Skip to content
Merged
Show file tree
Hide file tree
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
226 changes: 191 additions & 35 deletions src/wp_aes_aead.c

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/wp_ecc_kmgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2913,7 +2913,9 @@ static int wp_ecc_encode_priv(const wp_Ecc *ecc, unsigned char* keyData,

WOLFPROV_ENTER(WP_LOG_COMP_ECC, "wp_ecc_encode_priv");

PRIVATE_KEY_UNLOCK();
rc = wc_EccKeyToDer((ecc_key*)&ecc->key, keyData, len);
PRIVATE_KEY_LOCK();
if (rc <= 0) {
ok = 0;
}
Expand Down
2 changes: 2 additions & 0 deletions src/wp_ecx_kmgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2454,7 +2454,9 @@ static int wp_ecx_encode(wp_EcxEncDecCtx* ctx, OSSL_CORE_BIO *cBio,
}

if (ok) {
PRIVATE_KEY_UNLOCK();
rc = ctx->encode((void*)&ecx->key, derData, sizeof(derData));
PRIVATE_KEY_LOCK();
if (rc <= 0) {
ok = 0;
}
Expand Down
4 changes: 4 additions & 0 deletions src/wp_rsa_kmgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -3443,7 +3443,9 @@ static int wp_rsa_encode_pki(const wp_Rsa* rsa, unsigned char* keyData,
}
}
if (ok) {
PRIVATE_KEY_UNLOCK();
ret = wc_RsaKeyToDer((RsaKey*)&rsa->key, pkcs1Data, (word32)pkcs1Len);
PRIVATE_KEY_LOCK();
if (ret <= 0) {
ok = 0;
}
Expand Down Expand Up @@ -3537,7 +3539,9 @@ static int wp_rsa_encode_priv(const wp_Rsa* rsa, unsigned char* keyData,

WOLFPROV_ENTER(WP_LOG_COMP_RSA, "wp_rsa_encode_priv");

PRIVATE_KEY_UNLOCK();
ret = wc_RsaKeyToDer((RsaKey*)&rsa->key, keyData, (word32)*keyLen);
PRIVATE_KEY_LOCK();
if (ret <= 0) {
ok = 0;
}
Expand Down
Loading
Loading