X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=test%2Ffatalerrtest.c;h=66731e640257778d1f51db62bbb8009bac35e472;hb=a8b2b52fe57249f5093e190eb40def9fed9c9627;hp=fe2071f6e298ee5bf4d0e8bf954127ca19158b7b;hpb=97652f0b3a557876462ef30373ac5eeeaa88b295;p=openssl.git diff --git a/test/fatalerrtest.c b/test/fatalerrtest.c index fe2071f6e2..66731e6402 100644 --- a/test/fatalerrtest.c +++ b/test/fatalerrtest.c @@ -1,5 +1,5 @@ /* - * Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -28,8 +28,9 @@ static int test_fatalerr(void) 0x17, 0x03, 0x03, 0x00, 0x05, 'D', 'u', 'm', 'm', 'y' }; - if (!TEST_true(create_ssl_ctx_pair(TLS_method(), TLS_method(), &sctx, &cctx, - cert, privkey))) + if (!TEST_true(create_ssl_ctx_pair(TLS_method(), TLS_method(), + TLS1_VERSION, TLS_MAX_VERSION, + &sctx, &cctx, cert, privkey))) goto err; /* @@ -38,6 +39,10 @@ static int test_fatalerr(void) */ if (!TEST_true(SSL_CTX_set_cipher_list(sctx, "AES128-SHA")) || !TEST_true(SSL_CTX_set_cipher_list(cctx, "AES256-SHA")) + || !TEST_true(SSL_CTX_set_ciphersuites(sctx, + "TLS_AES_128_GCM_SHA256")) + || !TEST_true(SSL_CTX_set_ciphersuites(cctx, + "TLS_AES_256_GCM_SHA384")) || !TEST_true(create_ssl_objects(sctx, cctx, &sssl, &cssl, NULL, NULL))) goto err; @@ -59,7 +64,7 @@ static int test_fatalerr(void) goto err; /* SSL_read()/SSL_write should fail because of a previous fatal error */ - if (!TEST_int_le(len = SSL_read(sssl, buf, sizeof(buf - 1)), 0)) { + if (!TEST_int_le(len = SSL_read(sssl, buf, sizeof(buf) - 1), 0)) { buf[len] = '\0'; TEST_error("Unexpected success reading data: %s\n", buf); goto err;