Imported OpenSSL 1.1.1b

This commit is contained in:
Steve Dower
2019-03-07 09:36:23 -08:00
parent d6b2cd4920
commit 8f99635588
389 changed files with 7946 additions and 4431 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
* Copyright 2005 Nokia. All rights reserved.
*
@@ -1382,11 +1382,52 @@ int main(int argc, char *argv[])
goto end;
if (cipher != NULL) {
if (!SSL_CTX_set_cipher_list(c_ctx, cipher)
|| !SSL_CTX_set_cipher_list(s_ctx, cipher)
|| !SSL_CTX_set_cipher_list(s_ctx2, cipher)) {
ERR_print_errors(bio_err);
goto end;
if (strcmp(cipher, "") == 0) {
if (!SSL_CTX_set_cipher_list(c_ctx, cipher)) {
if (ERR_GET_REASON(ERR_peek_error()) == SSL_R_NO_CIPHER_MATCH) {
ERR_clear_error();
} else {
ERR_print_errors(bio_err);
goto end;
}
} else {
/* Should have failed when clearing all TLSv1.2 ciphers. */
fprintf(stderr, "CLEARING ALL TLSv1.2 CIPHERS SHOULD FAIL\n");
goto end;
}
if (!SSL_CTX_set_cipher_list(s_ctx, cipher)) {
if (ERR_GET_REASON(ERR_peek_error()) == SSL_R_NO_CIPHER_MATCH) {
ERR_clear_error();
} else {
ERR_print_errors(bio_err);
goto end;
}
} else {
/* Should have failed when clearing all TLSv1.2 ciphers. */
fprintf(stderr, "CLEARING ALL TLSv1.2 CIPHERS SHOULD FAIL\n");
goto end;
}
if (!SSL_CTX_set_cipher_list(s_ctx2, cipher)) {
if (ERR_GET_REASON(ERR_peek_error()) == SSL_R_NO_CIPHER_MATCH) {
ERR_clear_error();
} else {
ERR_print_errors(bio_err);
goto end;
}
} else {
/* Should have failed when clearing all TLSv1.2 ciphers. */
fprintf(stderr, "CLEARING ALL TLSv1.2 CIPHERS SHOULD FAIL\n");
goto end;
}
} else {
if (!SSL_CTX_set_cipher_list(c_ctx, cipher)
|| !SSL_CTX_set_cipher_list(s_ctx, cipher)
|| !SSL_CTX_set_cipher_list(s_ctx2, cipher)) {
ERR_print_errors(bio_err);
goto end;
}
}
}
if (ciphersuites != NULL) {