libssl_internals.h (3158B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 5 * You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #ifndef libssl_internals_h_ 8 #define libssl_internals_h_ 9 10 #include <stdint.h> 11 12 #include "prio.h" 13 #include "seccomon.h" 14 #include "ssl.h" 15 #include "sslimpl.h" 16 #include "sslt.h" 17 18 SECStatus SSLInt_IncrementClientHandshakeVersion(PRFileDesc *fd); 19 20 SECStatus SSLInt_UpdateSSLv2ClientRandom(PRFileDesc *fd, uint8_t *rnd, 21 size_t rnd_len, uint8_t *msg, 22 size_t msg_len); 23 SECStatus SSLInt_GetHandshakeRandoms(PRFileDesc *fd, SSL3Random client_random, 24 SSL3Random server_random); 25 PRBool SSLInt_ExtensionNegotiated(PRFileDesc *fd, PRUint16 ext); 26 void SSLInt_ClearSelfEncryptKey(); 27 void SSLInt_SetSelfEncryptMacKey(PK11SymKey *key); 28 PRInt32 SSLInt_CountCipherSpecs(PRFileDesc *fd); 29 void SSLInt_PrintCipherSpecs(const char *label, PRFileDesc *fd); 30 SECStatus SSLInt_ShiftDtlsTimers(PRFileDesc *fd, PRIntervalTime shift); 31 SECStatus SSLInt_SendImmediateACK(PRFileDesc *fd); 32 SECStatus SSLInt_SetMTU(PRFileDesc *fd, PRUint16 mtu); 33 PRBool SSLInt_CheckSecretsDestroyed(PRFileDesc *fd); 34 PRBool SSLInt_DamageClientHsTrafficSecret(PRFileDesc *fd); 35 PRBool SSLInt_DamageServerHsTrafficSecret(PRFileDesc *fd); 36 PRBool SSLInt_DamageEarlyTrafficSecret(PRFileDesc *fd); 37 SECStatus SSLInt_Set0RttAlpn(PRFileDesc *fd, PRUint8 *data, unsigned int len); 38 PRBool SSLInt_HasCertWithAuthType(PRFileDesc *fd, SSLAuthType authType); 39 PRBool SSLInt_SendAlert(PRFileDesc *fd, uint8_t level, uint8_t type); 40 SECStatus SSLInt_AdvanceDtls13DecryptFailures(PRFileDesc *fd, PRUint64 to); 41 SECStatus SSLInt_AdvanceWriteSeqNum(PRFileDesc *fd, PRUint64 to); 42 SECStatus SSLInt_AdvanceReadSeqNum(PRFileDesc *fd, PRUint64 to); 43 SECStatus SSLInt_AdvanceWriteEpochNum(PRFileDesc *fd, PRUint64 to); 44 SECStatus SSLInt_AdvanceReadEpochNum(PRFileDesc *fd, PRUint64 to); 45 SECStatus SSLInt_AdvanceWriteSeqByAWindow(PRFileDesc *fd, PRInt32 extra); 46 SSLKEAType SSLInt_GetKEAType(SSLNamedGroup group); 47 SECStatus SSLInt_HasPendingHandshakeData(PRFileDesc *fd, PRBool *pending); 48 SECStatus SSLInt_SetSocketMaxEarlyDataSize(PRFileDesc *fd, uint32_t size); 49 SECStatus SSLInt_TweakChannelInfoForDC(PRFileDesc *fd, PRBool changeAuthKeyBits, 50 PRBool changeScheme); 51 SECStatus SSLInt_SetDCAdvertisedSigSchemes(PRFileDesc *fd, 52 const SSLSignatureScheme *schemes, 53 uint32_t num_sig_schemes); 54 SECStatus SSLInt_RemoveServerCertificates(PRFileDesc *fd); 55 SECStatus SSLInt_SetRawEchConfigForRetry(PRFileDesc *fd, const uint8_t *buf, 56 size_t len); 57 PRBool SSLInt_IsIp(PRUint8 *s, unsigned int len); 58 59 SECStatus SSLInt_GetCertificateCompressionAlgorithm( 60 PRFileDesc *fd, SSLCertificateCompressionAlgorithm *alg); 61 #endif // ifndef libssl_internals_h_