Skip to content

Commit 57ef8a7

Browse files
authored
Merge pull request #9574 from anhu/dtls_guard
Guard a bit of DTLS code.
2 parents 1817639 + 40327b7 commit 57ef8a7

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.github/workflows/os-check.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ jobs:
6868
'--disable-sni --disable-ecc --disable-tls13 --disable-secure-renegotiation-info',
6969
'CPPFLAGS=-DWOLFSSL_BLIND_PRIVATE_KEY',
7070
'--enable-all --enable-certgencache',
71+
'--enable-sessionexport --enable-dtls --enable-dtls13',
72+
'--enable-sessionexport',
7173
]
7274
name: make check
7375
if: github.repository_owner == 'wolfssl'

src/internal.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1555,10 +1555,12 @@ static int ImportOptions(WOLFSSL* ssl, const byte* exp, word32 len, byte ver,
15551555
idx++;
15561556
#endif
15571557
}
1558-
1558+
#ifdef WOLFSSL_DTLS
15591559
/* If we had a connection established, let's assume that we can act
15601560
* statefully */
15611561
options->dtlsStateful = 1;
1562+
#endif
1563+
15621564
if (ver > WOLFSSL_EXPORT_VERSION_4) {
15631565
#ifdef WOLFSSL_DTLS
15641566
options->dtlsStateful = exp[idx++];

tests/api.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12043,7 +12043,7 @@ static int test_wolfSSL_dtls_export_peers(void)
1204312043
};
1204412044

1204512045
for (i = 0; i < sizeof(params)/sizeof(*params); i++) {
12046-
for (j = 0; j <= 0b11; j++) {
12046+
for (j = 0; j <= 3; j++) {
1204712047
XMEMSET(&client_cbf, 0, sizeof(client_cbf));
1204812048
XMEMSET(&server_cbf, 0, sizeof(server_cbf));
1204912049

@@ -12052,12 +12052,12 @@ static int test_wolfSSL_dtls_export_peers(void)
1205212052
client_cbf.method = params[i].client_meth;
1205312053
server_cbf.method = params[i].server_meth;
1205412054

12055-
if (j & 0b01) {
12055+
if (j & 0x1) {
1205612056
client_cbf.on_handshake =
1205712057
test_wolfSSL_dtls_export_peers_on_handshake;
1205812058
printf(" With client export;");
1205912059
}
12060-
if (j & 0b10) {
12060+
if (j & 0x2) {
1206112061
server_cbf.on_handshake =
1206212062
test_wolfSSL_dtls_export_peers_on_handshake;
1206312063
printf(" With server export;");

0 commit comments

Comments
 (0)