Only check if SSL_OP_NO_SSLv2 is set if it is != 0

This commit is contained in:
Jonathan Schleifer 2017-08-01 21:14:38 +02:00
parent 2ef2132444
commit ec17d44407
No known key found for this signature in database
GPG key ID: 28D65178B37F33E3

View file

@ -134,9 +134,11 @@ locking_callback(int mode, int n, const char *file, int line)
@throw [OFInitializationFailedException
exceptionWithClass: self];
#if SSL_OP_NO_SSLv2 != 0
if ((SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2) & SSL_OP_NO_SSLv2) == 0)
@throw [OFInitializationFailedException
exceptionWithClass: self];
#endif
if (SSL_CTX_set_default_verify_paths(ctx) == 0)
@throw [OFInitializationFailedException