summaryrefslogtreecommitdiffstats
path: root/src/libknot/quic/quic.h
diff options
context:
space:
mode:
authorDaniel Salzman <daniel.salzman@nic.cz>2023-03-12 18:44:19 +0100
committerDaniel Salzman <daniel.salzman@nic.cz>2023-03-21 09:45:15 +0100
commit6d07b557cffd29a5874d34c5da2e435d82c17d8b (patch)
tree578e74e14e40bb44b00262ca09e9eeaa7feb4ed3 /src/libknot/quic/quic.h
parentquic: simplify ALPN handling (diff)
downloadknot-6d07b557cffd29a5874d34c5da2e435d82c17d8b.tar.xz
knot-6d07b557cffd29a5874d34c5da2e435d82c17d8b.zip
quic: move acl/cert_pin() to libknot/knot_quic_conn_pin()
Diffstat (limited to 'src/libknot/quic/quic.h')
-rw-r--r--src/libknot/quic/quic.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libknot/quic/quic.h b/src/libknot/quic/quic.h
index aafcf21db..9da4f8099 100644
--- a/src/libknot/quic/quic.h
+++ b/src/libknot/quic/quic.h
@@ -30,6 +30,8 @@
#include "libknot/quic/quic_conn.h"
+#define KNOT_QUIC_PIN_LEN 32
+
struct gnutls_x509_crt_int;
struct knot_quic_creds;
struct knot_quic_session;
@@ -118,6 +120,18 @@ bool xquic_conn_timeout(knot_xquic_conn_t *conn, uint64_t *now);
uint32_t knot_xquic_conn_rtt(knot_xquic_conn_t *conn);
/*!
+ * \brief Gets local or remote certificate pin.
+ *
+ * \note Zero output pin_size value means no certificate available or error.
+ *
+ * \param conn QUIC connection.
+ * \param pin Output certificate pin.
+ * \param pin_size Input size of the storage / output size of the stored pin.
+ * \param local Local or remote certificate indication.
+ */
+void knot_quic_conn_pin(knot_xquic_conn_t *conn, uint8_t *pin, size_t *pin_size, bool local);
+
+/*!
* \brief Create new outgoing QUIC connection.
*
* \param table QUIC connections table to be added to.