| 427 | |
| 428 | |
| 429 | void Context::disableProtocols(int protocols) |
| 430 | { |
| 431 | if (protocols & PROTO_SSLV2) |
| 432 | { |
| 433 | #if defined(SSL_OP_NO_SSLv2) |
| 434 | SSL_CTX_set_options(_pSSLContext, SSL_OP_NO_SSLv2); |
| 435 | #endif |
| 436 | } |
| 437 | if (protocols & PROTO_SSLV3) |
| 438 | { |
| 439 | #if defined(SSL_OP_NO_SSLv3) |
| 440 | SSL_CTX_set_options(_pSSLContext, SSL_OP_NO_SSLv3); |
| 441 | #endif |
| 442 | } |
| 443 | if (protocols & PROTO_TLSV1) |
| 444 | { |
| 445 | #if defined(SSL_OP_NO_TLSv1) |
| 446 | SSL_CTX_set_options(_pSSLContext, SSL_OP_NO_TLSv1); |
| 447 | #endif |
| 448 | } |
| 449 | if (protocols & PROTO_TLSV1_1) |
| 450 | { |
| 451 | #if defined(SSL_OP_NO_TLSv1_1) |
| 452 | SSL_CTX_set_options(_pSSLContext, SSL_OP_NO_TLSv1_1); |
| 453 | #endif |
| 454 | } |
| 455 | if (protocols & PROTO_TLSV1_2) |
| 456 | { |
| 457 | #if defined(SSL_OP_NO_TLSv1_2) |
| 458 | SSL_CTX_set_options(_pSSLContext, SSL_OP_NO_TLSv1_2); |
| 459 | #endif |
| 460 | } |
| 461 | } |
| 462 | |
| 463 | |
| 464 | void Context::preferServerCiphers() |
no outgoing calls
no test coverage detected