Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:26
erlang
1514-public_key-fix-OCSP-signature-check.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1514-public_key-fix-OCSP-signature-check.patch of Package erlang
From 0a1a74af2431fc74c6cbd0b8afd62a752b12a703 Mon Sep 17 00:00:00 2001 From: Jakub Witczak <kuba@erlang.org> Date: Wed, 10 Apr 2024 17:38:26 +0200 Subject: [PATCH 4/5] public_key: fix OCSP signature check - for public key info using EC - https://ietf.org certificate --- lib/public_key/src/pubkey_ocsp.erl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/public_key/src/pubkey_ocsp.erl b/lib/public_key/src/pubkey_ocsp.erl index 6c08ca7bf5..e5d5145094 100644 --- a/lib/public_key/src/pubkey_ocsp.erl +++ b/lib/public_key/src/pubkey_ocsp.erl @@ -251,14 +251,20 @@ do_verify_signature(ResponseDataDer, Signature, AlgorithmID, get_public_key_rec(#'OTPCertificate'{tbsCertificate = TbsCert}) -> PKInfo = TbsCert#'OTPTBSCertificate'.subjectPublicKeyInfo, - PKInfo#'OTPSubjectPublicKeyInfo'.subjectPublicKey. + Params = PKInfo#'OTPSubjectPublicKeyInfo'.algorithm#'PublicKeyAlgorithm'.parameters, + SubjectPublicKey = PKInfo#'OTPSubjectPublicKeyInfo'.subjectPublicKey, + case Params of + {namedCurve, _} -> + {SubjectPublicKey, Params}; + _ -> + SubjectPublicKey + end. get_subject_name(#'OTPCertificate'{tbsCertificate = TbsCert}) -> public_key:pkix_encode('Name', TbsCert#'OTPTBSCertificate'.subject, otp). -get_public_key(#'OTPCertificate'{tbsCertificate = TbsCert}) -> - PKInfo = TbsCert#'OTPTBSCertificate'.subjectPublicKeyInfo, - enc_pub_key(PKInfo#'OTPSubjectPublicKeyInfo'.subjectPublicKey). +get_public_key(OtpCert) -> + enc_pub_key(get_public_key_rec(OtpCert)). enc_pub_key(Key = #'RSAPublicKey'{}) -> public_key:der_encode('RSAPublicKey', Key); -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor