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/asn1/n_pkey.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/asn1/n_pkey.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/n_pkey.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/asn1/n_pkey.c b/src/lib/libcrypto/asn1/n_pkey.c index 9146ee02c9..766b51c538 100644 --- a/src/lib/libcrypto/asn1/n_pkey.c +++ b/src/lib/libcrypto/asn1/n_pkey.c | |||
| @@ -187,7 +187,7 @@ int i2d_RSA_NET(const RSA *a, unsigned char **pp, int (*cb)(), int sgckey) | |||
| 187 | i2d_NETSCAPE_PKEY(pkey,&zz); | 187 | i2d_NETSCAPE_PKEY(pkey,&zz); |
| 188 | 188 | ||
| 189 | /* Wipe the private key encoding */ | 189 | /* Wipe the private key encoding */ |
| 190 | memset(pkey->private_key->data, 0, rsalen); | 190 | OPENSSL_cleanse(pkey->private_key->data, rsalen); |
| 191 | 191 | ||
| 192 | if (cb == NULL) | 192 | if (cb == NULL) |
| 193 | cb=EVP_read_pw_string; | 193 | cb=EVP_read_pw_string; |
| @@ -206,7 +206,7 @@ int i2d_RSA_NET(const RSA *a, unsigned char **pp, int (*cb)(), int sgckey) | |||
| 206 | } | 206 | } |
| 207 | 207 | ||
| 208 | EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL); | 208 | EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL); |
| 209 | memset(buf,0,256); | 209 | OPENSSL_cleanse(buf,256); |
| 210 | 210 | ||
| 211 | /* Encrypt private key in place */ | 211 | /* Encrypt private key in place */ |
| 212 | zz = enckey->enckey->digest->data; | 212 | zz = enckey->enckey->digest->data; |
| @@ -294,7 +294,7 @@ static RSA *d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os, | |||
| 294 | } | 294 | } |
| 295 | 295 | ||
| 296 | EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL); | 296 | EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL); |
| 297 | memset(buf,0,256); | 297 | OPENSSL_cleanse(buf,256); |
| 298 | 298 | ||
| 299 | EVP_CIPHER_CTX_init(&ctx); | 299 | EVP_CIPHER_CTX_init(&ctx); |
| 300 | EVP_DecryptInit_ex(&ctx,EVP_rc4(),NULL, key,NULL); | 300 | EVP_DecryptInit_ex(&ctx,EVP_rc4(),NULL, key,NULL); |
