mirror of
https://github.com/go-acme/lego.git
synced 2024-12-27 19:43:24 +02:00
Merge pull request #104 from chrismoos/fix_ocsp
GetOCSPForCert should fail if there are no OCSP servers in the cert.
This commit is contained in:
commit
4efc9abf53
@ -90,6 +90,10 @@ func GetOCSPForCert(bundle []byte) ([]byte, *ocsp.Response, error) {
|
|||||||
issuedCert := certificates[0]
|
issuedCert := certificates[0]
|
||||||
issuerCert := certificates[1]
|
issuerCert := certificates[1]
|
||||||
|
|
||||||
|
if len(issuedCert.OCSPServer) == 0 {
|
||||||
|
return nil, nil, errors.New("no OCSP server specified in cert")
|
||||||
|
}
|
||||||
|
|
||||||
// Finally kick off the OCSP request.
|
// Finally kick off the OCSP request.
|
||||||
ocspReq, err := ocsp.CreateRequest(issuedCert, issuerCert, nil)
|
ocspReq, err := ocsp.CreateRequest(issuedCert, issuerCert, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user