Added Ed25519 support (#44696)

This commit is contained in:
Francis Dupont
2017-07-31 15:26:00 +02:00
parent 93ae9a09a9
commit 9b9182fe00
57 changed files with 3462 additions and 74 deletions

View File

@@ -95,8 +95,19 @@ isc_hmacmd5_init(isc_hmacmd5_t *ctx, const unsigned char *key,
{ CKA_SIGN, &truevalue, (CK_ULONG) sizeof(truevalue) },
{ CKA_VALUE, NULL, (CK_ULONG) len }
};
#ifdef PK11_PAD_HMAC_KEYS
CK_BYTE keypad[ISC_MD5_DIGESTLENGTH];
if (len < ISC_MD5_DIGESTLENGTH) {
memset(keypad, 0, ISC_MD5_DIGESTLENGTH);
memmove(keypad, key, len);
keyTemplate[5].pValue = keypad;
keyTemplate[5].ulValueLen = ISC_MD5_DIGESTLENGTH;
} else
DE_CONST(key, keyTemplate[5].pValue);
#else
DE_CONST(key, keyTemplate[5].pValue);
#endif
RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, ISC_TRUE, ISC_FALSE,
ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
ctx->object = CK_INVALID_HANDLE;