1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
From 46744c412dca9ca2efc0df8ba1473ffd9145ddac Mon Sep 17 00:00:00 2001
From: Michael Gehring <mg@ebfe.org>
Date: Fri, 3 Jun 2016 20:23:52 +0200
Subject: [PATCH] lib/fetch/common.c: fix build with
-Werror=misleading-indentation
Fixes #179
---
lib/fetch/common.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/lib/fetch/common.c b/lib/fetch/common.c
index 77ffb7b..dd98a88 100644
--- a/lib/fetch/common.c
+++ b/lib/fetch/common.c
@@ -754,17 +754,17 @@ fetch_ssl_verify_cn(X509_NAME *subject, const char *host,
NID_commonName, lastpos)) != -1)
loc = lastpos;
- if (loc > -1) {
- nameentry = X509_NAME_get_entry(subject, loc);
- namedata = X509_NAME_ENTRY_get_data(nameentry);
- cnlen = ASN1_STRING_to_UTF8(&cn, namedata);
- if (ip == NULL &&
- fetch_ssl_hname_match(host, strlen(host), (const char *)cn, cnlen))
- ret = 1;
- else if (ip != NULL && fetch_ssl_ipaddr_match(ip, (const char *)cn, cnlen))
- ret = 1;
- OPENSSL_free(cn);
- }
+ if (loc > -1) {
+ nameentry = X509_NAME_get_entry(subject, loc);
+ namedata = X509_NAME_ENTRY_get_data(nameentry);
+ cnlen = ASN1_STRING_to_UTF8(&cn, namedata);
+ if (ip == NULL &&
+ fetch_ssl_hname_match(host, strlen(host), (const char *)cn, cnlen))
+ ret = 1;
+ else if (ip != NULL && fetch_ssl_ipaddr_match(ip, (const char *)cn, cnlen))
+ ret = 1;
+ OPENSSL_free(cn);
+ }
return (ret);
}
|