X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=test%2Ftls13secretstest.c;h=313ab5682ed9c929de7817d2a64f25415c1fa2e3;hb=0d8da77908df1aa3186b00113aab1b338cba9b07;hp=daccd7c360b10f460760c562d04df7d885d3762e;hpb=1f6359db729fa46364435b4899331296d2b91c65;p=openssl.git diff --git a/test/tls13secretstest.c b/test/tls13secretstest.c index daccd7c360..313ab5682e 100644 --- a/test/tls13secretstest.c +++ b/test/tls13secretstest.c @@ -1,5 +1,5 @@ /* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-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 @@ -207,6 +207,21 @@ const EVP_MD *ssl_md(int idx) return EVP_sha256(); } +void ossl_statem_fatal(SSL *s, int al, int func, int reason, const char *file, + int line) +{ +} + +int ossl_statem_export_allowed(SSL *s) +{ + return 1; +} + +int ossl_statem_export_early_allowed(SSL *s) +{ + return 1; +} + /* End of mocked out code */ static int test_secret(SSL *s, unsigned char *prk, @@ -226,8 +241,8 @@ static int test_secret(SSL *s, unsigned char *prk, return 0; } - if (!tls13_hkdf_expand(s, md, prk, label, labellen, hash, gensecret, - hashsize)) { + if (!tls13_hkdf_expand(s, md, prk, label, labellen, hash, hashsize, + gensecret, hashsize)) { TEST_error("Secret generation failed"); return 0; } @@ -289,7 +304,7 @@ static int test_handshake_secrets(void) if (!TEST_true(tls13_generate_handshake_secret(s, ecdhe_secret, sizeof(ecdhe_secret)))) { - TEST_info("Hanshake secret generation failed"); + TEST_info("Handshake secret generation failed"); goto err; } @@ -384,7 +399,8 @@ static int test_handshake_secrets(void) return ret; } -void register_tests() +int setup_tests(void) { ADD_TEST(test_handshake_secrets); + return 1; }