Merge pull request #537 from julek-wolfssl/gh/6061
Add session ref-counting and clean up TLS resume clientdevin/1766079702-dtls-session-export
commit
1b5089b5cf
|
|
@ -174,14 +174,14 @@ int main(int argc, char** argv)
|
|||
|
||||
|
||||
/* Save the session */
|
||||
session = wolfSSL_get_session(ssl);
|
||||
session = wolfSSL_get1_session(ssl);
|
||||
|
||||
/* Close the socket */
|
||||
wolfSSL_free(ssl);
|
||||
ssl = NULL;
|
||||
close(sockfd);
|
||||
|
||||
|
||||
|
||||
/* --------------------------------------- *
|
||||
* we are now disconnected from the server *
|
||||
* --------------------------------------- */
|
||||
|
|
@ -275,10 +275,8 @@ exit:
|
|||
/* Cleanup and return */
|
||||
if (ssl)
|
||||
wolfSSL_free(ssl); /* Free the wolfSSL object */
|
||||
#ifdef OPENSSL_EXTRA
|
||||
if (session)
|
||||
wolfSSL_SESSION_free(session);
|
||||
#endif
|
||||
if (sockfd != SOCKET_INVALID)
|
||||
close(sockfd); /* Close the socket */
|
||||
if (ctx)
|
||||
|
|
|
|||
Loading…
Reference in New Issue