summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2017-11-30 11:17:05 +0100
committerailin-nemui <ailin-nemui@users.noreply.github.com>2017-11-30 11:17:05 +0100
commit2b918fd9b8438eeef8f33556723140263e36f731 (patch)
tree0bdda333a8822fe71c60e42d19a3078019ee38d0 /src/core
parentb332d448f7e3c7e4b40ea4a08932d0bd46007bbf (diff)
downloadirssi-2b918fd9b8438eeef8f33556723140263e36f731.zip
move decls before code
Diffstat (limited to 'src/core')
-rw-r--r--src/core/network-openssl.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/network-openssl.c b/src/core/network-openssl.c
index 26496f47..c7ce4b43 100644
--- a/src/core/network-openssl.c
+++ b/src/core/network-openssl.c
@@ -583,9 +583,6 @@ static void set_cipher_info(TLS_REC *tls, SSL *ssl)
static void set_pubkey_info(TLS_REC *tls, X509 *cert, unsigned char *cert_fingerprint, size_t cert_fingerprint_size, unsigned char *public_key_fingerprint, size_t public_key_fingerprint_size)
{
- g_return_if_fail(tls != NULL);
- g_return_if_fail(cert != NULL);
-
EVP_PKEY *pubkey = NULL;
char *cert_fingerprint_hex = NULL;
char *public_key_fingerprint_hex = NULL;
@@ -594,6 +591,9 @@ static void set_pubkey_info(TLS_REC *tls, X509 *cert, unsigned char *cert_finger
char buffer[128];
size_t length;
+ g_return_if_fail(tls != NULL);
+ g_return_if_fail(cert != NULL);
+
pubkey = X509_get_pubkey(cert);
cert_fingerprint_hex = binary_to_hex(cert_fingerprint, cert_fingerprint_size);
@@ -647,9 +647,6 @@ static void set_pubkey_info(TLS_REC *tls, X509 *cert, unsigned char *cert_finger
static void set_peer_cert_chain_info(TLS_REC *tls, SSL *ssl)
{
- g_return_if_fail(tls != NULL);
- g_return_if_fail(ssl != NULL);
-
int nid;
char *key = NULL;
char *value = NULL;
@@ -662,6 +659,9 @@ static void set_peer_cert_chain_info(TLS_REC *tls, SSL *ssl)
TLS_CERT_ENTRY_REC *tls_cert_entry_rec = NULL;
ASN1_STRING *data = NULL;
+ g_return_if_fail(tls != NULL);
+ g_return_if_fail(ssl != NULL);
+
chain = SSL_get_peer_cert_chain(ssl);
if (chain == NULL)
@@ -714,9 +714,6 @@ static void set_peer_cert_chain_info(TLS_REC *tls, SSL *ssl)
static void set_server_temporary_key_info(TLS_REC *tls, SSL *ssl)
{
- g_return_if_fail(tls != NULL);
- g_return_if_fail(ssl != NULL);
-
#ifdef SSL_get_server_tmp_key
/* Show ephemeral key information. */
EVP_PKEY *ephemeral_key = NULL;
@@ -729,6 +726,9 @@ static void set_server_temporary_key_info(TLS_REC *tls, SSL *ssl)
char *cname = NULL;
int nid;
+ g_return_if_fail(tls != NULL);
+ g_return_if_fail(ssl != NULL);
+
if (SSL_get_server_tmp_key(ssl, &ephemeral_key)) {
switch (EVP_PKEY_id(ephemeral_key)) {
case EVP_PKEY_DH: