summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-09-05 05:58:21 +0000
committerRoger Dingledine <arma@torproject.org>2003-09-05 05:58:21 +0000
commit99d1e4931b0eeb1e2e11f20b6d999332eb5a0c70 (patch)
tree34448f6de62f775a09f7c05564c55218047f1205
parentfd20011c263df7fa843d32a2323bff81357b5a20 (diff)
downloadtor-99d1e4931b0eeb1e2e11f20b6d999332eb5a0c70.tar.gz
tor-99d1e4931b0eeb1e2e11f20b6d999332eb5a0c70.zip
move variable declarations to top of function
svn:r425
-rw-r--r--src/common/tortls.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 9e964de6e6..19a814be91 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -135,13 +135,14 @@ tor_tls_write_certificate(char *certfile, crypto_pk_env_t *rsa, char *nickname)
tor_tls_context *
tor_tls_context_new(char *certfile, crypto_pk_env_t *rsa, int isServer)
{
- assert(!rsa || rsa->type == CRYPTO_PK_RSA);
- assert((certfile && rsa) || (!certfile && !rsa));
crypto_dh_env_t *dh = NULL;
RSA *_rsa = NULL;
EVP_PKEY *pkey = NULL;
tor_tls_context *result;
+ assert(!rsa || rsa->type == CRYPTO_PK_RSA);
+ assert((certfile && rsa) || (!certfile && !rsa));
+
result = tor_malloc(sizeof(tor_tls_context));
if (!(result->ctx = SSL_CTX_new(TLSv1_method())))
return NULL;