summaryrefslogtreecommitdiff
path: root/src/x509.erl
diff options
context:
space:
mode:
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} ->