summaryrefslogtreecommitdiff
path: root/regress/lib
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2017-01-22 08:19:37 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2017-01-22 08:19:37 +0000
commit15dc6d0938826d99a66fc912e821a8ec5c52f7e6 (patch)
treed5ccfdf3b3bfef3a2c4821dc8a4bedfe22de9539 /regress/lib
parent2084371cb17b0ba8e005086f116e5a7698dfec69 (diff)
Update the TLS ALPN unit tests to work with internal/opaque data.
Diffstat (limited to 'regress/lib')
-rw-r--r--regress/lib/libssl/unit/Makefile3
-rw-r--r--regress/lib/libssl/unit/tls_ext_alpn.c21
2 files changed, 11 insertions, 13 deletions
diff --git a/regress/lib/libssl/unit/Makefile b/regress/lib/libssl/unit/Makefile
index 48ae3963273..264bd2c3db3 100644
--- a/regress/lib/libssl/unit/Makefile
+++ b/regress/lib/libssl/unit/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.7 2016/12/30 16:58:12 jsing Exp $
+# $OpenBSD: Makefile,v 1.8 2017/01/22 08:19:36 jsing Exp $
TEST_CASES+= cipher_list
TEST_CASES+= ssl_versions
@@ -9,6 +9,7 @@ REGRESS_TARGETS= all_tests
WARNINGS= Yes
LDLIBS= ${SSL_INT} -lcrypto
CFLAGS+= -DLIBRESSL_INTERNAL -Wall -Wundef -Werror
+CFLAGS+= -I${.CURDIR}/../../../../lib/libssl
CLEANFILES+= ${TEST_CASES}
diff --git a/regress/lib/libssl/unit/tls_ext_alpn.c b/regress/lib/libssl/unit/tls_ext_alpn.c
index e4ad2c5fd4f..7fd7afac5ac 100644
--- a/regress/lib/libssl/unit/tls_ext_alpn.c
+++ b/regress/lib/libssl/unit/tls_ext_alpn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls_ext_alpn.c,v 1.2 2016/12/18 13:54:15 jsing Exp $ */
+/* $OpenBSD: tls_ext_alpn.c,v 1.3 2017/01/22 08:19:36 jsing Exp $ */
/*
* Copyright (c) 2015 Doug Hogan <doug@openbsd.org>
*
@@ -21,12 +21,9 @@
#include <stdio.h>
#include <openssl/ssl.h>
-#include "tests.h"
+#include "ssl_locl.h"
-extern int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p,
- unsigned char *d, int n, int *al);
-extern int ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p,
- int n, int *al);
+#include "tests.h"
/*
* In the ProtocolNameList, ProtocolNames must not include empty strings and
@@ -346,9 +343,9 @@ check_valid_alpn(SSL *s)
SSL_CTX_set_alpn_select_cb(s->ctx, dummy_alpn_cb, NULL);
/* Prerequisites to test these. */
- CHECK(s->alpn_client_proto_list != NULL);
- CHECK(s->ctx->alpn_select_cb != NULL);
- CHECK(s->s3->tmp.finish_md_len == 0);
+ CHECK(s->internal->alpn_client_proto_list != NULL);
+ CHECK(s->ctx->internal->alpn_select_cb != NULL);
+ //CHECK(s->s3->tmp.finish_md_len == 0);
CHECK_BOTH(1, 1, proto_single);
CHECK_BOTH(1, 1, proto_empty);
@@ -378,9 +375,9 @@ check_invalid_alpn(SSL *s)
SSL_CTX_set_alpn_select_cb(s->ctx, dummy_alpn_cb, NULL);
/* Prerequisites to test these. */
- CHECK(s->alpn_client_proto_list != NULL);
- CHECK(s->ctx->alpn_select_cb != NULL);
- CHECK(s->s3->tmp.finish_md_len == 0);
+ CHECK(s->internal->alpn_client_proto_list != NULL);
+ CHECK(s->ctx->internal->alpn_select_cb != NULL);
+ //CHECK(s->s3->tmp.finish_md_len == 0);
/* None of these are valid for client or server */
CHECK_BOTH(0, 0, proto_invalid_len1);