TLS/SSL and crypto library
Revisión | 739a5eee619fc8c03736140828891b369f8690f4 (tree) |
---|---|
Tiempo | 2015-01-22 18:20:10 |
Autor | Matt Caswell <matt@open...> |
Commiter | Matt Caswell |
Rerun util/openssl-format-source -v -c .
Reviewed-by: Tim Hudson <tjh@openssl.org>
@@ -344,7 +344,9 @@ IMPLEMENT_ASN1_FUNCTIONS(X509_REVOKED) | ||
344 | 344 | IMPLEMENT_ASN1_DUP_FUNCTION(X509_REVOKED) |
345 | 345 | |
346 | 346 | IMPLEMENT_ASN1_FUNCTIONS(X509_CRL_INFO) |
347 | + | |
347 | 348 | IMPLEMENT_ASN1_FUNCTIONS(X509_CRL) |
349 | + | |
348 | 350 | IMPLEMENT_ASN1_DUP_FUNCTION(X509_CRL) |
349 | 351 | |
350 | 352 | static int X509_REVOKED_cmp(const X509_REVOKED *const *a, |
@@ -511,4 +513,5 @@ IMPLEMENT_STACK_OF(X509_REVOKED) | ||
511 | 513 | IMPLEMENT_ASN1_SET_OF(X509_REVOKED) |
512 | 514 | |
513 | 515 | IMPLEMENT_STACK_OF(X509_CRL) |
516 | + | |
514 | 517 | IMPLEMENT_ASN1_SET_OF(X509_CRL) |
@@ -239,8 +239,7 @@ static int file_read(BIO *b, char *out, int outl) | ||
239 | 239 | else |
240 | 240 | ret = fread(out, 1, (int)outl, (FILE *)b->ptr); |
241 | 241 | if (ret == 0 |
242 | - && (b-> | |
243 | - flags & BIO_FLAGS_UPLINK) ? UP_ferror((FILE *)b->ptr) : | |
242 | + && (b->flags & BIO_FLAGS_UPLINK) ? UP_ferror((FILE *)b->ptr) : | |
244 | 243 | ferror((FILE *)b->ptr)) { |
245 | 244 | SYSerr(SYS_F_FREAD, get_last_sys_error()); |
246 | 245 | BIOerr(BIO_F_FILE_READ, ERR_R_SYS_LIB); |
@@ -190,6 +190,7 @@ RSA *PEM_read_RSAPrivateKey(FILE *fp, RSA **rsa, pem_password_cb *cb, void *u) | ||
190 | 190 | IMPLEMENT_PEM_write_cb_const(RSAPrivateKey, RSA, PEM_STRING_RSA, |
191 | 191 | RSAPrivateKey) |
192 | 192 | |
193 | + | |
193 | 194 | IMPLEMENT_PEM_rw_const(RSAPublicKey, RSA, PEM_STRING_RSA_PUBLIC, |
194 | 195 | RSAPublicKey) IMPLEMENT_PEM_rw(RSA_PUBKEY, RSA, |
195 | 196 | PEM_STRING_PUBLIC, |
@@ -881,9 +881,8 @@ static int RSA_eay_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) | ||
881 | 881 | goto err; |
882 | 882 | |
883 | 883 | if (rsa->e && rsa->n) { |
884 | - if (!rsa-> | |
885 | - meth->bn_mod_exp(vrfy, r0, rsa->e, rsa->n, ctx, | |
886 | - rsa->_method_mod_n)) | |
884 | + if (!rsa->meth->bn_mod_exp(vrfy, r0, rsa->e, rsa->n, ctx, | |
885 | + rsa->_method_mod_n)) | |
887 | 886 | goto err; |
888 | 887 | /* |
889 | 888 | * If 'I' was greater than (or equal to) rsa->n, the operation will |
@@ -491,8 +491,7 @@ int dtls1_accept(SSL *s) | ||
491 | 491 | || ((alg_k & SSL_kRSA) |
492 | 492 | && (s->cert->pkeys[SSL_PKEY_RSA_ENC].privatekey == NULL |
493 | 493 | || (SSL_C_IS_EXPORT(s->s3->tmp.new_cipher) |
494 | - && EVP_PKEY_size(s->cert-> | |
495 | - pkeys | |
494 | + && EVP_PKEY_size(s->cert->pkeys | |
496 | 495 | [SSL_PKEY_RSA_ENC].privatekey) * |
497 | 496 | 8 > SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher) |
498 | 497 | ) |
@@ -710,8 +710,7 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len) | ||
710 | 710 | u_len >= 4 * (max_send_fragment = s->max_send_fragment) && |
711 | 711 | s->compress == NULL && s->msg_callback == NULL && |
712 | 712 | !SSL_USE_ETM(s) && SSL_USE_EXPLICIT_IV(s) && |
713 | - EVP_CIPHER_flags(s-> | |
714 | - enc_write_ctx->cipher) & | |
713 | + EVP_CIPHER_flags(s->enc_write_ctx->cipher) & | |
715 | 714 | EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK) { |
716 | 715 | unsigned char aad[13]; |
717 | 716 | EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM mb_param; |
@@ -921,8 +920,7 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf, | ||
921 | 920 | #if 0 && !defined(OPENSSL_NO_MULTIBLOCK) && EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK |
922 | 921 | if (type == SSL3_RT_APPLICATION_DATA && s->compress == NULL && |
923 | 922 | !SSL_USE_ETM(s) && SSL_USE_EXPLICIT_IV(s) && |
924 | - EVP_CIPHER_flags(s-> | |
925 | - enc_write_ctx->cipher) & | |
923 | + EVP_CIPHER_flags(s->enc_write_ctx->cipher) & | |
926 | 924 | EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK) |
927 | 925 | do { |
928 | 926 | unsigned char aad[13]; |
@@ -480,8 +480,7 @@ int ssl3_accept(SSL *s) | ||
480 | 480 | || ((alg_k & SSL_kRSA) |
481 | 481 | && (s->cert->pkeys[SSL_PKEY_RSA_ENC].privatekey == NULL |
482 | 482 | || (SSL_C_IS_EXPORT(s->s3->tmp.new_cipher) |
483 | - && EVP_PKEY_size(s->cert-> | |
484 | - pkeys | |
483 | + && EVP_PKEY_size(s->cert->pkeys | |
485 | 484 | [SSL_PKEY_RSA_ENC].privatekey) * |
486 | 485 | 8 > SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher) |
487 | 486 | ) |
@@ -468,8 +468,7 @@ int ssl_get_prev_session(SSL *s, unsigned char *session_id, int len, | ||
468 | 468 | |
469 | 469 | if (try_session_cache && |
470 | 470 | ret == NULL && |
471 | - !(s-> | |
472 | - session_ctx->session_cache_mode & | |
471 | + !(s->session_ctx->session_cache_mode & | |
473 | 472 | SSL_SESS_CACHE_NO_INTERNAL_LOOKUP)) { |
474 | 473 | SSL_SESSION data; |
475 | 474 | data.ssl_version = s->version; |
@@ -510,8 +509,7 @@ int ssl_get_prev_session(SSL *s, unsigned char *session_id, int len, | ||
510 | 509 | * well if and only if we are supposed to. |
511 | 510 | */ |
512 | 511 | if (! |
513 | - (s-> | |
514 | - session_ctx->session_cache_mode & | |
512 | + (s->session_ctx->session_cache_mode & | |
515 | 513 | SSL_SESS_CACHE_NO_INTERNAL_STORE)) |
516 | 514 | /* |
517 | 515 | * The following should not return 1, otherwise, things are |