ocsp: add Response.Raw
Fixes golang/go#38340
Trust: Roland Shoemaker
Run-TryBot: Roland Shoemaker
TryBot-Result: Gopher Robot
@@ -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),
