TLS/SSL and crypto library
Revision | 4bc991384404d05e49e3aa622c142c7b7d05ef7b (tree) |
---|---|
Zeit | 2015-01-22 18:46:26 |
Autor | Matt Caswell <matt@open...> |
Commiter | Matt Caswell |
Rerun util/openssl-format-source -v -c .
Reviewed-by: Tim Hudson <tjh@openssl.org>
@@ -344,6 +344,7 @@ IMPLEMENT_ASN1_FUNCTIONS(X509_REVOKED) | ||
344 | 344 | IMPLEMENT_ASN1_FUNCTIONS(X509_CRL_INFO) |
345 | 345 | |
346 | 346 | IMPLEMENT_ASN1_FUNCTIONS(X509_CRL) |
347 | + | |
347 | 348 | IMPLEMENT_ASN1_DUP_FUNCTION(X509_CRL) |
348 | 349 | |
349 | 350 | static int X509_REVOKED_cmp(const X509_REVOKED *const *a, |
@@ -510,4 +511,5 @@ IMPLEMENT_STACK_OF(X509_REVOKED) | ||
510 | 511 | IMPLEMENT_ASN1_SET_OF(X509_REVOKED) |
511 | 512 | |
512 | 513 | IMPLEMENT_STACK_OF(X509_CRL) |
514 | + | |
513 | 515 | IMPLEMENT_ASN1_SET_OF(X509_CRL) |
@@ -239,8 +239,7 @@ static int MS_CALLBACK 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); |
@@ -1650,9 +1650,8 @@ int ec_GFp_simple_points_make_affine(const EC_GROUP *group, size_t num, | ||
1650 | 1650 | |
1651 | 1651 | for (i = 1; i < num; i++) { |
1652 | 1652 | if (!BN_is_zero(&points[i]->Z)) { |
1653 | - if (!group-> | |
1654 | - meth->field_mul(group, prod_Z[i], prod_Z[i - 1], | |
1655 | - &points[i]->Z, ctx)) | |
1653 | + if (!group->meth->field_mul(group, prod_Z[i], prod_Z[i - 1], | |
1654 | + &points[i]->Z, ctx)) | |
1656 | 1655 | goto err; |
1657 | 1656 | } else { |
1658 | 1657 | if (!BN_copy(prod_Z[i], prod_Z[i - 1])) |
@@ -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, |
@@ -842,9 +842,8 @@ static int RSA_eay_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) | ||
842 | 842 | goto err; |
843 | 843 | |
844 | 844 | if (rsa->e && rsa->n) { |
845 | - if (!rsa-> | |
846 | - meth->bn_mod_exp(vrfy, r0, rsa->e, rsa->n, ctx, | |
847 | - rsa->_method_mod_n)) | |
845 | + if (!rsa->meth->bn_mod_exp(vrfy, r0, rsa->e, rsa->n, ctx, | |
846 | + rsa->_method_mod_n)) | |
848 | 847 | goto err; |
849 | 848 | /* |
850 | 849 | * If 'I' was greater than (or equal to) rsa->n, the operation will |
@@ -579,7 +579,9 @@ pushfd cld mov esi, ecx mov edi, ecx mov ecx, 60 up:lodsd | ||
579 | 579 | # if defined(NID_aes_256_ofb128) && ! defined (NID_aes_256_ofb) |
580 | 580 | # define NID_aes_256_ofb NID_aes_256_ofb128 |
581 | 581 | # endif |
582 | -/* List of supported ciphers. */ static int padlock_cipher_nids[] = { | |
582 | +/* | |
583 | + * List of supported ciphers. | |
584 | + */ static int padlock_cipher_nids[] = { | |
583 | 585 | NID_aes_128_ecb, |
584 | 586 | NID_aes_128_cbc, |
585 | 587 | NID_aes_128_cfb, |
@@ -394,8 +394,7 @@ int dtls1_accept(SSL *s) | ||
394 | 394 | || ((alg_k & SSL_kRSA) |
395 | 395 | && (s->cert->pkeys[SSL_PKEY_RSA_ENC].privatekey == NULL |
396 | 396 | || (SSL_C_IS_EXPORT(s->s3->tmp.new_cipher) |
397 | - && EVP_PKEY_size(s->cert-> | |
398 | - pkeys | |
397 | + && EVP_PKEY_size(s->cert->pkeys | |
399 | 398 | [SSL_PKEY_RSA_ENC].privatekey) * |
400 | 399 | 8 > SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher) |
401 | 400 | ) |
@@ -484,8 +484,7 @@ static int get_client_master_key(SSL *s) | ||
484 | 484 | if ((i < 0) || ((!is_export && (i != EVP_CIPHER_key_length(c))) |
485 | 485 | || (is_export && ((i != ek) |
486 | 486 | || (s->s2->tmp.clear + |
487 | - (unsigned int)i != | |
488 | - (unsigned int) | |
487 | + (unsigned int)i != (unsigned int) | |
489 | 488 | EVP_CIPHER_key_length(c)))))) { |
490 | 489 | ERR_clear_error(); |
491 | 490 | if (is_export) |
@@ -3034,9 +3034,8 @@ SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt, | ||
3034 | 3034 | j++) { |
3035 | 3035 | if ((s->session->tlsext_ellipticcurvelist[2 * j] == |
3036 | 3036 | ec_search1) |
3037 | - && (s-> | |
3038 | - session->tlsext_ellipticcurvelist[2 * j + | |
3039 | - 1] == | |
3037 | + && (s->session->tlsext_ellipticcurvelist[2 * j + | |
3038 | + 1] == | |
3040 | 3039 | ec_search2)) { |
3041 | 3040 | ec_ok = 1; |
3042 | 3041 | break; |
@@ -3089,9 +3088,8 @@ SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt, | ||
3089 | 3088 | j++) { |
3090 | 3089 | if ((s->session->tlsext_ellipticcurvelist[2 * j] == |
3091 | 3090 | ec_search1) |
3092 | - && (s-> | |
3093 | - session->tlsext_ellipticcurvelist[2 * j + | |
3094 | - 1] == | |
3091 | + && (s->session->tlsext_ellipticcurvelist[2 * j + | |
3092 | + 1] == | |
3095 | 3093 | ec_search2)) { |
3096 | 3094 | ec_ok = 1; |
3097 | 3095 | break; |
@@ -402,8 +402,7 @@ int ssl3_accept(SSL *s) | ||
402 | 402 | || ((alg_k & SSL_kRSA) |
403 | 403 | && (s->cert->pkeys[SSL_PKEY_RSA_ENC].privatekey == NULL |
404 | 404 | || (SSL_C_IS_EXPORT(s->s3->tmp.new_cipher) |
405 | - && EVP_PKEY_size(s->cert-> | |
406 | - pkeys | |
405 | + && EVP_PKEY_size(s->cert->pkeys | |
407 | 406 | [SSL_PKEY_RSA_ENC].privatekey) * |
408 | 407 | 8 > SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher) |
409 | 408 | ) |
@@ -439,8 +439,7 @@ int ssl_get_prev_session(SSL *s, unsigned char *session_id, int len, | ||
439 | 439 | } else if (r == 0 || (!ret && !len)) |
440 | 440 | goto err; |
441 | 441 | else if (!ret |
442 | - && !(s-> | |
443 | - session_ctx->session_cache_mode & | |
442 | + && !(s->session_ctx->session_cache_mode & | |
444 | 443 | SSL_SESS_CACHE_NO_INTERNAL_LOOKUP)) |
445 | 444 | #else |
446 | 445 | if (len == 0) |
@@ -490,8 +489,7 @@ int ssl_get_prev_session(SSL *s, unsigned char *session_id, int len, | ||
490 | 489 | * well if and only if we are supposed to. |
491 | 490 | */ |
492 | 491 | if (! |
493 | - (s-> | |
494 | - session_ctx->session_cache_mode & | |
492 | + (s->session_ctx->session_cache_mode & | |
495 | 493 | SSL_SESS_CACHE_NO_INTERNAL_STORE)) |
496 | 494 | /* |
497 | 495 | * The following should not return 1, otherwise, things are |