summaryrefslogtreecommitdiff
path: root/src/x509.erl
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2015-05-06 12:04:51 +0200
committerLinus Nordberg <linus@nordberg.se>2015-05-06 12:04:51 +0200
commit0e27a8f7b0fff609f463cca3b2bfb40a916fcc13 (patch)
treec83538159453a2f432b29781b95e7d84dda2a203 /src/x509.erl
parentca8cbe163492f7fcb321d22d7e3700d8f0646d99 (diff)
Dialyzer clean.
Diffstat (limited to 'src/x509.erl')
-rw-r--r--src/x509.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/x509.erl b/src/x509.erl
index 87d9c0c..7bbfb8e 100644
--- a/src/x509.erl
+++ b/src/x509.erl
@@ -56,7 +56,7 @@ self_signed(L) ->
lists:filter(fun(Cert) -> signed_by_p(Cert, Cert) end, L).
-spec detox(binary(), [binary()]) -> {binary(), binary()}.
-%% @doc Return the detoxed cet in LeafDer and the issuer leaf hash.
+%% @doc Return a detoxed LeafDer and its issuer.
detox(LeafDer, ChainDer) ->
detox_precert(LeafDer, nth(1, ChainDer), nth(2, ChainDer)).
@@ -64,7 +64,7 @@ detox(LeafDer, ChainDer) ->
%% Private functions.
-spec normalise_chain([binary()], [binary()], integer()) ->
- {false, reason()} | {true, list()}.
+ {false, reason()} | {true, [binary()]}.
%% @doc Verify that the leaf cert or precert has a valid chain back to
%% an acceptable root cert. The order of certificates in the second
%% argument is: leaf cert in head, chain in tail. Order of first
@@ -312,7 +312,7 @@ is_precert_signer(#'Certificate'{tbsCertificate = TBSCert}) ->
_ -> false
end.
--spec is_ca(#'TBSCertificate'{}) -> binary().
+-spec is_ca(#'TBSCertificate'{}) -> boolean().
is_ca(#'TBSCertificate'{extensions = Extensions}) ->
case pubkey_cert:select_extension(?'id-ce-basicConstraints', Extensions) of
#'Extension'{critical = true, extnValue = Val} ->