diff options
| author | Roland Shoemaker <roland@golang.org> | 2022-03-02 11:20:58 -0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-03-31 22:09:35 +0000 |
| commit | ae2d96664a2994bd96a7d9e398c8042459da881b (patch) | |
| tree | 0a0b57be7e52c3df34f36873800b0f94e3c7922d | |
| parent | 2c7772ba30643b7a2026cbea938420dce7c6384d (diff) | |
| download | go-x-crypto-ae2d96664a2994bd96a7d9e398c8042459da881b.tar.xz | |
ocsp: add Response.Raw
Fixes golang/go#38340
Change-Id: I77afc901584ac3361eafa13c9ee9f8cf9ec2ee28
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/389256
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
Auto-Submit: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
| -rw-r--r-- | ocsp/ocsp.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ocsp/ocsp.go b/ocsp/ocsp.go index 96972ae..4269ed1 100644 --- a/ocsp/ocsp.go +++ b/ocsp/ocsp.go @@ -345,6 +345,8 @@ func (req *Request) Marshal() ([]byte, error) { // Response represents an OCSP response containing a single SingleResponse. See // RFC 6960. type Response struct { + Raw []byte + // Status is one of {Good, Revoked, Unknown} Status int SerialNumber *big.Int @@ -518,6 +520,7 @@ func ParseResponseForCert(bytes []byte, cert, issuer *x509.Certificate) (*Respon } ret := &Response{ + Raw: bytes, TBSResponseData: basicResp.TBSResponseData.Raw, Signature: basicResp.Signature.RightAlign(), SignatureAlgorithm: getSignatureAlgorithmFromOID(basicResp.SignatureAlgorithm.Algorithm), |
