Skip to content

Commit 72b6074

Browse files
committed
Fixes in pk.c
1 parent 8970ff4 commit 72b6074

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/pk.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2559,7 +2559,7 @@ int SetRsaInternal(WOLFSSL_RSA* rsa)
25592559
}
25602560

25612561
/* Copy down d mod q-1 if available. */
2562-
if ((ret == 1) && (rsa->dmp1 != NULL) &&
2562+
if ((ret == 1) && (rsa->dmq1 != NULL) &&
25632563
(wolfssl_bn_get_value(rsa->dmq1, &key->dQ) != 1)) {
25642564
WOLFSSL_ERROR_MSG("rsa dQ key error");
25652565
ret = -1;
@@ -3419,7 +3419,7 @@ int wolfSSL_RSA_padding_add_PKCS1_PSS(WOLFSSL_RSA *rsa, unsigned char *em,
34193419
if (ret == 1) {
34203420
/* Get length of RSA key - encrypted message length. */
34213421
emLen = wolfSSL_RSA_size(rsa);
3422-
if (ret <= 0) {
3422+
if (emLen <= 0) {
34233423
WOLFSSL_ERROR_MSG("wolfSSL_RSA_size error");
34243424
ret = 0;
34253425
}
@@ -8569,7 +8569,7 @@ int wolfSSL_DH_compute_key(unsigned char* key, const WOLFSSL_BIGNUM* otherPub,
85698569
if (ret == 0) {
85708570
/* Get the public key into the array. */
85718571
pubSz = wolfSSL_BN_bn2bin(otherPub, pub);
8572-
if (privSz <= 0) {
8572+
if (pubSz <= 0) {
85738573
ret = -1;
85748574
}
85758575
}

0 commit comments

Comments
 (0)