Deleted Added
full compact
n_pkey.c (160815) n_pkey.c (215697)
1/* crypto/asn1/n_pkey.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *

--- 228 unchanged lines hidden (view full) ---

237 return d2i_RSA_NET(a, pp, length, cb, 0);
238}
239
240RSA *d2i_RSA_NET(RSA **a, const unsigned char **pp, long length,
241 int (*cb)(char *buf, int len, const char *prompt, int verify),
242 int sgckey)
243 {
244 RSA *ret=NULL;
1/* crypto/asn1/n_pkey.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *

--- 228 unchanged lines hidden (view full) ---

237 return d2i_RSA_NET(a, pp, length, cb, 0);
238}
239
240RSA *d2i_RSA_NET(RSA **a, const unsigned char **pp, long length,
241 int (*cb)(char *buf, int len, const char *prompt, int verify),
242 int sgckey)
243 {
244 RSA *ret=NULL;
245 const unsigned char *p, *kp;
245 const unsigned char *p;
246 NETSCAPE_ENCRYPTED_PKEY *enckey = NULL;
247
248 p = *pp;
249
250 enckey = d2i_NETSCAPE_ENCRYPTED_PKEY(NULL, &p, length);
251 if(!enckey) {
252 ASN1err(ASN1_F_D2I_RSA_NET,ASN1_R_DECODING_ERROR);
253 return NULL;

--- 6 unchanged lines hidden (view full) ---

260 NETSCAPE_ENCRYPTED_PKEY_free(enckey);
261 return NULL;
262 }
263 if (OBJ_obj2nid(enckey->enckey->algor->algorithm) != NID_rc4)
264 {
265 ASN1err(ASN1_F_D2I_RSA_NET,ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM);
266 goto err;
267 }
246 NETSCAPE_ENCRYPTED_PKEY *enckey = NULL;
247
248 p = *pp;
249
250 enckey = d2i_NETSCAPE_ENCRYPTED_PKEY(NULL, &p, length);
251 if(!enckey) {
252 ASN1err(ASN1_F_D2I_RSA_NET,ASN1_R_DECODING_ERROR);
253 return NULL;

--- 6 unchanged lines hidden (view full) ---

260 NETSCAPE_ENCRYPTED_PKEY_free(enckey);
261 return NULL;
262 }
263 if (OBJ_obj2nid(enckey->enckey->algor->algorithm) != NID_rc4)
264 {
265 ASN1err(ASN1_F_D2I_RSA_NET,ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM);
266 goto err;
267 }
268 kp = enckey->enckey->digest->data;
269 if (cb == NULL)
270 cb=EVP_read_pw_string;
271 if ((ret=d2i_RSA_NET_2(a, enckey->enckey->digest,cb, sgckey)) == NULL) goto err;
272
273 *pp = p;
274
275 err:
276 NETSCAPE_ENCRYPTED_PKEY_free(enckey);

--- 68 unchanged lines hidden ---
268 if (cb == NULL)
269 cb=EVP_read_pw_string;
270 if ((ret=d2i_RSA_NET_2(a, enckey->enckey->digest,cb, sgckey)) == NULL) goto err;
271
272 *pp = p;
273
274 err:
275 NETSCAPE_ENCRYPTED_PKEY_free(enckey);

--- 68 unchanged lines hidden ---