summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2015-04-08 17:31:58 +0200
committerLinus Nordberg <linus@nordberg.se>2015-04-08 17:51:56 +0200
commit16520e4f8e9ac02d213455f213fe84ed0a705448 (patch)
tree00075cb8b6193d5396dde79bbeabbb4f8c8fb1b8 /src
parent1d1ea78c07f389172237d990c18d47dbba8014f5 (diff)
Keep lines short.
Diffstat (limited to 'src')
-rw-r--r--src/plop_httputil.erl9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plop_httputil.erl b/src/plop_httputil.erl
index 3b1c104..10a887b 100644
--- a/src/plop_httputil.erl
+++ b/src/plop_httputil.erl
@@ -25,7 +25,8 @@ get_cert_hostname(Cert) ->
TBSCert = Cert#'OTPCertificate'.tbsCertificate,
Subject = TBSCert#'OTPTBSCertificate'.subject,
{rdnSequence, RDNs} = Subject,
- CNs = lists:map(fun([#'AttributeTypeAndValue'{type=?'id-at-commonName', value=Value}]) ->
+ CNs = lists:map(fun([#'AttributeTypeAndValue'{type=?'id-at-commonName',
+ value=Value}]) ->
Value;
(_) ->
none
@@ -51,7 +52,8 @@ verify_fun(Cert, valid_peer, UserState) ->
{check_hostname, CertHostname} ->
{valid, UserState};
{check_hostname, ExpectedHostname} ->
- lager:info("Expected hostname ~p but certificate has hostname ~p", [ExpectedHostname, CertHostname]),
+ lager:info("Expected hostname ~p but certificate has hostname ~p",
+ [ExpectedHostname, CertHostname]),
{fail, "Hostname does not match"};
false ->
{valid, UserState}
@@ -67,7 +69,8 @@ request(DebugTag, URL, Headers, RequestBody) ->
case hackney:connect(ParsedURL,
[{ssl_options, [{cacertfile, CACertFile},
{verify, verify_peer},
- {verify_fun, {fun verify_fun/3, [{check_hostname, Host}]}}
+ {verify_fun, {fun verify_fun/3,
+ [{check_hostname, Host}]}}
]}]) of
{ok, ConnRef} ->
lager:debug("~s: connected to ~p",