Skip to content
This repository has been archived by the owner on Jan 21, 2019. It is now read-only.

Commit

Permalink
Disable SSLv3
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyshch committed Nov 26, 2013
1 parent 2a2aa70 commit 5d3cad3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions c_src/p1_tls_drv.c
Expand Up @@ -490,11 +490,16 @@ static ErlDrvSSizeT tls_drv_control(ErlDrvData handle,
SSL_set_bio(d->ssl, d->bio_read, d->bio_write);

if (command == SET_CERTIFICATE_FILE_ACCEPT) {
SSL_set_options(d->ssl, SSL_OP_NO_SSLv2|SSL_OP_NO_TICKET|SSL_OP_ALL);
SSL_set_options(
d->ssl,
SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 |
SSL_OP_NO_TICKET | SSL_OP_ALL);

SSL_set_accept_state(d->ssl);
} else {
SSL_set_options(d->ssl, SSL_OP_NO_SSLv2|SSL_OP_NO_TICKET);
SSL_set_options(
d->ssl,
SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_TICKET);
SSL_set_connect_state(d->ssl);
}
break;
Expand Down

0 comments on commit 5d3cad3

Please sign in to comment.