Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

Commit ec17d44

Browse files
committed
Only check if SSL_OP_NO_SSLv2 is set if it is != 0
1 parent 2ef2132 commit ec17d44

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/SSLSocket.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,11 @@ + (void)initialize
134134
@throw [OFInitializationFailedException
135135
exceptionWithClass: self];
136136

137+
#if SSL_OP_NO_SSLv2 != 0
137138
if ((SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2) & SSL_OP_NO_SSLv2) == 0)
138139
@throw [OFInitializationFailedException
139140
exceptionWithClass: self];
141+
#endif
140142

141143
if (SSL_CTX_set_default_verify_paths(ctx) == 0)
142144
@throw [OFInitializationFailedException

0 commit comments

Comments
 (0)