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

Side by Side Diff: openssl/ssl/s2_srvr.c

Issue 59083010: third_party/openssl: add ChaCha20+Poly1305 support. Base URL: https://chromium.googlesource.com/chromium/deps/openssl.git@master
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « openssl/ssl/s2_enc.c ('k') | openssl/ssl/s3_enc.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 /* ssl/s2_srvr.c */ 1 /* ssl/s2_srvr.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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR); 445 ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR);
446 SSLerr(SSL_F_GET_CLIENT_MASTER_KEY,SSL_R_NO_PRIVATEKEY); 446 SSLerr(SSL_F_GET_CLIENT_MASTER_KEY,SSL_R_NO_PRIVATEKEY);
447 return(-1); 447 return(-1);
448 } 448 }
449 i=ssl_rsa_private_decrypt(s->cert,s->s2->tmp.enc, 449 i=ssl_rsa_private_decrypt(s->cert,s->s2->tmp.enc,
450 &(p[s->s2->tmp.clear]),&(p[s->s2->tmp.clear]), 450 &(p[s->s2->tmp.clear]),&(p[s->s2->tmp.clear]),
451 (s->s2->ssl2_rollback)?RSA_SSLV23_PADDING:RSA_PKCS1_PADDING); 451 (s->s2->ssl2_rollback)?RSA_SSLV23_PADDING:RSA_PKCS1_PADDING);
452 452
453 is_export=SSL_C_IS_EXPORT(s->session->cipher); 453 is_export=SSL_C_IS_EXPORT(s->session->cipher);
454 454
455 » if (!ssl_cipher_get_evp(s->session,&c,&md,NULL,NULL,NULL)) 455 » if (!ssl_cipher_get_evp(s->session,&c,&md,NULL,NULL))
456 { 456 {
457 ssl2_return_error(s,SSL2_PE_NO_CIPHER); 457 ssl2_return_error(s,SSL2_PE_NO_CIPHER);
458 SSLerr(SSL_F_GET_CLIENT_MASTER_KEY,SSL_R_PROBLEMS_MAPPING_CIPHER _FUNCTIONS); 458 SSLerr(SSL_F_GET_CLIENT_MASTER_KEY,SSL_R_PROBLEMS_MAPPING_CIPHER _FUNCTIONS);
459 return(0); 459 return(0);
460 } 460 }
461 461
462 if (s->session->cipher->algorithm2 & SSL2_CF_8_BYTE_ENC) 462 if (s->session->cipher->algorithm2 & SSL2_CF_8_BYTE_ENC)
463 { 463 {
464 is_export=1; 464 is_export=1;
465 ek=8; 465 ek=8;
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 SSLerr(SSL_F_SSL_RSA_PRIVATE_DECRYPT,ERR_R_RSA_LIB); 1139 SSLerr(SSL_F_SSL_RSA_PRIVATE_DECRYPT,ERR_R_RSA_LIB);
1140 return(i); 1140 return(i);
1141 } 1141 }
1142 #else /* !OPENSSL_NO_SSL2 */ 1142 #else /* !OPENSSL_NO_SSL2 */
1143 1143
1144 # if PEDANTIC 1144 # if PEDANTIC
1145 static void *dummy=&dummy; 1145 static void *dummy=&dummy;
1146 # endif 1146 # endif
1147 1147
1148 #endif 1148 #endif
OLDNEW
« no previous file with comments | « openssl/ssl/s2_enc.c ('k') | openssl/ssl/s3_enc.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698