X-Git-Url: https://bearssl.org/gitweb//home/git/?p=BearSSL;a=blobdiff_plain;f=inc%2Fbearssl_ssl.h;h=6640bc651848d7a9924681e87661ba0814f09dbc;hp=ad807ab9acbfe6e86104d6a69bbb008a2e4708fe;hb=af9c79a0710a45361f9ae4313f8bb5bf738c3b7a;hpb=ea95d8264c6aefe742a9c3f4f9d834b188566a29 diff --git a/inc/bearssl_ssl.h b/inc/bearssl_ssl.h index ad807ab..6640bc6 100644 --- a/inc/bearssl_ssl.h +++ b/inc/bearssl_ssl.h @@ -833,6 +833,14 @@ typedef struct { /* * Context RNG. + * + * rng_init_done is initially 0. It is set to 1 when the + * basic structure of the RNG is set, and 2 when some + * entropy has been pushed in. The value 2 marks the RNG + * as "properly seeded". + * + * rng_os_rand_done is initially 0. It is set to 1 when + * some seeding from the OS or hardware has been attempted. */ br_hmac_drbg_context rng; int rng_init_done; @@ -871,8 +879,8 @@ typedef struct { /* * Secure renegotiation (RFC 5746): 'reneg' can be: * 0 first handshake (server support is not known) - * 1 server does not support secure renegotiation - * 2 server supports secure renegotiation + * 1 peer does not support secure renegotiation + * 2 peer supports secure renegotiation * * The saved_finished buffer contains the client and the * server "Finished" values from the last handshake, in @@ -2063,8 +2071,9 @@ void br_ssl_engine_close(br_ssl_engine_context *cc); * * If the engine is failed or closed, or if the peer is known not to * support secure renegotiation (RFC 5746), or if renegotiations have - * been disabled with the `BR_OPT_NO_RENEGOTIATION` flag, then this - * function returns 0 and nothing else happens. + * been disabled with the `BR_OPT_NO_RENEGOTIATION` flag, or if there + * is buffered incoming application data, then this function returns 0 + * and nothing else happens. * * Otherwise, this function returns 1, and a renegotiation attempt is * triggered (if a handshake is already ongoing at that point, then @@ -3219,6 +3228,19 @@ typedef struct { void br_ssl_session_cache_lru_init(br_ssl_session_cache_lru *cc, unsigned char *store, size_t store_len); +/** + * \brief Forget an entry in an LRU session cache. + * + * The session cache context must have been initialised. The entry + * with the provided session ID (of exactly 32 bytes) is looked for + * in the cache; if located, it is disabled. + * + * \param cc session cache context. + * \param id session ID to forget. + */ +void br_ssl_session_cache_lru_forget( + br_ssl_session_cache_lru *cc, const unsigned char *id); + /** * \brief Context structure for a SSL server. *