Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:26
erlang
1513-public_key-handle-OCSP-response-with-no-ce...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1513-public_key-handle-OCSP-response-with-no-certs-provid.patch of Package erlang
From 185d885d661b8e53337a611e6b3bc08eac74be91 Mon Sep 17 00:00:00 2001 From: Jakub Witczak <kuba@erlang.org> Date: Mon, 8 Apr 2024 16:53:13 +0200 Subject: [PATCH 3/5] public_key: handle OCSP response with no certs provided --- lib/public_key/src/public_key.erl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/public_key/src/public_key.erl b/lib/public_key/src/public_key.erl index 98192f2f55..0b76d9ac1d 100644 --- a/lib/public_key/src/public_key.erl +++ b/lib/public_key/src/public_key.erl @@ -1982,9 +1982,14 @@ pkix_ocsp_validate(Cert, IssuerCert, OcspRespDer, NonceExt, Options) proplists:get_value(is_trusted_responder_fun, Options, fun(_) -> false end), maybe - {ok, BasicOcspResponse = #'BasicOCSPResponse'{certs = Certs}} ?= + {ok, BasicOcspResponse = #'BasicOCSPResponse'{certs = Certs0}} ?= pubkey_ocsp:decode_response(OcspRespDer), - OcspResponseCerts = [combined_cert(C) || C <- Certs], + Certs = case Certs0 of + asn1_NOVALUE -> []; % case when certs field is empty + _ -> Certs0 + end, + OcspResponseCerts = [combined_cert(C) || C <- Certs] ++ + [#cert{der = <<>>, otp = IssuerCert}], {ok, Responses} ?= pubkey_ocsp:verify_response( BasicOcspResponse, OcspResponseCerts, NonceExt, IssuerCert, -- 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