From b7b76c84da09d8399fda12902662a98ddd607c3e Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Fri, 5 Sep 2003 05:58:21 +0000 Subject: [PATCH] move variable declarations to top of function svn:r425 --- trunk/src/common/tortls.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/trunk/src/common/tortls.c b/trunk/src/common/tortls.c index 9e964de6e6..19a814be91 100644 --- a/trunk/src/common/tortls.c +++ b/trunk/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;