diff options
| author | markus <> | 2003-05-11 21:36:58 +0000 |
|---|---|---|
| committer | markus <> | 2003-05-11 21:36:58 +0000 |
| commit | 1c98a87f0daac81245653c227eb2f2508a22a965 (patch) | |
| tree | 3de6d603296ec563b936da4e6a8a1e33d48f8884 /src/lib/libcrypto/rsa/rsa_saos.c | |
| parent | 31392c89d1135cf2a416f97295f6d21681b3fbc4 (diff) | |
| download | openbsd-1c98a87f0daac81245653c227eb2f2508a22a965.tar.gz openbsd-1c98a87f0daac81245653c227eb2f2508a22a965.tar.bz2 openbsd-1c98a87f0daac81245653c227eb2f2508a22a965.zip | |
import 0.9.7b (without idea and rc5)
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_saos.c')
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_saos.c | 6 |
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; |
| 140 | err: | 140 | err: |
| 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 | } |
