http2: fix client setup (#1090)

* http2: cancel client action on setup timeout

* ignore incompatible server keys
This commit is contained in:
Alexander Bondarenko authored and GitHub committed 2024-04-10 21:00:39 +01:00
1 parent 1219446996
commit 91cf6841e0
2 files changed
+8 -7

No files matched your search

+1 -1
View File
@@ -142,7 +142,7 @@ xftpClientHandshakeV1 g serverVRange keyHash@(C.KeyHash kh) c@HTTP2Client {sessi
case cert of
[_leaf, ca] | XV.Fingerprint kh == XV.getFingerprint ca X.HashSHA256 -> pure ()
_ -> throwError "bad certificate"
pubKey <- C.verifyX509 serverKey exact
pubKey <- maybe (throwError "bad server key type") (`C.verifyX509` exact) serverKey
C.x509ToPublic (pubKey, []) >>= C.pubKey
sendClientHandshake chs = do
chs' <- liftHS $ C.pad (smpEncode chs) xftpBlockSize