Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -5472,6 +5472,14 @@ int ProcessBuffer(WOLFSSL_CTX* ctx, const unsigned char* buff,
case RSAk:
#ifdef HAVE_PK_CALLBACKS
keyType = rsa_sa_algo;
#endif
#ifdef HAVE_PKCS11
if (ctx) {
ctx->privateKeyType = rsa_sa_algo;
}
else {
ssl->buffers.keyType = rsa_sa_algo;
}
#endif
/* Determine RSA key size by parsing public key */
idx = 0;
Expand Down Expand Up @@ -5500,6 +5508,14 @@ int ProcessBuffer(WOLFSSL_CTX* ctx, const unsigned char* buff,
case ECDSAk:
#ifdef HAVE_PK_CALLBACKS
keyType = ecc_dsa_sa_algo;
#endif
#ifdef HAVE_PKCS11
if (ctx) {
ctx->privateKeyType = ecc_dsa_sa_algo;
}
else {
ssl->buffers.keyType = ecc_dsa_sa_algo;
}
#endif
/* Determine ECC key size based on curve */
keySz = wc_ecc_get_curve_size_from_id(
Expand All @@ -5525,6 +5541,14 @@ int ProcessBuffer(WOLFSSL_CTX* ctx, const unsigned char* buff,
case ED25519k:
#ifdef HAVE_PK_CALLBACKS
keyType = ed25519_sa_algo;
#endif
#ifdef HAVE_PKCS11
if (ctx) {
ctx->privateKeyType = ed25519_sa_algo;
}
else {
ssl->buffers.keyType = ed25519_sa_algo;
}
#endif
/* ED25519 is fixed key size */
keySz = ED25519_KEY_SIZE;
Expand Down