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

Side by Side Diff: openssl/crypto/x509/x509type.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/x509/x509name.c ('k') | openssl/crypto/x509/x_all.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/x509/x509type.c */ 1 /* crypto/x509/x509type.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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 ret|=EVP_PKT_ENC; 84 ret|=EVP_PKT_ENC;
85 break; 85 break;
86 case EVP_PKEY_DSA: 86 case EVP_PKEY_DSA:
87 ret=EVP_PK_DSA|EVP_PKT_SIGN; 87 ret=EVP_PK_DSA|EVP_PKT_SIGN;
88 break; 88 break;
89 case EVP_PKEY_EC: 89 case EVP_PKEY_EC:
90 ret=EVP_PK_EC|EVP_PKT_SIGN|EVP_PKT_EXCH; 90 ret=EVP_PK_EC|EVP_PKT_SIGN|EVP_PKT_EXCH;
91 break; 91 break;
92 case EVP_PKEY_DH: 92 case EVP_PKEY_DH:
93 ret=EVP_PK_DH|EVP_PKT_EXCH; 93 ret=EVP_PK_DH|EVP_PKT_EXCH;
94 break;
95 case NID_id_GostR3410_94:
96 case NID_id_GostR3410_2001:
97 ret=EVP_PKT_EXCH|EVP_PKT_SIGN;
94 break; 98 break;
95 default: 99 default:
96 break; 100 break;
97 } 101 }
98 102
99 i=X509_get_signature_type(x); 103 i=X509_get_signature_type(x);
100 switch (i) 104 switch (i)
101 { 105 {
102 case EVP_PKEY_RSA: 106 case EVP_PKEY_RSA:
103 ret|=EVP_PKS_RSA; 107 ret|=EVP_PKS_RSA;
104 break; 108 break;
105 case EVP_PKEY_DSA: 109 case EVP_PKEY_DSA:
106 ret|=EVP_PKS_DSA; 110 ret|=EVP_PKS_DSA;
107 break; 111 break;
108 case EVP_PKEY_EC: 112 case EVP_PKEY_EC:
109 ret|=EVP_PKS_EC; 113 ret|=EVP_PKS_EC;
110 break; 114 break;
111 default: 115 default:
112 break; 116 break;
113 } 117 }
114 118
115 if (EVP_PKEY_size(pk) <= 1024/8)/* /8 because it's 1024 bits we look 119 if (EVP_PKEY_size(pk) <= 1024/8)/* /8 because it's 1024 bits we look
116 for, not bytes */ 120 for, not bytes */
117 ret|=EVP_PKT_EXP; 121 ret|=EVP_PKT_EXP;
118 if(pkey==NULL) EVP_PKEY_free(pk); 122 if(pkey==NULL) EVP_PKEY_free(pk);
119 return(ret); 123 return(ret);
120 } 124 }
121 125
OLDNEW
« no previous file with comments | « openssl/crypto/x509/x509name.c ('k') | openssl/crypto/x509/x_all.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698