/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * 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/. */
// Note that this is only valid *during* a handshake; at the end of the // handshake, it gets reset back to false. void SetFullHandshake() {
COMMON_SOCKET_CONTROL_ASSERT_ON_OWNING_THREAD();
mIsFullHandshake = true;
} bool IsFullHandshake() const {
COMMON_SOCKET_CONTROL_ASSERT_ON_OWNING_THREAD(); return mIsFullHandshake;
}
#ifdef DEBUG // These helpers assert that the caller does try to send the same data // as it was previously when we hit the short-write. This is a measure // to make sure we communicate correctly to the consumer. void RememberShortWrittenBuffer(constunsignedchar* data) {
COMMON_SOCKET_CONTROL_ASSERT_ON_OWNING_THREAD();
mShortWriteBufferCheck =
mozilla::MakeUnique<char[]>(mShortWriteOriginalAmount);
memcpy(mShortWriteBufferCheck.get(), data, mShortWriteOriginalAmount);
} void CheckShortWrittenBuffer(constunsignedchar* data, int32_t amount) {
COMMON_SOCKET_CONTROL_ASSERT_ON_OWNING_THREAD(); if (!mShortWriteBufferCheck) return;
MOZ_ASSERT(amount >= mShortWriteOriginalAmount, "unexpected amount length after short write");
MOZ_ASSERT(
!memcmp(mShortWriteBufferCheck.get(), data, mShortWriteOriginalAmount), "unexpected buffer content after short write");
mShortWriteBufferCheck = nullptr;
} #endif
void SetPendingSelectClientAuthCertificate(
nsCOMPtr<nsIRunnable>&& selectClientAuthCertificate) {
COMMON_SOCKET_CONTROL_ASSERT_ON_OWNING_THREAD();
MOZ_LOG(
gPIPNSSLog, mozilla::LogLevel::Debug,
("[%p] setting pending select client auth certificate", (void*)mFd)); // If the connection corresponding to this socket hasn't been claimed, it // is a speculative connection. The connection will block until the "choose // a client auth certificate" dialog has been shown. The dialog will only // be shown when this connection gets claimed. However, necko will never // claim the connection as long as it is blocking. Thus, this connection // can't proceed, so it's best to cancel it. Necko will create a new, // non-speculative connection instead. if (!mClaimed) {
SetCanceled(PR_CONNECT_RESET_ERROR);
} else {
mPendingSelectClientAuthCertificate =
std::move(selectClientAuthCertificate);
}
}
RefPtr<nsSSLIOLayerHelpers> mSSLIOLayerHelpers; bool mForSTARTTLS;
SSLVersionRange mTLSVersionRange; bool mHandshakePending; bool mPreliminaryHandshakeDone; // after false start items are complete
nsresult ActivateSSL();
nsCString mEsniTxt;
nsCString mEchConfig; bool mEarlyDataAccepted; bool mDenyClientCert; bool mFalseStartCallbackCalled; bool mFalseStarted; bool mIsFullHandshake; bool mNotedTimeUntilReady;
EchExtensionStatus mEchExtensionStatus; // Currently only used for telemetry. bool mSentMlkemShare; bool mHasTls13HandshakeSecrets;
// True when SSL layer has indicated an "SSL short write", i.e. need // to call on send one or more times to push all pending data to write. bool mIsShortWritePending;
// These are only valid if mIsShortWritePending is true. // // Value of the last byte pending from the SSL short write that needs // to be passed to subsequent calls to send to perform the flush. unsignedchar mShortWritePendingByte;
// Original amount of data the upper layer has requested to write to // return after the successful flush.
int32_t mShortWriteOriginalAmount;
// mKEA* are used in false start and http/2 detetermination // Values are from nsITLSSocketControl
int16_t mKEAUsed;
uint32_t mKEAKeyBits;
int16_t mMACAlgorithmUsed;
// Regarding the client certificate message in the TLS handshake, RFC 5246 // (TLS 1.2) says: // If the certificate_authorities list in the certificate request // message was non-empty, one of the certificates in the certificate // chain SHOULD be issued by one of the listed CAs. // (RFC 8446 (TLS 1.3) has a similar provision) // These certificates may be known to gecko but not NSS (e.g. enterprise // intermediates). In order to make these certificates discoverable to NSS // so it can include them in the message, we cache them here as temporary // certificates.
mozilla::UniqueCERTCertList mClientCertChain;
¤ 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.0.34Bemerkung:
(vorverarbeitet)
¤
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 ist noch experimentell.