mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-29 08:09:59 +00:00
TUN-6158: Update golang.org/x/crypto
This commit is contained in:
7
vendor/golang.org/x/crypto/cryptobyte/asn1.go
generated
vendored
7
vendor/golang.org/x/crypto/cryptobyte/asn1.go
generated
vendored
@@ -407,7 +407,12 @@ func (s *String) ReadASN1Enum(out *int) bool {
|
||||
func (s *String) readBase128Int(out *int) bool {
|
||||
ret := 0
|
||||
for i := 0; len(*s) > 0; i++ {
|
||||
if i == 4 {
|
||||
if i == 5 {
|
||||
return false
|
||||
}
|
||||
// Avoid overflowing int on a 32-bit platform.
|
||||
// We don't want different behavior based on the architecture.
|
||||
if ret >= 1<<(31-7) {
|
||||
return false
|
||||
}
|
||||
ret <<= 7
|
||||
|
14
vendor/golang.org/x/crypto/cryptobyte/builder.go
generated
vendored
14
vendor/golang.org/x/crypto/cryptobyte/builder.go
generated
vendored
@@ -106,13 +106,13 @@ func (b *Builder) AddBytes(v []byte) {
|
||||
// supplied to them. The child builder passed to the continuation can be used
|
||||
// to build the content of the length-prefixed sequence. For example:
|
||||
//
|
||||
// parent := cryptobyte.NewBuilder()
|
||||
// parent.AddUint8LengthPrefixed(func (child *Builder) {
|
||||
// child.AddUint8(42)
|
||||
// child.AddUint8LengthPrefixed(func (grandchild *Builder) {
|
||||
// grandchild.AddUint8(5)
|
||||
// })
|
||||
// })
|
||||
// parent := cryptobyte.NewBuilder()
|
||||
// parent.AddUint8LengthPrefixed(func (child *Builder) {
|
||||
// child.AddUint8(42)
|
||||
// child.AddUint8LengthPrefixed(func (grandchild *Builder) {
|
||||
// grandchild.AddUint8(5)
|
||||
// })
|
||||
// })
|
||||
//
|
||||
// It is an error to write more bytes to the child than allowed by the reserved
|
||||
// length prefix. After the continuation returns, the child must be considered
|
||||
|
Reference in New Issue
Block a user