summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/asn1/n_pkey.c8
-rw-r--r--src/lib/libssl/src/crypto/asn1/n_pkey.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libcrypto/asn1/n_pkey.c b/src/lib/libcrypto/asn1/n_pkey.c
index 1a724cfed7..5c6181b04c 100644
--- a/src/lib/libcrypto/asn1/n_pkey.c
+++ b/src/lib/libcrypto/asn1/n_pkey.c
@@ -189,7 +189,7 @@ i2d_RSA_NET(const RSA *a, unsigned char **pp,
189 189
190 if (cb == NULL) 190 if (cb == NULL)
191 cb = EVP_read_pw_string; 191 cb = EVP_read_pw_string;
192 i = cb((char *)buf, 256, "Enter Private Key password:", 1); 192 i = cb((char *)buf, sizeof(buf), "Enter Private Key password:", 1);
193 if (i != 0) { 193 if (i != 0) {
194 ASN1err(ASN1_F_I2D_RSA_NET, ASN1_R_BAD_PASSWORD_READ); 194 ASN1err(ASN1_F_I2D_RSA_NET, ASN1_R_BAD_PASSWORD_READ);
195 goto err; 195 goto err;
@@ -205,7 +205,7 @@ i2d_RSA_NET(const RSA *a, unsigned char **pp,
205 205
206 if (!EVP_BytesToKey(EVP_rc4(), EVP_md5(), NULL, buf, i,1, key, NULL)) 206 if (!EVP_BytesToKey(EVP_rc4(), EVP_md5(), NULL, buf, i,1, key, NULL))
207 goto err; 207 goto err;
208 OPENSSL_cleanse(buf, 256); 208 OPENSSL_cleanse(buf, sizeof(buf));
209 209
210 /* Encrypt private key in place */ 210 /* Encrypt private key in place */
211 zz = enckey->enckey->digest->data; 211 zz = enckey->enckey->digest->data;
@@ -286,7 +286,7 @@ d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os,
286 EVP_CIPHER_CTX ctx; 286 EVP_CIPHER_CTX ctx;
287 EVP_CIPHER_CTX_init(&ctx); 287 EVP_CIPHER_CTX_init(&ctx);
288 288
289 i=cb((char *)buf,256, "Enter Private Key password:",0); 289 i=cb((char *)buf, sizeof(buf), "Enter Private Key password:",0);
290 if (i != 0) { 290 if (i != 0) {
291 ASN1err(ASN1_F_D2I_RSA_NET_2, ASN1_R_BAD_PASSWORD_READ); 291 ASN1err(ASN1_F_D2I_RSA_NET_2, ASN1_R_BAD_PASSWORD_READ);
292 goto err; 292 goto err;
@@ -302,7 +302,7 @@ d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os,
302 302
303 if (!EVP_BytesToKey(EVP_rc4(), EVP_md5(), NULL, buf, i,1, key, NULL)) 303 if (!EVP_BytesToKey(EVP_rc4(), EVP_md5(), NULL, buf, i,1, key, NULL))
304 goto err; 304 goto err;
305 OPENSSL_cleanse(buf, 256); 305 OPENSSL_cleanse(buf, sizeof(buf));
306 306
307 if (!EVP_DecryptInit_ex(&ctx, EVP_rc4(), NULL, key, NULL)) 307 if (!EVP_DecryptInit_ex(&ctx, EVP_rc4(), NULL, key, NULL))
308 goto err; 308 goto err;
diff --git a/src/lib/libssl/src/crypto/asn1/n_pkey.c b/src/lib/libssl/src/crypto/asn1/n_pkey.c
index 1a724cfed7..5c6181b04c 100644
--- a/src/lib/libssl/src/crypto/asn1/n_pkey.c
+++ b/src/lib/libssl/src/crypto/asn1/n_pkey.c
@@ -189,7 +189,7 @@ i2d_RSA_NET(const RSA *a, unsigned char **pp,
189 189
190 if (cb == NULL) 190 if (cb == NULL)
191 cb = EVP_read_pw_string; 191 cb = EVP_read_pw_string;
192 i = cb((char *)buf, 256, "Enter Private Key password:", 1); 192 i = cb((char *)buf, sizeof(buf), "Enter Private Key password:", 1);
193 if (i != 0) { 193 if (i != 0) {
194 ASN1err(ASN1_F_I2D_RSA_NET, ASN1_R_BAD_PASSWORD_READ); 194 ASN1err(ASN1_F_I2D_RSA_NET, ASN1_R_BAD_PASSWORD_READ);
195 goto err; 195 goto err;
@@ -205,7 +205,7 @@ i2d_RSA_NET(const RSA *a, unsigned char **pp,
205 205
206 if (!EVP_BytesToKey(EVP_rc4(), EVP_md5(), NULL, buf, i,1, key, NULL)) 206 if (!EVP_BytesToKey(EVP_rc4(), EVP_md5(), NULL, buf, i,1, key, NULL))
207 goto err; 207 goto err;
208 OPENSSL_cleanse(buf, 256); 208 OPENSSL_cleanse(buf, sizeof(buf));
209 209
210 /* Encrypt private key in place */ 210 /* Encrypt private key in place */
211 zz = enckey->enckey->digest->data; 211 zz = enckey->enckey->digest->data;
@@ -286,7 +286,7 @@ d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os,
286 EVP_CIPHER_CTX ctx; 286 EVP_CIPHER_CTX ctx;
287 EVP_CIPHER_CTX_init(&ctx); 287 EVP_CIPHER_CTX_init(&ctx);
288 288
289 i=cb((char *)buf,256, "Enter Private Key password:",0); 289 i=cb((char *)buf, sizeof(buf), "Enter Private Key password:",0);
290 if (i != 0) { 290 if (i != 0) {
291 ASN1err(ASN1_F_D2I_RSA_NET_2, ASN1_R_BAD_PASSWORD_READ); 291 ASN1err(ASN1_F_D2I_RSA_NET_2, ASN1_R_BAD_PASSWORD_READ);
292 goto err; 292 goto err;
@@ -302,7 +302,7 @@ d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os,
302 302
303 if (!EVP_BytesToKey(EVP_rc4(), EVP_md5(), NULL, buf, i,1, key, NULL)) 303 if (!EVP_BytesToKey(EVP_rc4(), EVP_md5(), NULL, buf, i,1, key, NULL))
304 goto err; 304 goto err;
305 OPENSSL_cleanse(buf, 256); 305 OPENSSL_cleanse(buf, sizeof(buf));
306 306
307 if (!EVP_DecryptInit_ex(&ctx, EVP_rc4(), NULL, key, NULL)) 307 if (!EVP_DecryptInit_ex(&ctx, EVP_rc4(), NULL, key, NULL))
308 goto err; 308 goto err;