summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2026-06-09 05:17:24 +0000
committertb <>2026-06-09 05:17:24 +0000
commitf14a542246cdcc303df2664106c4252e1c938396 (patch)
tree10db24b227396adb51833b7875edc989a7d82638 /src
parent216081b6fcc8cc105c5d67cd7feba13e79c0658d (diff)
downloadopenbsd-f14a542246cdcc303df2664106c4252e1c938396.tar.gz
openbsd-f14a542246cdcc303df2664106c4252e1c938396.tar.bz2
openbsd-f14a542246cdcc303df2664106c4252e1c938396.zip
ssl_kex: ensure decode_error alert is raised
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libssl/unit/ssl_kex.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/regress/lib/libssl/unit/ssl_kex.c b/src/regress/lib/libssl/unit/ssl_kex.c
index 0fc15033c0..8b4f644a41 100644
--- a/src/regress/lib/libssl/unit/ssl_kex.c
+++ b/src/regress/lib/libssl/unit/ssl_kex.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_kex.c,v 1.2 2026/06/08 11:41:21 tb Exp $ */ 1/* $OpenBSD: ssl_kex.c,v 1.3 2026/06/09 05:17:24 tb Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2026 Theo Buehler <tb@openbsd.org> 4 * Copyright (c) 2026 Theo Buehler <tb@openbsd.org>
@@ -121,6 +121,10 @@ ssl_key_share_ecdhe_test(void)
121 fprintf(stderr, "FAIL: parsed point at infinity\n"); 121 fprintf(stderr, "FAIL: parsed point at infinity\n");
122 failed |= 1; 122 failed |= 1;
123 } 123 }
124 if (!decode_error) {
125 fprintf(stderr, "FAIL: no decode_error for point at infinity\n");
126 failed |= 1;
127 }
124 128
125 EC_KEY_free(ecdh_peer); 129 EC_KEY_free(ecdh_peer);
126 ecdh_peer = NULL; 130 ecdh_peer = NULL;
@@ -133,6 +137,10 @@ ssl_key_share_ecdhe_test(void)
133 fprintf(stderr, "FAIL: parsed compressed P-384 point\n"); 137 fprintf(stderr, "FAIL: parsed compressed P-384 point\n");
134 failed |= 1; 138 failed |= 1;
135 } 139 }
140 if (!decode_error) {
141 fprintf(stderr, "FAIL: no decode_error for compressed P-384 point\n");
142 failed |= 1;
143 }
136 144
137 EC_KEY_free(ecdh_peer); 145 EC_KEY_free(ecdh_peer);
138 ecdh_peer = NULL; 146 ecdh_peer = NULL;
@@ -145,6 +153,10 @@ ssl_key_share_ecdhe_test(void)
145 fprintf(stderr, "FAIL: parsed hybrid P-384 point\n"); 153 fprintf(stderr, "FAIL: parsed hybrid P-384 point\n");
146 failed |= 1; 154 failed |= 1;
147 } 155 }
156 if (!decode_error) {
157 fprintf(stderr, "FAIL: no decode_error for hybrid P-384 point\n");
158 failed |= 1;
159 }
148 160
149 EC_KEY_free(ecdh_peer); 161 EC_KEY_free(ecdh_peer);
150 ecdh_peer = NULL; 162 ecdh_peer = NULL;