Skip to content

Commit

Permalink
ocsp: add Response.Raw
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rolandshoemaker authored and gopherbot committed Mar 31, 2022
1 parent 9563c9f commit b573cc5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ocsp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit b573cc5

Please sign in to comment.