cryptobyte: include changes from review of 57810
I forgot to upload the final set of changes before submitting. Change-Id: I3e60c6e2aad25af7f5007fc5ffbf8a1a1e1a91f3 Reviewed-on: https://go-review.googlesource.com/63331 Reviewed-by: Adam Langley <agl@golang.org>
This commit is contained in:
+1
-4
@@ -562,9 +562,6 @@ func (s *String) ReadOptionalASN1(out *String, outPresent *bool, tag asn1.Tag) b
|
|||||||
if outPresent != nil {
|
if outPresent != nil {
|
||||||
*outPresent = present
|
*outPresent = present
|
||||||
}
|
}
|
||||||
if out != nil {
|
|
||||||
*out = String(nil)
|
|
||||||
}
|
|
||||||
if present && !s.ReadASN1(out, tag) {
|
if present && !s.ReadASN1(out, tag) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@@ -727,7 +724,7 @@ func (s *String) readASN1(out *String, outTag *asn1.Tag, skipHeader bool) bool {
|
|||||||
if uint32(int(length)) != length || !s.ReadBytes((*[]byte)(out), int(length)) {
|
if uint32(int(length)) != length || !s.ReadBytes((*[]byte)(out), int(length)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if skipHeader && out != nil && !out.Skip(int(headerLen)) {
|
if skipHeader && !out.Skip(int(headerLen)) {
|
||||||
panic("cryptobyte: internal error")
|
panic("cryptobyte: internal error")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user