aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl_crl_cache_api.erl
diff options
context:
space:
mode:
authorMagnus Henoch <[email protected]>2016-02-16 15:09:07 +0000
committerMagnus Henoch <[email protected]>2016-04-01 15:45:15 +0100
commit8fbd0e8dd05ba1f76f2d02a2e4c16e7973adfd4c (patch)
tree505be567f4349063f00ece003b711333ad18ccba /lib/ssl/src/ssl_crl_cache_api.erl
parentd166fec5d5c901a93e21a1ea7b3165b6fe68d320 (diff)
downloadotp-8fbd0e8dd05ba1f76f2d02a2e4c16e7973adfd4c.tar.gz
otp-8fbd0e8dd05ba1f76f2d02a2e4c16e7973adfd4c.tar.bz2
otp-8fbd0e8dd05ba1f76f2d02a2e4c16e7973adfd4c.zip
Add issuer arg to ssl_crl_cache_api lookup callback
Change the ssl_crl_cache_api callback specification, passing the certificate issuer name as an argument to the lookup callback function. Support the previous API too, for the time being. The purpose of this change is to accomodate CRL cache modules that index CRLs by issuer name, not by distribution point URL. While in most cases such lookups could be performed using the select/2 callback function, that doesn't work when the CRL in question contains an Issuing Distribution Point (IDP) extension, since RFC 5280 specifies different processing rules for CRLs specified in a distribution point (DP) and other CRLs. For the latter, a DP is assumed that most likely will not match the IDP of the CRL. In order to accommodate cache modules that index CRLs by issuer name, let's pass them the issuer as well.
Diffstat (limited to 'lib/ssl/src/ssl_crl_cache_api.erl')
-rw-r--r--lib/ssl/src/ssl_crl_cache_api.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/ssl/src/ssl_crl_cache_api.erl b/lib/ssl/src/ssl_crl_cache_api.erl
index d7b31f280e..c3a57e2f49 100644
--- a/lib/ssl/src/ssl_crl_cache_api.erl
+++ b/lib/ssl/src/ssl_crl_cache_api.erl
@@ -24,8 +24,9 @@
-include_lib("public_key/include/public_key.hrl").
--type db_handle() :: term().
+-type db_handle() :: term().
+-type issuer_name() :: {rdnSequence, [#'AttributeTypeAndValue'{}]}.
--callback lookup(#'DistributionPoint'{}, db_handle()) -> not_available | [public_key:der_encoded()].
--callback select(term(), db_handle()) -> [public_key:der_encoded()].
+-callback lookup(#'DistributionPoint'{}, issuer_name(), db_handle()) -> not_available | [public_key:der_encoded()].
+-callback select(issuer_name(), db_handle()) -> [public_key:der_encoded()].
-callback fresh_crl(#'DistributionPoint'{}, public_key:der_encoded()) -> public_key:der_encoded().