** libgnutls: DTLS replay protection can now be disabled.
** API and ABI modifications:
+GNUTLS_NO_REPLAY_PROTECTION: Added
gnutls_certificate_set_trust_list: Added
gnutls_cipher_get_tag_size: Added
-gnutls_record_disable_replay_protection: Added
gnutls_record_overhead_size: Added
gnutls_record_overhead_size2: Added
{
return session->internals.dtls.packets_dropped;
}
-
-/**
- * gnutls_record_disable_replay_protection:
- * @session: is a #gnutls_session_t structure.
- *
- * This function will disable any replay protection in DTLS mode.
- * That must only used when replay protection is achieved using
- * other means.
- *
- **/
-void
-gnutls_record_disable_replay_protection (gnutls_session_t session)
-{
- session->internals.no_replay_protection = 1;
-}
* also available. The latter flag will enable a non-blocking
* operation of the DTLS timers.
*
+ * The flag %GNUTLS_NO_REPLAY_PROTECTION will disable any
+ * replay protection in DTLS mode. That must only used when
+ * replay protection is achieved using other means.
+ *
* Note that since version 3.1.2 this function enables some common
* TLS extensions such as session tickets and OCSP certificate status
* request in client side by default. To prevent that use the %GNUTLS_NO_EXTENSIONS
gnutls_ocsp_status_request_enable_client(*session, NULL, 0, NULL);
}
+ if (flags & GNUTLS_NO_REPLAY_PROTECTION)
+ (*session)->internals.no_replay_protection = 1;
+
return 0;
}
gnutls_dtls_prestate_st* prestate);
unsigned int gnutls_record_get_discarded (gnutls_session_t session);
-
- void gnutls_record_disable_replay_protection (gnutls_session_t session);
+
#ifdef __cplusplus
}
#endif
* @GNUTLS_DATAGRAM: Connection is datagram oriented (DTLS).
* @GNUTLS_NONBLOCK: Connection should not block (DTLS).
* @GNUTLS_NO_EXTENSIONS: Do not enable any TLS extensions by default.
+ * @GNUTLS_NO_REPLAY_PROTECTION: Disable any replay protection in DTLS.
*
*/
#define GNUTLS_SERVER 1
#define GNUTLS_DATAGRAM (1<<2)
#define GNUTLS_NONBLOCK (1<<3)
#define GNUTLS_NO_EXTENSIONS (1<<4)
+#define GNUTLS_NO_REPLAY_PROTECTION (1<<5)
/**
* gnutls_alert_level_t:
gnutls_session_set_id;
gnutls_certificate_set_trust_list;
gnutls_cipher_get_tag_size;
- gnutls_record_disable_replay_protection;
gnutls_record_overhead_size;
gnutls_record_overhead_size2;
} GNUTLS_3_0_0;