summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa/rsa_saos.c
diff options
context:
space:
mode:
authormarkus <>2003-05-12 02:18:40 +0000
committermarkus <>2003-05-12 02:18:40 +0000
commitd4fcd82bb7f6d603bd61e19a81ba97337b89dfca (patch)
treed52e3a0f1f08f65ad283027e560e17ed0d720462 /src/lib/libcrypto/rsa/rsa_saos.c
parent582bbd139cd2afd58d10dc051c5b0b989b441074 (diff)
downloadopenbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.tar.gz
openbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.tar.bz2
openbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.zip
merge 0.9.7b with local changes; crank majors for libssl/libcrypto
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_saos.c')
-rw-r--r--src/lib/libcrypto/rsa/rsa_saos.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_saos.c b/src/lib/libcrypto/rsa/rsa_saos.c
index 85adacc08f..f462716a57 100644
--- a/src/lib/libcrypto/rsa/rsa_saos.c
+++ b/src/lib/libcrypto/rsa/rsa_saos.c
@@ -77,7 +77,7 @@ int RSA_sign_ASN1_OCTET_STRING(int type,
77 77
78 i=i2d_ASN1_OCTET_STRING(&sig,NULL); 78 i=i2d_ASN1_OCTET_STRING(&sig,NULL);
79 j=RSA_size(rsa); 79 j=RSA_size(rsa);
80 if ((i-RSA_PKCS1_PADDING) > j) 80 if (i > (j-RSA_PKCS1_PADDING_SIZE))
81 { 81 {
82 RSAerr(RSA_F_RSA_SIGN_ASN1_OCTET_STRING,RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY); 82 RSAerr(RSA_F_RSA_SIGN_ASN1_OCTET_STRING,RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY);
83 return(0); 83 return(0);
@@ -96,7 +96,7 @@ int RSA_sign_ASN1_OCTET_STRING(int type,
96 else 96 else
97 *siglen=i; 97 *siglen=i;
98 98
99 memset(s,0,(unsigned int)j+1); 99 OPENSSL_cleanse(s,(unsigned int)j+1);
100 OPENSSL_free(s); 100 OPENSSL_free(s);
101 return(ret); 101 return(ret);
102 } 102 }
@@ -139,7 +139,7 @@ int RSA_verify_ASN1_OCTET_STRING(int dtype,
139 ret=1; 139 ret=1;
140err: 140err:
141 if (sig != NULL) M_ASN1_OCTET_STRING_free(sig); 141 if (sig != NULL) M_ASN1_OCTET_STRING_free(sig);
142 memset(s,0,(unsigned int)siglen); 142 OPENSSL_cleanse(s,(unsigned int)siglen);
143 OPENSSL_free(s); 143 OPENSSL_free(s);
144 return(ret); 144 return(ret);
145 } 145 }