krb5: implement draft-ietf-kitten-aes-cts-hmac-sha2-07
This commit is contained in:
@@ -107,24 +107,24 @@ test_pkcs5_pbe2(const struct tests *t)
|
||||
unsigned char key[32];
|
||||
int ret, error = 0;
|
||||
|
||||
ret = PKCS5_PBKDF2_HMAC_SHA1(t->password, strlen(t->password),
|
||||
t->salt, strlen(t->salt),
|
||||
t->iterations,
|
||||
16, key);
|
||||
ret = PKCS5_PBKDF2_HMAC(t->password, strlen(t->password),
|
||||
t->salt, strlen(t->salt),
|
||||
t->iterations, EVP_sha1(),
|
||||
16, key);
|
||||
if (ret != 1)
|
||||
errx(1, "PKCS5_PBKDF2_HMAC_SHA1: %d", ret);
|
||||
errx(1, "PKCS5_PBKDF2_HMAC: %d", ret);
|
||||
|
||||
if (memcmp(t->pbkdf2_128, key, 16) != 0) {
|
||||
printf("incorrect 128 key\n");
|
||||
error++;
|
||||
}
|
||||
|
||||
ret = PKCS5_PBKDF2_HMAC_SHA1(t->password, strlen(t->password),
|
||||
t->salt, strlen(t->salt),
|
||||
t->iterations,
|
||||
32, key);
|
||||
ret = PKCS5_PBKDF2_HMAC(t->password, strlen(t->password),
|
||||
t->salt, strlen(t->salt),
|
||||
t->iterations, EVP_sha1(),
|
||||
32, key);
|
||||
if (ret != 1)
|
||||
errx(1, "PKCS5_PBKDF2_HMAC_SHA1: %d", ret);
|
||||
errx(1, "PKCS5_PBKDF2_HMAC: %d", ret);
|
||||
|
||||
if (memcmp(t->pbkdf2_256, key, 32) != 0) {
|
||||
printf("incorrect 256 key\n");
|
||||
|
Reference in New Issue
Block a user