forked from erlang/otp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
public_key: exclusive_decode config & data
- Loading branch information
Showing
4 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ok, Bin} = file:read_file("BasicOcspResponse.data"). | ||
|
||
%% decode everything | ||
public_key:der_decode('BasicOCSPResponse', Bin). | ||
|
||
%% decode but not signature | ||
'OTP-PUB-KEY':decode_BasicOCSPResponse_exclusive1(Bin). | ||
|
||
%% decode but not certs - 'parts' crashes with function_clause: 'OTP-PUB-KEY':decode_tag_and_length({asn1,"tag failure" | ||
'OTP-PUB-KEY':decode_BasicOCSPResponse_exclusive2(Bin). | ||
|
||
%% decode but not certs - 'undecoded' returns error but shouldn't? | ||
'OTP-PUB-KEY':decode_BasicOCSPResponse_exclusive3(Bin). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
{exclusive_decode,{'OTP-PUB-KEY', | ||
[{decode_TBSCert_exclusive,['Certificate',[{tbsCertificate,undecoded}]]}, | ||
{decode_TBSCertList_exclusive,['CertificateList',[{tbsCertList,undecoded}]]}]}}. | ||
{exclusive_decode, | ||
{'OTP-PUB-KEY', | ||
[ | ||
{decode_TBSCert_exclusive, | ||
['Certificate',[{tbsCertificate,undecoded}]]}, | ||
%% {decode_TBSCertList_exclusive2, | ||
%% ['CertificateList',[{tbsCertList,undecoded}]]}, | ||
{decode_BasicOCSPResponse_exclusive1, | ||
['BasicOCSPResponse',[{signature,undecoded}]]} | ||
%% ,{decode_BasicOCSPResponse_exclusive2, % FIXME1 | ||
%% ['BasicOCSPResponse',[{certs,undecoded}]]} | ||
%% ,{decode_BasicOCSPResponse_exclusive2, % FIXME2 | ||
%% ['BasicOCSPResponse',[{certs,parts}]]} | ||
]}}. |