- /* There are two ways to detect a resumed ticket sesion.
- * One is to set a random session ID and then the server
- * must return a match in ServerHello. This allows the normal
- * client session ID matching to work and we know much
- * earlier that the ticket has been accepted.
- *
- * The other way is to set zero length session ID when the
- * ticket is presented and rely on the handshake to determine
- * session resumption.
- */
- if (ret->session_id_length == 0)
- {
- EVP_Digest(ret->tlsext_tick, ret->tlsext_ticklen,
- ret->session_id, &ret->session_id_length,
-#ifndef OPENSSL_NO_SHA256
- EVP_sha256(), NULL);
-#else
- EVP_sha1(), NULL);
-#endif
- }