Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1148)

Side by Side Diff: openssl/crypto/asn1/a_dup.c

Issue 9254031: Upgrade chrome's OpenSSL to same version Android ships with. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/openssl/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « openssl/crypto/asn1/a_bitstr.c ('k') | openssl/crypto/asn1/a_gentm.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* crypto/asn1/a_dup.c */ 1 /* crypto/asn1/a_dup.c */
2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * This package is an SSL implementation written 5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com). 6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL. 7 * The implementation was written so as to conform with Netscapes SSL.
8 * 8 *
9 * This library is free for commercial and non-commercial use as long as 9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions 10 * the following conditions are aheared to. The following conditions
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 * copied and put under another distribution licence 55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59 #include <stdio.h> 59 #include <stdio.h>
60 #include "cryptlib.h" 60 #include "cryptlib.h"
61 #include <openssl/asn1.h> 61 #include <openssl/asn1.h>
62 62
63 #ifndef NO_OLD_ASN1 63 #ifndef NO_OLD_ASN1
64 64
65 void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, char *x) 65 void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x)
66 { 66 {
67 unsigned char *b,*p; 67 unsigned char *b,*p;
68 const unsigned char *p2; 68 const unsigned char *p2;
69 int i; 69 int i;
70 char *ret; 70 char *ret;
71 71
72 if (x == NULL) return(NULL); 72 if (x == NULL) return(NULL);
73 73
74 i=i2d(x,NULL); 74 i=i2d(x,NULL);
75 b=OPENSSL_malloc(i+10); 75 b=OPENSSL_malloc(i+10);
(...skipping 24 matching lines...) Expand all
100 if (x == NULL) return(NULL); 100 if (x == NULL) return(NULL);
101 101
102 i=ASN1_item_i2d(x,&b,it); 102 i=ASN1_item_i2d(x,&b,it);
103 if (b == NULL) 103 if (b == NULL)
104 { ASN1err(ASN1_F_ASN1_ITEM_DUP,ERR_R_MALLOC_FAILURE); return(NUL L); } 104 { ASN1err(ASN1_F_ASN1_ITEM_DUP,ERR_R_MALLOC_FAILURE); return(NUL L); }
105 p= b; 105 p= b;
106 ret=ASN1_item_d2i(NULL,&p,i, it); 106 ret=ASN1_item_d2i(NULL,&p,i, it);
107 OPENSSL_free(b); 107 OPENSSL_free(b);
108 return(ret); 108 return(ret);
109 } 109 }
OLDNEW
« no previous file with comments | « openssl/crypto/asn1/a_bitstr.c ('k') | openssl/crypto/asn1/a_gentm.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698