Home | History | Annotate | Download | only in openssl

Lines Matching full:session

358  * |SSL_shutdown| must be called to retain |ssl|'s session in the session
360 * neither send nor wait for close_notify but still retain the session.
362 * TODO(davidben): Is there any point in the session cache interaction? Remove
449 /* SSL_ERROR_PENDING_SESSION indicates the operation failed because the session
450 * lookup callback indicated the session was unavailable. The caller may retry
549 /* SSL_OP_NO_TICKET disables session ticket support (RFC 5077). */
630 /* SSL_MODE_NO_SESSION_CREATION will cause any attempts to create a session to
632 * session resumption is used for a given SSL*. */
1285 * return zero if |ssl| performed session resumption unless EMS was used when
1286 * negotiating the original session. */
1408 * An |SSL_SESSION| represents an SSL session that may be resumed in an
1421 /* SSL_SESSION_up_ref, if |session| is not NULL, increments the reference count
1422 * of |session|. It then returns |session|. */
1423 OPENSSL_EXPORT SSL_SESSION *SSL_SESSION_up_ref(SSL_SESSION *session);
1425 /* SSL_SESSION_free decrements the reference count of |session|. If it reaches
1426 * zero, all data referenced by |session| and |session| itself are released. */
1427 OPENSSL_EXPORT void SSL_SESSION_free(SSL_SESSION *session);
1436 /* SSL_SESSION_to_bytes_for_ticket serializes |in|, but excludes the session
1437 * identification information, namely the session ID and ticket. */
1447 /* SSL_SESSION_get_version returns a string describing the TLS version |session|
1449 OPENSSL_EXPORT const char *SSL_SESSION_get_version(const SSL_SESSION *session);
1451 /* SSL_SESSION_get_id returns a pointer to a buffer containg |session|'s session
1453 OPENSSL_EXPORT const uint8_t *SSL_SESSION_get_id(const SSL_SESSION *session,
1456 /* SSL_SESSION_get_time returns the time at which |session| was established in
1458 OPENSSL_EXPORT long SSL_SESSION_get_time(const SSL_SESSION *session);
1460 /* SSL_SESSION_get_timeout returns the lifetime of |session| in seconds. */
1461 OPENSSL_EXPORT long SSL_SESSION_get_timeout(const SSL_SESSION *session);
1465 * |session|. Its interpretation depends on the operation used. See the
1468 const SSL_SESSION *session);
1471 * |session|.
1474 OPENSSL_EXPORT X509 *SSL_SESSION_get0_peer(const SSL_SESSION *session);
1476 /* SSL_SESSION_set_time sets |session|'s creation time to |time| and returns
1479 OPENSSL_EXPORT long SSL_SESSION_set_time(SSL_SESSION *session, long time);
1481 /* SSL_SESSION_set_timeout sets |session|'s timeout to |timeout| and returns
1484 OPENSSL_EXPORT long SSL_SESSION_set_timeout(SSL_SESSION *session, long timeout);
1486 /* SSL_SESSION_set1_id_context sets |session|'s session ID context (see
1490 OPENSSL_EXPORT int SSL_SESSION_set1_id_context(SSL_SESSION *session,
1495 /* Session caching.
1497 * Session caching allows clients to reconnect to a server based on saved
1500 * For a server, the library implements a built-in internal session cache as an
1502 * external session cache. An external cache may be used in addition to or
1506 * For a client, the only option is an external session cache. Prior to
1507 * handshaking, the consumer should look up a session externally (keyed, for
1508 * instance, by hostname) and use |SSL_set_session| to configure which session
1512 * Note that offering or accepting a session short-circuits most parameter
1515 * fallback should shard its session cache by maximum protocol version. */
1517 /* SSL_SESS_CACHE_OFF disables all session caching. */
1520 /* SSL_SESS_CACHE_CLIENT enables session caching for a client. The internal
1524 /* SSL_SESS_CACHE_SERVER enables session caching for a server. */
1527 /* SSL_SESS_CACHE_SERVER enables session caching for both client and server. */
1534 /* SSL_SESS_CACHE_NO_INTERNAL_LOOKUP, on a server, disables looking up a session
1535 * from the internal session cache. */
1539 * the internal session cache. */
1542 /* SSL_SESS_CACHE_NO_INTERNAL, on a server, disables the internal session
1547 /* SSL_CTX_set_session_cache_mode sets the session cache mode bits for |ctx| to
1551 /* SSL_CTX_get_session_cache_mode returns the session cache mode bits for
1555 /* SSL_set_session, for a client, configures |ssl| to offer to resume |session|
1557 * |session|. */
1558 OPENSSL_EXPORT int SSL_set_session(SSL *ssl, SSL_SESSION *session);
1560 /* SSL_get_session returns a non-owning pointer to |ssl|'s session. Prior to the
1561 * initial handshake beginning, this is the session to be offered, set by
1563 * active session. Its behavior is undefined while a handshake is progress. */
1570 * the session. */
1574 * session. */
1585 /* SSL_CTX_set_session_id_context sets |ctx|'s session ID context to |sid_ctx|.
1586 * It returns one on success and zero on error. The session ID context is an
1587 * application-defined opaque byte string. A session will not be used in a
1588 * connection without a matching session ID context.
1591 * session ID context.
1600 /* SSL_set_session_id_context sets |ssl|'s session ID context to |sid_ctx|. It
1606 /* SSL_SESSION_CACHE_MAX_SIZE_DEFAULT is the default maximum size of a session
1610 /* SSL_CTX_sess_set_cache_size sets the maximum size of |ctx|'s internal session
1616 * session cache. */
1619 /* SSL_CTX_sessions returns |ctx|'s internal session cache. */
1623 * session cache. */
1626 /* SSL_CTX_add_session inserts |session| into |ctx|'s internal session cache. It
1627 * returns one on success and zero on error or if |session| is already in the
1628 * cache. The caller retains its reference to |session|. */
1629 OPENSSL_EXPORT int SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *session);
1631 /* SSL_CTX_remove_session removes |session| from |ctx|'s internal session cache.
1632 * It returns one on success and zero if |session| was not in the cache. */
1633 OPENSSL_EXPORT int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *session);
1639 /* SSL_CTX_sess_set_new_cb sets the callback to be called when a new session is
1640 * established and ready to be cached. If the session cache is disabled (the
1644 * The callback is passed a reference to |session|. It returns one if it takes
1658 SSL_CTX *ctx, int (*new_session_cb)(SSL *ssl, SSL_SESSION *session));
1663 SSL *ssl, SSL_SESSION *session);
1665 /* SSL_CTX_sess_set_remove_cb sets a callback which is called when a session is
1666 * removed from the internal session cache.
1672 void (*remove_session_cb)(SSL_CTX *ctx, SSL_SESSION *session));
1677 SSL_CTX *ctx, SSL_SESSION *session);
1679 /* SSL_CTX_sess_set_get_cb sets a callback to look up a session by ID for a
1680 * server. The callback is passed the session ID and should return a matching
1682 * return a new reference to the session. This callback is not used for a
1688 * |ctx| and thus the callback is used on multiple threads, the session may be
1692 * To look up a session asynchronously, the callback may return
1696 * If the internal session cache is enabled, the callback is only consulted if
1712 * that the session
1718 /* Session tickets.
1720 * Session tickets, from RFC 5077, allow session resumption without server-side
1721 * state. Session tickets are supported in by default but may be disabled with
1732 /* SSL_CTX_get_tlsext_ticket_keys writes |ctx|'s session ticket key material to
1738 /* SSL_CTX_set_tlsext_ticket_keys sets |ctx|'s session ticket key material to
1744 /* SSL_TICKET_KEY_NAME_LEN is the length of the key name prefix of a session
2560 OPENSSL_EXPORT int SSL_SESSION_set_ex_data(SSL_SESSION *session, int idx,
2562 OPENSSL_EXPORT void *SSL_SESSION_get_ex_data(const SSL_SESSION *session,
2736 * ClientHello processing and before the decision whether to resume a session
2838 * report |ctx|. However most settings and the session cache itself will
2844 * session cache explicitly selects the initial |SSL_CTX|. Most settings are
3027 /* d2i_SSL_SESSION parses a serialized session from the |length| bytes pointed
3030 * ownership of the new session and must call |SSL_SESSION_free| when done.
3038 /* i2d_SSL_SESSION_bio serializes |session| and writes the result to |bio|. It
3040 OPENSSL_EXPORT int i2d_SSL_SESSION_bio(BIO *bio, const SSL_SESSION *session);
3093 #define SSL_get_time(session) SSL_SESSION_get_time(session)
3094 #define SSL_set_time(session, time) SSL_SESSION_set_time((session), (time))
3095 #define SSL_get_timeout(session) SSL_SESSION_get_timeout(session)
3096 #define SSL_set_timeout(session, timeout) \
3097 SSL_SESSION_set_timeout((session), (timeout))
3342 int ssl_version; /* what ssl version session info is being kept in here? */
3345 * primitive used in the handshake that created this session. In the event
3362 /* this is used to determine whether the session is being reused in
3377 /* when app_verify_callback accepts a session where the peer's certificate is
3378 * not ok, we must remember the error for session reuse: */
3388 /* These are used to make removal of session-ids more efficient and to
3394 uint8_t *tlsext_tick; /* Session ticket */
3395 size_t tlsext_ticklen; /* Session ticket length */
3400 /* The OCSP response that came with the session. */
3410 * created a session. This is used by Channel IDs during resumption. */
3414 uint32_t tlsext_tick_lifetime_hint; /* Session lifetime hint in seconds */
3416 /* extended_master_secret is true if the master secret in this session was
3424 /* not_resumable is used to indicate that session resumption is not allowed.
3425 * Applications can also set this bit for a new session via
3426 * not_resumable_session_cb to disable session caching and tickets. */
3501 /* Most session-ids that will be cached, default is
3522 /* If this callback is not null, it will be called each time a session id is
3526 * remove_session_cb is not null, it will be called when a session-id is
3590 * before the decision whether to resume a session is made. It may return one
3609 /* RFC 4507 session ticket keys */
3631 * session space. Only effective on the server side. */
3781 /* session info */
3797 /* This can also be in the session once a session is established */
3798 SSL_SESSION *session;
3832 /* RFC4507 session ticket expected to be received or sent */
3880 /* hit is true if this connection is resuming a previous session. */
4076 * whether it was used for the current session. If this is a resumption
4078 * messages, but it doesn't matter if the session that's being resumed