asdfadsf and #if 0 and comment cleanup.
parent
94dafcb952
commit
5bdf886138
|
@ -228,18 +228,18 @@ int main(int argc, char** argv)
|
||||||
wolfSSL_FreeArrays(ssl);
|
wolfSSL_FreeArrays(ssl);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
/* Save the session
|
/* Save the session
|
||||||
*
|
*
|
||||||
* NOTE: This is not an ideal solution. Please see client-tls-resume.c.
|
* NOTE: This is not an ideal solution. Please see below where we call
|
||||||
* There you will see that we do not need to call wolfSSL_peek() because
|
* wolfSSL_get_session() just before disconnection. We do not need to
|
||||||
* we have already called wolfSSL_read() before calling
|
* call wolfSSL_peek() in that case because we have already called
|
||||||
* wolfSSL_get_session() so wolfSSL has already internally stored the
|
* wolfSSL_read() so wolfSSL has already internally stored the session
|
||||||
* session ticket. For TLS 1.2 it is fine to put wolfSSL_get_session()
|
* ticket. For TLS 1.2 it is fine to put wolfSSL_get_session() right after
|
||||||
* right after the connection is established because the resumption
|
* the connection is established because the resumption information is part
|
||||||
* information is part of the TLS 1.2 handshake. This is not the case for
|
* of the TLS 1.2 handshake. This is not the case for TLS 1.3. However, if
|
||||||
* TLS 1.3. However, if you are migrating from TLS 1.2 and are having a
|
* you are migrating from TLS 1.2 and are having a hard time moving your
|
||||||
* hard time moving your call to wolfSSL_get_session(), you can try this
|
* call to wolfSSL_get_session(), you can try this approach.
|
||||||
* approach.
|
|
||||||
*
|
*
|
||||||
* This approach can result in issues with I/O and is best used with non-
|
* This approach can result in issues with I/O and is best used with non-
|
||||||
* blocking mode sockets.
|
* blocking mode sockets.
|
||||||
|
@ -253,6 +253,7 @@ int main(int argc, char** argv)
|
||||||
printf("Session ticket found\n");
|
printf("Session ticket found\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Get a message for the server from stdin */
|
/* Get a message for the server from stdin */
|
||||||
printf("Message for server: ");
|
printf("Message for server: ");
|
||||||
|
@ -408,7 +409,6 @@ exit:
|
||||||
if (sslRes)
|
if (sslRes)
|
||||||
wolfSSL_free(sslRes); /* Free the wolfSSL object */
|
wolfSSL_free(sslRes); /* Free the wolfSSL object */
|
||||||
#ifdef OPENSSL_EXTRA
|
#ifdef OPENSSL_EXTRA
|
||||||
asdfasdfasdf
|
|
||||||
if (session)
|
if (session)
|
||||||
wolfSSL_SESSION_free(session);
|
wolfSSL_SESSION_free(session);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue