/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file contains prototypes for the public SSL functions. * * 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/. */
typedefstruct SSL3StatisticsStr { /* statistics from ssl3_SendClientHello (sch) */ long sch_sid_cache_hits; long sch_sid_cache_misses; long sch_sid_cache_not_ok;
/* statistics from ssl3_HandleServerHello (hsh) */ long hsh_sid_cache_hits; long hsh_sid_cache_misses; long hsh_sid_cache_not_ok;
/* statistics from ssl3_HandleClientHello (hch) */ long hch_sid_cache_hits; long hch_sid_cache_misses; long hch_sid_cache_not_ok;
/* statistics related to stateless resume */ long sch_sid_stateless_resumes; long hsh_sid_stateless_resumes; long hch_sid_stateless_resumes; long hch_sid_ticket_parse_failures;
} SSL3Statistics;
/* The following defines are for backwards compatibility. ** They will be removed in a forthcoming release to reduce namespace pollution. ** programs that use the kt_ symbols should convert to the ssl_kt_ symbols ** soon.
*/ #define kt_null ssl_kea_null #define kt_rsa ssl_kea_rsa #define kt_dh ssl_kea_dh #define kt_fortezza ssl_kea_fortezza /* deprecated, now unused */ #define kt_ecdh ssl_kea_ecdh #define kt_kea_size ssl_kea_size
/* Values of this enum match the SignatureAlgorithm enum from
* https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ typedefenum {
ssl_sign_null = 0, /* "anonymous" in TLS */
ssl_sign_rsa = 1,
ssl_sign_dsa = 2,
ssl_sign_ecdsa = 3
} SSLSignType;
/* Values of this enum match the HashAlgorithm enum from
* https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ typedefenum { /* ssl_hash_none is used internally to mean the pre-1.2 combination of MD5
* and SHA1. The other values are only used in TLS 1.2. */
ssl_hash_none = 0,
ssl_hash_md5 = 1,
ssl_hash_sha1 = 2,
ssl_hash_sha224 = 3,
ssl_hash_sha256 = 4,
ssl_hash_sha384 = 5,
ssl_hash_sha512 = 6
} SSLHashType;
typedefenum {
ssl_sig_none = 0,
ssl_sig_rsa_pkcs1_sha1 = 0x0201,
ssl_sig_rsa_pkcs1_sha256 = 0x0401,
ssl_sig_rsa_pkcs1_sha384 = 0x0501,
ssl_sig_rsa_pkcs1_sha512 = 0x0601, /* For ECDSA, the pairing of the hash with a specific curve is only enforced
* in TLS 1.3; in TLS 1.2 any curve can be used with each of these. */
ssl_sig_ecdsa_secp256r1_sha256 = 0x0403,
ssl_sig_ecdsa_secp384r1_sha384 = 0x0503,
ssl_sig_ecdsa_secp521r1_sha512 = 0x0603,
ssl_sig_rsa_pss_rsae_sha256 = 0x0804,
ssl_sig_rsa_pss_rsae_sha384 = 0x0805,
ssl_sig_rsa_pss_rsae_sha512 = 0x0806,
ssl_sig_ed25519 = 0x0807,
ssl_sig_ed448 = 0x0808,
ssl_sig_rsa_pss_pss_sha256 = 0x0809,
ssl_sig_rsa_pss_pss_sha384 = 0x080a,
ssl_sig_rsa_pss_pss_sha512 = 0x080b,
/* The following value (which can't be used in the protocol), represents * the RSA signature using SHA-1 and MD5 that is used in TLS 1.0 and 1.1. * This is reported as a signature scheme when TLS 1.0 or 1.1 is used. * This should not be passed to SSL_SignatureSchemePrefSet(); this
* signature scheme is always used and cannot be disabled. */
ssl_sig_rsa_pkcs1_sha1md5 = 0x10101,
} SSLSignatureScheme;
/* Deprecated names maintained only for source compatibility. */ #define ssl_sig_rsa_pss_sha256 ssl_sig_rsa_pss_rsae_sha256 #define ssl_sig_rsa_pss_sha384 ssl_sig_rsa_pss_rsae_sha384 #define ssl_sig_rsa_pss_sha512 ssl_sig_rsa_pss_rsae_sha512
/* ** SSLAuthType describes the type of key that is used to authenticate a ** connection. That is, the type of key in the end-entity certificate.
*/ typedefenum {
ssl_auth_null = 0,
ssl_auth_rsa_decrypt = 1, /* RSA key exchange. */
ssl_auth_dsa = 2,
ssl_auth_kea = 3, /* unused */
ssl_auth_ecdsa = 4,
ssl_auth_ecdh_rsa = 5, /* ECDH cert with an RSA signature. */
ssl_auth_ecdh_ecdsa = 6, /* ECDH cert with an ECDSA signature. */
ssl_auth_rsa_sign = 7, /* RSA signing with an rsaEncryption key. */
ssl_auth_rsa_pss = 8, /* RSA signing with a PSS key. */
ssl_auth_psk = 9,
ssl_auth_tls13_any = 10,
ssl_auth_size /* number of authentication types */
} SSLAuthType;
typedefstruct SSLExtraServerCertDataStr { /* When this struct is passed to SSL_ConfigServerCert, and authType is set * to a value other than ssl_auth_null, this limits the use of the key to * the type defined; otherwise, the certificate is configured for all
* compatible types. */
SSLAuthType authType; /* The remainder of the certificate chain. */ const CERTCertificateList* certChain; /* A set of one or more stapled OCSP responses for the certificate. This is
* used to generate the OCSP stapling answer provided by the server. */ const SECItemArray* stapledOCSPResponses; /* A serialized sign_certificate_timestamp extension, used to answer
* requests from clients for this data. */ const SECItem* signedCertTimestamps;
/* Delegated credentials. * * A serialized delegated credential (DC) to use for authentication to peers * who indicate support for this extension (ietf-drafts-tls-subcerts). DCs * are used opportunistically if (1) the client indicates support, (2) TLS * 1.3 or higher is negotiated, and (3) the selected certificate is * configured with a DC. * * Note that it's the caller's responsibility to ensure that the DC is * well-formed.
*/ const SECItem* delegCred;
/* The secret key corresponding to the |delegCred|. * * Note that it's the caller's responsibility to ensure that this matches * the DC public key.
*/ const SECKEYPrivateKey* delegCredPrivKey;
} SSLExtraServerCertData;
typedefstruct SSLChannelInfoStr { /* On return, SSL_GetChannelInfo sets |length| to the smaller of * the |len| argument and the length of the struct used by NSS. * Callers must ensure the application uses a version of NSS that
* isn't older than the version used at compile time. */
PRUint32 length;
PRUint16 protocolVersion;
PRUint16 cipherSuite;
/* The strength of the key used to authenticate the peer. Before * interpreting this value, check authType, signatureScheme, and * peerDelegCred, to determine the type of the key and how it was used. * * Typically, this is the length of the key from the peer's end-entity * certificate. If delegated credentials are used (i.e., peerDelegCred is
* PR_TRUE), then this is the strength of the delegated credential key. */
PRUint32 authKeyBits;
/* key exchange algorithm info */
PRUint32 keaKeyBits;
/* session info */
PRUint32 creationTime; /* seconds since Jan 1, 1970 */
PRUint32 lastAccessTime; /* seconds since Jan 1, 1970 */
PRUint32 expirationTime; /* seconds since Jan 1, 1970 */
PRUint32 sessionIDLength; /* up to 32 */
PRUint8 sessionID[32];
/* The following fields are added in NSS 3.12.5. */
/* compression method info */ constchar* compressionMethodName;
SSLCompressionMethod compressionMethod;
/* The following fields are added in NSS 3.21. * This field only has meaning in TLS < 1.3 and will be set to * PR_FALSE in TLS 1.3.
*/
PRBool extendedMasterSecretUsed;
/* The following fields were added in NSS 3.25. * This field only has meaning in TLS >= 1.3, and indicates on the * client side that the server accepted early (0-RTT) data.
*/
PRBool earlyDataAccepted;
/* The following fields were added in NSS 3.28. */ /* These fields have the same meaning as in SSLCipherSuiteInfo. */
SSLKEAType keaType;
SSLNamedGroup keaGroup;
SSLCipherAlgorithm symCipher;
SSLMACAlgorithm macAlgorithm;
SSLAuthType authType;
SSLSignatureScheme signatureScheme;
/* The following fields were added in NSS 3.34. */ /* When the session was resumed this holds the key exchange group of the
* original handshake. */
SSLNamedGroup originalKeaGroup; /* This field is PR_TRUE when the session is resumed and PR_FALSE
* otherwise. */
PRBool resumed;
/* Indicates whether the peer used a delegated credential (DC) for * authentication.
*/
PRBool peerDelegCred;
/* The following fields were added in NSS 3.54. */ /* Indicates what type of PSK, if any, was used in a handshake. */
SSLPskType pskType;
/* The following fields were added in NSS 3.60 */ /* This field is PR_TRUE when the connection is established
* with TLS 1.3 Encrypted Client Hello. */
PRBool echAccepted;
/* The following field was added in NSS 3.66 */ /* This filed is PR_TRUE if the FIPS indicator is true for the
* current connection */
PRBool isFIPS;
/* When adding new fields to this structure, please document the
* NSS version in which they were added. */
} SSLChannelInfo;
/* Preliminary channel info */ #define ssl_preinfo_version (1U << 0) #define ssl_preinfo_cipher_suite (1U << 1) #define ssl_preinfo_0rtt_cipher_suite (1U << 2) /* ssl_preinfo_peer_auth covers peerDelegCred, authKeyBits,
* and scheme. Not included in ssl_preinfo_all as it is client-only. */ #define ssl_preinfo_peer_auth (1U << 3) #define ssl_preinfo_ech (1U << 4) /* ssl_preinfo_all doesn't contain ssl_preinfo_0rtt_cipher_suite because that
* field is only set if 0-RTT is sent (client) or accepted (server). */ #define ssl_preinfo_all (ssl_preinfo_version | ssl_preinfo_cipher_suite | ssl_preinfo_ech)
typedefstruct SSLPreliminaryChannelInfoStr { /* On return, SSL_GetPreliminaryChannelInfo sets |length| to the smaller of * the |len| argument and the length of the struct used by NSS. * Callers must ensure the application uses a version of NSS that
* isn't older than the version used at compile time. */
PRUint32 length; /* A bitfield over SSLPreliminaryValueSet that describes which
* preliminary values are set (see ssl_preinfo_*). */
PRUint32 valuesSet; /* Protocol version: test (valuesSet & ssl_preinfo_version) */
PRUint16 protocolVersion; /* Cipher suite: test (valuesSet & ssl_preinfo_cipher_suite) */
PRUint16 cipherSuite;
/* The following fields were added in NSS 3.29. */ /* |canSendEarlyData| is true when a 0-RTT is enabled. This can only be * true after sending the ClientHello and before the handshake completes.
*/
PRBool canSendEarlyData;
/* The following fields were added in NSS 3.31. */ /* The number of early data octets that a client is permitted to send on * this connection. The value will be zero if the connection was not * resumed or early data is not permitted. For a client, this value only * has meaning if |canSendEarlyData| is true. For a server, this indicates * the value that was advertised in the session ticket that was used to
* resume this session. */
PRUint32 maxEarlyDataSize;
/* The following fields were added in NSS 3.43. */ /* This reports the cipher suite used for 0-RTT if it sent or accepted. For * a client, this is set earlier than |cipherSuite|, and will match that * value if 0-RTT is accepted by the server. The server only sets this
* after accepting 0-RTT, so this will contain the same value. */
PRUint16 zeroRttCipherSuite;
/* The following fields were added in NSS 3.48. */ /* These fields contain information about the key that will be used in * the CertificateVerify message. If Delegated Credentials are being used, * this is the DC-contained SPKI, else the EE-cert SPKI. These fields are * valid only after the Certificate message is handled. This can be determined
* by checking the valuesSet field against |ssl_preinfo_peer_auth|. */
PRBool peerDelegCred;
PRUint32 authKeyBits;
SSLSignatureScheme signatureScheme;
/* The following fields were added in NSS 3.60. */
PRBool echAccepted; /* If the application configured ECH but |!echAccepted|, authCertificate
* should use the following hostname extracted from the ECHConfig. */ constchar* echPublicName;
/* The following field was added in NSS 3.88. */
PRBool ticketSupportsEarlyData;
/* When adding new fields to this structure, please document the
* NSS version in which they were added. */
} SSLPreliminaryChannelInfo;
typedefstruct SSLCipherSuiteInfoStr { /* On return, SSL_GetCipherSuitelInfo sets |length| to the smaller of * the |len| argument and the length of the struct used by NSS. * Callers must ensure the application uses a version of NSS that
* isn't older than the version used at compile time. */
PRUint16 length;
PRUint16 cipherSuite;
/* Cipher Suite Name */ constchar* cipherSuiteName;
/* server authentication info */ constchar* authAlgorithmName;
SSLAuthType authAlgorithm; /* deprecated, use |authType| */
/* key exchange algorithm info */ constchar* keaTypeName;
SSLKEAType keaType;
/* MAC info */ /* AEAD ciphers don't have a MAC. For an AEAD cipher, macAlgorithmName * is "AEAD", macAlgorithm is ssl_mac_aead, and macBits is the length in
* bits of the authentication tag. */ constchar* macAlgorithmName;
SSLMACAlgorithm macAlgorithm;
PRUint16 macBits;
/* The following fields were added in NSS 3.24. */ /* This reports the correct authentication type for the cipher suite, use
* this instead of |authAlgorithm|. */
SSLAuthType authType;
/* The following fields were added in NSS 3.43. */ /* This reports the hash function used in the TLS KDF, or HKDF for TLS 1.3. * For suites defined for versions of TLS earlier than TLS 1.2, this reports
* ssl_hash_none. */
SSLHashType kdfHash;
/* When adding new fields to this structure, please document the
* NSS version in which they were added. */
} SSLCipherSuiteInfo;
/* This is the old name for the supported_groups extensions. */ #define ssl_elliptic_curves_xtn ssl_supported_groups_xtn
/* SSL_MAX_EXTENSIONS includes the maximum number of extensions that are * supported for any single message type. That is, a ClientHello; ServerHello
* and TLS 1.3 NewSessionTicket and HelloRetryRequest extensions have fewer. */ #define SSL_MAX_EXTENSIONS 22
typedefstruct SSLCertificateCompressionAlgorithmStr {
SSLCertificateCompressionAlgorithmID id; constchar* name;
SECStatus (*encode)(const SECItem* input, SECItem* output); /* outputLen is the length of the output buffer passed by NSS to the decode function. * Decode should return an error code if the decoding fails or the output buffer is not big enough. * usedLen is an outparam which indicates the number of bytes the decoder consumed from output.
* Note: usedLen is always <= outputLen. */
SECStatus (*decode)(const SECItem* input, unsignedchar* output, size_t outputLen, size_t* usedLen);
} SSLCertificateCompressionAlgorithm;
#endif/* __sslt_h_ */
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.24 Sekunden
(vorverarbeitet am 2026-06-06)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.