Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
base repository: Yawning/tor
base: master
head repository: Yawning/tor
compare: bug15760_redux
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 2 files changed
  • 0 comments
  • 1 contributor
Commits on Jun 02, 2015
 * Use `TLS_method()` instead of the deprecated `SSLv23_method()`
 * Fix one missed conversion to `SSL_CIPHER_get_id()`
Showing with 11 additions and 1 deletion.
  1. +1 −0 configure.ac
  2. +10 −1 src/common/tortls.c
@@ -627,6 +627,7 @@ AC_CHECK_FUNCS([ \
SSL_get_client_ciphers \
SSL_get_client_random \
SSL_CIPHER_find \
TLS_method
])
LIBS="$save_LIBS"
LDFLAGS="$save_LDFLAGS"
@@ -1189,8 +1189,13 @@ tor_tls_context_new(crypto_pk_t *identity, unsigned int key_lifetime,
#endif

/* Tell OpenSSL to use TLS 1.0 or later but not SSL2 or SSL3. */
#ifdef HAVE_TLS_METHOD
if (!(result->ctx = SSL_CTX_new(TLS_method())))
goto error;
#else
if (!(result->ctx = SSL_CTX_new(SSLv23_method())))
goto error;
#endif
SSL_CTX_set_options(result->ctx, SSL_OP_NO_SSLv2);
SSL_CTX_set_options(result->ctx, SSL_OP_NO_SSLv3);

@@ -1411,7 +1416,7 @@ find_cipher_by_id(const SSL *ssl, const SSL_METHOD *m, uint16_t cipher)
* cipher with the appropriate 3 bytes. */
c = SSL_CIPHER_find((SSL*)ssl, cipherid);
if (c)
tor_assert((c->id & 0xffff) == cipher);
tor_assert((SSL_CIPHER_get_id(c) & 0xffff) == cipher);
return c != NULL;
}
#elif defined(HAVE_STRUCT_SSL_METHOD_ST_GET_CIPHER_BY_CHAR)
@@ -1454,7 +1459,11 @@ static void
prune_v2_cipher_list(const SSL *ssl)
{
uint16_t *inp, *outp;
#ifdef HAVE_TLS_METHOD
const SSL_METHOD *m = TLS_method();
#else
const SSL_METHOD *m = SSLv23_method();
#endif

inp = outp = v2_cipher_list;
while (*inp) {

No commit comments for this range