Skip to content

Add server-tls-writedup.c example#329

Merged
julek-wolfssl merged 1 commit intowolfSSL:masterfrom
embhorn:gh5366
Jul 27, 2022
Merged

Add server-tls-writedup.c example#329
julek-wolfssl merged 1 commit intowolfSSL:masterfrom
embhorn:gh5366

Conversation

@embhorn
Copy link
Copy Markdown
Member

@embhorn embhorn commented Jul 22, 2022

Add example for server using wolfSSL_write_dup to copy the SSL structure. This is a validation test for wolfSSL/wolfssl#5366

Comment thread tls/server-tls-writedup.c Outdated
Comment on lines +168 to +177
#ifdef HAVE_WRITE_DUP
write_ssl = wolfSSL_write_dup(ssl);
if (write_ssl == NULL) {
fprintf(stderr, "wolfSSL_write_dup failed\n");
ret = -1;
goto exit;
}
#else
write_ssl = ssl;
#endif
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would prefer the client-tls-writedup.c approach. If HAVE_WRITE_DUP is not configured in wolfSSL, the example should fail at run-time with a helpful message.

@embhorn
Copy link
Copy Markdown
Member Author

embhorn commented Jul 26, 2022

Ready for merge

@julek-wolfssl julek-wolfssl merged commit f4f6a42 into wolfSSL:master Jul 27, 2022
yota22721 pushed a commit to yota22721/wolfssl-examples that referenced this pull request Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants