Skip to content

Commit 746ffac

Browse files
committed
ECDHE-PSK with x25519
1. Add missing assignment of the WOLFSSL object's ecdhCurveOid value. It is set correctly in the previous cases, but got missed for ECDHE-PSK. 2. Add test cases to the unit testing.
1 parent 7a77d64 commit 746ffac

3 files changed

Lines changed: 27 additions & 0 deletions

File tree

src/internal.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29895,6 +29895,7 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
2989529895
if ((curveOid = CheckCurveId(b)) < 0) {
2989629896
ERROR_OUT(ECC_CURVE_ERROR, exit_dske);
2989729897
}
29898+
ssl->ecdhCurveOID = curveOid;
2989829899

2989929900
length = input[args->idx++];
2990029901
if ((args->idx - args->begin) + length > size) {

tests/test-dtls.conf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,20 @@
5555
-s
5656
-l ECDHE-PSK-CHACHA20-POLY1305
5757

58+
# server TLSv1.2 ECDHE-PSK-CHACHA20-POLY1305 x25519
59+
-u
60+
-v 3
61+
-s
62+
-t
63+
-l ECDHE-PSK-CHACHA20-POLY1305
64+
65+
# client TLSv1.2 ECDHE-PSK-CHACHA20-POLY1305 x25519
66+
-u
67+
-v 3
68+
-s
69+
-t
70+
-l ECDHE-PSK-CHACHA20-POLY1305
71+
5872
# server TLSv1.2 PSK-CHACHA20-POLY1305
5973
-u
6074
-v 3

tests/test.conf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,18 @@
4545
-s
4646
-l ECDHE-PSK-CHACHA20-POLY1305
4747

48+
# server TLSv1.2 ECDHE-PSK-CHACHA20-POLY1305 x25519
49+
-v 3
50+
-s
51+
-t
52+
-l ECDHE-PSK-CHACHA20-POLY1305
53+
54+
# client TLSv1.2 ECDHE-PSK-CHACHA20-POLY1305 x25519
55+
-v 3
56+
-s
57+
-t
58+
-l ECDHE-PSK-CHACHA20-POLY1305
59+
4860
# server TLSv1.2 PSK-CHACHA20-POLY1305
4961
-v 3
5062
-s

0 commit comments

Comments
 (0)