summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol/http/nsHttpConnectionMgr.h
diff options
context:
space:
mode:
Diffstat (limited to 'netwerk/protocol/http/nsHttpConnectionMgr.h')
-rw-r--r--netwerk/protocol/http/nsHttpConnectionMgr.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.h b/netwerk/protocol/http/nsHttpConnectionMgr.h
index 2cf4ab7568..3be6b01689 100644
--- a/netwerk/protocol/http/nsHttpConnectionMgr.h
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.h
@@ -60,6 +60,12 @@ class nsHttpConnectionMgr final : public HttpConnectionMgrShell,
[[nodiscard]] nsresult CancelTransactions(nsHttpConnectionInfo*,
nsresult code);
+ // The connection manager needs to know the hashes used for a WebTransport
+ // connection authenticated with serverCertHashes
+ nsresult StoreServerCertHashes(
+ nsHttpConnectionInfo* aConnInfo, bool aNoSpdy, bool aNoHttp3,
+ nsTArray<RefPtr<nsIWebTransportHash>>&& aServerCertHashes);
+
//-------------------------------------------------------------------------
// NOTE: functions below may be called only on the socket thread.
//-------------------------------------------------------------------------
@@ -143,6 +149,11 @@ class nsHttpConnectionMgr final : public HttpConnectionMgrShell,
void NewIdleConnectionAdded(uint32_t timeToLive);
void DecrementNumIdleConns();
+ const nsTArray<RefPtr<nsIWebTransportHash>>* GetServerCertHashes(
+ nsHttpConnectionInfo* aConnInfo);
+
+ uint64_t GenerateNewWebTransportId() { return mMaxWebTransportId++; }
+
private:
virtual ~nsHttpConnectionMgr();
@@ -334,6 +345,7 @@ class nsHttpConnectionMgr final : public HttpConnectionMgrShell,
void OnMsgPruneNoTraffic(int32_t, ARefBase*);
void OnMsgUpdateCurrentBrowserId(int32_t, ARefBase*);
void OnMsgClearConnectionHistory(int32_t, ARefBase*);
+ void OnMsgStoreServerCertHashes(int32_t, ARefBase*);
// Total number of active connections in all of the ConnectionEntry objects
// that are accessed from mCT connection table.
@@ -462,6 +474,10 @@ class nsHttpConnectionMgr final : public HttpConnectionMgrShell,
void NotifyConnectionOfBrowserIdChange(uint64_t previousId);
void CheckTransInPendingQueue(nsHttpTransaction* aTrans);
+
+ // Used for generating unique IDSs for dedicated connections, currently used
+ // by WebTransport
+ Atomic<uint64_t> mMaxWebTransportId{1};
};
} // namespace mozilla::net