AppleTLS: Enable BEAST mitigations in ST

Only available in 10.9+, but since we might be building on a previous
version but running on 10.9+, always try to set the option.
pull/220/merge
Nils Maier 2014-04-12 20:40:55 +02:00
parent e195dc5f00
commit 18c35f56b8
1 changed files with 10 additions and 0 deletions

View File

@ -382,6 +382,16 @@ AppleTLSSession::AppleTLSSession(AppleTLSContext* ctx)
(void)SSLSetProtocolVersionEnabled(sslCtx_, kTLSProtocol12, true);
#endif
// BEAST
(void)SSLSetSessionOption(
sslCtx_,
#if defined(__MAC_10_9)
kSSLSessionOptionSendOneByteRecord,
#else
(SSLSessionOption)0x4, /* kSSLSessionOptionSendOneByteRecord */
#endif
true);
#if defined(__MAC_10_8)
if (!ctx->getVerifyPeer()) {
// This disables client verification