HsOpenSSL 0.11.5.1 → 0.11.6
raw patch · 3 files changed
+22/−1 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ OpenSSL.Session: contextSetSessionIdContext :: SSLContext -> ByteString -> IO ()
Files
- ChangeLog +7/−0
- HsOpenSSL.cabal +1/−1
- OpenSSL/Session.hsc +14/−0
ChangeLog view
@@ -1,3 +1,10 @@+2021-03-19 Vladimir Shabanov <dev@vshabanov.com>++ * HsOpenSSL.cabal (Version): Bump version to 0.11.6++ * Added Session.contextSetSessionIdContext+ by Francesco Gazzetta @fgaz (#56)+ 2020-11-06 Vladimir Shabanov <dev@vshabanov.com> * HsOpenSSL.cabal (Version): Bump version to 0.11.5.1
HsOpenSSL.cabal view
@@ -10,7 +10,7 @@ systems and stable. You may also be interested in the @tls@ package, <http://hackage.haskell.org/package/tls>, which is a pure Haskell implementation of SSL.-Version: 0.11.5.1+Version: 0.11.6 License: PublicDomain License-File: COPYING Author: Adam Langley, Mikhail Vorozhtsov, PHO, Taru Karttunen
OpenSSL/Session.hsc view
@@ -29,6 +29,7 @@ , contextSetCAFile , contextSetCADirectory , contextGetCAStore+ , contextSetSessionIdContext -- * SSL connections , SSL@@ -338,6 +339,19 @@ = withContext context $ \ ctx -> _ssl_get_cert_store ctx >>= wrapX509Store (touchContext context)++foreign import ccall unsafe "SSL_CTX_set_session_id_context"+ _ssl_set_session_id_context :: Ptr SSLContext_ -> Ptr CChar -> CSize -> IO CInt++-- | Set context within which session can be reused (server side only).+--+-- If client certificates are used and the session id context is not set,+-- attempts by the clients to reuse a session will make the handshake fail.+contextSetSessionIdContext :: SSLContext -> B.ByteString -> IO ()+contextSetSessionIdContext context idCtx =+ withContext context $ \ctx ->+ B.unsafeUseAsCStringLen idCtx $ \(cIdCtx, len) ->+ _ssl_set_session_id_context ctx cIdCtx (fromIntegral len) >>= failIf_ (/= 1) data SSL_