summaryrefslogtreecommitdiffstats
path: root/security/nss/lib/ssl/tls13esni.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-12-18 11:39:00 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-12-18 11:39:00 +0100
commit76fe52eb81db323ceaa8396de39b76efbce1c25e (patch)
tree061c409281374d893f9730f89e6a4ef32d0b53f9 /security/nss/lib/ssl/tls13esni.h
parent63635e38ff9341c02fae7f4557d230ec710947b6 (diff)
parent680c3eadb6aaec1f3653636db081a519e0f62ef5 (diff)
downloadUXP-76fe52eb81db323ceaa8396de39b76efbce1c25e.tar
UXP-76fe52eb81db323ceaa8396de39b76efbce1c25e.tar.gz
UXP-76fe52eb81db323ceaa8396de39b76efbce1c25e.tar.lz
UXP-76fe52eb81db323ceaa8396de39b76efbce1c25e.tar.xz
UXP-76fe52eb81db323ceaa8396de39b76efbce1c25e.zip
Merge branch 'master' into Basilisk-releasev2018.12.18
Diffstat (limited to 'security/nss/lib/ssl/tls13esni.h')
-rw-r--r--security/nss/lib/ssl/tls13esni.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/security/nss/lib/ssl/tls13esni.h b/security/nss/lib/ssl/tls13esni.h
new file mode 100644
index 000000000..6c52c9952
--- /dev/null
+++ b/security/nss/lib/ssl/tls13esni.h
@@ -0,0 +1,51 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is PRIVATE to SSL.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef __tls13esni_h_
+#define __tls13esni_h_
+
+struct sslEsniKeysStr {
+ SECItem data; /* The encoded record. */
+ sslEphemeralKeyPair *privKey;
+ const char *dummySni;
+ PRCList keyShares; /* List of TLS13KeyShareEntry */
+ SECItem suites;
+ PRUint16 paddedLength;
+ PRUint64 notBefore;
+ PRUint64 notAfter;
+};
+
+SECStatus SSLExp_SetESNIKeyPair(PRFileDesc *fd,
+ SECKEYPrivateKey *privKey,
+ const PRUint8 *record, unsigned int recordLen);
+
+SECStatus SSLExp_EnableESNI(PRFileDesc *fd, const PRUint8 *esniKeys,
+ unsigned int esniKeysLen, const char *dummySNI);
+SECStatus SSLExp_EncodeESNIKeys(PRUint16 *cipherSuites, unsigned int cipherSuiteCount,
+ SSLNamedGroup group, SECKEYPublicKey *pubKey,
+ PRUint16 pad, PRUint64 notBefore, PRUint64 notAfter,
+ PRUint8 *out, unsigned int *outlen, unsigned int maxlen);
+sslEsniKeys *tls13_CopyESNIKeys(sslEsniKeys *okeys);
+void tls13_DestroyESNIKeys(sslEsniKeys *keys);
+SECStatus tls13_ClientSetupESNI(sslSocket *ss);
+SECStatus tls13_ComputeESNIKeys(const sslSocket *ss,
+ TLS13KeyShareEntry *entry,
+ sslKeyPair *keyPair,
+ const ssl3CipherSuiteDef *suite,
+ const PRUint8 *esniKeysHash,
+ const PRUint8 *keyShareBuf,
+ unsigned int keyShareBufLen,
+ const PRUint8 *clientRandom,
+ ssl3KeyMaterial *keyMat);
+SECStatus tls13_FormatEsniAADInput(sslBuffer *aadInput,
+ PRUint8 *keyShare, unsigned int keyShareLen);
+
+SECStatus tls13_ServerDecryptEsniXtn(const sslSocket *ss, PRUint8 *in, unsigned int inLen,
+ PRUint8 *out, int *outLen, int maxLen);
+
+#endif