diff --git a/api/next/43936.txt b/api/next/43936.txt new file mode 100644 index 0000000000..e32bd75ed9 --- /dev/null +++ b/api/next/43936.txt @@ -0,0 +1,4 @@ +pkg testing, method (*B) Attr(string, string) #43936 +pkg testing, method (*F) Attr(string, string) #43936 +pkg testing, method (*T) Attr(string, string) #43936 +pkg testing, type TB interface, Attr(string, string) #43936 diff --git a/api/next/63185.txt b/api/next/63185.txt new file mode 100644 index 0000000000..b5127ff8b2 --- /dev/null +++ b/api/next/63185.txt @@ -0,0 +1,9 @@ +pkg runtime/trace, func NewFlightRecorder(FlightRecorderConfig) *FlightRecorder #63185 +pkg runtime/trace, method (*FlightRecorder) Enabled() bool #63185 +pkg runtime/trace, method (*FlightRecorder) Start() error #63185 +pkg runtime/trace, method (*FlightRecorder) Stop() #63185 +pkg runtime/trace, method (*FlightRecorder) WriteTo(io.Writer) (int64, error) #63185 +pkg runtime/trace, type FlightRecorder struct #63185 +pkg runtime/trace, type FlightRecorderConfig struct #63185 +pkg runtime/trace, type FlightRecorderConfig struct, MaxBytes uint64 #63185 +pkg runtime/trace, type FlightRecorderConfig struct, MinAge time.Duration #63185 diff --git a/api/next/63796.txt b/api/next/63796.txt index 624ee9db3b..bb1a4b4858 100644 --- a/api/next/63796.txt +++ b/api/next/63796.txt @@ -1 +1 @@ -pkg sync, method (*WaitGroup) Go(func()) #63769 +pkg sync, method (*WaitGroup) Go(func()) #63796 diff --git a/api/next/63963.txt b/api/next/63963.txt new file mode 100644 index 0000000000..f64f214c10 --- /dev/null +++ b/api/next/63963.txt @@ -0,0 +1,4 @@ +pkg crypto/ecdsa, func ParseRawPrivateKey(elliptic.Curve, []uint8) (*PrivateKey, error) #63963 +pkg crypto/ecdsa, func ParseUncompressedPublicKey(elliptic.Curve, []uint8) (*PublicKey, error) #63963 +pkg crypto/ecdsa, method (*PrivateKey) Bytes() ([]uint8, error) #63963 +pkg crypto/ecdsa, method (*PublicKey) Bytes() ([]uint8, error) #63963 diff --git a/api/next/66365.txt b/api/next/66365.txt new file mode 100644 index 0000000000..52f1c7ea8e --- /dev/null +++ b/api/next/66365.txt @@ -0,0 +1 @@ +pkg log/slog, func GroupAttrs(string, ...Attr) Attr #66365 diff --git a/api/next/67002.txt b/api/next/67002.txt index 112f477e8e..2a442fd6a4 100644 --- a/api/next/67002.txt +++ b/api/next/67002.txt @@ -3,6 +3,8 @@ pkg os, method (*Root) Chown(string, int, int) error #67002 pkg os, method (*Root) Chtimes(string, time.Time, time.Time) error #67002 pkg os, method (*Root) Lchown(string, int, int) error #67002 pkg os, method (*Root) Link(string, string) error #67002 +pkg os, method (*Root) MkdirAll(string, fs.FileMode) error #67002 pkg os, method (*Root) Readlink(string) (string, error) #67002 +pkg os, method (*Root) RemoveAll(string) error #67002 pkg os, method (*Root) Rename(string, string) error #67002 pkg os, method (*Root) Symlink(string, string) error #67002 diff --git a/api/next/69518.txt b/api/next/69518.txt new file mode 100644 index 0000000000..b70fcc13fb --- /dev/null +++ b/api/next/69518.txt @@ -0,0 +1,5 @@ +pkg hash, type XOF interface { BlockSize, Read, Reset, Write } #69518 +pkg hash, type XOF interface, BlockSize() int #69518 +pkg hash, type XOF interface, Read([]uint8) (int, error) #69518 +pkg hash, type XOF interface, Reset() #69518 +pkg hash, type XOF interface, Write([]uint8) (int, error) #69518 diff --git a/api/next/69521.txt b/api/next/69521.txt new file mode 100644 index 0000000000..6974226086 --- /dev/null +++ b/api/next/69521.txt @@ -0,0 +1,9 @@ +pkg crypto/sha3, method (*SHA3) Clone() (hash.Cloner, error) #69521 +pkg hash, type Cloner interface { BlockSize, Clone, Reset, Size, Sum, Write } #69521 +pkg hash, type Cloner interface, BlockSize() int #69521 +pkg hash, type Cloner interface, Clone() (Cloner, error) #69521 +pkg hash, type Cloner interface, Reset() #69521 +pkg hash, type Cloner interface, Size() int #69521 +pkg hash, type Cloner interface, Sum([]uint8) []uint8 #69521 +pkg hash, type Cloner interface, Write([]uint8) (int, error) #69521 +pkg hash/maphash, method (*Hash) Clone() (hash.Cloner, error) #69521 diff --git a/api/next/71920.txt b/api/next/71920.txt new file mode 100644 index 0000000000..c15759f45f --- /dev/null +++ b/api/next/71920.txt @@ -0,0 +1 @@ +pkg crypto/tls, type Config struct, GetEncryptedClientHelloKeys func(*ClientHelloInfo) ([]EncryptedClientHelloKey, error) #71920 diff --git a/api/next/73126.txt b/api/next/73126.txt new file mode 100644 index 0000000000..9392448c02 --- /dev/null +++ b/api/next/73126.txt @@ -0,0 +1,2 @@ +pkg os, method (*Root) ReadFile(string) ([]uint8, error) #73126 +pkg os, method (*Root) WriteFile(string, []uint8, fs.FileMode) error #73126 diff --git a/api/next/73193.txt b/api/next/73193.txt new file mode 100644 index 0000000000..f2b6ea748c --- /dev/null +++ b/api/next/73193.txt @@ -0,0 +1 @@ +pkg runtime, func SetDefaultGOMAXPROCS() #73193 diff --git a/api/next/73626.txt b/api/next/73626.txt new file mode 100644 index 0000000000..ef4d0683b2 --- /dev/null +++ b/api/next/73626.txt @@ -0,0 +1,7 @@ +pkg net/http, func NewCrossOriginProtection() *CrossOriginProtection #73626 +pkg net/http, method (*CrossOriginProtection) AddInsecureBypassPattern(string) #73626 +pkg net/http, method (*CrossOriginProtection) AddTrustedOrigin(string) error #73626 +pkg net/http, method (*CrossOriginProtection) Check(*Request) error #73626 +pkg net/http, method (*CrossOriginProtection) Handler(Handler) Handler #73626 +pkg net/http, method (*CrossOriginProtection) SetDenyHandler(Handler) #73626 +pkg net/http, type CrossOriginProtection struct #73626 diff --git a/doc/godebug.md b/doc/godebug.md index 1d6e6d78d0..15be9da5df 100644 --- a/doc/godebug.md +++ b/doc/godebug.md @@ -169,6 +169,23 @@ Go command will follow symlinks to regular files embedding files. The default value `embedfollowsymlinks=0` does not allow following symlinks. `embedfollowsymlinks=1` will allow following symlinks. +Go 1.25 added a new `containermaxprocs` setting that controls whether the Go +runtime will consider cgroup CPU limits when setting the default GOMAXPROCS. +The default value `containermaxprocs=1` will use cgroup limits in addition to +the total logical CPU count and CPU affinity. `containermaxprocs=0` will +disable consideration of cgroup limits. This setting only affects Linux. + +Go 1.25 added a new `updatemaxprocs` setting that controls whether the Go +runtime will periodically update GOMAXPROCS for new CPU affinity or cgroup +limits. The default value `updatemaxprocs=1` will enable periodic updates. +`updatemaxprocs=0` will disable periodic updates. + +Go 1.25 disabled SHA-1 signature algorithms in TLS 1.2 according to RFC 9155. +The default can be reverted using the `tlssha1=1` setting. + +Go 1.25 switched to SHA-256 to fill in missing SubjectKeyId in +crypto/x509.CreateCertificate. The setting `x509sha256skid=0` reverts to SHA-1. + Go 1.25 corrected the semantics of contention reports for runtime-internal locks, and so removed the [`runtimecontentionstacks` setting](/pkg/runtime#hdr-Environment_Variable). diff --git a/doc/next/4-runtime.md b/doc/next/4-runtime.md index 4e8182c8cf..67c1cee401 100644 --- a/doc/next/4-runtime.md +++ b/doc/next/4-runtime.md @@ -17,6 +17,31 @@ This program will now print: panic: PANIC [recovered, repanicked] + + +The default behavior of the `GOMAXPROCS` has changed. In prior versions of Go, +`GOMAXPROCS` defaults to the number of logical CPUs available at startup +([runtime.NumCPU]). Go 1.25 introduces two changes: + +1. On Linux, the runtime considers the CPU bandwidth limit of the cgroup + containing the process, if any. If the CPU bandwidth limit is lower than the + number of logical CPUs available, `GOMAXPROCS` will default to the lower + limit. In container runtime systems like Kubernetes, cgroup CPU bandwidth + limits generally correspond to the "CPU limit" option. The Go runtime does + not consider the "CPU requests" option. + +2. On all OSes, the runtime periodically updates `GOMAXPROCS` if the number + of logical CPUs available or the cgroup CPU bandwidth limit change. + +Both of these behaviors are automatically disabled if `GOMAXPROCS` is set +manually via the `GOMAXPROCS` environment variable or a call to +[runtime.GOMAXPROCS]. They can also be disabled explicitly with the [GODEBUG +settings](/doc/godebug) `containermaxprocs=0` and `updatemaxprocs=0`, +respectively. + +In order to support reading updated cgroup limits, the runtime will keep cached +file descriptors for the cgroup files for the duration of the process lifetime. + On Linux systems with kernel support for anonymous VMA names diff --git a/doc/next/5-toolchain.md b/doc/next/5-toolchain.md index c270e9dfc9..84a7624bb5 100644 --- a/doc/next/5-toolchain.md +++ b/doc/next/5-toolchain.md @@ -38,6 +38,18 @@ successfully in Go 1.25. If this change is affecting your code, the solution is the non-nil error check earlier in your code, preferably immediately after the error-generating statement. + + +The compiler can now allocate the backing store for slices on the +stack in more situations, which improves performance. This change has +the potential to amplify the effects of incorrect +[unsafe.Pointer](/pkg/unsafe#Pointer) usage, see for example [issue +73199](/issue/73199). In order to track down these problems, the +[bisect tool](https://pkg.go.dev/golang.org/x/tools/cmd/bisect) can be +used to find the allocation causing trouble using the +`-compile=variablemake` flag. All such new stack allocations can also +be turned off using `-gcflags=all=-d=variablemakehash=n`. + ## Assembler {#assembler} ## Linker {#linker} diff --git a/doc/next/6-stdlib/1-synctest.md b/doc/next/6-stdlib/1-synctest.md index 4f3cce8222..0a34930470 100644 --- a/doc/next/6-stdlib/1-synctest.md +++ b/doc/next/6-stdlib/1-synctest.md @@ -1,5 +1,6 @@ ### New testing/synctest package + The new [testing/synctest](/pkg/testing/synctest) package provides support for testing concurrent code. diff --git a/doc/next/6-stdlib/99-minor/crypto/ecdsa/63963.md b/doc/next/6-stdlib/99-minor/crypto/ecdsa/63963.md new file mode 100644 index 0000000000..5c329c7d51 --- /dev/null +++ b/doc/next/6-stdlib/99-minor/crypto/ecdsa/63963.md @@ -0,0 +1,3 @@ +The new [ParseRawPrivateKey], [ParseUncompressedPublicKey], [PrivateKey.Bytes], +and [PublicKey.Bytes] functions and methods implement low-level encodings, +replacing the need to use crypto/elliptic or math/big functions and methods. diff --git a/doc/next/6-stdlib/99-minor/crypto/sha3/69521.md b/doc/next/6-stdlib/99-minor/crypto/sha3/69521.md new file mode 100644 index 0000000000..2af674dcb4 --- /dev/null +++ b/doc/next/6-stdlib/99-minor/crypto/sha3/69521.md @@ -0,0 +1 @@ +The new [SHA3.Clone] method implements [hash.Cloner](/pkg/hash#Cloner). diff --git a/doc/next/6-stdlib/99-minor/crypto/tls/71920.md b/doc/next/6-stdlib/99-minor/crypto/tls/71920.md new file mode 100644 index 0000000000..848211751a --- /dev/null +++ b/doc/next/6-stdlib/99-minor/crypto/tls/71920.md @@ -0,0 +1,3 @@ +The new [Config.GetEncryptedClientHelloKeys] callback can be used to set the +[EncryptedClientHelloKey]s for a server to use when a client sends an Encrypted +Client Hello extension. \ No newline at end of file diff --git a/doc/next/6-stdlib/99-minor/crypto/tls/72883.md b/doc/next/6-stdlib/99-minor/crypto/tls/72883.md new file mode 100644 index 0000000000..70e06192a3 --- /dev/null +++ b/doc/next/6-stdlib/99-minor/crypto/tls/72883.md @@ -0,0 +1,3 @@ +SHA-1 signature algorithms are now disallowed in TLS 1.2 handshakes, per +[RFC 9155](https://www.rfc-editor.org/rfc/rfc9155.html). +They can be re-enabled with the `tlssha1=1` GODEBUG option. diff --git a/doc/next/6-stdlib/99-minor/crypto/tls/version_pref.md b/doc/next/6-stdlib/99-minor/crypto/tls/version_pref.md new file mode 100644 index 0000000000..5686f3ca0a --- /dev/null +++ b/doc/next/6-stdlib/99-minor/crypto/tls/version_pref.md @@ -0,0 +1 @@ +TLS servers now prefer the highest supported protocol version, even if it isn't the client's most preferred protocol version. diff --git a/doc/next/6-stdlib/99-minor/crypto/x509/71746.md b/doc/next/6-stdlib/99-minor/crypto/x509/71746.md new file mode 100644 index 0000000000..44e60293d3 --- /dev/null +++ b/doc/next/6-stdlib/99-minor/crypto/x509/71746.md @@ -0,0 +1,2 @@ +[CreateCertificate] now uses truncated SHA-256 to populate the `SubjectKeyId` if +it is missing. The GODEBUG setting `x509sha256skid=0` reverts to SHA-1. diff --git a/doc/next/6-stdlib/99-minor/hash/69518.md b/doc/next/6-stdlib/99-minor/hash/69518.md new file mode 100644 index 0000000000..ae9e133cd7 --- /dev/null +++ b/doc/next/6-stdlib/99-minor/hash/69518.md @@ -0,0 +1,3 @@ +The new [XOF](/pkg/hash#XOF) interface can be implemented by "extendable output +functions", which are hash functions with arbitrary or unlimited output length +such as [SHAKE](https://pkg.go.dev/crypto/sha3#SHAKE). diff --git a/doc/next/6-stdlib/99-minor/hash/69521.md b/doc/next/6-stdlib/99-minor/hash/69521.md new file mode 100644 index 0000000000..a8d58e3074 --- /dev/null +++ b/doc/next/6-stdlib/99-minor/hash/69521.md @@ -0,0 +1,2 @@ +Hashes implementing the new [Cloner] interface can return a copy of their state. +All standard library [Hash] implementations now implement [Cloner]. diff --git a/doc/next/6-stdlib/99-minor/hash/maphash/69521.md b/doc/next/6-stdlib/99-minor/hash/maphash/69521.md new file mode 100644 index 0000000000..497df8b6aa --- /dev/null +++ b/doc/next/6-stdlib/99-minor/hash/maphash/69521.md @@ -0,0 +1 @@ +The new [Hash.Clone] method implements [hash.Cloner](/pkg/hash#Cloner). diff --git a/doc/next/6-stdlib/99-minor/log/slog/66365.md b/doc/next/6-stdlib/99-minor/log/slog/66365.md new file mode 100644 index 0000000000..b6b0c81fe5 --- /dev/null +++ b/doc/next/6-stdlib/99-minor/log/slog/66365.md @@ -0,0 +1 @@ +[GroupAttrs] creates a group [Attr] from a slice of [Attr] values. diff --git a/doc/next/6-stdlib/99-minor/net/http/73626.md b/doc/next/6-stdlib/99-minor/net/http/73626.md new file mode 100644 index 0000000000..88a204b8a4 --- /dev/null +++ b/doc/next/6-stdlib/99-minor/net/http/73626.md @@ -0,0 +1,7 @@ +The new [CrossOriginProtection] implements protections against [Cross-Site +Request Forgery (CSRF)][] by rejecting non-safe cross-origin browser requests. +It uses [modern browser Fetch metadata][Sec-Fetch-Site], doesn't require tokens +or cookies, and supports origin-based and pattern-based bypasses. + +[Sec-Fetch-Site]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Site +[Cross-Site Request Forgery (CSRF)]: https://developer.mozilla.org/en-US/docs/Web/Security/Attacks/CSRF diff --git a/doc/next/6-stdlib/99-minor/os/67002.md b/doc/next/6-stdlib/99-minor/os/67002.md index 84661c6c40..481a2c171c 100644 --- a/doc/next/6-stdlib/99-minor/os/67002.md +++ b/doc/next/6-stdlib/99-minor/os/67002.md @@ -5,6 +5,10 @@ The [os.Root] type supports the following additional methods: * [os.Root.Chtimes] * [os.Root.Lchown] * [os.Root.Link] + * [os.Root.MkdirAll] + * [os.Root.ReadFile] * [os.Root.Readlink] + * [os.Root.RemoveAll] * [os.Root.Rename] * [os.Root.Symlink] + * [os.Root.WriteFile] diff --git a/doc/next/6-stdlib/99-minor/os/73126.md b/doc/next/6-stdlib/99-minor/os/73126.md new file mode 100644 index 0000000000..1cd40d79ee --- /dev/null +++ b/doc/next/6-stdlib/99-minor/os/73126.md @@ -0,0 +1 @@ + diff --git a/doc/next/6-stdlib/99-minor/runtime/73193.md b/doc/next/6-stdlib/99-minor/runtime/73193.md new file mode 100644 index 0000000000..a729f6a3c4 --- /dev/null +++ b/doc/next/6-stdlib/99-minor/runtime/73193.md @@ -0,0 +1,5 @@ +The new [SetDefaultGOMAXPROCS] function sets `GOMAXPROCS` to the runtime +default value, as if the `GOMAXPROCS` environment variable is not set. This is +useful for enabling the [new `GOMAXPROCS` default](#runtime) if it has been +disabled by the `GOMAXPROCS` environment variable or a prior call to +[GOMAXPROCS]. diff --git a/doc/next/6-stdlib/99-minor/runtime/trace/63185.md b/doc/next/6-stdlib/99-minor/runtime/trace/63185.md new file mode 100644 index 0000000000..80ba088b75 --- /dev/null +++ b/doc/next/6-stdlib/99-minor/runtime/trace/63185.md @@ -0,0 +1,2 @@ + +TODO The flight recorder has been added to the runtime/trace package. diff --git a/doc/next/6-stdlib/99-minor/sync/63769.md b/doc/next/6-stdlib/99-minor/sync/63796.md similarity index 100% rename from doc/next/6-stdlib/99-minor/sync/63769.md rename to doc/next/6-stdlib/99-minor/sync/63796.md diff --git a/doc/next/6-stdlib/99-minor/testing/43936.md b/doc/next/6-stdlib/99-minor/testing/43936.md new file mode 100644 index 0000000000..5be98d5db8 --- /dev/null +++ b/doc/next/6-stdlib/99-minor/testing/43936.md @@ -0,0 +1,10 @@ +The new methods [T.Attr], [B.Attr], and [F.Attr] emit an +attribute to the test log. An attribute is an arbitrary +key and value associated with a test. + +For example, in a test named `TestAttr`, +`t.Attr("key", "value")` emits: + +``` +=== ATTR TestAttr key value +``` diff --git a/doc/next/9-todo.md b/doc/next/9-todo.md new file mode 100644 index 0000000000..a6861d176b --- /dev/null +++ b/doc/next/9-todo.md @@ -0,0 +1,202 @@ + + + +all: implement plugin build mode for riscv64 + + +cmd/link/internal/ld: introduce -funcalign=N option +This patch adds linker option -funcalign=N that allows to set alignment +for function entries. +For \#72130. + + +cmd/fix: automate migrations for simple deprecations + + +cmd/go: allow serving module under the subdirectory of git repository +cmd/go: add subdirectory support to go-import meta tag +This CL adds ability to specify a subdirectory in the go-import meta tag. +A go-import meta tag now will support: +\ +Fixes: \#34055 + + +cmd/go: add global ignore mechanism for Go tooling ecosystem + + +cmd/cover: extend coverage testing to include applications + + +all: add GOARM64=v8.1 and so on +runtime: check LSE support on ARM64 at runtime init +Check presence of LSE support on ARM64 chip if we targeted it at compile +time. +Related to \#69124 +Updates \#60905 +Fixes \#71411 + + +all: add GORISCV64 environment variable +cmd/go: add rva23u64 as a valid value for GORISCV64 +The RVA23 profile was ratified on the 21st of October 2024. +https://riscv.org/announcements/2024/10/risc-v-announces-ratification-of-the-rva23-profile-standard/ +Now that it's ratified we can add rva23u64 as a valid value for the +GORISCV64 environment variable. This will allow the compiler and +assembler to generate instructions made mandatory by the new profile +without a runtime check. Examples of such instructions include those +introduced by the Vector and Zicond extensions. +Setting GORISCV64=rva23u64 defines the riscv64.rva20u64, +riscv64.rva22u64 and riscv64.rva23u64 build tags, sets the internal +variable buildcfg.GORISCV64 to 23 and defines the macros +GORISCV64_rva23u64, hasV, hasZba, hasZbb, hasZbs, hasZfa, and +hasZicond for use in assembly language code. +Updates \#61476 + + +math/rand/v2: revised API for math/rand +rand: deprecate in favor of math/rand/v2 +For golang/go#61716 +Fixes golang/go#71373 + + +cmd/go: enable GOCACHEPROG by default +cmd/go/internal/cacheprog: drop Request.ObjectID +ObjectID was a misnaming of OutputID from cacheprog's initial +implementation. It was maintained for compatibility with existing +cacheprog users in 1.24 but can be removed in 1.25. + + +cmd/go: doc -http should start a pkgsite instance and open a browser + + +cmd/go: -json flag for go version -m +cmd/go: support -json flag in go version +It supports features described in the issue: +- add -json flag for 'go version -m' to print json encoding of + runtime/debug.BuildSetting to standard output. +- report an error when specifying -json flag without -m. +- print build settings on seperated line for each binary +Fixes \#69712 + + +crypto: mechanism to enable FIPS mode + + +spec: remove notion of core types + + +cmd/go: add fips140 module selection mechanism +lib/fips140: set inprocess.txt to v1.0.0 + + +testing: panic in AllocsPerRun during parallel test +testing: panic in AllocsPerRun if parallel tests are running +If other tests are running, AllocsPerRun's result will be inherently flaky. +Saw this with CL 630136 and \#70327. +Proposed in \#70464. +Fixes \#70464. + + +encoding/json/v2: add new JSON API behind a GOEXPERIMENT=jsonv2 guard + + +cmd/go, cmd/distpack: build and run tools that are not necessary for builds as needed and don't include in binary distribution + + diff --git a/lib/fips140/inprocess.txt b/lib/fips140/inprocess.txt new file mode 100644 index 0000000000..0ec25f7505 --- /dev/null +++ b/lib/fips140/inprocess.txt @@ -0,0 +1 @@ +v1.0.0 diff --git a/src/bufio/scan.go b/src/bufio/scan.go index a26b2ff17d..1a0a3907c9 100644 --- a/src/bufio/scan.go +++ b/src/bufio/scan.go @@ -260,8 +260,11 @@ func (s *Scanner) setErr(err error) { } } -// Buffer sets the initial buffer to use when scanning +// Buffer controls memory allocation by the Scanner. +// It sets the initial buffer to use when scanning // and the maximum size of buffer that may be allocated during scanning. +// The contents of the buffer are ignored. +// // The maximum token size must be less than the larger of max and cap(buf). // If max <= cap(buf), [Scanner.Scan] will use this buffer only and do no allocation. // diff --git a/src/cmd/compile/internal/escape/call.go b/src/cmd/compile/internal/escape/call.go index bd2e923da1..58c44eb9bb 100644 --- a/src/cmd/compile/internal/escape/call.go +++ b/src/cmd/compile/internal/escape/call.go @@ -40,6 +40,7 @@ func (e *escape) call(ks []hole, call ir.Node) { var fn *ir.Name switch call.Op() { case ir.OCALLFUNC: + // TODO(thepudds): use an ir.ReassignOracle here. v := ir.StaticValue(call.Fun) fn = ir.StaticCalleeName(v) } @@ -83,15 +84,19 @@ func (e *escape) call(ks []hole, call ir.Node) { argument(e.tagHole(ks, fn, param), arg) } - // hash/maphash.escapeForHash forces its argument to be on - // the heap, if it contains a non-string pointer. We cannot + // internal/abi.EscapeNonString forces its argument to be on + // the heap, if it contains a non-string pointer. + // This is used in hash/maphash.Comparable, where we cannot // hash pointers to local variables, as the address of the // local variable might change on stack growth. // Strings are okay as the hash depends on only the content, // not the pointer. + // This is also used in unique.clone, to model the data flow + // edge on the value with strings excluded, because strings + // are cloned (by content). // The actual call we match is - // hash/maphash.escapeForHash[go.shape.T](dict, go.shape.T) - if fn != nil && fn.Sym().Pkg.Path == "hash/maphash" && strings.HasPrefix(fn.Sym().Name, "escapeForHash[") { + // internal/abi.EscapeNonString[go.shape.T](dict, go.shape.T) + if fn != nil && fn.Sym().Pkg.Path == "internal/abi" && strings.HasPrefix(fn.Sym().Name, "EscapeNonString[") { ps := fntype.Params() if len(ps) == 2 && ps[1].Type.IsShape() { if !hasNonStringPointers(ps[1].Type) { diff --git a/src/cmd/compile/internal/escape/escape.go b/src/cmd/compile/internal/escape/escape.go index 5bd3038a9c..06dee7ec41 100644 --- a/src/cmd/compile/internal/escape/escape.go +++ b/src/cmd/compile/internal/escape/escape.go @@ -6,6 +6,8 @@ package escape import ( "fmt" + "go/constant" + "go/token" "cmd/compile/internal/base" "cmd/compile/internal/ir" @@ -86,8 +88,9 @@ import ( // A batch holds escape analysis state that's shared across an entire // batch of functions being analyzed at once. type batch struct { - allLocs []*location - closures []closure + allLocs []*location + closures []closure + reassignOracles map[*ir.Func]*ir.ReassignOracle heapLoc location mutatorLoc location @@ -129,6 +132,7 @@ func Batch(fns []*ir.Func, recursive bool) { b.heapLoc.attrs = attrEscapes | attrPersists | attrMutates | attrCalls b.mutatorLoc.attrs = attrMutates b.calleeLoc.attrs = attrCalls + b.reassignOracles = make(map[*ir.Func]*ir.ReassignOracle) // Construct data-flow graph from syntax trees. for _, fn := range fns { @@ -154,6 +158,11 @@ func Batch(fns []*ir.Func, recursive bool) { b.closures = nil for _, loc := range b.allLocs { + // Try to replace some non-constant expressions with literals. + b.rewriteWithLiterals(loc.n, loc.curfn) + + // Check if the node must be heap allocated for certain reasons + // such as OMAKESLICE for a large slice. if why := HeapAllocReason(loc.n); why != "" { b.flow(b.heapHole().addr(loc.n, why), loc) } @@ -515,3 +524,101 @@ func (b *batch) reportLeaks(pos src.XPos, name string, esc leaks, sig *types.Typ base.WarnfAt(pos, "%v does not escape, mutate, or call", name) } } + +// rewriteWithLiterals attempts to replace certain non-constant expressions +// within n with a literal if possible. +func (b *batch) rewriteWithLiterals(n ir.Node, fn *ir.Func) { + if n == nil || fn == nil { + return + } + if n.Op() != ir.OMAKESLICE && n.Op() != ir.OCONVIFACE { + return + } + if base.Flag.Cfg.CoverageInfo != nil { + // Avoid altering coverage results. + return + } + + // Look up a cached ReassignOracle for the function, lazily computing one if needed. + ro := b.reassignOracle(fn) + if ro == nil { + base.Fatalf("no ReassignOracle for function %v with closure parent %v", fn, fn.ClosureParent) + } + + switch n.Op() { + case ir.OMAKESLICE: + // Check if we can replace a non-constant argument to make with + // a literal to allow for this slice to be stack allocated if otherwise allowed. + n := n.(*ir.MakeExpr) + + r := &n.Cap + if n.Cap == nil { + r = &n.Len + } + + if s := ro.StaticValue(*r); s.Op() == ir.OLITERAL { + lit, ok := s.(*ir.BasicLit) + if !ok || lit.Val().Kind() != constant.Int { + base.Fatalf("unexpected BasicLit Kind") + } + if constant.Compare(lit.Val(), token.GEQ, constant.MakeInt64(0)) { + *r = lit + } + } + case ir.OCONVIFACE: + // Check if we can replace a non-constant expression in an interface conversion with + // a literal to avoid heap allocating the underlying interface value. + conv := n.(*ir.ConvExpr) + if conv.X.Op() != ir.OLITERAL && !conv.X.Type().IsInterface() { + v := ro.StaticValue(conv.X) + if v != nil && v.Op() == ir.OLITERAL && ir.ValidTypeForConst(conv.X.Type(), v.Val()) { + if base.Debug.EscapeDebug >= 3 { + base.WarnfAt(n.Pos(), "rewriting OCONVIFACE value from %v (%v) to %v (%v)", conv.X, conv.X.Type(), v, v.Type()) + } + v := v.(*ir.BasicLit) + conv.X = ir.NewBasicLit(conv.X.Pos(), conv.X.Type(), v.Val()) + typecheck.Expr(conv) + } + } + } +} + +// reassignOracle returns an initialized *ir.ReassignOracle for fn. +// If fn is a closure, it returns the ReassignOracle for the ultimate parent. +// +// A new ReassignOracle is initialized lazily if needed, and the result +// is cached to reduce duplicative work of preparing a ReassignOracle. +func (b *batch) reassignOracle(fn *ir.Func) *ir.ReassignOracle { + if ro, ok := b.reassignOracles[fn]; ok { + return ro // Hit. + } + + // For closures, we want the ultimate parent's ReassignOracle, + // so walk up the parent chain, if any. + f := fn + for f.ClosureParent != nil && !f.ClosureParent.IsPackageInit() { + f = f.ClosureParent + } + + if f != fn { + // We found a parent. + ro := b.reassignOracles[f] + if ro != nil { + // Hit, via a parent. Before returning, store this ro for the original fn as well. + b.reassignOracles[fn] = ro + return ro + } + } + + // Miss. We did not find a ReassignOracle for fn or a parent, so lazily create one. + ro := &ir.ReassignOracle{} + ro.Init(f) + + // Cache the answer for the original fn. + b.reassignOracles[fn] = ro + if f != fn { + // Cache for the parent as well. + b.reassignOracles[f] = ro + } + return ro +} diff --git a/src/cmd/compile/internal/escape/graph.go b/src/cmd/compile/internal/escape/graph.go index 0bbf6bb941..0ffb4a0bb5 100644 --- a/src/cmd/compile/internal/escape/graph.go +++ b/src/cmd/compile/internal/escape/graph.go @@ -139,35 +139,6 @@ func (l *location) leakTo(sink *location, derefs int) { l.paramEsc.AddHeap(derefs) } -// leakTo records that parameter l leaks to sink. -func (b *batch) leakTo(l, sink *location, derefs int) { - if (logopt.Enabled() || base.Flag.LowerM >= 2) && !l.hasAttr(attrEscapes) { - if base.Flag.LowerM >= 2 { - fmt.Printf("%s: parameter %v leaks to %s with derefs=%d:\n", base.FmtPos(l.n.Pos()), l.n, b.explainLoc(sink), derefs) - } - explanation := b.explainPath(sink, l) - if logopt.Enabled() { - var e_curfn *ir.Func // TODO(mdempsky): Fix. - logopt.LogOpt(l.n.Pos(), "leak", "escape", ir.FuncName(e_curfn), - fmt.Sprintf("parameter %v leaks to %s with derefs=%d", l.n, b.explainLoc(sink), derefs), explanation) - } - } - - // If sink is a result parameter that doesn't escape (#44614) - // and we can fit return bits into the escape analysis tag, - // then record as a result leak. - if !sink.hasAttr(attrEscapes) && sink.isName(ir.PPARAMOUT) && sink.curfn == l.curfn { - if ri := sink.resultIndex - 1; ri < numEscResults { - // Leak to result parameter. - l.paramEsc.AddResult(ri, derefs) - return - } - } - - // Otherwise, record as heap leak. - l.paramEsc.AddHeap(derefs) -} - func (l *location) isName(c ir.Class) bool { return l.n != nil && l.n.Op() == ir.ONAME && l.n.(*ir.Name).Class == c } @@ -241,7 +212,7 @@ func (b *batch) flow(k hole, src *location) { if base.Flag.LowerM >= 2 || logopt.Enabled() { pos := base.FmtPos(src.n.Pos()) if base.Flag.LowerM >= 2 { - fmt.Printf("%s: %v escapes to heap:\n", pos, src.n) + fmt.Printf("%s: %v escapes to heap in %v:\n", pos, src.n, ir.FuncName(src.curfn)) } explanation := b.explainFlow(pos, dst, src, k.derefs, k.notes, []*logopt.LoggedOpt{}) if logopt.Enabled() { diff --git a/src/cmd/compile/internal/escape/solve.go b/src/cmd/compile/internal/escape/solve.go index d2263a7039..e2ca3eabda 100644 --- a/src/cmd/compile/internal/escape/solve.go +++ b/src/cmd/compile/internal/escape/solve.go @@ -116,7 +116,7 @@ func (b *batch) walkOne(root *location, walkgen uint32, enqueue func(*location)) if b.outlives(root, l) { if !l.hasAttr(attrEscapes) && (logopt.Enabled() || base.Flag.LowerM >= 2) { if base.Flag.LowerM >= 2 { - fmt.Printf("%s: %v escapes to heap:\n", base.FmtPos(l.n.Pos()), l.n) + fmt.Printf("%s: %v escapes to heap in %v:\n", base.FmtPos(l.n.Pos()), l.n, ir.FuncName(l.curfn)) } explanation := b.explainPath(root, l) if logopt.Enabled() { @@ -146,7 +146,7 @@ func (b *batch) walkOne(root *location, walkgen uint32, enqueue func(*location)) if b.outlives(root, l) { if !l.hasAttr(attrEscapes) && (logopt.Enabled() || base.Flag.LowerM >= 2) { if base.Flag.LowerM >= 2 { - fmt.Printf("%s: parameter %v leaks to %s with derefs=%d:\n", base.FmtPos(l.n.Pos()), l.n, b.explainLoc(root), derefs) + fmt.Printf("%s: parameter %v leaks to %s for %v with derefs=%d:\n", base.FmtPos(l.n.Pos()), l.n, b.explainLoc(root), ir.FuncName(l.curfn), derefs) } explanation := b.explainPath(root, l) if logopt.Enabled() { @@ -234,7 +234,7 @@ func (b *batch) explainFlow(pos string, dst, srcloc *location, derefs int, notes } print := base.Flag.LowerM >= 2 - flow := fmt.Sprintf(" flow: %s = %s%v:", b.explainLoc(dst), ops, b.explainLoc(srcloc)) + flow := fmt.Sprintf(" flow: %s ← %s%v:", b.explainLoc(dst), ops, b.explainLoc(srcloc)) if print { fmt.Printf("%s:%s\n", pos, flow) } diff --git a/src/cmd/compile/internal/escape/utils.go b/src/cmd/compile/internal/escape/utils.go index b3ebe778f4..2718a7f841 100644 --- a/src/cmd/compile/internal/escape/utils.go +++ b/src/cmd/compile/internal/escape/utils.go @@ -5,12 +5,9 @@ package escape import ( - "cmd/compile/internal/base" "cmd/compile/internal/ir" "cmd/compile/internal/typecheck" "cmd/compile/internal/types" - "go/constant" - "go/token" ) func isSliceSelfAssign(dst, src ir.Node) bool { @@ -210,21 +207,9 @@ func HeapAllocReason(n ir.Node) string { if n.Op() == ir.OMAKESLICE { n := n.(*ir.MakeExpr) - r := &n.Cap + r := n.Cap if n.Cap == nil { - r = &n.Len - } - - // Try to determine static values of make() calls, to avoid allocating them on the heap. - // We are doing this in escape analysis, so that it happens after inlining and devirtualization. - if s := ir.StaticValue(*r); s.Op() == ir.OLITERAL { - lit, ok := s.(*ir.BasicLit) - if !ok || lit.Val().Kind() != constant.Int { - base.Fatalf("unexpected BasicLit Kind") - } - if constant.Compare(lit.Val(), token.GEQ, constant.MakeInt64(0)) { - *r = lit - } + r = n.Len } elem := n.Type().Elem() @@ -232,7 +217,7 @@ func HeapAllocReason(n ir.Node) string { // TODO: stack allocate these? See #65685. return "zero-sized element" } - if !ir.IsSmallIntConst(*r) { + if !ir.IsSmallIntConst(r) { // For non-constant sizes, we do a hybrid approach: // // if cap <= K { @@ -249,7 +234,7 @@ func HeapAllocReason(n ir.Node) string { // Implementation is in ../walk/builtin.go:walkMakeSlice. return "" } - if ir.Int64Val(*r) > ir.MaxImplicitStackVarSize/elem.Size() { + if ir.Int64Val(r) > ir.MaxImplicitStackVarSize/elem.Size() { return "too large for stack" } } diff --git a/src/cmd/compile/internal/inline/inl.go b/src/cmd/compile/internal/inline/inl.go index e3480c2463..8bba604214 100644 --- a/src/cmd/compile/internal/inline/inl.go +++ b/src/cmd/compile/internal/inline/inl.go @@ -454,6 +454,11 @@ opSwitch: // generate code. cheap = true } + if strings.HasPrefix(fn, "EscapeNonString[") { + // internal/abi.EscapeNonString[T] is a compiler intrinsic + // implemented in the escape analysis phase. + cheap = true + } case "internal/runtime/sys": switch fn { case "GetCallerPC", "GetCallerSP": @@ -472,12 +477,6 @@ opSwitch: case "panicrangestate": cheap = true } - case "hash/maphash": - if strings.HasPrefix(fn, "escapeForHash[") { - // hash/maphash.escapeForHash[T] is a compiler intrinsic - // implemented in the escape analysis phase. - cheap = true - } } } // Special case for coverage counter updates; although @@ -801,10 +800,10 @@ func inlineCallCheck(callerfn *ir.Func, call *ir.CallExpr) (bool, bool) { } } - // hash/maphash.escapeForHash[T] is a compiler intrinsic implemented + // internal/abi.EscapeNonString[T] is a compiler intrinsic implemented // in the escape analysis phase. - if fn := ir.StaticCalleeName(call.Fun); fn != nil && fn.Sym().Pkg.Path == "hash/maphash" && - strings.HasPrefix(fn.Sym().Name, "escapeForHash[") { + if fn := ir.StaticCalleeName(call.Fun); fn != nil && fn.Sym().Pkg.Path == "internal/abi" && + strings.HasPrefix(fn.Sym().Name, "EscapeNonString[") { return false, true } diff --git a/src/cmd/compile/internal/ir/symtab.go b/src/cmd/compile/internal/ir/symtab.go index 00b07cb45c..e2da710f02 100644 --- a/src/cmd/compile/internal/ir/symtab.go +++ b/src/cmd/compile/internal/ir/symtab.go @@ -59,6 +59,7 @@ type symsStruct struct { Udiv *obj.LSym WriteBarrier *obj.LSym Zerobase *obj.LSym + ZeroVal *obj.LSym ARM64HasATOMICS *obj.LSym ARMHasVFPv4 *obj.LSym Loong64HasLAMCAS *obj.LSym diff --git a/src/cmd/compile/internal/logopt/logopt_test.go b/src/cmd/compile/internal/logopt/logopt_test.go index c7debd9897..1edabf9fb7 100644 --- a/src/cmd/compile/internal/logopt/logopt_test.go +++ b/src/cmd/compile/internal/logopt/logopt_test.go @@ -203,16 +203,16 @@ func s15a8(x *[15]int64) [15]int64 { // escape analysis explanation want(t, slogged, `{"range":{"start":{"line":7,"character":13},"end":{"line":7,"character":13}},"severity":3,"code":"leak","source":"go compiler","message":"parameter z leaks to ~r0 with derefs=0",`+ `"relatedInformation":[`+ - `{"location":{"uri":"file://tmpdir/file.go","range":{"start":{"line":9,"character":13},"end":{"line":9,"character":13}}},"message":"escflow: flow: y = z:"},`+ + `{"location":{"uri":"file://tmpdir/file.go","range":{"start":{"line":9,"character":13},"end":{"line":9,"character":13}}},"message":"escflow: flow: y ← z:"},`+ `{"location":{"uri":"file://tmpdir/file.go","range":{"start":{"line":9,"character":13},"end":{"line":9,"character":13}}},"message":"escflow: from y := z (assign-pair)"},`+ - `{"location":{"uri":"file://tmpdir/file.go","range":{"start":{"line":9,"character":13},"end":{"line":9,"character":13}}},"message":"escflow: flow: ~r0 = y:"},`+ + `{"location":{"uri":"file://tmpdir/file.go","range":{"start":{"line":9,"character":13},"end":{"line":9,"character":13}}},"message":"escflow: flow: ~r0 ← y:"},`+ `{"location":{"uri":"file://tmpdir/file.go","range":{"start":{"line":4,"character":11},"end":{"line":4,"character":11}}},"message":"inlineLoc"},`+ `{"location":{"uri":"file://tmpdir/file.go","range":{"start":{"line":9,"character":13},"end":{"line":9,"character":13}}},"message":"escflow: from y.b (dot of pointer)"},`+ `{"location":{"uri":"file://tmpdir/file.go","range":{"start":{"line":4,"character":11},"end":{"line":4,"character":11}}},"message":"inlineLoc"},`+ `{"location":{"uri":"file://tmpdir/file.go","range":{"start":{"line":9,"character":13},"end":{"line":9,"character":13}}},"message":"escflow: from \u0026y.b (address-of)"},`+ `{"location":{"uri":"file://tmpdir/file.go","range":{"start":{"line":4,"character":9},"end":{"line":4,"character":9}}},"message":"inlineLoc"},`+ `{"location":{"uri":"file://tmpdir/file.go","range":{"start":{"line":9,"character":13},"end":{"line":9,"character":13}}},"message":"escflow: from ~r0 = \u0026y.b (assign-pair)"},`+ - `{"location":{"uri":"file://tmpdir/file.go","range":{"start":{"line":9,"character":3},"end":{"line":9,"character":3}}},"message":"escflow: flow: ~r0 = ~r0:"},`+ + `{"location":{"uri":"file://tmpdir/file.go","range":{"start":{"line":9,"character":3},"end":{"line":9,"character":3}}},"message":"escflow: flow: ~r0 ← ~r0:"},`+ `{"location":{"uri":"file://tmpdir/file.go","range":{"start":{"line":9,"character":3},"end":{"line":9,"character":3}}},"message":"escflow: from return ~r0 (return)"}]}`) }) } diff --git a/src/cmd/compile/internal/loong64/ssa.go b/src/cmd/compile/internal/loong64/ssa.go index 03d7a1082a..a71a5c3e43 100644 --- a/src/cmd/compile/internal/loong64/ssa.go +++ b/src/cmd/compile/internal/loong64/ssa.go @@ -165,6 +165,8 @@ func ssaGenValue(s *ssagen.State, v *ssa.Value) { ssa.OpLOONG64OR, ssa.OpLOONG64XOR, ssa.OpLOONG64NOR, + ssa.OpLOONG64ANDN, + ssa.OpLOONG64ORN, ssa.OpLOONG64SLL, ssa.OpLOONG64SLLV, ssa.OpLOONG64SRL, diff --git a/src/cmd/compile/internal/loopvar/loopvar.go b/src/cmd/compile/internal/loopvar/loopvar.go index 030fc04c13..5a4590d299 100644 --- a/src/cmd/compile/internal/loopvar/loopvar.go +++ b/src/cmd/compile/internal/loopvar/loopvar.go @@ -305,6 +305,7 @@ func ForCapture(fn *ir.Func) []VarAndLoop { as := ir.NewAssignStmt(x.Pos(), z, tz) as.Def = true as.SetTypecheck(1) + z.Defn = as preBody.Append(as) dclFixups[z] = as diff --git a/src/cmd/compile/internal/mips/ssa.go b/src/cmd/compile/internal/mips/ssa.go index 4c7c8eafcd..9762554829 100644 --- a/src/cmd/compile/internal/mips/ssa.go +++ b/src/cmd/compile/internal/mips/ssa.go @@ -804,6 +804,9 @@ func ssaGenValue(s *ssagen.State, v *ssa.Value) { p := s.Prog(obj.AGETCALLERPC) p.To.Type = obj.TYPE_REG p.To.Reg = v.Reg() + case ssa.OpMIPSLoweredPubBarrier: + // SYNC + s.Prog(v.Op.Asm()) case ssa.OpClobber, ssa.OpClobberReg: // TODO: implement for clobberdead experiment. Nop is ok for now. default: diff --git a/src/cmd/compile/internal/mips64/ssa.go b/src/cmd/compile/internal/mips64/ssa.go index 5b5edf622a..af94c16f6d 100644 --- a/src/cmd/compile/internal/mips64/ssa.go +++ b/src/cmd/compile/internal/mips64/ssa.go @@ -813,6 +813,9 @@ func ssaGenValue(s *ssagen.State, v *ssa.Value) { p := s.Prog(obj.AGETCALLERPC) p.To.Type = obj.TYPE_REG p.To.Reg = v.Reg() + case ssa.OpMIPS64LoweredPubBarrier: + // SYNC + s.Prog(v.Op.Asm()) case ssa.OpClobber, ssa.OpClobberReg: // TODO: implement for clobberdead experiment. Nop is ok for now. default: diff --git a/src/cmd/compile/internal/noder/reader.go b/src/cmd/compile/internal/noder/reader.go index 05052651c6..c854619897 100644 --- a/src/cmd/compile/internal/noder/reader.go +++ b/src/cmd/compile/internal/noder/reader.go @@ -49,6 +49,9 @@ type pkgReader struct { // but bitwise inverted so we can detect if we're missing the entry // or not. newindex []index + + // indicates whether the data is reading during reshaping. + reshaping bool } func newPkgReader(pr pkgbits.PkgDecoder) *pkgReader { @@ -116,6 +119,10 @@ type reader struct { // find parameters/results. funarghack bool + // reshaping is used during reading exprReshape code, preventing + // the reader from shapifying the re-shaped type. + reshaping bool + // methodSym is the name of method's name, if reading a method. // It's nil if reading a normal function or closure body. methodSym *types.Sym @@ -762,7 +769,7 @@ func (pr *pkgReader) objIdxMayFail(idx index, implicits, explicits []*types.Type if hack { if sym.Def != nil { name = sym.Def.(*ir.Name) - assert(name.Type() == typ) + assert(types.IdenticalStrict(name.Type(), typ)) return name, nil } sym.Def = name @@ -1007,7 +1014,7 @@ func (pr *pkgReader) objDictIdx(sym *types.Sym, idx index, implicits, explicits // arguments. for i, targ := range dict.targs { basic := r.Bool() - if dict.shaped { + if dict.shaped && !pr.reshaping { dict.targs[i] = shapify(targ, basic) } } @@ -2445,7 +2452,10 @@ func (r *reader) expr() (res ir.Node) { case exprReshape: typ := r.typ() + old := r.reshaping + r.reshaping = true x := r.expr() + r.reshaping = old if types.IdenticalStrict(x.Type(), typ) { return x @@ -2568,7 +2578,10 @@ func (r *reader) funcInst(pos src.XPos) (wrapperFn, baseFn, dictPtr ir.Node) { info := r.dict.subdicts[idx] explicits := r.p.typListIdx(info.explicits, r.dict) + old := r.p.reshaping + r.p.reshaping = r.reshaping baseFn = r.p.objIdx(info.idx, implicits, explicits, true).(*ir.Name) + r.p.reshaping = old // TODO(mdempsky): Is there a more robust way to get the // dictionary pointer type here? diff --git a/src/cmd/compile/internal/ssa/_gen/LOONG64.rules b/src/cmd/compile/internal/ssa/_gen/LOONG64.rules index bec8493b99..cab63a503f 100644 --- a/src/cmd/compile/internal/ssa/_gen/LOONG64.rules +++ b/src/cmd/compile/internal/ssa/_gen/LOONG64.rules @@ -782,6 +782,9 @@ (AND x x) => x (OR x x) => x (XOR x x) => (MOVVconst [0]) +(ORN x (MOVVconst [-1])) => x +(AND x (NORconst [0] y)) => (ANDN x y) +(OR x (NORconst [0] y)) => (ORN x y) // Fold negation into subtraction. (NEGV (SUBV x y)) => (SUBV y x) diff --git a/src/cmd/compile/internal/ssa/_gen/LOONG64Ops.go b/src/cmd/compile/internal/ssa/_gen/LOONG64Ops.go index dbfbcf1fd0..5ef304b4f9 100644 --- a/src/cmd/compile/internal/ssa/_gen/LOONG64Ops.go +++ b/src/cmd/compile/internal/ssa/_gen/LOONG64Ops.go @@ -221,6 +221,8 @@ func init() { {name: "XORconst", argLength: 1, reg: gp11, asm: "XOR", aux: "Int64", typ: "UInt64"}, // arg0 ^ auxInt {name: "NOR", argLength: 2, reg: gp21, asm: "NOR", commutative: true}, // ^(arg0 | arg1) {name: "NORconst", argLength: 1, reg: gp11, asm: "NOR", aux: "Int64"}, // ^(arg0 | auxInt) + {name: "ANDN", argLength: 2, reg: gp21, asm: "ANDN"}, // arg0 & ^arg1 + {name: "ORN", argLength: 2, reg: gp21, asm: "ORN"}, // arg0 | ^arg1 {name: "FMADDF", argLength: 3, reg: fp31, asm: "FMADDF", commutative: true, typ: "Float32"}, // (arg0 * arg1) + arg2 {name: "FMADDD", argLength: 3, reg: fp31, asm: "FMADDD", commutative: true, typ: "Float64"}, // (arg0 * arg1) + arg2 diff --git a/src/cmd/compile/internal/ssa/_gen/MIPS.rules b/src/cmd/compile/internal/ssa/_gen/MIPS.rules index a4899ac24d..a9bac5fabe 100644 --- a/src/cmd/compile/internal/ssa/_gen/MIPS.rules +++ b/src/cmd/compile/internal/ssa/_gen/MIPS.rules @@ -420,6 +420,9 @@ // Write barrier. (WB ...) => (LoweredWB ...) +// Publication barrier as intrinsic +(PubBarrier ...) => (LoweredPubBarrier ...) + (PanicBounds [kind] x y mem) && boundsABI(kind) == 0 => (LoweredPanicBoundsA [kind] x y mem) (PanicBounds [kind] x y mem) && boundsABI(kind) == 1 => (LoweredPanicBoundsB [kind] x y mem) (PanicBounds [kind] x y mem) && boundsABI(kind) == 2 => (LoweredPanicBoundsC [kind] x y mem) diff --git a/src/cmd/compile/internal/ssa/_gen/MIPS64.rules b/src/cmd/compile/internal/ssa/_gen/MIPS64.rules index cd82655ff3..8e484f4a3d 100644 --- a/src/cmd/compile/internal/ssa/_gen/MIPS64.rules +++ b/src/cmd/compile/internal/ssa/_gen/MIPS64.rules @@ -476,6 +476,9 @@ // Write barrier. (WB ...) => (LoweredWB ...) +// Publication barrier as intrinsic +(PubBarrier ...) => (LoweredPubBarrier ...) + (PanicBounds [kind] x y mem) && boundsABI(kind) == 0 => (LoweredPanicBoundsA [kind] x y mem) (PanicBounds [kind] x y mem) && boundsABI(kind) == 1 => (LoweredPanicBoundsB [kind] x y mem) (PanicBounds [kind] x y mem) && boundsABI(kind) == 2 => (LoweredPanicBoundsC [kind] x y mem) diff --git a/src/cmd/compile/internal/ssa/_gen/MIPS64Ops.go b/src/cmd/compile/internal/ssa/_gen/MIPS64Ops.go index 3d1abb16b6..6c04a1aea2 100644 --- a/src/cmd/compile/internal/ssa/_gen/MIPS64Ops.go +++ b/src/cmd/compile/internal/ssa/_gen/MIPS64Ops.go @@ -466,6 +466,9 @@ func init() { // Returns a pointer to a write barrier buffer in R25. {name: "LoweredWB", argLength: 1, reg: regInfo{clobbers: (callerSave &^ gpg) | buildReg("R31"), outputs: []regMask{buildReg("R25")}}, clobberFlags: true, aux: "Int64"}, + // Do data barrier. arg0=memorys + {name: "LoweredPubBarrier", argLength: 1, asm: "SYNC", hasSideEffects: true}, + // There are three of these functions so that they can have three different register inputs. // When we check 0 <= c <= cap (A), then 0 <= b <= c (B), then 0 <= a <= b (C), we want the // default registers to match so we don't need to copy registers around unnecessarily. diff --git a/src/cmd/compile/internal/ssa/_gen/MIPSOps.go b/src/cmd/compile/internal/ssa/_gen/MIPSOps.go index 48e06a4189..62c35ed49f 100644 --- a/src/cmd/compile/internal/ssa/_gen/MIPSOps.go +++ b/src/cmd/compile/internal/ssa/_gen/MIPSOps.go @@ -408,6 +408,9 @@ func init() { // Returns a pointer to a write barrier buffer in R25. {name: "LoweredWB", argLength: 1, reg: regInfo{clobbers: (callerSave &^ gpg) | buildReg("R31"), outputs: []regMask{buildReg("R25")}}, clobberFlags: true, aux: "Int64"}, + // Do data barrier. arg0=memorys + {name: "LoweredPubBarrier", argLength: 1, asm: "SYNC", hasSideEffects: true}, + // There are three of these functions so that they can have three different register inputs. // When we check 0 <= c <= cap (A), then 0 <= b <= c (B), then 0 <= a <= b (C), we want the // default registers to match so we don't need to copy registers around unnecessarily. diff --git a/src/cmd/compile/internal/ssa/_gen/S390X.rules b/src/cmd/compile/internal/ssa/_gen/S390X.rules index 78de5bb5a2..231ad0615d 100644 --- a/src/cmd/compile/internal/ssa/_gen/S390X.rules +++ b/src/cmd/compile/internal/ssa/_gen/S390X.rules @@ -1188,6 +1188,8 @@ // TODO: more of this (ADD x (NEG y)) => (SUB x y) (ADDW x (NEGW y)) => (SUBW x y) +(SUB x (NEG y)) => (ADD x y) +(SUBW x (NEGW y)) => (ADDW x y) (SUB x x) => (MOVDconst [0]) (SUBW x x) => (MOVDconst [0]) (AND x x) => x @@ -1196,6 +1198,7 @@ (ORW x x) => x (XOR x x) => (MOVDconst [0]) (XORW x x) => (MOVDconst [0]) +(NEG (NEG x)) => x (NEG (ADDconst [c] (NEG x))) && c != -(1<<31) => (ADDconst [-c] x) (MOVBZreg (ANDWconst [m] x)) => (MOVWZreg (ANDWconst [int32( uint8(m))] x)) (MOVHZreg (ANDWconst [m] x)) => (MOVWZreg (ANDWconst [int32(uint16(m))] x)) diff --git a/src/cmd/compile/internal/ssa/_gen/generic.rules b/src/cmd/compile/internal/ssa/_gen/generic.rules index baa26133fe..b178a1add6 100644 --- a/src/cmd/compile/internal/ssa/_gen/generic.rules +++ b/src/cmd/compile/internal/ssa/_gen/generic.rules @@ -2832,3 +2832,14 @@ && clobber(sbts) && clobber(key) => (StaticLECall {f} [argsize] typ_ map_ (StringMake ptr len) mem) + +// Similarly to map lookups, also handle unique.Make for strings, which unique.Make will clone. +(StaticLECall {f} [argsize] dict_ key:(SelectN [0] sbts:(StaticLECall {g} _ ptr len mem)) m:(SelectN [1] sbts)) + && isSameCall(f, "unique.Make[go.shape.string]") + && isSameCall(g, "runtime.slicebytetostring") + && key.Uses == 1 + && sbts.Uses == 2 + && resetCopy(m, mem) + && clobber(sbts) + && clobber(key) +=> (StaticLECall {f} [argsize] dict_ (StringMake ptr len) mem) diff --git a/src/cmd/compile/internal/ssa/memcombine.go b/src/cmd/compile/internal/ssa/memcombine.go index 416f5540a7..b8fcd39495 100644 --- a/src/cmd/compile/internal/ssa/memcombine.go +++ b/src/cmd/compile/internal/ssa/memcombine.go @@ -581,7 +581,7 @@ func combineStores(root *Value) { mask := int64(1)<<(8*a[i].size) - 1 s := 8 * (a[i].offset - a[0].offset) if root.Block.Func.Config.BigEndian { - s = aTotalSize*8 - a[i].size - s + s = (aTotalSize-a[i].size)*8 - s } c |= (a[i].store.Args[1].AuxInt & mask) << s } diff --git a/src/cmd/compile/internal/ssa/opGen.go b/src/cmd/compile/internal/ssa/opGen.go index 615aca3ba6..90a38c783a 100644 --- a/src/cmd/compile/internal/ssa/opGen.go +++ b/src/cmd/compile/internal/ssa/opGen.go @@ -1810,6 +1810,8 @@ const ( OpLOONG64XORconst OpLOONG64NOR OpLOONG64NORconst + OpLOONG64ANDN + OpLOONG64ORN OpLOONG64FMADDF OpLOONG64FMADDD OpLOONG64FMSUBF @@ -2074,6 +2076,7 @@ const ( OpMIPSLoweredGetCallerSP OpMIPSLoweredGetCallerPC OpMIPSLoweredWB + OpMIPSLoweredPubBarrier OpMIPSLoweredPanicBoundsA OpMIPSLoweredPanicBoundsB OpMIPSLoweredPanicBoundsC @@ -2205,6 +2208,7 @@ const ( OpMIPS64LoweredGetCallerSP OpMIPS64LoweredGetCallerPC OpMIPS64LoweredWB + OpMIPS64LoweredPubBarrier OpMIPS64LoweredPanicBoundsA OpMIPS64LoweredPanicBoundsB OpMIPS64LoweredPanicBoundsC @@ -24379,6 +24383,34 @@ var opcodeTable = [...]opInfo{ }, }, }, + { + name: "ANDN", + argLen: 2, + asm: loong64.AANDN, + reg: regInfo{ + inputs: []inputInfo{ + {0, 1073741816}, // R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 R14 R15 R16 R17 R18 R19 R20 R21 g R23 R24 R25 R26 R27 R28 R29 R31 + {1, 1073741816}, // R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 R14 R15 R16 R17 R18 R19 R20 R21 g R23 R24 R25 R26 R27 R28 R29 R31 + }, + outputs: []outputInfo{ + {0, 1071644664}, // R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 R14 R15 R16 R17 R18 R19 R20 R21 R23 R24 R25 R26 R27 R28 R29 R31 + }, + }, + }, + { + name: "ORN", + argLen: 2, + asm: loong64.AORN, + reg: regInfo{ + inputs: []inputInfo{ + {0, 1073741816}, // R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 R14 R15 R16 R17 R18 R19 R20 R21 g R23 R24 R25 R26 R27 R28 R29 R31 + {1, 1073741816}, // R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 R14 R15 R16 R17 R18 R19 R20 R21 g R23 R24 R25 R26 R27 R28 R29 R31 + }, + outputs: []outputInfo{ + {0, 1071644664}, // R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 R14 R15 R16 R17 R18 R19 R20 R21 R23 R24 R25 R26 R27 R28 R29 R31 + }, + }, + }, { name: "FMADDF", argLen: 3, @@ -27959,6 +27991,13 @@ var opcodeTable = [...]opInfo{ }, }, }, + { + name: "LoweredPubBarrier", + argLen: 1, + hasSideEffects: true, + asm: mips.ASYNC, + reg: regInfo{}, + }, { name: "LoweredPanicBoundsA", auxType: auxInt64, @@ -29725,6 +29764,13 @@ var opcodeTable = [...]opInfo{ }, }, }, + { + name: "LoweredPubBarrier", + argLen: 1, + hasSideEffects: true, + asm: mips.ASYNC, + reg: regInfo{}, + }, { name: "LoweredPanicBoundsA", auxType: auxInt64, diff --git a/src/cmd/compile/internal/ssa/rewriteLOONG64.go b/src/cmd/compile/internal/ssa/rewriteLOONG64.go index f6575a8181..7c46ed7727 100644 --- a/src/cmd/compile/internal/ssa/rewriteLOONG64.go +++ b/src/cmd/compile/internal/ssa/rewriteLOONG64.go @@ -436,6 +436,8 @@ func rewriteValueLOONG64(v *Value) bool { return rewriteValueLOONG64_OpLOONG64NORconst(v) case OpLOONG64OR: return rewriteValueLOONG64_OpLOONG64OR(v) + case OpLOONG64ORN: + return rewriteValueLOONG64_OpLOONG64ORN(v) case OpLOONG64ORconst: return rewriteValueLOONG64_OpLOONG64ORconst(v) case OpLOONG64REMV: @@ -1926,6 +1928,21 @@ func rewriteValueLOONG64_OpLOONG64AND(v *Value) bool { v.copyOf(x) return true } + // match: (AND x (NORconst [0] y)) + // result: (ANDN x y) + for { + for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { + x := v_0 + if v_1.Op != OpLOONG64NORconst || auxIntToInt64(v_1.AuxInt) != 0 { + continue + } + y := v_1.Args[0] + v.reset(OpLOONG64ANDN) + v.AddArg2(x, y) + return true + } + break + } return false } func rewriteValueLOONG64_OpLOONG64ANDconst(v *Value) bool { @@ -5583,6 +5600,36 @@ func rewriteValueLOONG64_OpLOONG64OR(v *Value) bool { v.copyOf(x) return true } + // match: (OR x (NORconst [0] y)) + // result: (ORN x y) + for { + for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { + x := v_0 + if v_1.Op != OpLOONG64NORconst || auxIntToInt64(v_1.AuxInt) != 0 { + continue + } + y := v_1.Args[0] + v.reset(OpLOONG64ORN) + v.AddArg2(x, y) + return true + } + break + } + return false +} +func rewriteValueLOONG64_OpLOONG64ORN(v *Value) bool { + v_1 := v.Args[1] + v_0 := v.Args[0] + // match: (ORN x (MOVVconst [-1])) + // result: x + for { + x := v_0 + if v_1.Op != OpLOONG64MOVVconst || auxIntToInt64(v_1.AuxInt) != -1 { + break + } + v.copyOf(x) + return true + } return false } func rewriteValueLOONG64_OpLOONG64ORconst(v *Value) bool { diff --git a/src/cmd/compile/internal/ssa/rewriteMIPS.go b/src/cmd/compile/internal/ssa/rewriteMIPS.go index fe24f0fd0f..4c5edb8694 100644 --- a/src/cmd/compile/internal/ssa/rewriteMIPS.go +++ b/src/cmd/compile/internal/ssa/rewriteMIPS.go @@ -450,6 +450,9 @@ func rewriteValueMIPS(v *Value) bool { return rewriteValueMIPS_OpPanicBounds(v) case OpPanicExtend: return rewriteValueMIPS_OpPanicExtend(v) + case OpPubBarrier: + v.Op = OpMIPSLoweredPubBarrier + return true case OpRotateLeft16: return rewriteValueMIPS_OpRotateLeft16(v) case OpRotateLeft32: diff --git a/src/cmd/compile/internal/ssa/rewriteMIPS64.go b/src/cmd/compile/internal/ssa/rewriteMIPS64.go index 14b273f9aa..c30815cefb 100644 --- a/src/cmd/compile/internal/ssa/rewriteMIPS64.go +++ b/src/cmd/compile/internal/ssa/rewriteMIPS64.go @@ -502,6 +502,9 @@ func rewriteValueMIPS64(v *Value) bool { return true case OpPanicBounds: return rewriteValueMIPS64_OpPanicBounds(v) + case OpPubBarrier: + v.Op = OpMIPS64LoweredPubBarrier + return true case OpRotateLeft16: return rewriteValueMIPS64_OpRotateLeft16(v) case OpRotateLeft32: diff --git a/src/cmd/compile/internal/ssa/rewriteS390X.go b/src/cmd/compile/internal/ssa/rewriteS390X.go index 7e652a19bc..2e7492501a 100644 --- a/src/cmd/compile/internal/ssa/rewriteS390X.go +++ b/src/cmd/compile/internal/ssa/rewriteS390X.go @@ -11292,6 +11292,16 @@ func rewriteValueS390X_OpS390XNEG(v *Value) bool { v.AuxInt = int64ToAuxInt(-c) return true } + // match: (NEG (NEG x)) + // result: x + for { + if v_0.Op != OpS390XNEG { + break + } + x := v_0.Args[0] + v.copyOf(x) + return true + } // match: (NEG (ADDconst [c] (NEG x))) // cond: c != -(1<<31) // result: (ADDconst [-c] x) @@ -13326,6 +13336,18 @@ func rewriteValueS390X_OpS390XSUB(v *Value) bool { v.AddArg(v0) return true } + // match: (SUB x (NEG y)) + // result: (ADD x y) + for { + x := v_0 + if v_1.Op != OpS390XNEG { + break + } + y := v_1.Args[0] + v.reset(OpS390XADD) + v.AddArg2(x, y) + return true + } // match: (SUB x x) // result: (MOVDconst [0]) for { @@ -13467,6 +13489,18 @@ func rewriteValueS390X_OpS390XSUBW(v *Value) bool { v.AddArg(v0) return true } + // match: (SUBW x (NEGW y)) + // result: (ADDW x y) + for { + x := v_0 + if v_1.Op != OpS390XNEGW { + break + } + y := v_1.Args[0] + v.reset(OpS390XADDW) + v.AddArg2(x, y) + return true + } // match: (SUBW x x) // result: (MOVDconst [0]) for { diff --git a/src/cmd/compile/internal/ssa/rewritegeneric.go b/src/cmd/compile/internal/ssa/rewritegeneric.go index b8866cc562..bfbd3c8522 100644 --- a/src/cmd/compile/internal/ssa/rewritegeneric.go +++ b/src/cmd/compile/internal/ssa/rewritegeneric.go @@ -30743,6 +30743,41 @@ func rewriteValuegeneric_OpStaticLECall(v *Value) bool { v.AddArg4(typ_, map_, v0, mem) return true } + // match: (StaticLECall {f} [argsize] dict_ key:(SelectN [0] sbts:(StaticLECall {g} _ ptr len mem)) m:(SelectN [1] sbts)) + // cond: isSameCall(f, "unique.Make[go.shape.string]") && isSameCall(g, "runtime.slicebytetostring") && key.Uses == 1 && sbts.Uses == 2 && resetCopy(m, mem) && clobber(sbts) && clobber(key) + // result: (StaticLECall {f} [argsize] dict_ (StringMake ptr len) mem) + for { + if len(v.Args) != 3 { + break + } + argsize := auxIntToInt32(v.AuxInt) + f := auxToCall(v.Aux) + _ = v.Args[2] + dict_ := v.Args[0] + key := v.Args[1] + if key.Op != OpSelectN || auxIntToInt64(key.AuxInt) != 0 { + break + } + sbts := key.Args[0] + if sbts.Op != OpStaticLECall || len(sbts.Args) != 4 { + break + } + g := auxToCall(sbts.Aux) + mem := sbts.Args[3] + ptr := sbts.Args[1] + len := sbts.Args[2] + m := v.Args[2] + if m.Op != OpSelectN || auxIntToInt64(m.AuxInt) != 1 || sbts != m.Args[0] || !(isSameCall(f, "unique.Make[go.shape.string]") && isSameCall(g, "runtime.slicebytetostring") && key.Uses == 1 && sbts.Uses == 2 && resetCopy(m, mem) && clobber(sbts) && clobber(key)) { + break + } + v.reset(OpStaticLECall) + v.AuxInt = int32ToAuxInt(argsize) + v.Aux = callToAux(f) + v0 := b.NewValue0(v.Pos, OpStringMake, typ.String) + v0.AddArg2(ptr, len) + v.AddArg3(dict_, v0, mem) + return true + } return false } func rewriteValuegeneric_OpStore(v *Value) bool { diff --git a/src/cmd/compile/internal/ssagen/intrinsics.go b/src/cmd/compile/internal/ssagen/intrinsics.go index 97798f5bcc..6b58e7e591 100644 --- a/src/cmd/compile/internal/ssagen/intrinsics.go +++ b/src/cmd/compile/internal/ssagen/intrinsics.go @@ -163,7 +163,7 @@ func initIntrinsics(cfg *intrinsicBuildConfig) { s.vars[memVar] = s.newValue1(ssa.OpPubBarrier, types.TypeMem, s.mem()) return nil }, - sys.ARM64, sys.Loong64, sys.PPC64, sys.RISCV64) + sys.ARM64, sys.Loong64, sys.MIPS, sys.MIPS64, sys.PPC64, sys.RISCV64) /******** internal/runtime/sys ********/ add("internal/runtime/sys", "GetCallerPC", diff --git a/src/cmd/compile/internal/ssagen/intrinsics_test.go b/src/cmd/compile/internal/ssagen/intrinsics_test.go index 6757e1e802..0623c5f209 100644 --- a/src/cmd/compile/internal/ssagen/intrinsics_test.go +++ b/src/cmd/compile/internal/ssagen/intrinsics_test.go @@ -554,6 +554,7 @@ var wantIntrinsics = map[testIntrinsicKey]struct{}{ {"mips", "math/bits", "TrailingZeros64"}: struct{}{}, {"mips", "math/bits", "TrailingZeros8"}: struct{}{}, {"mips", "runtime", "KeepAlive"}: struct{}{}, + {"mips", "runtime", "publicationBarrier"}: struct{}{}, {"mips", "runtime", "slicebytetostringtmp"}: struct{}{}, {"mips", "sync", "runtime_LoadAcquintptr"}: struct{}{}, {"mips", "sync", "runtime_StoreReluintptr"}: struct{}{}, @@ -631,6 +632,7 @@ var wantIntrinsics = map[testIntrinsicKey]struct{}{ {"mips64", "math/bits", "Sub"}: struct{}{}, {"mips64", "math/bits", "Sub64"}: struct{}{}, {"mips64", "runtime", "KeepAlive"}: struct{}{}, + {"mips64", "runtime", "publicationBarrier"}: struct{}{}, {"mips64", "runtime", "slicebytetostringtmp"}: struct{}{}, {"mips64", "sync", "runtime_LoadAcquintptr"}: struct{}{}, {"mips64", "sync", "runtime_StoreReluintptr"}: struct{}{}, @@ -718,6 +720,7 @@ var wantIntrinsics = map[testIntrinsicKey]struct{}{ {"mips64le", "math/bits", "Sub"}: struct{}{}, {"mips64le", "math/bits", "Sub64"}: struct{}{}, {"mips64le", "runtime", "KeepAlive"}: struct{}{}, + {"mips64le", "runtime", "publicationBarrier"}: struct{}{}, {"mips64le", "runtime", "slicebytetostringtmp"}: struct{}{}, {"mips64le", "sync", "runtime_LoadAcquintptr"}: struct{}{}, {"mips64le", "sync", "runtime_StoreReluintptr"}: struct{}{}, @@ -797,6 +800,7 @@ var wantIntrinsics = map[testIntrinsicKey]struct{}{ {"mipsle", "math/bits", "TrailingZeros64"}: struct{}{}, {"mipsle", "math/bits", "TrailingZeros8"}: struct{}{}, {"mipsle", "runtime", "KeepAlive"}: struct{}{}, + {"mipsle", "runtime", "publicationBarrier"}: struct{}{}, {"mipsle", "runtime", "slicebytetostringtmp"}: struct{}{}, {"mipsle", "sync", "runtime_LoadAcquintptr"}: struct{}{}, {"mipsle", "sync", "runtime_StoreReluintptr"}: struct{}{}, diff --git a/src/cmd/compile/internal/ssagen/ssa.go b/src/cmd/compile/internal/ssagen/ssa.go index 984dd138c3..542ad823ab 100644 --- a/src/cmd/compile/internal/ssagen/ssa.go +++ b/src/cmd/compile/internal/ssagen/ssa.go @@ -166,6 +166,7 @@ func InitConfig() { ir.Syms.Udiv = typecheck.LookupRuntimeVar("udiv") // asm func with special ABI ir.Syms.WriteBarrier = typecheck.LookupRuntimeVar("writeBarrier") // struct { bool; ... } ir.Syms.Zerobase = typecheck.LookupRuntimeVar("zerobase") + ir.Syms.ZeroVal = typecheck.LookupRuntimeVar("zeroVal") if Arch.LinkArch.Family == sys.Wasm { BoundsCheckFunc[ssa.BoundsIndex] = typecheck.LookupRuntimeFunc("goPanicIndex") diff --git a/src/cmd/compile/internal/types2/stdlib_test.go b/src/cmd/compile/internal/types2/stdlib_test.go index 6966bb94b0..4de698baaf 100644 --- a/src/cmd/compile/internal/types2/stdlib_test.go +++ b/src/cmd/compile/internal/types2/stdlib_test.go @@ -332,6 +332,7 @@ func TestStdFixed(t *testing.T) { "issue49814.go", // go/types does not have constraints on array size "issue56103.go", // anonymous interface cycles; will be a type checker error in 1.22 "issue52697.go", // types2 does not have constraints on stack size + "issue73309.go", // this test requires GODEBUG=gotypesalias=1 // These tests requires runtime/cgo.Incomplete, which is only available on some platforms. // However, types2 does not know about build constraints. diff --git a/src/cmd/compile/internal/walk/convert.go b/src/cmd/compile/internal/walk/convert.go index 4c443f71b9..beef6634a5 100644 --- a/src/cmd/compile/internal/walk/convert.go +++ b/src/cmd/compile/internal/walk/convert.go @@ -175,6 +175,11 @@ func dataWord(conv *ir.ConvExpr, init *ir.Nodes) ir.Node { xe := ir.NewIndexExpr(base.Pos, staticuint64s, index) xe.SetBounded(true) value = xe + case n.Op() == ir.OLINKSYMOFFSET && n.(*ir.LinksymOffsetExpr).Linksym == ir.Syms.ZeroVal && n.(*ir.LinksymOffsetExpr).Offset_ == 0: + // n is using zeroVal, so we can use n directly. + // (Note that n does not have a proper pos in this case, so using conv for the diagnostic instead.) + diagnose("using global for zero value interface value", conv) + value = n case n.Op() == ir.ONAME && n.(*ir.Name).Class == ir.PEXTERN && n.(*ir.Name).Readonly(): // n is a readonly global; use it directly. diagnose("using global for interface value", n) diff --git a/src/cmd/compile/internal/walk/expr.go b/src/cmd/compile/internal/walk/expr.go index 96087e16b7..6775bc4fc8 100644 --- a/src/cmd/compile/internal/walk/expr.go +++ b/src/cmd/compile/internal/walk/expr.go @@ -594,8 +594,8 @@ func walkCall(n *ir.CallExpr, init *ir.Nodes) ir.Node { if n.Op() == ir.OCALLFUNC { fn := ir.StaticCalleeName(n.Fun) - if fn != nil && fn.Sym().Pkg.Path == "hash/maphash" && strings.HasPrefix(fn.Sym().Name, "escapeForHash[") { - // hash/maphash.escapeForHash[T] is a compiler intrinsic + if fn != nil && fn.Sym().Pkg.Path == "internal/abi" && strings.HasPrefix(fn.Sym().Name, "EscapeNonString[") { + // internal/abi.EscapeNonString[T] is a compiler intrinsic // for the escape analysis to escape its argument based on // the type. The call itself is no-op. Just walk the // argument. diff --git a/src/cmd/compile/internal/walk/order.go b/src/cmd/compile/internal/walk/order.go index 8967b7dbba..77322286c7 100644 --- a/src/cmd/compile/internal/walk/order.go +++ b/src/cmd/compile/internal/walk/order.go @@ -7,6 +7,7 @@ package walk import ( "fmt" "go/constant" + "internal/abi" "internal/buildcfg" "cmd/compile/internal/base" @@ -226,7 +227,8 @@ func (o *orderState) addrTemp(n ir.Node) ir.Node { // for the implicit conversion of "foo" to any, and we can't handle // the relocations in that temp. if n.Op() == ir.ONIL || (n.Op() == ir.OLITERAL && !base.Ctxt.IsFIPS()) { - // TODO: expand this to all static composite literal nodes? + // This is a basic literal or nil that we can store + // directly in the read-only data section. n = typecheck.DefaultLit(n, nil) types.CalcSize(n.Type()) vstat := readonlystaticname(n.Type()) @@ -239,6 +241,28 @@ func (o *orderState) addrTemp(n ir.Node) ir.Node { return vstat } + // Check now for a composite literal to possibly store in the read-only data section. + v := staticValue(n) + if v == nil { + v = n + } + if (v.Op() == ir.OSTRUCTLIT || v.Op() == ir.OARRAYLIT) && !base.Ctxt.IsFIPS() { + if ir.IsZero(v) && 0 < v.Type().Size() && v.Type().Size() <= abi.ZeroValSize { + // This zero value can be represented by the read-only zeroVal. + zeroVal := ir.NewLinksymExpr(v.Pos(), ir.Syms.ZeroVal, v.Type()) + vstat := typecheck.Expr(zeroVal).(*ir.LinksymOffsetExpr) + return vstat + } + if isStaticCompositeLiteral(v) { + // v can be directly represented in the read-only data section. + lit := v.(*ir.CompLitExpr) + vstat := readonlystaticname(lit.Type()) + fixedlit(inInitFunction, initKindStatic, lit, vstat, nil) // nil init + vstat = typecheck.Expr(vstat).(*ir.Name) + return vstat + } + } + // Prevent taking the address of an SSA-able local variable (#63332). // // TODO(mdempsky): Note that OuterValue unwraps OCONVNOPs, but @@ -337,8 +361,8 @@ func (o *orderState) mapKeyTemp(outerPos src.XPos, t *types.Type, n ir.Node) ir. // // Note that this code does not handle the case: // -// s := string(k) -// x = m[s] +// s := string(k) +// x = m[s] // // Cases like this are handled during SSA, search for slicebytetostring // in ../ssa/_gen/generic.rules. diff --git a/src/cmd/compile/internal/walk/walk.go b/src/cmd/compile/internal/walk/walk.go index 25e03359fd..2fa51f1280 100644 --- a/src/cmd/compile/internal/walk/walk.go +++ b/src/cmd/compile/internal/walk/walk.go @@ -24,6 +24,13 @@ const tmpstringbufsize = 32 func Walk(fn *ir.Func) { ir.CurFunc = fn + + // Set and then clear a package-level cache of static values for this fn. + // (At some point, it might be worthwhile to have a walkState structure + // that gets passed everywhere where things like this can go.) + staticValues = findStaticValues(fn) + defer func() { staticValues = nil }() + errorsBefore := base.Errors() order(fn) if base.Errors() > errorsBefore { @@ -422,3 +429,43 @@ func ifaceData(pos src.XPos, n ir.Node, t *types.Type) ir.Node { ind.SetBounded(true) return ind } + +// staticValue returns the earliest expression it can find that always +// evaluates to n, with similar semantics to [ir.StaticValue]. +// +// It only returns results for the ir.CurFunc being processed in [Walk], +// including its closures, and uses a cache to reduce duplicative work. +// It can return n or nil if it does not find an earlier expression. +// +// The current use case is reducing OCONVIFACE allocations, and hence +// staticValue is currently only useful when given an *ir.ConvExpr.X as n. +func staticValue(n ir.Node) ir.Node { + if staticValues == nil { + base.Fatalf("staticValues is nil. staticValue called outside of walk.Walk?") + } + return staticValues[n] +} + +// staticValues is a cache of static values for use by staticValue. +var staticValues map[ir.Node]ir.Node + +// findStaticValues returns a map of static values for fn. +func findStaticValues(fn *ir.Func) map[ir.Node]ir.Node { + // We can't use an ir.ReassignOracle or ir.StaticValue in the + // middle of walk because they don't currently handle + // transformed assignments (e.g., will complain about 'RHS == nil'). + // So we instead build this map to use in walk. + ro := &ir.ReassignOracle{} + ro.Init(fn) + m := make(map[ir.Node]ir.Node) + ir.Visit(fn, func(n ir.Node) { + if n.Op() == ir.OCONVIFACE { + x := n.(*ir.ConvExpr).X + v := ro.StaticValue(x) + if v != nil && v != x { + m[x] = v + } + } + }) + return m +} diff --git a/src/cmd/doc/main.go b/src/cmd/doc/main.go index 4c47b4bcfc..490337a0b4 100644 --- a/src/cmd/doc/main.go +++ b/src/cmd/doc/main.go @@ -122,8 +122,28 @@ func do(writer io.Writer, flagSet *flag.FlagSet, args []string) (err error) { } } if serveHTTP { - // We want to run the logic below to determine a match for a symbol, method, - // or field, but not actually print the documentation to the output. + // Special case: if there are no arguments, try to go to an appropriate page + // depending on whether we're in a module or workspace. The pkgsite homepage + // is often not the most useful page. + if len(flagSet.Args()) == 0 { + mod, err := runCmd(append(os.Environ(), "GOWORK=off"), "go", "list", "-m") + if err == nil && mod != "" && mod != "command-line-arguments" { + // If there's a module, go to the module's doc page. + return doPkgsite(mod) + } + gowork, err := runCmd(nil, "go", "env", "GOWORK") + if err == nil && gowork != "" { + // Outside a module, but in a workspace, go to the home page + // with links to each of the modules' pages. + return doPkgsite("") + } + // Outside a module or workspace, go to the documentation for the standard library. + return doPkgsite("std") + } + + // If args are provided, we need to figure out which page to open on the pkgsite + // instance. Run the logic below to determine a match for a symbol, method, + // or field, but don't actually print the documentation to the output. writer = io.Discard } var paths []string @@ -179,44 +199,42 @@ func do(writer io.Writer, flagSet *flag.FlagSet, args []string) (err error) { } if found { if serveHTTP { - return doPkgsite(userPath, pkg, symbol, method) + path, err := objectPath(userPath, pkg, symbol, method) + if err != nil { + return err + } + return doPkgsite(path) } return nil } } } -func listUserPath(userPath string) (string, error) { +func runCmd(env []string, cmdline ...string) (string, error) { var stdout, stderr strings.Builder - cmd := exec.Command("go", "list", userPath) + cmd := exec.Command(cmdline[0], cmdline[1:]...) + cmd.Env = env cmd.Stdout = &stdout cmd.Stderr = &stderr if err := cmd.Run(); err != nil { - return "", fmt.Errorf("go doc: go list %s: %v\n%s\n", userPath, err, stderr.String()) + return "", fmt.Errorf("go doc: %s: %v\n%s\n", strings.Join(cmdline, " "), err, stderr.String()) } return strings.TrimSpace(stdout.String()), nil } -func doPkgsite(userPath string, pkg *Package, symbol, method string) error { - port, err := pickUnusedPort() - if err != nil { - return fmt.Errorf("failed to find port for documentation server: %v", err) - } - addr := fmt.Sprintf("localhost:%d", port) - - // Assemble url to open on the browser, to point to documentation of - // the requested object. - importPath := pkg.build.ImportPath - if importPath == "." { +func objectPath(userPath string, pkg *Package, symbol, method string) (string, error) { + var err error + path := pkg.build.ImportPath + if path == "." { // go/build couldn't determine the import path, probably // because this was a relative path into a module. Use // go list to get the import path. - importPath, err = listUserPath(userPath) + path, err = runCmd(nil, "go", "list", userPath) if err != nil { - return err + return "", err } } - path := path.Join("http://"+addr, importPath) + object := symbol if symbol != "" && method != "" { object = symbol + "." + method @@ -224,17 +242,38 @@ func doPkgsite(userPath string, pkg *Package, symbol, method string) error { if object != "" { path = path + "#" + object } + return path, nil +} + +func doPkgsite(urlPath string) error { + port, err := pickUnusedPort() + if err != nil { + return fmt.Errorf("failed to find port for documentation server: %v", err) + } + addr := fmt.Sprintf("localhost:%d", port) + path := path.Join("http://"+addr, urlPath) // Turn off the default signal handler for SIGINT (and SIGQUIT on Unix) // and instead wait for the child process to handle the signal and // exit before exiting ourselves. signal.Ignore(signalsToIgnore...) + // Prepend the local download cache to GOPROXY to get around deprecation checks. + env := os.Environ() + vars, err := runCmd(nil, "go", "env", "GOPROXY", "GOMODCACHE") + fields := strings.Fields(vars) + if err == nil && len(fields) == 2 { + goproxy, gomodcache := fields[0], fields[1] + goproxy = "file://" + filepath.Join(gomodcache, "cache", "download") + "," + goproxy + env = append(env, "GOPROXY="+goproxy) + } + const version = "v0.0.0-20250520201116-40659211760d" cmd := exec.Command("go", "run", "golang.org/x/pkgsite/cmd/internal/doc@"+version, "-gorepo", buildCtx.GOROOT, "-http", addr, "-open", path) + cmd.Env = env cmd.Stdout = os.Stderr cmd.Stderr = os.Stderr diff --git a/src/cmd/go/internal/base/base.go b/src/cmd/go/internal/base/base.go index a2c95fb52f..83cbad401e 100644 --- a/src/cmd/go/internal/base/base.go +++ b/src/cmd/go/internal/base/base.go @@ -191,20 +191,28 @@ func GetExitStatus() int { // connected to the go command's own stdout and stderr. // If the command fails, Run reports the error using Errorf. func Run(cmdargs ...any) { + if err := RunErr(cmdargs...); err != nil { + Errorf("%v", err) + } +} + +// Run runs the command, with stdout and stderr +// connected to the go command's own stdout and stderr. +// If the command fails, RunErr returns the error, which +// may be an *exec.ExitError. +func RunErr(cmdargs ...any) error { cmdline := str.StringList(cmdargs...) if cfg.BuildN || cfg.BuildX { fmt.Printf("%s\n", strings.Join(cmdline, " ")) if cfg.BuildN { - return + return nil } } cmd := exec.Command(cmdline[0], cmdline[1:]...) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr - if err := cmd.Run(); err != nil { - Errorf("%v", err) - } + return cmd.Run() } // RunStdin is like run but connects Stdin. It retries if it encounters an ETXTBSY. diff --git a/src/cmd/go/internal/doc/doc.go b/src/cmd/go/internal/doc/doc.go index 4156284d1d..7dfa652e15 100644 --- a/src/cmd/go/internal/doc/doc.go +++ b/src/cmd/go/internal/doc/doc.go @@ -9,6 +9,9 @@ import ( "cmd/go/internal/base" "cmd/go/internal/cfg" "context" + "errors" + "os" + "os/exec" "path/filepath" ) @@ -131,5 +134,13 @@ Flags: } func runDoc(ctx context.Context, cmd *base.Command, args []string) { - base.Run(cfg.BuildToolexec, filepath.Join(cfg.GOROOTbin, "go"), "tool", "doc", args) + base.StartSigHandlers() + err := base.RunErr(cfg.BuildToolexec, filepath.Join(cfg.GOROOTbin, "go"), "tool", "doc", args) + if err != nil { + var ee *exec.ExitError + if errors.As(err, &ee) { + os.Exit(ee.ExitCode()) + } + base.Error(err) + } } diff --git a/src/cmd/internal/obj/loong64/a.out.go b/src/cmd/internal/obj/loong64/a.out.go index d46d6ce962..193993ec4d 100644 --- a/src/cmd/internal/obj/loong64/a.out.go +++ b/src/cmd/internal/obj/loong64/a.out.go @@ -225,8 +225,6 @@ const ( REGZERO = REG_R0 // set to zero REGLINK = REG_R1 REGSP = REG_R3 - REGRET = REG_R20 // not use - REGARG = -1 // -1 disables passing the first argument in register REGRT1 = REG_R20 // reserved for runtime, duffzero and duffcopy REGRT2 = REG_R21 // reserved for runtime, duffcopy REGCTXT = REG_R29 // context for closures diff --git a/src/cmd/internal/objabi/pkgspecial.go b/src/cmd/internal/objabi/pkgspecial.go index d4773b1ecf..e09aeadbc2 100644 --- a/src/cmd/internal/objabi/pkgspecial.go +++ b/src/cmd/internal/objabi/pkgspecial.go @@ -49,6 +49,7 @@ var runtimePkgs = []string{ "runtime", "internal/runtime/atomic", + "internal/runtime/cgroup", "internal/runtime/exithook", "internal/runtime/gc", "internal/runtime/maps", diff --git a/src/cmd/internal/test2json/test2json.go b/src/cmd/internal/test2json/test2json.go index ed78764d26..d08ef389f8 100644 --- a/src/cmd/internal/test2json/test2json.go +++ b/src/cmd/internal/test2json/test2json.go @@ -36,6 +36,8 @@ type event struct { Elapsed *float64 `json:",omitempty"` Output *textBytes `json:",omitempty"` FailedBuild string `json:",omitempty"` + Key string `json:",omitempty"` + Value string `json:",omitempty"` } // textBytes is a hack to get JSON to emit a []byte as a string @@ -177,6 +179,7 @@ var ( []byte("=== PASS "), []byte("=== FAIL "), []byte("=== SKIP "), + []byte("=== ATTR "), } reports = [][]byte{ @@ -333,6 +336,11 @@ func (c *Converter) handleInputLine(line []byte) { c.output.write(origLine) return } + if action == "attr" { + var rest string + name, rest, _ = strings.Cut(name, " ") + e.Key, e.Value, _ = strings.Cut(rest, " ") + } // === update. // Finish any pending PASS/FAIL reports. c.needMarker = sawMarker diff --git a/src/cmd/internal/test2json/testdata/attr.json b/src/cmd/internal/test2json/testdata/attr.json new file mode 100644 index 0000000000..9d7b0195ba --- /dev/null +++ b/src/cmd/internal/test2json/testdata/attr.json @@ -0,0 +1,15 @@ +{"Action":"start"} +{"Action":"run","Test":"TestAttr"} +{"Action":"output","Test":"TestAttr","Output":"=== RUN TestAttr\n"} +{"Action":"attr","Test":"TestAttr","Key":"key","Value":"value"} +{"Action":"output","Test":"TestAttr","Output":"=== ATTR TestAttr key value\n"} +{"Action":"run","Test":"TestAttr/sub"} +{"Action":"output","Test":"TestAttr/sub","Output":"=== RUN TestAttr/sub\n"} +{"Action":"attr","Test":"TestAttr/sub","Key":"key","Value":"value"} +{"Action":"output","Test":"TestAttr/sub","Output":"=== ATTR TestAttr/sub key value\n"} +{"Action":"output","Test":"TestAttr","Output":"--- PASS: TestAttr (0.00s)\n"} +{"Action":"output","Test":"TestAttr/sub","Output":" --- PASS: TestAttr/sub (0.00s)\n"} +{"Action":"pass","Test":"TestAttr/sub"} +{"Action":"pass","Test":"TestAttr"} +{"Action":"output","Output":"PASS\n"} +{"Action":"pass"} diff --git a/src/cmd/internal/test2json/testdata/attr.test b/src/cmd/internal/test2json/testdata/attr.test new file mode 100644 index 0000000000..6ec9f116ed --- /dev/null +++ b/src/cmd/internal/test2json/testdata/attr.test @@ -0,0 +1,7 @@ +=== RUN TestAttr +=== ATTR TestAttr key value +=== RUN TestAttr/sub +=== ATTR TestAttr/sub key value +--- PASS: TestAttr (0.00s) + --- PASS: TestAttr/sub (0.00s) +PASS diff --git a/src/cmd/link/internal/ld/macho.go b/src/cmd/link/internal/ld/macho.go index f55f342d6e..431dad9d6b 100644 --- a/src/cmd/link/internal/ld/macho.go +++ b/src/cmd/link/internal/ld/macho.go @@ -430,8 +430,10 @@ func (ctxt *Link) domacho() { // This must be fairly recent for Apple signing (go.dev/issue/30488). // Having too old a version here was also implicated in some problems // calling into macOS libraries (go.dev/issue/56784). - // In general this can be the most recent supported macOS version. - version = 11<<16 | 0<<8 | 0<<0 // 11.0.0 + // CL 460476 noted that in general this can be the most recent supported + // macOS version, but we haven't tested if going higher than Go's oldest + // supported macOS version could cause new problems. + version = 12<<16 | 0<<8 | 0<<0 // 12.0.0 } ml := newMachoLoad(ctxt.Arch, imacho.LC_BUILD_VERSION, 4) ml.data[0] = uint32(machoPlatform) diff --git a/src/cmd/link/link_test.go b/src/cmd/link/link_test.go index f26495a2b1..7c3ca427ed 100644 --- a/src/cmd/link/link_test.go +++ b/src/cmd/link/link_test.go @@ -195,7 +195,7 @@ func TestIssue33979(t *testing.T) { testenv.MustHaveCGO(t) // N.B. go build below explictly doesn't pass through // -asan/-msan/-race, so we don't care about those. - testenv.MustInternalLink(t, testenv.NoSpecialBuildTypes) + testenv.MustInternalLink(t, testenv.SpecialBuildTypes{Cgo: true}) t.Parallel() @@ -397,8 +397,8 @@ func TestMachOBuildVersion(t *testing.T) { found := false checkMin := func(ver uint32) { major, minor, patch := (ver>>16)&0xff, (ver>>8)&0xff, (ver>>0)&0xff - if major < 11 { - t.Errorf("LC_BUILD_VERSION version %d.%d.%d < 11.0.0", major, minor, patch) + if major < 12 { + t.Errorf("LC_BUILD_VERSION version %d.%d.%d < 12.0.0", major, minor, patch) } } for _, cmd := range exem.Loads { diff --git a/src/crypto/crypto_test.go b/src/crypto/crypto_test.go index b80fb49c13..66babcc2fb 100644 --- a/src/crypto/crypto_test.go +++ b/src/crypto/crypto_test.go @@ -5,13 +5,19 @@ package crypto_test import ( + "bytes" "crypto" "crypto/rand" "crypto/rsa" "crypto/x509" "encoding/pem" "errors" + "internal/testenv" "io" + "io/fs" + "os" + "path/filepath" + "regexp" "strings" "testing" ) @@ -88,3 +94,50 @@ UjmopwKBgAqB2KYYMUqAOvYcBnEfLDmyZv9BTVNHbR2lKkMYqv5LlvDaBxVfilE0 t.Errorf("VerifyPSS failed for MessageSigner signature: %s", err) } } + +func TestDisallowedAssemblyInstructions(t *testing.T) { + // This test enforces the cryptography assembly policy rule that we do not + // use BYTE or WORD instructions, since these instructions can obscure what + // the assembly is actually doing. If we do not support specific + // instructions in the assembler, we should not be using them until we do. + // + // Instead of using the output of the 'go tool asm' tool, we take the simple + // approach and just search the text of .s files for usage of BYTE and WORD. + // We do this because the assembler itself will sometimes insert WORD + // instructions for things like function preambles etc. + + boringSigPath := filepath.Join("internal", "boring", "sig") + + matcher, err := regexp.Compile(`(^|;)\s(BYTE|WORD)\s`) + if err != nil { + t.Fatal(err) + } + if err := filepath.WalkDir(filepath.Join(testenv.GOROOT(t), "src/crypto"), func(path string, d fs.DirEntry, err error) error { + if err != nil { + t.Fatal(err) + } + if d.IsDir() || !strings.HasSuffix(path, ".s") { + return nil + } + if strings.Contains(path, boringSigPath) { + return nil + } + + f, err := os.ReadFile(path) + if err != nil { + t.Fatal(err) + } + + i := 1 + for line := range bytes.Lines(f) { + if matcher.Match(line) { + t.Errorf("%s:%d assembly contains BYTE or WORD instruction (%q)", path, i, string(line)) + } + i++ + } + + return nil + }); err != nil { + t.Fatal(err) + } +} diff --git a/src/crypto/ecdsa/ecdsa.go b/src/crypto/ecdsa/ecdsa.go index 5e670c5081..9affc1ff78 100644 --- a/src/crypto/ecdsa/ecdsa.go +++ b/src/crypto/ecdsa/ecdsa.go @@ -23,6 +23,7 @@ import ( "crypto/internal/boring" "crypto/internal/boring/bbig" "crypto/internal/fips140/ecdsa" + "crypto/internal/fips140/nistec" "crypto/internal/fips140cache" "crypto/internal/fips140hash" "crypto/internal/fips140only" @@ -40,6 +41,18 @@ import ( // PublicKey represents an ECDSA public key. type PublicKey struct { elliptic.Curve + + // X, Y are the coordinates of the public key point. + // + // Modifying the raw coordinates can produce invalid keys, and may + // invalidate internal optimizations; moreover, [big.Int] methods are not + // suitable for operating on cryptographic values. To encode and decode + // PublicKey values, use [PublicKey.Bytes] and [ParseUncompressedPublicKey] + // or [x509.MarshalPKIXPublicKey] and [x509.ParsePKIXPublicKey]. For ECDH, + // use [crypto/ecdh]. For lower-level elliptic curve operations, use a + // third-party module like filippo.io/nistec. + // + // These fields will be deprecated in Go 1.26. X, Y *big.Int } @@ -78,9 +91,94 @@ func (pub *PublicKey) Equal(x crypto.PublicKey) bool { pub.Curve == xx.Curve } +// ParseUncompressedPublicKey parses a public key encoded as an uncompressed +// point according to SEC 1, Version 2.0, Section 2.3.3 (also known as the X9.62 +// uncompressed format). It returns an error if the point is not in uncompressed +// form, is not on the curve, or is the point at infinity. +// +// curve must be one of [elliptic.P224], [elliptic.P256], [elliptic.P384], or +// [elliptic.P521], or ParseUncompressedPublicKey returns an error. +// +// ParseUncompressedPublicKey accepts the same format as +// [ecdh.Curve.NewPublicKey] does for NIST curves, but returns a [PublicKey] +// instead of an [ecdh.PublicKey]. +// +// Note that public keys are more commonly encoded in DER (or PEM) format, which +// can be parsed with [x509.ParsePKIXPublicKey] (and [encoding/pem]). +func ParseUncompressedPublicKey(curve elliptic.Curve, data []byte) (*PublicKey, error) { + if len(data) < 1 || data[0] != 4 { + return nil, errors.New("ecdsa: invalid uncompressed public key") + } + switch curve { + case elliptic.P224(): + return parseUncompressedPublicKey(ecdsa.P224(), curve, data) + case elliptic.P256(): + return parseUncompressedPublicKey(ecdsa.P256(), curve, data) + case elliptic.P384(): + return parseUncompressedPublicKey(ecdsa.P384(), curve, data) + case elliptic.P521(): + return parseUncompressedPublicKey(ecdsa.P521(), curve, data) + default: + return nil, errors.New("ecdsa: curve not supported by ParseUncompressedPublicKey") + } +} + +func parseUncompressedPublicKey[P ecdsa.Point[P]](c *ecdsa.Curve[P], curve elliptic.Curve, data []byte) (*PublicKey, error) { + k, err := ecdsa.NewPublicKey(c, data) + if err != nil { + return nil, err + } + return publicKeyFromFIPS(curve, k) +} + +// Bytes encodes the public key as an uncompressed point according to SEC 1, +// Version 2.0, Section 2.3.3 (also known as the X9.62 uncompressed format). +// It returns an error if the public key is invalid. +// +// PublicKey.Curve must be one of [elliptic.P224], [elliptic.P256], +// [elliptic.P384], or [elliptic.P521], or Bytes returns an error. +// +// Bytes returns the same format as [ecdh.PublicKey.Bytes] does for NIST curves. +// +// Note that public keys are more commonly encoded in DER (or PEM) format, which +// can be generated with [x509.MarshalPKIXPublicKey] (and [encoding/pem]). +func (pub *PublicKey) Bytes() ([]byte, error) { + switch pub.Curve { + case elliptic.P224(): + return publicKeyBytes(ecdsa.P224(), pub) + case elliptic.P256(): + return publicKeyBytes(ecdsa.P256(), pub) + case elliptic.P384(): + return publicKeyBytes(ecdsa.P384(), pub) + case elliptic.P521(): + return publicKeyBytes(ecdsa.P521(), pub) + default: + return nil, errors.New("ecdsa: curve not supported by PublicKey.Bytes") + } +} + +func publicKeyBytes[P ecdsa.Point[P]](c *ecdsa.Curve[P], pub *PublicKey) ([]byte, error) { + k, err := publicKeyToFIPS(c, pub) + if err != nil { + return nil, err + } + return k.Bytes(), nil +} + // PrivateKey represents an ECDSA private key. type PrivateKey struct { PublicKey + + // D is the private scalar value. + // + // Modifying the raw value can produce invalid keys, and may + // invalidate internal optimizations; moreover, [big.Int] methods are not + // suitable for operating on cryptographic values. To encode and decode + // PrivateKey values, use [PrivateKey.Bytes] and [ParseRawPrivateKey] + // or [x509.MarshalPKCS8PrivateKey] and [x509.ParsePKCS8PrivateKey]. + // For ECDH, use [crypto/ecdh]. + // + // This field will be deprecated in Go 1.26. D *big.Int } @@ -134,6 +232,82 @@ func bigIntEqual(a, b *big.Int) bool { return subtle.ConstantTimeCompare(a.Bytes(), b.Bytes()) == 1 } +// ParseRawPrivateKey parses a private key encoded as a fixed-length big-endian +// integer, according to SEC 1, Version 2.0, Section 2.3.6 (sometimes referred +// to as the raw format). It returns an error if the value is not reduced modulo +// the curve's order, or if it's zero. +// +// curve must be one of [elliptic.P224], [elliptic.P256], [elliptic.P384], or +// [elliptic.P521], or ParseRawPrivateKey returns an error. +// +// ParseRawPrivateKey accepts the same format as [ecdh.Curve.NewPrivateKey] does +// for NIST curves, but returns a [PrivateKey] instead of an [ecdh.PrivateKey]. +// +// Note that private keys are more commonly encoded in ASN.1 or PKCS#8 format, +// which can be parsed with [x509.ParseECPrivateKey] or +// [x509.ParsePKCS8PrivateKey] (and [encoding/pem]). +func ParseRawPrivateKey(curve elliptic.Curve, data []byte) (*PrivateKey, error) { + switch curve { + case elliptic.P224(): + return parseRawPrivateKey(ecdsa.P224(), nistec.NewP224Point, curve, data) + case elliptic.P256(): + return parseRawPrivateKey(ecdsa.P256(), nistec.NewP256Point, curve, data) + case elliptic.P384(): + return parseRawPrivateKey(ecdsa.P384(), nistec.NewP384Point, curve, data) + case elliptic.P521(): + return parseRawPrivateKey(ecdsa.P521(), nistec.NewP521Point, curve, data) + default: + return nil, errors.New("ecdsa: curve not supported by ParseRawPrivateKey") + } +} + +func parseRawPrivateKey[P ecdsa.Point[P]](c *ecdsa.Curve[P], newPoint func() P, curve elliptic.Curve, data []byte) (*PrivateKey, error) { + q, err := newPoint().ScalarBaseMult(data) + if err != nil { + return nil, err + } + k, err := ecdsa.NewPrivateKey(c, data, q.Bytes()) + if err != nil { + return nil, err + } + return privateKeyFromFIPS(curve, k) +} + +// Bytes encodes the private key as a fixed-length big-endian integer according +// to SEC 1, Version 2.0, Section 2.3.6 (sometimes referred to as the raw +// format). It returns an error if the private key is invalid. +// +// PrivateKey.Curve must be one of [elliptic.P224], [elliptic.P256], +// [elliptic.P384], or [elliptic.P521], or Bytes returns an error. +// +// Bytes returns the same format as [ecdh.PrivateKey.Bytes] does for NIST curves. +// +// Note that private keys are more commonly encoded in ASN.1 or PKCS#8 format, +// which can be generated with [x509.MarshalECPrivateKey] or +// [x509.MarshalPKCS8PrivateKey] (and [encoding/pem]). +func (priv *PrivateKey) Bytes() ([]byte, error) { + switch priv.Curve { + case elliptic.P224(): + return privateKeyBytes(ecdsa.P224(), priv) + case elliptic.P256(): + return privateKeyBytes(ecdsa.P256(), priv) + case elliptic.P384(): + return privateKeyBytes(ecdsa.P384(), priv) + case elliptic.P521(): + return privateKeyBytes(ecdsa.P521(), priv) + default: + return nil, errors.New("ecdsa: curve not supported by PrivateKey.Bytes") + } +} + +func privateKeyBytes[P ecdsa.Point[P]](c *ecdsa.Curve[P], priv *PrivateKey) ([]byte, error) { + k, err := privateKeyToFIPS(c, priv) + if err != nil { + return nil, err + } + return k.Bytes(), nil +} + // Sign signs a hash (which should be the result of hashing a larger message // with opts.HashFunc()) using the private key, priv. If the hash is longer than // the bit-length of the private key's curve order, the hash will be truncated diff --git a/src/crypto/ecdsa/ecdsa_test.go b/src/crypto/ecdsa/ecdsa_test.go index 84b127dc0f..87e74f2a0e 100644 --- a/src/crypto/ecdsa/ecdsa_test.go +++ b/src/crypto/ecdsa/ecdsa_test.go @@ -546,6 +546,161 @@ func testRFC6979(t *testing.T, curve elliptic.Curve, D, X, Y, msg, r, s string) } } +func TestParseAndBytesRoundTrip(t *testing.T) { + testAllCurves(t, testParseAndBytesRoundTrip) +} + +func testParseAndBytesRoundTrip(t *testing.T, curve elliptic.Curve) { + if strings.HasSuffix(t.Name(), "/Generic") { + t.Skip("these methods don't support generic curves") + } + priv, _ := GenerateKey(curve, rand.Reader) + + b, err := priv.PublicKey.Bytes() + if err != nil { + t.Fatalf("failed to serialize private key's public key: %v", err) + } + if b[0] != 4 { + t.Fatalf("public key bytes doesn't start with 0x04 (uncompressed format)") + } + p, err := ParseUncompressedPublicKey(curve, b) + if err != nil { + t.Fatalf("failed to parse private key's public key: %v", err) + } + if !priv.PublicKey.Equal(p) { + t.Errorf("parsed private key's public key doesn't match original") + } + + bk, err := priv.Bytes() + if err != nil { + t.Fatalf("failed to serialize private key: %v", err) + } + k, err := ParseRawPrivateKey(curve, bk) + if err != nil { + t.Fatalf("failed to parse private key: %v", err) + } + if !priv.Equal(k) { + t.Errorf("parsed private key doesn't match original") + } + + if curve != elliptic.P224() { + privECDH, err := priv.ECDH() + if err != nil { + t.Fatalf("failed to convert private key to ECDH: %v", err) + } + + pp, err := privECDH.Curve().NewPublicKey(b) + if err != nil { + t.Fatalf("failed to parse with ECDH: %v", err) + } + if !privECDH.PublicKey().Equal(pp) { + t.Errorf("parsed ECDH public key doesn't match original") + } + if !bytes.Equal(b, pp.Bytes()) { + t.Errorf("encoded ECDH public key doesn't match Bytes") + } + + kk, err := privECDH.Curve().NewPrivateKey(bk) + if err != nil { + t.Fatalf("failed to parse with ECDH: %v", err) + } + if !privECDH.Equal(kk) { + t.Errorf("parsed ECDH private key doesn't match original") + } + if !bytes.Equal(bk, kk.Bytes()) { + t.Errorf("encoded ECDH private key doesn't match Bytes") + } + } +} + +func TestInvalidPublicKeys(t *testing.T) { + testAllCurves(t, testInvalidPublicKeys) +} + +func testInvalidPublicKeys(t *testing.T, curve elliptic.Curve) { + t.Run("Infinity", func(t *testing.T) { + k := &PublicKey{Curve: curve, X: big.NewInt(0), Y: big.NewInt(0)} + if _, err := k.Bytes(); err == nil { + t.Errorf("PublicKey.Bytes accepted infinity") + } + + b := []byte{0} + if _, err := ParseUncompressedPublicKey(curve, b); err == nil { + t.Errorf("ParseUncompressedPublicKey accepted infinity") + } + b = make([]byte, 1+2*(curve.Params().BitSize+7)/8) + b[0] = 4 + if _, err := ParseUncompressedPublicKey(curve, b); err == nil { + t.Errorf("ParseUncompressedPublicKey accepted infinity") + } + }) + t.Run("NotOnCurve", func(t *testing.T) { + k, _ := GenerateKey(curve, rand.Reader) + k.X = k.X.Add(k.X, big.NewInt(1)) + if _, err := k.Bytes(); err == nil { + t.Errorf("PublicKey.Bytes accepted not on curve") + } + + b := make([]byte, 1+2*(curve.Params().BitSize+7)/8) + b[0] = 4 + k.X.FillBytes(b[1 : 1+len(b)/2]) + k.Y.FillBytes(b[1+len(b)/2:]) + if _, err := ParseUncompressedPublicKey(curve, b); err == nil { + t.Errorf("ParseUncompressedPublicKey accepted not on curve") + } + }) + t.Run("Compressed", func(t *testing.T) { + k, _ := GenerateKey(curve, rand.Reader) + b := elliptic.MarshalCompressed(curve, k.X, k.Y) + if _, err := ParseUncompressedPublicKey(curve, b); err == nil { + t.Errorf("ParseUncompressedPublicKey accepted compressed key") + } + }) +} + +func TestInvalidPrivateKeys(t *testing.T) { + testAllCurves(t, testInvalidPrivateKeys) +} + +func testInvalidPrivateKeys(t *testing.T, curve elliptic.Curve) { + t.Run("Zero", func(t *testing.T) { + k := &PrivateKey{PublicKey{curve, big.NewInt(0), big.NewInt(0)}, big.NewInt(0)} + if _, err := k.Bytes(); err == nil { + t.Errorf("PrivateKey.Bytes accepted zero key") + } + + b := make([]byte, (curve.Params().BitSize+7)/8) + if _, err := ParseRawPrivateKey(curve, b); err == nil { + t.Errorf("ParseRawPrivateKey accepted zero key") + } + }) + t.Run("Overflow", func(t *testing.T) { + d := new(big.Int).Add(curve.Params().N, big.NewInt(5)) + x, y := curve.ScalarBaseMult(d.Bytes()) + k := &PrivateKey{PublicKey{curve, x, y}, d} + if _, err := k.Bytes(); err == nil { + t.Errorf("PrivateKey.Bytes accepted overflow key") + } + + b := make([]byte, (curve.Params().BitSize+7)/8) + k.D.FillBytes(b) + if _, err := ParseRawPrivateKey(curve, b); err == nil { + t.Errorf("ParseRawPrivateKey accepted overflow key") + } + }) + t.Run("Length", func(t *testing.T) { + b := []byte{1, 2, 3} + if _, err := ParseRawPrivateKey(curve, b); err == nil { + t.Errorf("ParseRawPrivateKey accepted short key") + } + + b = append(b, make([]byte, (curve.Params().BitSize+7)/8)...) + if _, err := ParseRawPrivateKey(curve, b); err == nil { + t.Errorf("ParseRawPrivateKey accepted long key") + } + }) +} + func benchmarkAllCurves(b *testing.B, f func(*testing.B, elliptic.Curve)) { tests := []struct { name string diff --git a/src/crypto/fips140/fips140.go b/src/crypto/fips140/fips140.go index 1c4036d5e7..830b6f80af 100644 --- a/src/crypto/fips140/fips140.go +++ b/src/crypto/fips140/fips140.go @@ -7,11 +7,8 @@ package fips140 import ( "crypto/internal/fips140" "crypto/internal/fips140/check" - "internal/godebug" ) -var fips140GODEBUG = godebug.New("fips140") - // Enabled reports whether the cryptography libraries are operating in FIPS // 140-3 mode. // @@ -21,11 +18,6 @@ var fips140GODEBUG = godebug.New("fips140") // // This can't be changed after the program has started. func Enabled() bool { - godebug := fips140GODEBUG.Value() - currentlyEnabled := godebug == "on" || godebug == "only" || godebug == "debug" - if currentlyEnabled != fips140.Enabled { - panic("crypto/fips140: GODEBUG setting changed after program start") - } if fips140.Enabled && !check.Verified { panic("crypto/fips140: FIPS 140-3 mode enabled, but integrity check didn't pass") } diff --git a/src/crypto/fips140/fips140_test.go b/src/crypto/fips140/fips140_test.go new file mode 100644 index 0000000000..c038add947 --- /dev/null +++ b/src/crypto/fips140/fips140_test.go @@ -0,0 +1,51 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package fips140 + +import ( + "internal/godebug" + "os" + "testing" +) + +func TestImmutableGODEBUG(t *testing.T) { + defer func(v string) { os.Setenv("GODEBUG", v) }(os.Getenv("GODEBUG")) + + fips140Enabled := Enabled() + fips140Setting := godebug.New("fips140") + fips140SettingValue := fips140Setting.Value() + + os.Setenv("GODEBUG", "fips140=off") + if Enabled() != fips140Enabled { + t.Errorf("Enabled() changed after setting GODEBUG=fips140=off") + } + if fips140Setting.Value() != fips140SettingValue { + t.Errorf("fips140Setting.Value() changed after setting GODEBUG=fips140=off") + } + + os.Setenv("GODEBUG", "fips140=on") + if Enabled() != fips140Enabled { + t.Errorf("Enabled() changed after setting GODEBUG=fips140=on") + } + if fips140Setting.Value() != fips140SettingValue { + t.Errorf("fips140Setting.Value() changed after setting GODEBUG=fips140=on") + } + + os.Setenv("GODEBUG", "fips140=") + if Enabled() != fips140Enabled { + t.Errorf("Enabled() changed after setting GODEBUG=fips140=") + } + if fips140Setting.Value() != fips140SettingValue { + t.Errorf("fips140Setting.Value() changed after setting GODEBUG=fips140=") + } + + os.Setenv("GODEBUG", "") + if Enabled() != fips140Enabled { + t.Errorf("Enabled() changed after setting GODEBUG=") + } + if fips140Setting.Value() != fips140SettingValue { + t.Errorf("fips140Setting.Value() changed after setting GODEBUG=") + } +} diff --git a/src/crypto/hmac/hmac_test.go b/src/crypto/hmac/hmac_test.go index 7accad7632..9b7eee7bf7 100644 --- a/src/crypto/hmac/hmac_test.go +++ b/src/crypto/hmac/hmac_test.go @@ -632,6 +632,18 @@ func TestHMACHash(t *testing.T) { } } +func TestExtraMethods(t *testing.T) { + h := New(sha256.New, []byte("key")) + cryptotest.NoExtraMethods(t, maybeCloner(h)) +} + +func maybeCloner(h hash.Hash) any { + if c, ok := h.(hash.Cloner); ok { + return &c + } + return &h +} + func BenchmarkHMACSHA256_1K(b *testing.B) { key := make([]byte, 32) buf := make([]byte, 1024) diff --git a/src/crypto/internal/cryptotest/hash.go b/src/crypto/internal/cryptotest/hash.go index a2916e9c87..f00e9c80d3 100644 --- a/src/crypto/internal/cryptotest/hash.go +++ b/src/crypto/internal/cryptotest/hash.go @@ -5,6 +5,8 @@ package cryptotest import ( + "crypto/internal/boring" + "crypto/internal/fips140" "hash" "internal/testhash" "io" @@ -18,6 +20,10 @@ type MakeHash func() hash.Hash // TestHash performs a set of tests on hash.Hash implementations, checking the // documented requirements of Write, Sum, Reset, Size, and BlockSize. func TestHash(t *testing.T, mh MakeHash) { + if boring.Enabled || fips140.Version() == "v1.0" { + testhash.TestHashWithoutClone(t, testhash.MakeHash(mh)) + return + } testhash.TestHash(t, testhash.MakeHash(mh)) } diff --git a/src/crypto/internal/cryptotest/implementations.go b/src/crypto/internal/cryptotest/implementations.go index 3fa7304590..f0ba665403 100644 --- a/src/crypto/internal/cryptotest/implementations.go +++ b/src/crypto/internal/cryptotest/implementations.go @@ -7,6 +7,7 @@ package cryptotest import ( "crypto/internal/boring" "crypto/internal/impl" + "internal/goarch" "internal/goos" "internal/testenv" "testing" @@ -35,15 +36,14 @@ func TestAllImplementations(t *testing.T, pkg string, f func(t *testing.T)) { t.Run(name, f) } else { t.Run(name, func(t *testing.T) { - // Report an error if we're on Linux CI (assumed to be the most - // consistent) and the builder can't test this implementation. - if testenv.Builder() != "" && goos.GOOS == "linux" { + // Report an error if we're on the most capable builder for the + // architecture and the builder can't test this implementation. + flagship := goos.GOOS == "linux" && goarch.GOARCH != "arm64" || + goos.GOOS == "darwin" && goarch.GOARCH == "arm64" + if testenv.Builder() != "" && flagship { if name == "SHA-NI" { t.Skip("known issue, see golang.org/issue/69592") } - if name == "Armv8.2" { - t.Skip("known issue, see golang.org/issue/69593") - } t.Error("builder doesn't support CPU features needed to test this implementation") } else { t.Skip("implementation not supported") diff --git a/src/crypto/internal/fips140/ecdsa/ecdsa.go b/src/crypto/internal/fips140/ecdsa/ecdsa.go index 11389e8210..47c1b24421 100644 --- a/src/crypto/internal/fips140/ecdsa/ecdsa.go +++ b/src/crypto/internal/fips140/ecdsa/ecdsa.go @@ -11,6 +11,7 @@ import ( "crypto/internal/fips140/drbg" "crypto/internal/fips140/nistec" "errors" + "hash" "io" "sync" ) @@ -271,7 +272,7 @@ type Signature struct { // the hash function H) using the private key, priv. If the hash is longer than // the bit-length of the private key's curve order, the hash will be truncated // to that length. -func Sign[P Point[P], H fips140.Hash](c *Curve[P], h func() H, priv *PrivateKey, rand io.Reader, hash []byte) (*Signature, error) { +func Sign[P Point[P], H hash.Hash](c *Curve[P], h func() H, priv *PrivateKey, rand io.Reader, hash []byte) (*Signature, error) { if priv.pub.curve != c.curve { return nil, errors.New("ecdsa: private key does not match curve") } @@ -304,7 +305,7 @@ func Sign[P Point[P], H fips140.Hash](c *Curve[P], h func() H, priv *PrivateKey, // hash is longer than the bit-length of the private key's curve order, the hash // will be truncated to that length. This applies Deterministic ECDSA as // specified in FIPS 186-5 and RFC 6979. -func SignDeterministic[P Point[P], H fips140.Hash](c *Curve[P], h func() H, priv *PrivateKey, hash []byte) (*Signature, error) { +func SignDeterministic[P Point[P], H hash.Hash](c *Curve[P], h func() H, priv *PrivateKey, hash []byte) (*Signature, error) { if priv.pub.curve != c.curve { return nil, errors.New("ecdsa: private key does not match curve") } diff --git a/src/crypto/internal/fips140/ecdsa/hmacdrbg.go b/src/crypto/internal/fips140/ecdsa/hmacdrbg.go index 8f52091170..fa82ce39f9 100644 --- a/src/crypto/internal/fips140/ecdsa/hmacdrbg.go +++ b/src/crypto/internal/fips140/ecdsa/hmacdrbg.go @@ -8,6 +8,7 @@ import ( "bytes" "crypto/internal/fips140" "crypto/internal/fips140/hmac" + "hash" ) // hmacDRBG is an SP 800-90A Rev. 1 HMAC_DRBG. @@ -48,7 +49,7 @@ type personalizationString interface { isPersonalizationString() } -func newDRBG[H fips140.Hash](hash func() H, entropy, nonce []byte, s personalizationString) *hmacDRBG { +func newDRBG[H hash.Hash](hash func() H, entropy, nonce []byte, s personalizationString) *hmacDRBG { // HMAC_DRBG_Instantiate_algorithm, per Section 10.1.2.3. fips140.RecordApproved() @@ -121,7 +122,7 @@ func newDRBG[H fips140.Hash](hash func() H, entropy, nonce []byte, s personaliza // // This should only be used for ACVP testing. hmacDRBG is not intended to be // used directly. -func TestingOnlyNewDRBG(hash func() fips140.Hash, entropy, nonce []byte, s []byte) *hmacDRBG { +func TestingOnlyNewDRBG(hash func() hash.Hash, entropy, nonce []byte, s []byte) *hmacDRBG { return newDRBG(hash, entropy, nonce, plainPersonalizationString(s)) } diff --git a/src/crypto/internal/fips140/fips140.go b/src/crypto/internal/fips140/fips140.go index e05ad66374..050967f480 100644 --- a/src/crypto/internal/fips140/fips140.go +++ b/src/crypto/internal/fips140/fips140.go @@ -7,6 +7,7 @@ package fips140 import ( "crypto/internal/fips140deps/godebug" "errors" + "hash" "runtime" ) @@ -69,3 +70,9 @@ func Version() string { // moved to a different file. return "latest" //mkzip:version } + +// Hash is a legacy compatibility alias for hash.Hash. +// +// It's only here because [crypto/internal/fips140/ecdsa.TestingOnlyNewDRBG] +// takes a "func() fips140.Hash" in v1.0.0, instead of being generic. +type Hash = hash.Hash diff --git a/src/crypto/internal/fips140/hash.go b/src/crypto/internal/fips140/hash.go deleted file mode 100644 index bc6c7ca2f5..0000000000 --- a/src/crypto/internal/fips140/hash.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package fips140 - -import "io" - -// Hash is the common interface implemented by all hash functions. It is a copy -// of [hash.Hash] from the standard library, to avoid depending on security -// definitions from outside of the module. -type Hash interface { - // Write (via the embedded io.Writer interface) adds more data to the - // running hash. It never returns an error. - io.Writer - - // Sum appends the current hash to b and returns the resulting slice. - // It does not change the underlying hash state. - Sum(b []byte) []byte - - // Reset resets the Hash to its initial state. - Reset() - - // Size returns the number of bytes Sum will return. - Size() int - - // BlockSize returns the hash's underlying block size. - // The Write method must be able to accept any amount - // of data, but it may operate more efficiently if all writes - // are a multiple of the block size. - BlockSize() int -} diff --git a/src/crypto/internal/fips140/hkdf/hkdf.go b/src/crypto/internal/fips140/hkdf/hkdf.go index e612fbbc21..2e8b83d41d 100644 --- a/src/crypto/internal/fips140/hkdf/hkdf.go +++ b/src/crypto/internal/fips140/hkdf/hkdf.go @@ -7,9 +7,10 @@ package hkdf import ( "crypto/internal/fips140" "crypto/internal/fips140/hmac" + "hash" ) -func Extract[H fips140.Hash](h func() H, secret, salt []byte) []byte { +func Extract[H hash.Hash](h func() H, secret, salt []byte) []byte { if len(secret) < 112/8 { fips140.RecordNonApproved() } @@ -23,7 +24,7 @@ func Extract[H fips140.Hash](h func() H, secret, salt []byte) []byte { return extractor.Sum(nil) } -func Expand[H fips140.Hash](h func() H, pseudorandomKey []byte, info string, keyLen int) []byte { +func Expand[H hash.Hash](h func() H, pseudorandomKey []byte, info string, keyLen int) []byte { out := make([]byte, 0, keyLen) expander := hmac.New(h, pseudorandomKey) hmac.MarkAsUsedInKDF(expander) @@ -50,7 +51,7 @@ func Expand[H fips140.Hash](h func() H, pseudorandomKey []byte, info string, key return out } -func Key[H fips140.Hash](h func() H, secret, salt []byte, info string, keyLen int) []byte { +func Key[H hash.Hash](h func() H, secret, salt []byte, info string, keyLen int) []byte { prk := Extract(h, secret, salt) return Expand(h, prk, info, keyLen) } diff --git a/src/crypto/internal/fips140/hmac/hmac.go b/src/crypto/internal/fips140/hmac/hmac.go index 5a588d7c26..9b28017662 100644 --- a/src/crypto/internal/fips140/hmac/hmac.go +++ b/src/crypto/internal/fips140/hmac/hmac.go @@ -12,6 +12,8 @@ import ( "crypto/internal/fips140/sha256" "crypto/internal/fips140/sha3" "crypto/internal/fips140/sha512" + "errors" + "hash" ) // key is zero padded to the block size of the hash function @@ -28,8 +30,9 @@ type marshalable interface { } type HMAC struct { + // opad and ipad may share underlying storage with HMAC clones. opad, ipad []byte - outer, inner fips140.Hash + outer, inner hash.Hash // If marshaled is true, then opad and ipad do not contain a padded // copy of the key, but rather the marshaled state of outer/inner after @@ -127,8 +130,32 @@ func (h *HMAC) Reset() { h.marshaled = true } -// New returns a new HMAC hash using the given [fips140.Hash] type and key. -func New[H fips140.Hash](h func() H, key []byte) *HMAC { +// Clone implements [hash.Cloner] if the underlying hash does. +// Otherwise, it returns [errors.ErrUnsupported]. +func (h *HMAC) Clone() (hash.Cloner, error) { + r := *h + ic, ok := h.inner.(hash.Cloner) + if !ok { + return nil, errors.ErrUnsupported + } + oc, ok := h.outer.(hash.Cloner) + if !ok { + return nil, errors.ErrUnsupported + } + var err error + r.inner, err = ic.Clone() + if err != nil { + return nil, errors.ErrUnsupported + } + r.outer, err = oc.Clone() + if err != nil { + return nil, errors.ErrUnsupported + } + return &r, nil +} + +// New returns a new HMAC hash using the given [hash.Hash] type and key. +func New[H hash.Hash](h func() H, key []byte) *HMAC { hm := &HMAC{keyLen: len(key)} hm.outer = h() hm.inner = h() diff --git a/src/crypto/internal/fips140/nistec/p256_asm_s390x.s b/src/crypto/internal/fips140/nistec/p256_asm_s390x.s index 4ca25cfc41..190147ebb1 100644 --- a/src/crypto/internal/fips140/nistec/p256_asm_s390x.s +++ b/src/crypto/internal/fips140/nistec/p256_asm_s390x.s @@ -7,11 +7,6 @@ #include "textflag.h" #include "go_asm.h" -DATA p256ordK0<>+0x00(SB)/4, $0xee00bc4f -DATA p256ord<>+0x00(SB)/8, $0xffffffff00000000 -DATA p256ord<>+0x08(SB)/8, $0xffffffffffffffff -DATA p256ord<>+0x10(SB)/8, $0xbce6faada7179e84 -DATA p256ord<>+0x18(SB)/8, $0xf3b9cac2fc632551 DATA p256<>+0x00(SB)/8, $0xffffffff00000001 // P256 DATA p256<>+0x08(SB)/8, $0x0000000000000000 // P256 DATA p256<>+0x10(SB)/8, $0x00000000ffffffff // P256 @@ -44,8 +39,6 @@ DATA p256mul<>+0x80(SB)/8, $0x00000000fffffffe // (1*2^256)%P256 DATA p256mul<>+0x88(SB)/8, $0xffffffffffffffff // (1*2^256)%P256 DATA p256mul<>+0x90(SB)/8, $0xffffffff00000000 // (1*2^256)%P256 DATA p256mul<>+0x98(SB)/8, $0x0000000000000001 // (1*2^256)%P256 -GLOBL p256ordK0<>(SB), 8, $4 -GLOBL p256ord<>(SB), 8, $32 GLOBL p256<>(SB), 8, $96 GLOBL p256mul<>(SB), 8, $160 @@ -500,392 +493,6 @@ loop_select: #undef SEL2 #undef CPOOL -// --------------------------------------- - -// func p256OrdMul(res, in1, in2 *p256OrdElement) -#define res_ptr R1 -#define x_ptr R2 -#define y_ptr R3 -#define X0 V0 -#define X1 V1 -#define Y0 V2 -#define Y1 V3 -#define M0 V4 -#define M1 V5 -#define T0 V6 -#define T1 V7 -#define T2 V8 -#define YDIG V9 - -#define ADD1 V16 -#define ADD1H V17 -#define ADD2 V18 -#define ADD2H V19 -#define RED1 V20 -#define RED1H V21 -#define RED2 V22 -#define RED2H V23 -#define CAR1 V24 -#define CAR1M V25 - -#define MK0 V30 -#define K0 V31 -TEXT ·p256OrdMul<>(SB), NOSPLIT, $0 - MOVD res+0(FP), res_ptr - MOVD in1+8(FP), x_ptr - MOVD in2+16(FP), y_ptr - - VZERO T2 - MOVD $p256ordK0<>+0x00(SB), R4 - - // VLEF $3, 0(R4), K0 - WORD $0xE7F40000 - BYTE $0x38 - BYTE $0x03 - MOVD $p256ord<>+0x00(SB), R4 - VL 16(R4), M0 - VL 0(R4), M1 - - VL (0*16)(x_ptr), X0 - VPDI $0x4, X0, X0, X0 - VL (1*16)(x_ptr), X1 - VPDI $0x4, X1, X1, X1 - VL (0*16)(y_ptr), Y0 - VPDI $0x4, Y0, Y0, Y0 - VL (1*16)(y_ptr), Y1 - VPDI $0x4, Y1, Y1, Y1 - - // ---------------------------------------------------------------------------/ - VREPF $3, Y0, YDIG - VMLF X0, YDIG, ADD1 - VMLF ADD1, K0, MK0 - VREPF $3, MK0, MK0 - - VMLF X1, YDIG, ADD2 - VMLHF X0, YDIG, ADD1H - VMLHF X1, YDIG, ADD2H - - VMALF M0, MK0, ADD1, RED1 - VMALHF M0, MK0, ADD1, RED1H - VMALF M1, MK0, ADD2, RED2 - VMALHF M1, MK0, ADD2, RED2H - - VSLDB $12, RED2, RED1, RED1 - VSLDB $12, T2, RED2, RED2 - - VACCQ RED1, ADD1H, CAR1 - VAQ RED1, ADD1H, T0 - VACCQ RED1H, T0, CAR1M - VAQ RED1H, T0, T0 - - // << ready for next MK0 - - VACQ RED2, ADD2H, CAR1, T1 - VACCCQ RED2, ADD2H, CAR1, CAR1 - VACCCQ RED2H, T1, CAR1M, T2 - VACQ RED2H, T1, CAR1M, T1 - VAQ CAR1, T2, T2 - - // --------------------------------------------------- -/* * - * ---+--------+--------+ - * T2| T1 | T0 | - * ---+--------+--------+ - * *(add)* - * +--------+--------+ - * | X1 | X0 | - * +--------+--------+ - * *(mul)* - * +--------+--------+ - * | YDIG | YDIG | - * +--------+--------+ - * *(add)* - * +--------+--------+ - * | M1 | M0 | - * +--------+--------+ - * *(mul)* - * +--------+--------+ - * | MK0 | MK0 | - * +--------+--------+ - * - * --------------------- - * - * +--------+--------+ - * | ADD2 | ADD1 | - * +--------+--------+ - * +--------+--------+ - * | ADD2H | ADD1H | - * +--------+--------+ - * +--------+--------+ - * | RED2 | RED1 | - * +--------+--------+ - * +--------+--------+ - * | RED2H | RED1H | - * +--------+--------+ - */ - VREPF $2, Y0, YDIG - VMALF X0, YDIG, T0, ADD1 - VMLF ADD1, K0, MK0 - VREPF $3, MK0, MK0 - - VMALF X1, YDIG, T1, ADD2 - VMALHF X0, YDIG, T0, ADD1H - VMALHF X1, YDIG, T1, ADD2H - - VMALF M0, MK0, ADD1, RED1 - VMALHF M0, MK0, ADD1, RED1H - VMALF M1, MK0, ADD2, RED2 - VMALHF M1, MK0, ADD2, RED2H - - VSLDB $12, RED2, RED1, RED1 - VSLDB $12, T2, RED2, RED2 - - VACCQ RED1, ADD1H, CAR1 - VAQ RED1, ADD1H, T0 - VACCQ RED1H, T0, CAR1M - VAQ RED1H, T0, T0 - - // << ready for next MK0 - - VACQ RED2, ADD2H, CAR1, T1 - VACCCQ RED2, ADD2H, CAR1, CAR1 - VACCCQ RED2H, T1, CAR1M, T2 - VACQ RED2H, T1, CAR1M, T1 - VAQ CAR1, T2, T2 - - // --------------------------------------------------- - VREPF $1, Y0, YDIG - VMALF X0, YDIG, T0, ADD1 - VMLF ADD1, K0, MK0 - VREPF $3, MK0, MK0 - - VMALF X1, YDIG, T1, ADD2 - VMALHF X0, YDIG, T0, ADD1H - VMALHF X1, YDIG, T1, ADD2H - - VMALF M0, MK0, ADD1, RED1 - VMALHF M0, MK0, ADD1, RED1H - VMALF M1, MK0, ADD2, RED2 - VMALHF M1, MK0, ADD2, RED2H - - VSLDB $12, RED2, RED1, RED1 - VSLDB $12, T2, RED2, RED2 - - VACCQ RED1, ADD1H, CAR1 - VAQ RED1, ADD1H, T0 - VACCQ RED1H, T0, CAR1M - VAQ RED1H, T0, T0 - - // << ready for next MK0 - - VACQ RED2, ADD2H, CAR1, T1 - VACCCQ RED2, ADD2H, CAR1, CAR1 - VACCCQ RED2H, T1, CAR1M, T2 - VACQ RED2H, T1, CAR1M, T1 - VAQ CAR1, T2, T2 - - // --------------------------------------------------- - VREPF $0, Y0, YDIG - VMALF X0, YDIG, T0, ADD1 - VMLF ADD1, K0, MK0 - VREPF $3, MK0, MK0 - - VMALF X1, YDIG, T1, ADD2 - VMALHF X0, YDIG, T0, ADD1H - VMALHF X1, YDIG, T1, ADD2H - - VMALF M0, MK0, ADD1, RED1 - VMALHF M0, MK0, ADD1, RED1H - VMALF M1, MK0, ADD2, RED2 - VMALHF M1, MK0, ADD2, RED2H - - VSLDB $12, RED2, RED1, RED1 - VSLDB $12, T2, RED2, RED2 - - VACCQ RED1, ADD1H, CAR1 - VAQ RED1, ADD1H, T0 - VACCQ RED1H, T0, CAR1M - VAQ RED1H, T0, T0 - - // << ready for next MK0 - - VACQ RED2, ADD2H, CAR1, T1 - VACCCQ RED2, ADD2H, CAR1, CAR1 - VACCCQ RED2H, T1, CAR1M, T2 - VACQ RED2H, T1, CAR1M, T1 - VAQ CAR1, T2, T2 - - // --------------------------------------------------- - VREPF $3, Y1, YDIG - VMALF X0, YDIG, T0, ADD1 - VMLF ADD1, K0, MK0 - VREPF $3, MK0, MK0 - - VMALF X1, YDIG, T1, ADD2 - VMALHF X0, YDIG, T0, ADD1H - VMALHF X1, YDIG, T1, ADD2H - - VMALF M0, MK0, ADD1, RED1 - VMALHF M0, MK0, ADD1, RED1H - VMALF M1, MK0, ADD2, RED2 - VMALHF M1, MK0, ADD2, RED2H - - VSLDB $12, RED2, RED1, RED1 - VSLDB $12, T2, RED2, RED2 - - VACCQ RED1, ADD1H, CAR1 - VAQ RED1, ADD1H, T0 - VACCQ RED1H, T0, CAR1M - VAQ RED1H, T0, T0 - - // << ready for next MK0 - - VACQ RED2, ADD2H, CAR1, T1 - VACCCQ RED2, ADD2H, CAR1, CAR1 - VACCCQ RED2H, T1, CAR1M, T2 - VACQ RED2H, T1, CAR1M, T1 - VAQ CAR1, T2, T2 - - // --------------------------------------------------- - VREPF $2, Y1, YDIG - VMALF X0, YDIG, T0, ADD1 - VMLF ADD1, K0, MK0 - VREPF $3, MK0, MK0 - - VMALF X1, YDIG, T1, ADD2 - VMALHF X0, YDIG, T0, ADD1H - VMALHF X1, YDIG, T1, ADD2H - - VMALF M0, MK0, ADD1, RED1 - VMALHF M0, MK0, ADD1, RED1H - VMALF M1, MK0, ADD2, RED2 - VMALHF M1, MK0, ADD2, RED2H - - VSLDB $12, RED2, RED1, RED1 - VSLDB $12, T2, RED2, RED2 - - VACCQ RED1, ADD1H, CAR1 - VAQ RED1, ADD1H, T0 - VACCQ RED1H, T0, CAR1M - VAQ RED1H, T0, T0 - - // << ready for next MK0 - - VACQ RED2, ADD2H, CAR1, T1 - VACCCQ RED2, ADD2H, CAR1, CAR1 - VACCCQ RED2H, T1, CAR1M, T2 - VACQ RED2H, T1, CAR1M, T1 - VAQ CAR1, T2, T2 - - // --------------------------------------------------- - VREPF $1, Y1, YDIG - VMALF X0, YDIG, T0, ADD1 - VMLF ADD1, K0, MK0 - VREPF $3, MK0, MK0 - - VMALF X1, YDIG, T1, ADD2 - VMALHF X0, YDIG, T0, ADD1H - VMALHF X1, YDIG, T1, ADD2H - - VMALF M0, MK0, ADD1, RED1 - VMALHF M0, MK0, ADD1, RED1H - VMALF M1, MK0, ADD2, RED2 - VMALHF M1, MK0, ADD2, RED2H - - VSLDB $12, RED2, RED1, RED1 - VSLDB $12, T2, RED2, RED2 - - VACCQ RED1, ADD1H, CAR1 - VAQ RED1, ADD1H, T0 - VACCQ RED1H, T0, CAR1M - VAQ RED1H, T0, T0 - - // << ready for next MK0 - - VACQ RED2, ADD2H, CAR1, T1 - VACCCQ RED2, ADD2H, CAR1, CAR1 - VACCCQ RED2H, T1, CAR1M, T2 - VACQ RED2H, T1, CAR1M, T1 - VAQ CAR1, T2, T2 - - // --------------------------------------------------- - VREPF $0, Y1, YDIG - VMALF X0, YDIG, T0, ADD1 - VMLF ADD1, K0, MK0 - VREPF $3, MK0, MK0 - - VMALF X1, YDIG, T1, ADD2 - VMALHF X0, YDIG, T0, ADD1H - VMALHF X1, YDIG, T1, ADD2H - - VMALF M0, MK0, ADD1, RED1 - VMALHF M0, MK0, ADD1, RED1H - VMALF M1, MK0, ADD2, RED2 - VMALHF M1, MK0, ADD2, RED2H - - VSLDB $12, RED2, RED1, RED1 - VSLDB $12, T2, RED2, RED2 - - VACCQ RED1, ADD1H, CAR1 - VAQ RED1, ADD1H, T0 - VACCQ RED1H, T0, CAR1M - VAQ RED1H, T0, T0 - - // << ready for next MK0 - - VACQ RED2, ADD2H, CAR1, T1 - VACCCQ RED2, ADD2H, CAR1, CAR1 - VACCCQ RED2H, T1, CAR1M, T2 - VACQ RED2H, T1, CAR1M, T1 - VAQ CAR1, T2, T2 - - // --------------------------------------------------- - - VZERO RED1 - VSCBIQ M0, T0, CAR1 - VSQ M0, T0, ADD1 - VSBCBIQ T1, M1, CAR1, CAR1M - VSBIQ T1, M1, CAR1, ADD2 - VSBIQ T2, RED1, CAR1M, T2 - - // what output to use, ADD2||ADD1 or T1||T0? - VSEL T0, ADD1, T2, T0 - VSEL T1, ADD2, T2, T1 - - VPDI $0x4, T0, T0, T0 - VST T0, (0*16)(res_ptr) - VPDI $0x4, T1, T1, T1 - VST T1, (1*16)(res_ptr) - RET - -#undef res_ptr -#undef x_ptr -#undef y_ptr -#undef X0 -#undef X1 -#undef Y0 -#undef Y1 -#undef M0 -#undef M1 -#undef T0 -#undef T1 -#undef T2 -#undef YDIG - -#undef ADD1 -#undef ADD1H -#undef ADD2 -#undef ADD2H -#undef RED1 -#undef RED1H -#undef RED2 -#undef RED2H -#undef CAR1 -#undef CAR1M - -#undef MK0 -#undef K0 - // --------------------------------------- // p256MulInternal // V0-V3,V30,V31 - Not Modified diff --git a/src/crypto/internal/fips140/pbkdf2/pbkdf2.go b/src/crypto/internal/fips140/pbkdf2/pbkdf2.go index 05923f6826..2cd9b00241 100644 --- a/src/crypto/internal/fips140/pbkdf2/pbkdf2.go +++ b/src/crypto/internal/fips140/pbkdf2/pbkdf2.go @@ -8,6 +8,7 @@ import ( "crypto/internal/fips140" "crypto/internal/fips140/hmac" "errors" + "hash" ) // divRoundUp divides x+y-1 by y, rounding up if the result is not whole. @@ -19,7 +20,7 @@ func divRoundUp(x, y int) int { return int((int64(x) + int64(y) - 1) / int64(y)) } -func Key[Hash fips140.Hash](h func() Hash, password string, salt []byte, iter, keyLength int) ([]byte, error) { +func Key[Hash hash.Hash](h func() Hash, password string, salt []byte, iter, keyLength int) ([]byte, error) { setServiceIndicator(salt, keyLength) if keyLength <= 0 { diff --git a/src/crypto/internal/fips140/rsa/pkcs1v22.go b/src/crypto/internal/fips140/rsa/pkcs1v22.go index a5bc56dafc..9ec28da794 100644 --- a/src/crypto/internal/fips140/rsa/pkcs1v22.go +++ b/src/crypto/internal/fips140/rsa/pkcs1v22.go @@ -16,6 +16,7 @@ import ( "crypto/internal/fips140/sha512" "crypto/internal/fips140/subtle" "errors" + "hash" "io" ) @@ -48,7 +49,7 @@ func incCounter(c *[4]byte) { // mgf1XOR XORs the bytes in out with a mask generated using the MGF1 function // specified in PKCS #1 v2.1. -func mgf1XOR(out []byte, hash fips140.Hash, seed []byte) { +func mgf1XOR(out []byte, hash hash.Hash, seed []byte) { var counter [4]byte var digest []byte @@ -67,7 +68,7 @@ func mgf1XOR(out []byte, hash fips140.Hash, seed []byte) { } } -func emsaPSSEncode(mHash []byte, emBits int, salt []byte, hash fips140.Hash) ([]byte, error) { +func emsaPSSEncode(mHash []byte, emBits int, salt []byte, hash hash.Hash) ([]byte, error) { // See RFC 8017, Section 9.1.1. hLen := hash.Size() @@ -144,7 +145,7 @@ func emsaPSSEncode(mHash []byte, emBits int, salt []byte, hash fips140.Hash) ([] const pssSaltLengthAutodetect = -1 -func emsaPSSVerify(mHash, em []byte, emBits, sLen int, hash fips140.Hash) error { +func emsaPSSVerify(mHash, em []byte, emBits, sLen int, hash hash.Hash) error { // See RFC 8017, Section 9.1.2. hLen := hash.Size() @@ -250,7 +251,7 @@ func emsaPSSVerify(mHash, em []byte, emBits, sLen int, hash fips140.Hash) error // PSSMaxSaltLength returns the maximum salt length for a given public key and // hash function. -func PSSMaxSaltLength(pub *PublicKey, hash fips140.Hash) (int, error) { +func PSSMaxSaltLength(pub *PublicKey, hash hash.Hash) (int, error) { saltLength := (pub.N.BitLen()-1+7)/8 - 2 - hash.Size() if saltLength < 0 { return 0, ErrMessageTooLong @@ -264,7 +265,7 @@ func PSSMaxSaltLength(pub *PublicKey, hash fips140.Hash) (int, error) { } // SignPSS calculates the signature of hashed using RSASSA-PSS. -func SignPSS(rand io.Reader, priv *PrivateKey, hash fips140.Hash, hashed []byte, saltLength int) ([]byte, error) { +func SignPSS(rand io.Reader, priv *PrivateKey, hash hash.Hash, hashed []byte, saltLength int) ([]byte, error) { fipsSelfTest() fips140.RecordApproved() checkApprovedHash(hash) @@ -311,19 +312,19 @@ func SignPSS(rand io.Reader, priv *PrivateKey, hash fips140.Hash, hashed []byte, } // VerifyPSS verifies sig with RSASSA-PSS automatically detecting the salt length. -func VerifyPSS(pub *PublicKey, hash fips140.Hash, digest []byte, sig []byte) error { +func VerifyPSS(pub *PublicKey, hash hash.Hash, digest []byte, sig []byte) error { return verifyPSS(pub, hash, digest, sig, pssSaltLengthAutodetect) } // VerifyPSS verifies sig with RSASSA-PSS and an expected salt length. -func VerifyPSSWithSaltLength(pub *PublicKey, hash fips140.Hash, digest []byte, sig []byte, saltLength int) error { +func VerifyPSSWithSaltLength(pub *PublicKey, hash hash.Hash, digest []byte, sig []byte, saltLength int) error { if saltLength < 0 { return errors.New("crypto/rsa: salt length cannot be negative") } return verifyPSS(pub, hash, digest, sig, saltLength) } -func verifyPSS(pub *PublicKey, hash fips140.Hash, digest []byte, sig []byte, saltLength int) error { +func verifyPSS(pub *PublicKey, hash hash.Hash, digest []byte, sig []byte, saltLength int) error { fipsSelfTest() fips140.RecordApproved() checkApprovedHash(hash) @@ -359,7 +360,7 @@ func verifyPSS(pub *PublicKey, hash fips140.Hash, digest []byte, sig []byte, sal return emsaPSSVerify(digest, em, emBits, saltLength, hash) } -func checkApprovedHash(hash fips140.Hash) { +func checkApprovedHash(hash hash.Hash) { switch hash.(type) { case *sha256.Digest, *sha512.Digest, *sha3.Digest: default: @@ -368,7 +369,7 @@ func checkApprovedHash(hash fips140.Hash) { } // EncryptOAEP encrypts the given message with RSAES-OAEP. -func EncryptOAEP(hash, mgfHash fips140.Hash, random io.Reader, pub *PublicKey, msg []byte, label []byte) ([]byte, error) { +func EncryptOAEP(hash, mgfHash hash.Hash, random io.Reader, pub *PublicKey, msg []byte, label []byte) ([]byte, error) { // Note that while we don't commit to deterministic execution with respect // to the random stream, we also don't apply MaybeReadByte, so per Hyrum's // Law it's probably relied upon by some. It's a tolerable promise because a @@ -411,7 +412,7 @@ func EncryptOAEP(hash, mgfHash fips140.Hash, random io.Reader, pub *PublicKey, m } // DecryptOAEP decrypts ciphertext using RSAES-OAEP. -func DecryptOAEP(hash, mgfHash fips140.Hash, priv *PrivateKey, ciphertext []byte, label []byte) ([]byte, error) { +func DecryptOAEP(hash, mgfHash hash.Hash, priv *PrivateKey, ciphertext []byte, label []byte) ([]byte, error) { fipsSelfTest() fips140.RecordApproved() checkApprovedHash(hash) diff --git a/src/crypto/internal/fips140/sha256/_asm/sha256block_amd64_asm.go b/src/crypto/internal/fips140/sha256/_asm/sha256block_amd64_asm.go index b26c2418e5..a3324673fd 100644 --- a/src/crypto/internal/fips140/sha256/_asm/sha256block_amd64_asm.go +++ b/src/crypto/internal/fips140/sha256/_asm/sha256block_amd64_asm.go @@ -8,8 +8,6 @@ import ( "os" . "github.com/mmcloughlin/avo/build" - . "github.com/mmcloughlin/avo/operand" - . "github.com/mmcloughlin/avo/reg" ) //go:generate go run . -out ../sha256block_amd64.s @@ -61,203 +59,11 @@ func main() { Package("crypto/internal/fips140/sha256") ConstraintExpr("!purego") - blockAMD64() blockAVX2() blockSHANI() Generate() } -// Wt = Mt; for 0 <= t <= 15 -func msgSchedule0(index int) { - MOVL(Mem{Base: SI}.Offset(index*4), EAX) - BSWAPL(EAX) - MOVL(EAX, Mem{Base: BP}.Offset(index*4)) -} - -// Wt = SIGMA1(Wt-2) + Wt-7 + SIGMA0(Wt-15) + Wt-16; for 16 <= t <= 63 -// -// SIGMA0(x) = ROTR(7,x) XOR ROTR(18,x) XOR SHR(3,x) -// SIGMA1(x) = ROTR(17,x) XOR ROTR(19,x) XOR SHR(10,x) -func msgSchedule1(index int) { - MOVL(Mem{Base: BP}.Offset((index-2)*4), EAX) - MOVL(EAX, ECX) - RORL(Imm(17), EAX) - MOVL(ECX, EDX) - RORL(Imm(19), ECX) - SHRL(Imm(10), EDX) - MOVL(Mem{Base: BP}.Offset((index-15)*4), EBX) - XORL(ECX, EAX) - MOVL(EBX, ECX) - XORL(EDX, EAX) - RORL(Imm(7), EBX) - MOVL(ECX, EDX) - SHRL(Imm(3), EDX) - RORL(Imm(18), ECX) - ADDL(Mem{Base: BP}.Offset((index-7)*4), EAX) - XORL(ECX, EBX) - XORL(EDX, EBX) - ADDL(Mem{Base: BP}.Offset((index-16)*4), EBX) - ADDL(EBX, EAX) - MOVL(EAX, Mem{Base: BP}.Offset((index)*4)) -} - -// Calculate T1 in AX - uses AX, CX and DX registers. -// h is also used as an accumulator. Wt is passed in AX. -// -// T1 = h + BIGSIGMA1(e) + Ch(e, f, g) + Kt + Wt -// BIGSIGMA1(x) = ROTR(6,x) XOR ROTR(11,x) XOR ROTR(25,x) -// Ch(x, y, z) = (x AND y) XOR (NOT x AND z) -func sha256T1(konst uint32, e, f, g, h GPPhysical) { - ADDL(EAX, h) - MOVL(e, EAX) - ADDL(U32(konst), h) - MOVL(e, ECX) - RORL(U8(6), EAX) - MOVL(e, EDX) - RORL(U8(11), ECX) - XORL(ECX, EAX) - MOVL(e, ECX) - RORL(U8(25), EDX) - ANDL(f, ECX) - XORL(EAX, EDX) - MOVL(e, EAX) - NOTL(EAX) - ADDL(EDX, h) - ANDL(g, EAX) - XORL(ECX, EAX) - ADDL(h, EAX) -} - -// Calculate T2 in BX - uses BX, CX, DX and DI registers. -// -// T2 = BIGSIGMA0(a) + Maj(a, b, c) -// BIGSIGMA0(x) = ROTR(2,x) XOR ROTR(13,x) XOR ROTR(22,x) -// Maj(x, y, z) = (x AND y) XOR (x AND z) XOR (y AND z) -func sha256T2(a, b, c GPPhysical) { - MOVL(a, EDI) - MOVL(c, EBX) - RORL(U8(2), EDI) - MOVL(a, EDX) - ANDL(b, EBX) - RORL(U8(13), EDX) - MOVL(a, ECX) - ANDL(c, ECX) - XORL(EDX, EDI) - XORL(ECX, EBX) - MOVL(a, EDX) - MOVL(b, ECX) - RORL(U8(22), EDX) - ANDL(a, ECX) - XORL(ECX, EBX) - XORL(EDX, EDI) - ADDL(EDI, EBX) -} - -// Calculate T1 and T2, then e = d + T1 and a = T1 + T2. -// The values for e and a are stored in d and h, ready for rotation. -func sha256Round(index int, konst uint32, a, b, c, d, e, f, g, h GPPhysical) { - sha256T1(konst, e, f, g, h) - sha256T2(a, b, c) - MOVL(EBX, h) - ADDL(EAX, d) - ADDL(EAX, h) -} - -func sha256Round0(index int, konst uint32, a, b, c, d, e, f, g, h GPPhysical) { - msgSchedule0(index) - sha256Round(index, konst, a, b, c, d, e, f, g, h) -} - -func sha256Round1(index int, konst uint32, a, b, c, d, e, f, g, h GPPhysical) { - msgSchedule1(index) - sha256Round(index, konst, a, b, c, d, e, f, g, h) -} - -func blockAMD64() { - Implement("blockAMD64") - AllocLocal(256 + 8) - - Load(Param("p").Base(), RSI) - Load(Param("p").Len(), RDX) - SHRQ(Imm(6), RDX) - SHLQ(Imm(6), RDX) - - // Return if p is empty - LEAQ(Mem{Base: RSI, Index: RDX, Scale: 1}, RDI) - MOVQ(RDI, Mem{Base: SP}.Offset(256)) - CMPQ(RSI, RDI) - JEQ(LabelRef("end")) - - BP := Mem{Base: BP} - Load(Param("dig"), RBP) - MOVL(BP.Offset(0*4), R8L) // a = H0 - MOVL(BP.Offset(1*4), R9L) // b = H1 - MOVL(BP.Offset(2*4), R10L) // c = H2 - MOVL(BP.Offset(3*4), R11L) // d = H3 - MOVL(BP.Offset(4*4), R12L) // e = H4 - MOVL(BP.Offset(5*4), R13L) // f = H5 - MOVL(BP.Offset(6*4), R14L) // g = H6 - MOVL(BP.Offset(7*4), R15L) // h = H7 - - loop() - end() -} - -func rotateRight(slice *[]GPPhysical) []GPPhysical { - n := len(*slice) - new := make([]GPPhysical, n) - for i, reg := range *slice { - new[(i+1)%n] = reg - } - return new -} - -func loop() { - Label("loop") - MOVQ(RSP, RBP) - - regs := []GPPhysical{R8L, R9L, R10L, R11L, R12L, R13L, R14L, R15L} - n := len(_K) - - for i := 0; i < 16; i++ { - sha256Round0(i, _K[i], regs[0], regs[1], regs[2], regs[3], regs[4], regs[5], regs[6], regs[7]) - regs = rotateRight(®s) - } - - for i := 16; i < n; i++ { - sha256Round1(i, _K[i], regs[0], regs[1], regs[2], regs[3], regs[4], regs[5], regs[6], regs[7]) - regs = rotateRight(®s) - } - - Load(Param("dig"), RBP) - BP := Mem{Base: BP} - ADDL(BP.Offset(0*4), R8L) // H0 = a + H0 - MOVL(R8L, BP.Offset(0*4)) - ADDL(BP.Offset(1*4), R9L) // H1 = b + H1 - MOVL(R9L, BP.Offset(1*4)) - ADDL(BP.Offset(2*4), R10L) // H2 = c + H2 - MOVL(R10L, BP.Offset(2*4)) - ADDL(BP.Offset(3*4), R11L) // H3 = d + H3 - MOVL(R11L, BP.Offset(3*4)) - ADDL(BP.Offset(4*4), R12L) // H4 = e + H4 - MOVL(R12L, BP.Offset(4*4)) - ADDL(BP.Offset(5*4), R13L) // H5 = f + H5 - MOVL(R13L, BP.Offset(5*4)) - ADDL(BP.Offset(6*4), R14L) // H6 = g + H6 - MOVL(R14L, BP.Offset(6*4)) - ADDL(BP.Offset(7*4), R15L) // H7 = h + H7 - MOVL(R15L, BP.Offset(7*4)) - - ADDQ(Imm(64), RSI) - CMPQ(RSI, Mem{Base: SP}.Offset(256)) - JB(LabelRef("loop")) -} - -func end() { - Label("end") - RET() -} - var _K = []uint32{ 0x428a2f98, 0x71374491, diff --git a/src/crypto/internal/fips140/sha256/sha256.go b/src/crypto/internal/fips140/sha256/sha256.go index bc157f9adb..a51ad2be24 100644 --- a/src/crypto/internal/fips140/sha256/sha256.go +++ b/src/crypto/internal/fips140/sha256/sha256.go @@ -10,6 +10,7 @@ import ( "crypto/internal/fips140" "crypto/internal/fips140deps/byteorder" "errors" + "hash" ) // The size of a SHA-256 checksum in bytes. @@ -115,6 +116,11 @@ func consumeUint32(b []byte) ([]byte, uint32) { return b[4:], byteorder.BEUint32(b) } +func (d *Digest) Clone() (hash.Cloner, error) { + r := *d + return &r, nil +} + func (d *Digest) Reset() { if !d.is224 { d.h[0] = init0 diff --git a/src/crypto/internal/fips140/sha256/sha256block_amd64.go b/src/crypto/internal/fips140/sha256/sha256block_amd64.go index 291a565b1c..0aabcd0792 100644 --- a/src/crypto/internal/fips140/sha256/sha256block_amd64.go +++ b/src/crypto/internal/fips140/sha256/sha256block_amd64.go @@ -19,9 +19,6 @@ func init() { impl.Register("sha256", "SHA-NI", &useSHANI) } -//go:noescape -func blockAMD64(dig *Digest, p []byte) - //go:noescape func blockAVX2(dig *Digest, p []byte) @@ -34,6 +31,6 @@ func block(dig *Digest, p []byte) { } else if useAVX2 { blockAVX2(dig, p) } else { - blockAMD64(dig, p) + blockGeneric(dig, p) } } diff --git a/src/crypto/internal/fips140/sha256/sha256block_amd64.s b/src/crypto/internal/fips140/sha256/sha256block_amd64.s index ce0ad4f887..d5ab42c819 100644 --- a/src/crypto/internal/fips140/sha256/sha256block_amd64.s +++ b/src/crypto/internal/fips140/sha256/sha256block_amd64.s @@ -4,3492 +4,6 @@ #include "textflag.h" -// func blockAMD64(dig *Digest, p []byte) -TEXT ·blockAMD64(SB), $264-32 - MOVQ p_base+8(FP), SI - MOVQ p_len+16(FP), DX - SHRQ $0x06, DX - SHLQ $0x06, DX - LEAQ (SI)(DX*1), DI - MOVQ DI, 256(SP) - CMPQ SI, DI - JEQ end - MOVQ dig+0(FP), BP - MOVL (BP), R8 - MOVL 4(BP), R9 - MOVL 8(BP), R10 - MOVL 12(BP), R11 - MOVL 16(BP), R12 - MOVL 20(BP), R13 - MOVL 24(BP), R14 - MOVL 28(BP), R15 - -loop: - MOVQ SP, BP - MOVL (SI), AX - BSWAPL AX - MOVL AX, (BP) - ADDL AX, R15 - MOVL R12, AX - ADDL $0x428a2f98, R15 - MOVL R12, CX - RORL $0x06, AX - MOVL R12, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R12, CX - RORL $0x19, DX - ANDL R13, CX - XORL AX, DX - MOVL R12, AX - NOTL AX - ADDL DX, R15 - ANDL R14, AX - XORL CX, AX - ADDL R15, AX - MOVL R8, DI - MOVL R10, BX - RORL $0x02, DI - MOVL R8, DX - ANDL R9, BX - RORL $0x0d, DX - MOVL R8, CX - ANDL R10, CX - XORL DX, DI - XORL CX, BX - MOVL R8, DX - MOVL R9, CX - RORL $0x16, DX - ANDL R8, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R15 - ADDL AX, R11 - ADDL AX, R15 - MOVL 4(SI), AX - BSWAPL AX - MOVL AX, 4(BP) - ADDL AX, R14 - MOVL R11, AX - ADDL $0x71374491, R14 - MOVL R11, CX - RORL $0x06, AX - MOVL R11, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R11, CX - RORL $0x19, DX - ANDL R12, CX - XORL AX, DX - MOVL R11, AX - NOTL AX - ADDL DX, R14 - ANDL R13, AX - XORL CX, AX - ADDL R14, AX - MOVL R15, DI - MOVL R9, BX - RORL $0x02, DI - MOVL R15, DX - ANDL R8, BX - RORL $0x0d, DX - MOVL R15, CX - ANDL R9, CX - XORL DX, DI - XORL CX, BX - MOVL R15, DX - MOVL R8, CX - RORL $0x16, DX - ANDL R15, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R14 - ADDL AX, R10 - ADDL AX, R14 - MOVL 8(SI), AX - BSWAPL AX - MOVL AX, 8(BP) - ADDL AX, R13 - MOVL R10, AX - ADDL $0xb5c0fbcf, R13 - MOVL R10, CX - RORL $0x06, AX - MOVL R10, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R10, CX - RORL $0x19, DX - ANDL R11, CX - XORL AX, DX - MOVL R10, AX - NOTL AX - ADDL DX, R13 - ANDL R12, AX - XORL CX, AX - ADDL R13, AX - MOVL R14, DI - MOVL R8, BX - RORL $0x02, DI - MOVL R14, DX - ANDL R15, BX - RORL $0x0d, DX - MOVL R14, CX - ANDL R8, CX - XORL DX, DI - XORL CX, BX - MOVL R14, DX - MOVL R15, CX - RORL $0x16, DX - ANDL R14, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R13 - ADDL AX, R9 - ADDL AX, R13 - MOVL 12(SI), AX - BSWAPL AX - MOVL AX, 12(BP) - ADDL AX, R12 - MOVL R9, AX - ADDL $0xe9b5dba5, R12 - MOVL R9, CX - RORL $0x06, AX - MOVL R9, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R9, CX - RORL $0x19, DX - ANDL R10, CX - XORL AX, DX - MOVL R9, AX - NOTL AX - ADDL DX, R12 - ANDL R11, AX - XORL CX, AX - ADDL R12, AX - MOVL R13, DI - MOVL R15, BX - RORL $0x02, DI - MOVL R13, DX - ANDL R14, BX - RORL $0x0d, DX - MOVL R13, CX - ANDL R15, CX - XORL DX, DI - XORL CX, BX - MOVL R13, DX - MOVL R14, CX - RORL $0x16, DX - ANDL R13, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R12 - ADDL AX, R8 - ADDL AX, R12 - MOVL 16(SI), AX - BSWAPL AX - MOVL AX, 16(BP) - ADDL AX, R11 - MOVL R8, AX - ADDL $0x3956c25b, R11 - MOVL R8, CX - RORL $0x06, AX - MOVL R8, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R8, CX - RORL $0x19, DX - ANDL R9, CX - XORL AX, DX - MOVL R8, AX - NOTL AX - ADDL DX, R11 - ANDL R10, AX - XORL CX, AX - ADDL R11, AX - MOVL R12, DI - MOVL R14, BX - RORL $0x02, DI - MOVL R12, DX - ANDL R13, BX - RORL $0x0d, DX - MOVL R12, CX - ANDL R14, CX - XORL DX, DI - XORL CX, BX - MOVL R12, DX - MOVL R13, CX - RORL $0x16, DX - ANDL R12, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R11 - ADDL AX, R15 - ADDL AX, R11 - MOVL 20(SI), AX - BSWAPL AX - MOVL AX, 20(BP) - ADDL AX, R10 - MOVL R15, AX - ADDL $0x59f111f1, R10 - MOVL R15, CX - RORL $0x06, AX - MOVL R15, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R15, CX - RORL $0x19, DX - ANDL R8, CX - XORL AX, DX - MOVL R15, AX - NOTL AX - ADDL DX, R10 - ANDL R9, AX - XORL CX, AX - ADDL R10, AX - MOVL R11, DI - MOVL R13, BX - RORL $0x02, DI - MOVL R11, DX - ANDL R12, BX - RORL $0x0d, DX - MOVL R11, CX - ANDL R13, CX - XORL DX, DI - XORL CX, BX - MOVL R11, DX - MOVL R12, CX - RORL $0x16, DX - ANDL R11, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R10 - ADDL AX, R14 - ADDL AX, R10 - MOVL 24(SI), AX - BSWAPL AX - MOVL AX, 24(BP) - ADDL AX, R9 - MOVL R14, AX - ADDL $0x923f82a4, R9 - MOVL R14, CX - RORL $0x06, AX - MOVL R14, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R14, CX - RORL $0x19, DX - ANDL R15, CX - XORL AX, DX - MOVL R14, AX - NOTL AX - ADDL DX, R9 - ANDL R8, AX - XORL CX, AX - ADDL R9, AX - MOVL R10, DI - MOVL R12, BX - RORL $0x02, DI - MOVL R10, DX - ANDL R11, BX - RORL $0x0d, DX - MOVL R10, CX - ANDL R12, CX - XORL DX, DI - XORL CX, BX - MOVL R10, DX - MOVL R11, CX - RORL $0x16, DX - ANDL R10, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R9 - ADDL AX, R13 - ADDL AX, R9 - MOVL 28(SI), AX - BSWAPL AX - MOVL AX, 28(BP) - ADDL AX, R8 - MOVL R13, AX - ADDL $0xab1c5ed5, R8 - MOVL R13, CX - RORL $0x06, AX - MOVL R13, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R13, CX - RORL $0x19, DX - ANDL R14, CX - XORL AX, DX - MOVL R13, AX - NOTL AX - ADDL DX, R8 - ANDL R15, AX - XORL CX, AX - ADDL R8, AX - MOVL R9, DI - MOVL R11, BX - RORL $0x02, DI - MOVL R9, DX - ANDL R10, BX - RORL $0x0d, DX - MOVL R9, CX - ANDL R11, CX - XORL DX, DI - XORL CX, BX - MOVL R9, DX - MOVL R10, CX - RORL $0x16, DX - ANDL R9, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R8 - ADDL AX, R12 - ADDL AX, R8 - MOVL 32(SI), AX - BSWAPL AX - MOVL AX, 32(BP) - ADDL AX, R15 - MOVL R12, AX - ADDL $0xd807aa98, R15 - MOVL R12, CX - RORL $0x06, AX - MOVL R12, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R12, CX - RORL $0x19, DX - ANDL R13, CX - XORL AX, DX - MOVL R12, AX - NOTL AX - ADDL DX, R15 - ANDL R14, AX - XORL CX, AX - ADDL R15, AX - MOVL R8, DI - MOVL R10, BX - RORL $0x02, DI - MOVL R8, DX - ANDL R9, BX - RORL $0x0d, DX - MOVL R8, CX - ANDL R10, CX - XORL DX, DI - XORL CX, BX - MOVL R8, DX - MOVL R9, CX - RORL $0x16, DX - ANDL R8, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R15 - ADDL AX, R11 - ADDL AX, R15 - MOVL 36(SI), AX - BSWAPL AX - MOVL AX, 36(BP) - ADDL AX, R14 - MOVL R11, AX - ADDL $0x12835b01, R14 - MOVL R11, CX - RORL $0x06, AX - MOVL R11, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R11, CX - RORL $0x19, DX - ANDL R12, CX - XORL AX, DX - MOVL R11, AX - NOTL AX - ADDL DX, R14 - ANDL R13, AX - XORL CX, AX - ADDL R14, AX - MOVL R15, DI - MOVL R9, BX - RORL $0x02, DI - MOVL R15, DX - ANDL R8, BX - RORL $0x0d, DX - MOVL R15, CX - ANDL R9, CX - XORL DX, DI - XORL CX, BX - MOVL R15, DX - MOVL R8, CX - RORL $0x16, DX - ANDL R15, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R14 - ADDL AX, R10 - ADDL AX, R14 - MOVL 40(SI), AX - BSWAPL AX - MOVL AX, 40(BP) - ADDL AX, R13 - MOVL R10, AX - ADDL $0x243185be, R13 - MOVL R10, CX - RORL $0x06, AX - MOVL R10, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R10, CX - RORL $0x19, DX - ANDL R11, CX - XORL AX, DX - MOVL R10, AX - NOTL AX - ADDL DX, R13 - ANDL R12, AX - XORL CX, AX - ADDL R13, AX - MOVL R14, DI - MOVL R8, BX - RORL $0x02, DI - MOVL R14, DX - ANDL R15, BX - RORL $0x0d, DX - MOVL R14, CX - ANDL R8, CX - XORL DX, DI - XORL CX, BX - MOVL R14, DX - MOVL R15, CX - RORL $0x16, DX - ANDL R14, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R13 - ADDL AX, R9 - ADDL AX, R13 - MOVL 44(SI), AX - BSWAPL AX - MOVL AX, 44(BP) - ADDL AX, R12 - MOVL R9, AX - ADDL $0x550c7dc3, R12 - MOVL R9, CX - RORL $0x06, AX - MOVL R9, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R9, CX - RORL $0x19, DX - ANDL R10, CX - XORL AX, DX - MOVL R9, AX - NOTL AX - ADDL DX, R12 - ANDL R11, AX - XORL CX, AX - ADDL R12, AX - MOVL R13, DI - MOVL R15, BX - RORL $0x02, DI - MOVL R13, DX - ANDL R14, BX - RORL $0x0d, DX - MOVL R13, CX - ANDL R15, CX - XORL DX, DI - XORL CX, BX - MOVL R13, DX - MOVL R14, CX - RORL $0x16, DX - ANDL R13, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R12 - ADDL AX, R8 - ADDL AX, R12 - MOVL 48(SI), AX - BSWAPL AX - MOVL AX, 48(BP) - ADDL AX, R11 - MOVL R8, AX - ADDL $0x72be5d74, R11 - MOVL R8, CX - RORL $0x06, AX - MOVL R8, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R8, CX - RORL $0x19, DX - ANDL R9, CX - XORL AX, DX - MOVL R8, AX - NOTL AX - ADDL DX, R11 - ANDL R10, AX - XORL CX, AX - ADDL R11, AX - MOVL R12, DI - MOVL R14, BX - RORL $0x02, DI - MOVL R12, DX - ANDL R13, BX - RORL $0x0d, DX - MOVL R12, CX - ANDL R14, CX - XORL DX, DI - XORL CX, BX - MOVL R12, DX - MOVL R13, CX - RORL $0x16, DX - ANDL R12, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R11 - ADDL AX, R15 - ADDL AX, R11 - MOVL 52(SI), AX - BSWAPL AX - MOVL AX, 52(BP) - ADDL AX, R10 - MOVL R15, AX - ADDL $0x80deb1fe, R10 - MOVL R15, CX - RORL $0x06, AX - MOVL R15, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R15, CX - RORL $0x19, DX - ANDL R8, CX - XORL AX, DX - MOVL R15, AX - NOTL AX - ADDL DX, R10 - ANDL R9, AX - XORL CX, AX - ADDL R10, AX - MOVL R11, DI - MOVL R13, BX - RORL $0x02, DI - MOVL R11, DX - ANDL R12, BX - RORL $0x0d, DX - MOVL R11, CX - ANDL R13, CX - XORL DX, DI - XORL CX, BX - MOVL R11, DX - MOVL R12, CX - RORL $0x16, DX - ANDL R11, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R10 - ADDL AX, R14 - ADDL AX, R10 - MOVL 56(SI), AX - BSWAPL AX - MOVL AX, 56(BP) - ADDL AX, R9 - MOVL R14, AX - ADDL $0x9bdc06a7, R9 - MOVL R14, CX - RORL $0x06, AX - MOVL R14, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R14, CX - RORL $0x19, DX - ANDL R15, CX - XORL AX, DX - MOVL R14, AX - NOTL AX - ADDL DX, R9 - ANDL R8, AX - XORL CX, AX - ADDL R9, AX - MOVL R10, DI - MOVL R12, BX - RORL $0x02, DI - MOVL R10, DX - ANDL R11, BX - RORL $0x0d, DX - MOVL R10, CX - ANDL R12, CX - XORL DX, DI - XORL CX, BX - MOVL R10, DX - MOVL R11, CX - RORL $0x16, DX - ANDL R10, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R9 - ADDL AX, R13 - ADDL AX, R9 - MOVL 60(SI), AX - BSWAPL AX - MOVL AX, 60(BP) - ADDL AX, R8 - MOVL R13, AX - ADDL $0xc19bf174, R8 - MOVL R13, CX - RORL $0x06, AX - MOVL R13, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R13, CX - RORL $0x19, DX - ANDL R14, CX - XORL AX, DX - MOVL R13, AX - NOTL AX - ADDL DX, R8 - ANDL R15, AX - XORL CX, AX - ADDL R8, AX - MOVL R9, DI - MOVL R11, BX - RORL $0x02, DI - MOVL R9, DX - ANDL R10, BX - RORL $0x0d, DX - MOVL R9, CX - ANDL R11, CX - XORL DX, DI - XORL CX, BX - MOVL R9, DX - MOVL R10, CX - RORL $0x16, DX - ANDL R9, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R8 - ADDL AX, R12 - ADDL AX, R8 - MOVL 56(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 4(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 36(BP), AX - XORL CX, BX - XORL DX, BX - ADDL (BP), BX - ADDL BX, AX - MOVL AX, 64(BP) - ADDL AX, R15 - MOVL R12, AX - ADDL $0xe49b69c1, R15 - MOVL R12, CX - RORL $0x06, AX - MOVL R12, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R12, CX - RORL $0x19, DX - ANDL R13, CX - XORL AX, DX - MOVL R12, AX - NOTL AX - ADDL DX, R15 - ANDL R14, AX - XORL CX, AX - ADDL R15, AX - MOVL R8, DI - MOVL R10, BX - RORL $0x02, DI - MOVL R8, DX - ANDL R9, BX - RORL $0x0d, DX - MOVL R8, CX - ANDL R10, CX - XORL DX, DI - XORL CX, BX - MOVL R8, DX - MOVL R9, CX - RORL $0x16, DX - ANDL R8, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R15 - ADDL AX, R11 - ADDL AX, R15 - MOVL 60(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 8(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 40(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 4(BP), BX - ADDL BX, AX - MOVL AX, 68(BP) - ADDL AX, R14 - MOVL R11, AX - ADDL $0xefbe4786, R14 - MOVL R11, CX - RORL $0x06, AX - MOVL R11, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R11, CX - RORL $0x19, DX - ANDL R12, CX - XORL AX, DX - MOVL R11, AX - NOTL AX - ADDL DX, R14 - ANDL R13, AX - XORL CX, AX - ADDL R14, AX - MOVL R15, DI - MOVL R9, BX - RORL $0x02, DI - MOVL R15, DX - ANDL R8, BX - RORL $0x0d, DX - MOVL R15, CX - ANDL R9, CX - XORL DX, DI - XORL CX, BX - MOVL R15, DX - MOVL R8, CX - RORL $0x16, DX - ANDL R15, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R14 - ADDL AX, R10 - ADDL AX, R14 - MOVL 64(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 12(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 44(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 8(BP), BX - ADDL BX, AX - MOVL AX, 72(BP) - ADDL AX, R13 - MOVL R10, AX - ADDL $0x0fc19dc6, R13 - MOVL R10, CX - RORL $0x06, AX - MOVL R10, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R10, CX - RORL $0x19, DX - ANDL R11, CX - XORL AX, DX - MOVL R10, AX - NOTL AX - ADDL DX, R13 - ANDL R12, AX - XORL CX, AX - ADDL R13, AX - MOVL R14, DI - MOVL R8, BX - RORL $0x02, DI - MOVL R14, DX - ANDL R15, BX - RORL $0x0d, DX - MOVL R14, CX - ANDL R8, CX - XORL DX, DI - XORL CX, BX - MOVL R14, DX - MOVL R15, CX - RORL $0x16, DX - ANDL R14, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R13 - ADDL AX, R9 - ADDL AX, R13 - MOVL 68(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 16(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 48(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 12(BP), BX - ADDL BX, AX - MOVL AX, 76(BP) - ADDL AX, R12 - MOVL R9, AX - ADDL $0x240ca1cc, R12 - MOVL R9, CX - RORL $0x06, AX - MOVL R9, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R9, CX - RORL $0x19, DX - ANDL R10, CX - XORL AX, DX - MOVL R9, AX - NOTL AX - ADDL DX, R12 - ANDL R11, AX - XORL CX, AX - ADDL R12, AX - MOVL R13, DI - MOVL R15, BX - RORL $0x02, DI - MOVL R13, DX - ANDL R14, BX - RORL $0x0d, DX - MOVL R13, CX - ANDL R15, CX - XORL DX, DI - XORL CX, BX - MOVL R13, DX - MOVL R14, CX - RORL $0x16, DX - ANDL R13, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R12 - ADDL AX, R8 - ADDL AX, R12 - MOVL 72(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 20(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 52(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 16(BP), BX - ADDL BX, AX - MOVL AX, 80(BP) - ADDL AX, R11 - MOVL R8, AX - ADDL $0x2de92c6f, R11 - MOVL R8, CX - RORL $0x06, AX - MOVL R8, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R8, CX - RORL $0x19, DX - ANDL R9, CX - XORL AX, DX - MOVL R8, AX - NOTL AX - ADDL DX, R11 - ANDL R10, AX - XORL CX, AX - ADDL R11, AX - MOVL R12, DI - MOVL R14, BX - RORL $0x02, DI - MOVL R12, DX - ANDL R13, BX - RORL $0x0d, DX - MOVL R12, CX - ANDL R14, CX - XORL DX, DI - XORL CX, BX - MOVL R12, DX - MOVL R13, CX - RORL $0x16, DX - ANDL R12, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R11 - ADDL AX, R15 - ADDL AX, R11 - MOVL 76(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 24(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 56(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 20(BP), BX - ADDL BX, AX - MOVL AX, 84(BP) - ADDL AX, R10 - MOVL R15, AX - ADDL $0x4a7484aa, R10 - MOVL R15, CX - RORL $0x06, AX - MOVL R15, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R15, CX - RORL $0x19, DX - ANDL R8, CX - XORL AX, DX - MOVL R15, AX - NOTL AX - ADDL DX, R10 - ANDL R9, AX - XORL CX, AX - ADDL R10, AX - MOVL R11, DI - MOVL R13, BX - RORL $0x02, DI - MOVL R11, DX - ANDL R12, BX - RORL $0x0d, DX - MOVL R11, CX - ANDL R13, CX - XORL DX, DI - XORL CX, BX - MOVL R11, DX - MOVL R12, CX - RORL $0x16, DX - ANDL R11, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R10 - ADDL AX, R14 - ADDL AX, R10 - MOVL 80(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 28(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 60(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 24(BP), BX - ADDL BX, AX - MOVL AX, 88(BP) - ADDL AX, R9 - MOVL R14, AX - ADDL $0x5cb0a9dc, R9 - MOVL R14, CX - RORL $0x06, AX - MOVL R14, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R14, CX - RORL $0x19, DX - ANDL R15, CX - XORL AX, DX - MOVL R14, AX - NOTL AX - ADDL DX, R9 - ANDL R8, AX - XORL CX, AX - ADDL R9, AX - MOVL R10, DI - MOVL R12, BX - RORL $0x02, DI - MOVL R10, DX - ANDL R11, BX - RORL $0x0d, DX - MOVL R10, CX - ANDL R12, CX - XORL DX, DI - XORL CX, BX - MOVL R10, DX - MOVL R11, CX - RORL $0x16, DX - ANDL R10, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R9 - ADDL AX, R13 - ADDL AX, R9 - MOVL 84(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 32(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 64(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 28(BP), BX - ADDL BX, AX - MOVL AX, 92(BP) - ADDL AX, R8 - MOVL R13, AX - ADDL $0x76f988da, R8 - MOVL R13, CX - RORL $0x06, AX - MOVL R13, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R13, CX - RORL $0x19, DX - ANDL R14, CX - XORL AX, DX - MOVL R13, AX - NOTL AX - ADDL DX, R8 - ANDL R15, AX - XORL CX, AX - ADDL R8, AX - MOVL R9, DI - MOVL R11, BX - RORL $0x02, DI - MOVL R9, DX - ANDL R10, BX - RORL $0x0d, DX - MOVL R9, CX - ANDL R11, CX - XORL DX, DI - XORL CX, BX - MOVL R9, DX - MOVL R10, CX - RORL $0x16, DX - ANDL R9, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R8 - ADDL AX, R12 - ADDL AX, R8 - MOVL 88(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 36(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 68(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 32(BP), BX - ADDL BX, AX - MOVL AX, 96(BP) - ADDL AX, R15 - MOVL R12, AX - ADDL $0x983e5152, R15 - MOVL R12, CX - RORL $0x06, AX - MOVL R12, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R12, CX - RORL $0x19, DX - ANDL R13, CX - XORL AX, DX - MOVL R12, AX - NOTL AX - ADDL DX, R15 - ANDL R14, AX - XORL CX, AX - ADDL R15, AX - MOVL R8, DI - MOVL R10, BX - RORL $0x02, DI - MOVL R8, DX - ANDL R9, BX - RORL $0x0d, DX - MOVL R8, CX - ANDL R10, CX - XORL DX, DI - XORL CX, BX - MOVL R8, DX - MOVL R9, CX - RORL $0x16, DX - ANDL R8, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R15 - ADDL AX, R11 - ADDL AX, R15 - MOVL 92(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 40(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 72(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 36(BP), BX - ADDL BX, AX - MOVL AX, 100(BP) - ADDL AX, R14 - MOVL R11, AX - ADDL $0xa831c66d, R14 - MOVL R11, CX - RORL $0x06, AX - MOVL R11, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R11, CX - RORL $0x19, DX - ANDL R12, CX - XORL AX, DX - MOVL R11, AX - NOTL AX - ADDL DX, R14 - ANDL R13, AX - XORL CX, AX - ADDL R14, AX - MOVL R15, DI - MOVL R9, BX - RORL $0x02, DI - MOVL R15, DX - ANDL R8, BX - RORL $0x0d, DX - MOVL R15, CX - ANDL R9, CX - XORL DX, DI - XORL CX, BX - MOVL R15, DX - MOVL R8, CX - RORL $0x16, DX - ANDL R15, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R14 - ADDL AX, R10 - ADDL AX, R14 - MOVL 96(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 44(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 76(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 40(BP), BX - ADDL BX, AX - MOVL AX, 104(BP) - ADDL AX, R13 - MOVL R10, AX - ADDL $0xb00327c8, R13 - MOVL R10, CX - RORL $0x06, AX - MOVL R10, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R10, CX - RORL $0x19, DX - ANDL R11, CX - XORL AX, DX - MOVL R10, AX - NOTL AX - ADDL DX, R13 - ANDL R12, AX - XORL CX, AX - ADDL R13, AX - MOVL R14, DI - MOVL R8, BX - RORL $0x02, DI - MOVL R14, DX - ANDL R15, BX - RORL $0x0d, DX - MOVL R14, CX - ANDL R8, CX - XORL DX, DI - XORL CX, BX - MOVL R14, DX - MOVL R15, CX - RORL $0x16, DX - ANDL R14, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R13 - ADDL AX, R9 - ADDL AX, R13 - MOVL 100(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 48(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 80(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 44(BP), BX - ADDL BX, AX - MOVL AX, 108(BP) - ADDL AX, R12 - MOVL R9, AX - ADDL $0xbf597fc7, R12 - MOVL R9, CX - RORL $0x06, AX - MOVL R9, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R9, CX - RORL $0x19, DX - ANDL R10, CX - XORL AX, DX - MOVL R9, AX - NOTL AX - ADDL DX, R12 - ANDL R11, AX - XORL CX, AX - ADDL R12, AX - MOVL R13, DI - MOVL R15, BX - RORL $0x02, DI - MOVL R13, DX - ANDL R14, BX - RORL $0x0d, DX - MOVL R13, CX - ANDL R15, CX - XORL DX, DI - XORL CX, BX - MOVL R13, DX - MOVL R14, CX - RORL $0x16, DX - ANDL R13, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R12 - ADDL AX, R8 - ADDL AX, R12 - MOVL 104(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 52(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 84(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 48(BP), BX - ADDL BX, AX - MOVL AX, 112(BP) - ADDL AX, R11 - MOVL R8, AX - ADDL $0xc6e00bf3, R11 - MOVL R8, CX - RORL $0x06, AX - MOVL R8, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R8, CX - RORL $0x19, DX - ANDL R9, CX - XORL AX, DX - MOVL R8, AX - NOTL AX - ADDL DX, R11 - ANDL R10, AX - XORL CX, AX - ADDL R11, AX - MOVL R12, DI - MOVL R14, BX - RORL $0x02, DI - MOVL R12, DX - ANDL R13, BX - RORL $0x0d, DX - MOVL R12, CX - ANDL R14, CX - XORL DX, DI - XORL CX, BX - MOVL R12, DX - MOVL R13, CX - RORL $0x16, DX - ANDL R12, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R11 - ADDL AX, R15 - ADDL AX, R11 - MOVL 108(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 56(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 88(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 52(BP), BX - ADDL BX, AX - MOVL AX, 116(BP) - ADDL AX, R10 - MOVL R15, AX - ADDL $0xd5a79147, R10 - MOVL R15, CX - RORL $0x06, AX - MOVL R15, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R15, CX - RORL $0x19, DX - ANDL R8, CX - XORL AX, DX - MOVL R15, AX - NOTL AX - ADDL DX, R10 - ANDL R9, AX - XORL CX, AX - ADDL R10, AX - MOVL R11, DI - MOVL R13, BX - RORL $0x02, DI - MOVL R11, DX - ANDL R12, BX - RORL $0x0d, DX - MOVL R11, CX - ANDL R13, CX - XORL DX, DI - XORL CX, BX - MOVL R11, DX - MOVL R12, CX - RORL $0x16, DX - ANDL R11, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R10 - ADDL AX, R14 - ADDL AX, R10 - MOVL 112(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 60(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 92(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 56(BP), BX - ADDL BX, AX - MOVL AX, 120(BP) - ADDL AX, R9 - MOVL R14, AX - ADDL $0x06ca6351, R9 - MOVL R14, CX - RORL $0x06, AX - MOVL R14, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R14, CX - RORL $0x19, DX - ANDL R15, CX - XORL AX, DX - MOVL R14, AX - NOTL AX - ADDL DX, R9 - ANDL R8, AX - XORL CX, AX - ADDL R9, AX - MOVL R10, DI - MOVL R12, BX - RORL $0x02, DI - MOVL R10, DX - ANDL R11, BX - RORL $0x0d, DX - MOVL R10, CX - ANDL R12, CX - XORL DX, DI - XORL CX, BX - MOVL R10, DX - MOVL R11, CX - RORL $0x16, DX - ANDL R10, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R9 - ADDL AX, R13 - ADDL AX, R9 - MOVL 116(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 64(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 96(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 60(BP), BX - ADDL BX, AX - MOVL AX, 124(BP) - ADDL AX, R8 - MOVL R13, AX - ADDL $0x14292967, R8 - MOVL R13, CX - RORL $0x06, AX - MOVL R13, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R13, CX - RORL $0x19, DX - ANDL R14, CX - XORL AX, DX - MOVL R13, AX - NOTL AX - ADDL DX, R8 - ANDL R15, AX - XORL CX, AX - ADDL R8, AX - MOVL R9, DI - MOVL R11, BX - RORL $0x02, DI - MOVL R9, DX - ANDL R10, BX - RORL $0x0d, DX - MOVL R9, CX - ANDL R11, CX - XORL DX, DI - XORL CX, BX - MOVL R9, DX - MOVL R10, CX - RORL $0x16, DX - ANDL R9, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R8 - ADDL AX, R12 - ADDL AX, R8 - MOVL 120(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 68(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 100(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 64(BP), BX - ADDL BX, AX - MOVL AX, 128(BP) - ADDL AX, R15 - MOVL R12, AX - ADDL $0x27b70a85, R15 - MOVL R12, CX - RORL $0x06, AX - MOVL R12, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R12, CX - RORL $0x19, DX - ANDL R13, CX - XORL AX, DX - MOVL R12, AX - NOTL AX - ADDL DX, R15 - ANDL R14, AX - XORL CX, AX - ADDL R15, AX - MOVL R8, DI - MOVL R10, BX - RORL $0x02, DI - MOVL R8, DX - ANDL R9, BX - RORL $0x0d, DX - MOVL R8, CX - ANDL R10, CX - XORL DX, DI - XORL CX, BX - MOVL R8, DX - MOVL R9, CX - RORL $0x16, DX - ANDL R8, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R15 - ADDL AX, R11 - ADDL AX, R15 - MOVL 124(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 72(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 104(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 68(BP), BX - ADDL BX, AX - MOVL AX, 132(BP) - ADDL AX, R14 - MOVL R11, AX - ADDL $0x2e1b2138, R14 - MOVL R11, CX - RORL $0x06, AX - MOVL R11, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R11, CX - RORL $0x19, DX - ANDL R12, CX - XORL AX, DX - MOVL R11, AX - NOTL AX - ADDL DX, R14 - ANDL R13, AX - XORL CX, AX - ADDL R14, AX - MOVL R15, DI - MOVL R9, BX - RORL $0x02, DI - MOVL R15, DX - ANDL R8, BX - RORL $0x0d, DX - MOVL R15, CX - ANDL R9, CX - XORL DX, DI - XORL CX, BX - MOVL R15, DX - MOVL R8, CX - RORL $0x16, DX - ANDL R15, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R14 - ADDL AX, R10 - ADDL AX, R14 - MOVL 128(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 76(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 108(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 72(BP), BX - ADDL BX, AX - MOVL AX, 136(BP) - ADDL AX, R13 - MOVL R10, AX - ADDL $0x4d2c6dfc, R13 - MOVL R10, CX - RORL $0x06, AX - MOVL R10, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R10, CX - RORL $0x19, DX - ANDL R11, CX - XORL AX, DX - MOVL R10, AX - NOTL AX - ADDL DX, R13 - ANDL R12, AX - XORL CX, AX - ADDL R13, AX - MOVL R14, DI - MOVL R8, BX - RORL $0x02, DI - MOVL R14, DX - ANDL R15, BX - RORL $0x0d, DX - MOVL R14, CX - ANDL R8, CX - XORL DX, DI - XORL CX, BX - MOVL R14, DX - MOVL R15, CX - RORL $0x16, DX - ANDL R14, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R13 - ADDL AX, R9 - ADDL AX, R13 - MOVL 132(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 80(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 112(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 76(BP), BX - ADDL BX, AX - MOVL AX, 140(BP) - ADDL AX, R12 - MOVL R9, AX - ADDL $0x53380d13, R12 - MOVL R9, CX - RORL $0x06, AX - MOVL R9, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R9, CX - RORL $0x19, DX - ANDL R10, CX - XORL AX, DX - MOVL R9, AX - NOTL AX - ADDL DX, R12 - ANDL R11, AX - XORL CX, AX - ADDL R12, AX - MOVL R13, DI - MOVL R15, BX - RORL $0x02, DI - MOVL R13, DX - ANDL R14, BX - RORL $0x0d, DX - MOVL R13, CX - ANDL R15, CX - XORL DX, DI - XORL CX, BX - MOVL R13, DX - MOVL R14, CX - RORL $0x16, DX - ANDL R13, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R12 - ADDL AX, R8 - ADDL AX, R12 - MOVL 136(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 84(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 116(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 80(BP), BX - ADDL BX, AX - MOVL AX, 144(BP) - ADDL AX, R11 - MOVL R8, AX - ADDL $0x650a7354, R11 - MOVL R8, CX - RORL $0x06, AX - MOVL R8, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R8, CX - RORL $0x19, DX - ANDL R9, CX - XORL AX, DX - MOVL R8, AX - NOTL AX - ADDL DX, R11 - ANDL R10, AX - XORL CX, AX - ADDL R11, AX - MOVL R12, DI - MOVL R14, BX - RORL $0x02, DI - MOVL R12, DX - ANDL R13, BX - RORL $0x0d, DX - MOVL R12, CX - ANDL R14, CX - XORL DX, DI - XORL CX, BX - MOVL R12, DX - MOVL R13, CX - RORL $0x16, DX - ANDL R12, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R11 - ADDL AX, R15 - ADDL AX, R11 - MOVL 140(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 88(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 120(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 84(BP), BX - ADDL BX, AX - MOVL AX, 148(BP) - ADDL AX, R10 - MOVL R15, AX - ADDL $0x766a0abb, R10 - MOVL R15, CX - RORL $0x06, AX - MOVL R15, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R15, CX - RORL $0x19, DX - ANDL R8, CX - XORL AX, DX - MOVL R15, AX - NOTL AX - ADDL DX, R10 - ANDL R9, AX - XORL CX, AX - ADDL R10, AX - MOVL R11, DI - MOVL R13, BX - RORL $0x02, DI - MOVL R11, DX - ANDL R12, BX - RORL $0x0d, DX - MOVL R11, CX - ANDL R13, CX - XORL DX, DI - XORL CX, BX - MOVL R11, DX - MOVL R12, CX - RORL $0x16, DX - ANDL R11, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R10 - ADDL AX, R14 - ADDL AX, R10 - MOVL 144(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 92(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 124(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 88(BP), BX - ADDL BX, AX - MOVL AX, 152(BP) - ADDL AX, R9 - MOVL R14, AX - ADDL $0x81c2c92e, R9 - MOVL R14, CX - RORL $0x06, AX - MOVL R14, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R14, CX - RORL $0x19, DX - ANDL R15, CX - XORL AX, DX - MOVL R14, AX - NOTL AX - ADDL DX, R9 - ANDL R8, AX - XORL CX, AX - ADDL R9, AX - MOVL R10, DI - MOVL R12, BX - RORL $0x02, DI - MOVL R10, DX - ANDL R11, BX - RORL $0x0d, DX - MOVL R10, CX - ANDL R12, CX - XORL DX, DI - XORL CX, BX - MOVL R10, DX - MOVL R11, CX - RORL $0x16, DX - ANDL R10, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R9 - ADDL AX, R13 - ADDL AX, R9 - MOVL 148(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 96(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 128(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 92(BP), BX - ADDL BX, AX - MOVL AX, 156(BP) - ADDL AX, R8 - MOVL R13, AX - ADDL $0x92722c85, R8 - MOVL R13, CX - RORL $0x06, AX - MOVL R13, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R13, CX - RORL $0x19, DX - ANDL R14, CX - XORL AX, DX - MOVL R13, AX - NOTL AX - ADDL DX, R8 - ANDL R15, AX - XORL CX, AX - ADDL R8, AX - MOVL R9, DI - MOVL R11, BX - RORL $0x02, DI - MOVL R9, DX - ANDL R10, BX - RORL $0x0d, DX - MOVL R9, CX - ANDL R11, CX - XORL DX, DI - XORL CX, BX - MOVL R9, DX - MOVL R10, CX - RORL $0x16, DX - ANDL R9, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R8 - ADDL AX, R12 - ADDL AX, R8 - MOVL 152(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 100(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 132(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 96(BP), BX - ADDL BX, AX - MOVL AX, 160(BP) - ADDL AX, R15 - MOVL R12, AX - ADDL $0xa2bfe8a1, R15 - MOVL R12, CX - RORL $0x06, AX - MOVL R12, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R12, CX - RORL $0x19, DX - ANDL R13, CX - XORL AX, DX - MOVL R12, AX - NOTL AX - ADDL DX, R15 - ANDL R14, AX - XORL CX, AX - ADDL R15, AX - MOVL R8, DI - MOVL R10, BX - RORL $0x02, DI - MOVL R8, DX - ANDL R9, BX - RORL $0x0d, DX - MOVL R8, CX - ANDL R10, CX - XORL DX, DI - XORL CX, BX - MOVL R8, DX - MOVL R9, CX - RORL $0x16, DX - ANDL R8, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R15 - ADDL AX, R11 - ADDL AX, R15 - MOVL 156(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 104(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 136(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 100(BP), BX - ADDL BX, AX - MOVL AX, 164(BP) - ADDL AX, R14 - MOVL R11, AX - ADDL $0xa81a664b, R14 - MOVL R11, CX - RORL $0x06, AX - MOVL R11, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R11, CX - RORL $0x19, DX - ANDL R12, CX - XORL AX, DX - MOVL R11, AX - NOTL AX - ADDL DX, R14 - ANDL R13, AX - XORL CX, AX - ADDL R14, AX - MOVL R15, DI - MOVL R9, BX - RORL $0x02, DI - MOVL R15, DX - ANDL R8, BX - RORL $0x0d, DX - MOVL R15, CX - ANDL R9, CX - XORL DX, DI - XORL CX, BX - MOVL R15, DX - MOVL R8, CX - RORL $0x16, DX - ANDL R15, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R14 - ADDL AX, R10 - ADDL AX, R14 - MOVL 160(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 108(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 140(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 104(BP), BX - ADDL BX, AX - MOVL AX, 168(BP) - ADDL AX, R13 - MOVL R10, AX - ADDL $0xc24b8b70, R13 - MOVL R10, CX - RORL $0x06, AX - MOVL R10, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R10, CX - RORL $0x19, DX - ANDL R11, CX - XORL AX, DX - MOVL R10, AX - NOTL AX - ADDL DX, R13 - ANDL R12, AX - XORL CX, AX - ADDL R13, AX - MOVL R14, DI - MOVL R8, BX - RORL $0x02, DI - MOVL R14, DX - ANDL R15, BX - RORL $0x0d, DX - MOVL R14, CX - ANDL R8, CX - XORL DX, DI - XORL CX, BX - MOVL R14, DX - MOVL R15, CX - RORL $0x16, DX - ANDL R14, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R13 - ADDL AX, R9 - ADDL AX, R13 - MOVL 164(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 112(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 144(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 108(BP), BX - ADDL BX, AX - MOVL AX, 172(BP) - ADDL AX, R12 - MOVL R9, AX - ADDL $0xc76c51a3, R12 - MOVL R9, CX - RORL $0x06, AX - MOVL R9, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R9, CX - RORL $0x19, DX - ANDL R10, CX - XORL AX, DX - MOVL R9, AX - NOTL AX - ADDL DX, R12 - ANDL R11, AX - XORL CX, AX - ADDL R12, AX - MOVL R13, DI - MOVL R15, BX - RORL $0x02, DI - MOVL R13, DX - ANDL R14, BX - RORL $0x0d, DX - MOVL R13, CX - ANDL R15, CX - XORL DX, DI - XORL CX, BX - MOVL R13, DX - MOVL R14, CX - RORL $0x16, DX - ANDL R13, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R12 - ADDL AX, R8 - ADDL AX, R12 - MOVL 168(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 116(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 148(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 112(BP), BX - ADDL BX, AX - MOVL AX, 176(BP) - ADDL AX, R11 - MOVL R8, AX - ADDL $0xd192e819, R11 - MOVL R8, CX - RORL $0x06, AX - MOVL R8, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R8, CX - RORL $0x19, DX - ANDL R9, CX - XORL AX, DX - MOVL R8, AX - NOTL AX - ADDL DX, R11 - ANDL R10, AX - XORL CX, AX - ADDL R11, AX - MOVL R12, DI - MOVL R14, BX - RORL $0x02, DI - MOVL R12, DX - ANDL R13, BX - RORL $0x0d, DX - MOVL R12, CX - ANDL R14, CX - XORL DX, DI - XORL CX, BX - MOVL R12, DX - MOVL R13, CX - RORL $0x16, DX - ANDL R12, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R11 - ADDL AX, R15 - ADDL AX, R11 - MOVL 172(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 120(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 152(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 116(BP), BX - ADDL BX, AX - MOVL AX, 180(BP) - ADDL AX, R10 - MOVL R15, AX - ADDL $0xd6990624, R10 - MOVL R15, CX - RORL $0x06, AX - MOVL R15, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R15, CX - RORL $0x19, DX - ANDL R8, CX - XORL AX, DX - MOVL R15, AX - NOTL AX - ADDL DX, R10 - ANDL R9, AX - XORL CX, AX - ADDL R10, AX - MOVL R11, DI - MOVL R13, BX - RORL $0x02, DI - MOVL R11, DX - ANDL R12, BX - RORL $0x0d, DX - MOVL R11, CX - ANDL R13, CX - XORL DX, DI - XORL CX, BX - MOVL R11, DX - MOVL R12, CX - RORL $0x16, DX - ANDL R11, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R10 - ADDL AX, R14 - ADDL AX, R10 - MOVL 176(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 124(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 156(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 120(BP), BX - ADDL BX, AX - MOVL AX, 184(BP) - ADDL AX, R9 - MOVL R14, AX - ADDL $0xf40e3585, R9 - MOVL R14, CX - RORL $0x06, AX - MOVL R14, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R14, CX - RORL $0x19, DX - ANDL R15, CX - XORL AX, DX - MOVL R14, AX - NOTL AX - ADDL DX, R9 - ANDL R8, AX - XORL CX, AX - ADDL R9, AX - MOVL R10, DI - MOVL R12, BX - RORL $0x02, DI - MOVL R10, DX - ANDL R11, BX - RORL $0x0d, DX - MOVL R10, CX - ANDL R12, CX - XORL DX, DI - XORL CX, BX - MOVL R10, DX - MOVL R11, CX - RORL $0x16, DX - ANDL R10, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R9 - ADDL AX, R13 - ADDL AX, R9 - MOVL 180(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 128(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 160(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 124(BP), BX - ADDL BX, AX - MOVL AX, 188(BP) - ADDL AX, R8 - MOVL R13, AX - ADDL $0x106aa070, R8 - MOVL R13, CX - RORL $0x06, AX - MOVL R13, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R13, CX - RORL $0x19, DX - ANDL R14, CX - XORL AX, DX - MOVL R13, AX - NOTL AX - ADDL DX, R8 - ANDL R15, AX - XORL CX, AX - ADDL R8, AX - MOVL R9, DI - MOVL R11, BX - RORL $0x02, DI - MOVL R9, DX - ANDL R10, BX - RORL $0x0d, DX - MOVL R9, CX - ANDL R11, CX - XORL DX, DI - XORL CX, BX - MOVL R9, DX - MOVL R10, CX - RORL $0x16, DX - ANDL R9, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R8 - ADDL AX, R12 - ADDL AX, R8 - MOVL 184(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 132(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 164(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 128(BP), BX - ADDL BX, AX - MOVL AX, 192(BP) - ADDL AX, R15 - MOVL R12, AX - ADDL $0x19a4c116, R15 - MOVL R12, CX - RORL $0x06, AX - MOVL R12, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R12, CX - RORL $0x19, DX - ANDL R13, CX - XORL AX, DX - MOVL R12, AX - NOTL AX - ADDL DX, R15 - ANDL R14, AX - XORL CX, AX - ADDL R15, AX - MOVL R8, DI - MOVL R10, BX - RORL $0x02, DI - MOVL R8, DX - ANDL R9, BX - RORL $0x0d, DX - MOVL R8, CX - ANDL R10, CX - XORL DX, DI - XORL CX, BX - MOVL R8, DX - MOVL R9, CX - RORL $0x16, DX - ANDL R8, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R15 - ADDL AX, R11 - ADDL AX, R15 - MOVL 188(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 136(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 168(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 132(BP), BX - ADDL BX, AX - MOVL AX, 196(BP) - ADDL AX, R14 - MOVL R11, AX - ADDL $0x1e376c08, R14 - MOVL R11, CX - RORL $0x06, AX - MOVL R11, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R11, CX - RORL $0x19, DX - ANDL R12, CX - XORL AX, DX - MOVL R11, AX - NOTL AX - ADDL DX, R14 - ANDL R13, AX - XORL CX, AX - ADDL R14, AX - MOVL R15, DI - MOVL R9, BX - RORL $0x02, DI - MOVL R15, DX - ANDL R8, BX - RORL $0x0d, DX - MOVL R15, CX - ANDL R9, CX - XORL DX, DI - XORL CX, BX - MOVL R15, DX - MOVL R8, CX - RORL $0x16, DX - ANDL R15, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R14 - ADDL AX, R10 - ADDL AX, R14 - MOVL 192(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 140(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 172(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 136(BP), BX - ADDL BX, AX - MOVL AX, 200(BP) - ADDL AX, R13 - MOVL R10, AX - ADDL $0x2748774c, R13 - MOVL R10, CX - RORL $0x06, AX - MOVL R10, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R10, CX - RORL $0x19, DX - ANDL R11, CX - XORL AX, DX - MOVL R10, AX - NOTL AX - ADDL DX, R13 - ANDL R12, AX - XORL CX, AX - ADDL R13, AX - MOVL R14, DI - MOVL R8, BX - RORL $0x02, DI - MOVL R14, DX - ANDL R15, BX - RORL $0x0d, DX - MOVL R14, CX - ANDL R8, CX - XORL DX, DI - XORL CX, BX - MOVL R14, DX - MOVL R15, CX - RORL $0x16, DX - ANDL R14, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R13 - ADDL AX, R9 - ADDL AX, R13 - MOVL 196(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 144(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 176(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 140(BP), BX - ADDL BX, AX - MOVL AX, 204(BP) - ADDL AX, R12 - MOVL R9, AX - ADDL $0x34b0bcb5, R12 - MOVL R9, CX - RORL $0x06, AX - MOVL R9, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R9, CX - RORL $0x19, DX - ANDL R10, CX - XORL AX, DX - MOVL R9, AX - NOTL AX - ADDL DX, R12 - ANDL R11, AX - XORL CX, AX - ADDL R12, AX - MOVL R13, DI - MOVL R15, BX - RORL $0x02, DI - MOVL R13, DX - ANDL R14, BX - RORL $0x0d, DX - MOVL R13, CX - ANDL R15, CX - XORL DX, DI - XORL CX, BX - MOVL R13, DX - MOVL R14, CX - RORL $0x16, DX - ANDL R13, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R12 - ADDL AX, R8 - ADDL AX, R12 - MOVL 200(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 148(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 180(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 144(BP), BX - ADDL BX, AX - MOVL AX, 208(BP) - ADDL AX, R11 - MOVL R8, AX - ADDL $0x391c0cb3, R11 - MOVL R8, CX - RORL $0x06, AX - MOVL R8, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R8, CX - RORL $0x19, DX - ANDL R9, CX - XORL AX, DX - MOVL R8, AX - NOTL AX - ADDL DX, R11 - ANDL R10, AX - XORL CX, AX - ADDL R11, AX - MOVL R12, DI - MOVL R14, BX - RORL $0x02, DI - MOVL R12, DX - ANDL R13, BX - RORL $0x0d, DX - MOVL R12, CX - ANDL R14, CX - XORL DX, DI - XORL CX, BX - MOVL R12, DX - MOVL R13, CX - RORL $0x16, DX - ANDL R12, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R11 - ADDL AX, R15 - ADDL AX, R11 - MOVL 204(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 152(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 184(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 148(BP), BX - ADDL BX, AX - MOVL AX, 212(BP) - ADDL AX, R10 - MOVL R15, AX - ADDL $0x4ed8aa4a, R10 - MOVL R15, CX - RORL $0x06, AX - MOVL R15, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R15, CX - RORL $0x19, DX - ANDL R8, CX - XORL AX, DX - MOVL R15, AX - NOTL AX - ADDL DX, R10 - ANDL R9, AX - XORL CX, AX - ADDL R10, AX - MOVL R11, DI - MOVL R13, BX - RORL $0x02, DI - MOVL R11, DX - ANDL R12, BX - RORL $0x0d, DX - MOVL R11, CX - ANDL R13, CX - XORL DX, DI - XORL CX, BX - MOVL R11, DX - MOVL R12, CX - RORL $0x16, DX - ANDL R11, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R10 - ADDL AX, R14 - ADDL AX, R10 - MOVL 208(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 156(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 188(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 152(BP), BX - ADDL BX, AX - MOVL AX, 216(BP) - ADDL AX, R9 - MOVL R14, AX - ADDL $0x5b9cca4f, R9 - MOVL R14, CX - RORL $0x06, AX - MOVL R14, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R14, CX - RORL $0x19, DX - ANDL R15, CX - XORL AX, DX - MOVL R14, AX - NOTL AX - ADDL DX, R9 - ANDL R8, AX - XORL CX, AX - ADDL R9, AX - MOVL R10, DI - MOVL R12, BX - RORL $0x02, DI - MOVL R10, DX - ANDL R11, BX - RORL $0x0d, DX - MOVL R10, CX - ANDL R12, CX - XORL DX, DI - XORL CX, BX - MOVL R10, DX - MOVL R11, CX - RORL $0x16, DX - ANDL R10, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R9 - ADDL AX, R13 - ADDL AX, R9 - MOVL 212(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 160(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 192(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 156(BP), BX - ADDL BX, AX - MOVL AX, 220(BP) - ADDL AX, R8 - MOVL R13, AX - ADDL $0x682e6ff3, R8 - MOVL R13, CX - RORL $0x06, AX - MOVL R13, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R13, CX - RORL $0x19, DX - ANDL R14, CX - XORL AX, DX - MOVL R13, AX - NOTL AX - ADDL DX, R8 - ANDL R15, AX - XORL CX, AX - ADDL R8, AX - MOVL R9, DI - MOVL R11, BX - RORL $0x02, DI - MOVL R9, DX - ANDL R10, BX - RORL $0x0d, DX - MOVL R9, CX - ANDL R11, CX - XORL DX, DI - XORL CX, BX - MOVL R9, DX - MOVL R10, CX - RORL $0x16, DX - ANDL R9, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R8 - ADDL AX, R12 - ADDL AX, R8 - MOVL 216(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 164(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 196(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 160(BP), BX - ADDL BX, AX - MOVL AX, 224(BP) - ADDL AX, R15 - MOVL R12, AX - ADDL $0x748f82ee, R15 - MOVL R12, CX - RORL $0x06, AX - MOVL R12, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R12, CX - RORL $0x19, DX - ANDL R13, CX - XORL AX, DX - MOVL R12, AX - NOTL AX - ADDL DX, R15 - ANDL R14, AX - XORL CX, AX - ADDL R15, AX - MOVL R8, DI - MOVL R10, BX - RORL $0x02, DI - MOVL R8, DX - ANDL R9, BX - RORL $0x0d, DX - MOVL R8, CX - ANDL R10, CX - XORL DX, DI - XORL CX, BX - MOVL R8, DX - MOVL R9, CX - RORL $0x16, DX - ANDL R8, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R15 - ADDL AX, R11 - ADDL AX, R15 - MOVL 220(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 168(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 200(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 164(BP), BX - ADDL BX, AX - MOVL AX, 228(BP) - ADDL AX, R14 - MOVL R11, AX - ADDL $0x78a5636f, R14 - MOVL R11, CX - RORL $0x06, AX - MOVL R11, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R11, CX - RORL $0x19, DX - ANDL R12, CX - XORL AX, DX - MOVL R11, AX - NOTL AX - ADDL DX, R14 - ANDL R13, AX - XORL CX, AX - ADDL R14, AX - MOVL R15, DI - MOVL R9, BX - RORL $0x02, DI - MOVL R15, DX - ANDL R8, BX - RORL $0x0d, DX - MOVL R15, CX - ANDL R9, CX - XORL DX, DI - XORL CX, BX - MOVL R15, DX - MOVL R8, CX - RORL $0x16, DX - ANDL R15, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R14 - ADDL AX, R10 - ADDL AX, R14 - MOVL 224(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 172(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 204(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 168(BP), BX - ADDL BX, AX - MOVL AX, 232(BP) - ADDL AX, R13 - MOVL R10, AX - ADDL $0x84c87814, R13 - MOVL R10, CX - RORL $0x06, AX - MOVL R10, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R10, CX - RORL $0x19, DX - ANDL R11, CX - XORL AX, DX - MOVL R10, AX - NOTL AX - ADDL DX, R13 - ANDL R12, AX - XORL CX, AX - ADDL R13, AX - MOVL R14, DI - MOVL R8, BX - RORL $0x02, DI - MOVL R14, DX - ANDL R15, BX - RORL $0x0d, DX - MOVL R14, CX - ANDL R8, CX - XORL DX, DI - XORL CX, BX - MOVL R14, DX - MOVL R15, CX - RORL $0x16, DX - ANDL R14, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R13 - ADDL AX, R9 - ADDL AX, R13 - MOVL 228(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 176(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 208(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 172(BP), BX - ADDL BX, AX - MOVL AX, 236(BP) - ADDL AX, R12 - MOVL R9, AX - ADDL $0x8cc70208, R12 - MOVL R9, CX - RORL $0x06, AX - MOVL R9, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R9, CX - RORL $0x19, DX - ANDL R10, CX - XORL AX, DX - MOVL R9, AX - NOTL AX - ADDL DX, R12 - ANDL R11, AX - XORL CX, AX - ADDL R12, AX - MOVL R13, DI - MOVL R15, BX - RORL $0x02, DI - MOVL R13, DX - ANDL R14, BX - RORL $0x0d, DX - MOVL R13, CX - ANDL R15, CX - XORL DX, DI - XORL CX, BX - MOVL R13, DX - MOVL R14, CX - RORL $0x16, DX - ANDL R13, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R12 - ADDL AX, R8 - ADDL AX, R12 - MOVL 232(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 180(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 212(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 176(BP), BX - ADDL BX, AX - MOVL AX, 240(BP) - ADDL AX, R11 - MOVL R8, AX - ADDL $0x90befffa, R11 - MOVL R8, CX - RORL $0x06, AX - MOVL R8, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R8, CX - RORL $0x19, DX - ANDL R9, CX - XORL AX, DX - MOVL R8, AX - NOTL AX - ADDL DX, R11 - ANDL R10, AX - XORL CX, AX - ADDL R11, AX - MOVL R12, DI - MOVL R14, BX - RORL $0x02, DI - MOVL R12, DX - ANDL R13, BX - RORL $0x0d, DX - MOVL R12, CX - ANDL R14, CX - XORL DX, DI - XORL CX, BX - MOVL R12, DX - MOVL R13, CX - RORL $0x16, DX - ANDL R12, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R11 - ADDL AX, R15 - ADDL AX, R11 - MOVL 236(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 184(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 216(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 180(BP), BX - ADDL BX, AX - MOVL AX, 244(BP) - ADDL AX, R10 - MOVL R15, AX - ADDL $0xa4506ceb, R10 - MOVL R15, CX - RORL $0x06, AX - MOVL R15, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R15, CX - RORL $0x19, DX - ANDL R8, CX - XORL AX, DX - MOVL R15, AX - NOTL AX - ADDL DX, R10 - ANDL R9, AX - XORL CX, AX - ADDL R10, AX - MOVL R11, DI - MOVL R13, BX - RORL $0x02, DI - MOVL R11, DX - ANDL R12, BX - RORL $0x0d, DX - MOVL R11, CX - ANDL R13, CX - XORL DX, DI - XORL CX, BX - MOVL R11, DX - MOVL R12, CX - RORL $0x16, DX - ANDL R11, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R10 - ADDL AX, R14 - ADDL AX, R10 - MOVL 240(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 188(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 220(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 184(BP), BX - ADDL BX, AX - MOVL AX, 248(BP) - ADDL AX, R9 - MOVL R14, AX - ADDL $0xbef9a3f7, R9 - MOVL R14, CX - RORL $0x06, AX - MOVL R14, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R14, CX - RORL $0x19, DX - ANDL R15, CX - XORL AX, DX - MOVL R14, AX - NOTL AX - ADDL DX, R9 - ANDL R8, AX - XORL CX, AX - ADDL R9, AX - MOVL R10, DI - MOVL R12, BX - RORL $0x02, DI - MOVL R10, DX - ANDL R11, BX - RORL $0x0d, DX - MOVL R10, CX - ANDL R12, CX - XORL DX, DI - XORL CX, BX - MOVL R10, DX - MOVL R11, CX - RORL $0x16, DX - ANDL R10, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R9 - ADDL AX, R13 - ADDL AX, R9 - MOVL 244(BP), AX - MOVL AX, CX - RORL $0x11, AX - MOVL CX, DX - RORL $0x13, CX - SHRL $0x0a, DX - MOVL 192(BP), BX - XORL CX, AX - MOVL BX, CX - XORL DX, AX - RORL $0x07, BX - MOVL CX, DX - SHRL $0x03, DX - RORL $0x12, CX - ADDL 224(BP), AX - XORL CX, BX - XORL DX, BX - ADDL 188(BP), BX - ADDL BX, AX - MOVL AX, 252(BP) - ADDL AX, R8 - MOVL R13, AX - ADDL $0xc67178f2, R8 - MOVL R13, CX - RORL $0x06, AX - MOVL R13, DX - RORL $0x0b, CX - XORL CX, AX - MOVL R13, CX - RORL $0x19, DX - ANDL R14, CX - XORL AX, DX - MOVL R13, AX - NOTL AX - ADDL DX, R8 - ANDL R15, AX - XORL CX, AX - ADDL R8, AX - MOVL R9, DI - MOVL R11, BX - RORL $0x02, DI - MOVL R9, DX - ANDL R10, BX - RORL $0x0d, DX - MOVL R9, CX - ANDL R11, CX - XORL DX, DI - XORL CX, BX - MOVL R9, DX - MOVL R10, CX - RORL $0x16, DX - ANDL R9, CX - XORL CX, BX - XORL DX, DI - ADDL DI, BX - MOVL BX, R8 - ADDL AX, R12 - ADDL AX, R8 - MOVQ dig+0(FP), BP - ADDL (BP), R8 - MOVL R8, (BP) - ADDL 4(BP), R9 - MOVL R9, 4(BP) - ADDL 8(BP), R10 - MOVL R10, 8(BP) - ADDL 12(BP), R11 - MOVL R11, 12(BP) - ADDL 16(BP), R12 - MOVL R12, 16(BP) - ADDL 20(BP), R13 - MOVL R13, 20(BP) - ADDL 24(BP), R14 - MOVL R14, 24(BP) - ADDL 28(BP), R15 - MOVL R15, 28(BP) - ADDQ $0x40, SI - CMPQ SI, 256(SP) - JB loop - -end: - RET - // func blockAVX2(dig *Digest, p []byte) // Requires: AVX, AVX2, BMI2 TEXT ·blockAVX2(SB), $536-32 diff --git a/src/crypto/internal/fips140/sha3/sha3_arm64.go b/src/crypto/internal/fips140/sha3/sha3_arm64.go new file mode 100644 index 0000000000..fab91c02bb --- /dev/null +++ b/src/crypto/internal/fips140/sha3/sha3_arm64.go @@ -0,0 +1,43 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !purego + +package sha3 + +import ( + "crypto/internal/fips140deps/cpu" + "crypto/internal/impl" + "runtime" +) + +// On non-Apple ARM64, the SHA-3 instructions are apparently slower than the +// pure Go implementation. Checking GOOS is a bit blunt, as it also excludes +// Asahi Linux; we might consider checking the MIDR model in the future. +var useSHA3 = cpu.ARM64HasSHA3 && runtime.GOOS == "darwin" + +func init() { + impl.Register("sha3", "Armv8.2", &useSHA3) +} + +//go:noescape +func keccakF1600NEON(a *[200]byte) + +func keccakF1600(a *[200]byte) { + if useSHA3 { + keccakF1600NEON(a) + } else { + keccakF1600Generic(a) + } +} + +func (d *Digest) write(p []byte) (n int, err error) { + return d.writeGeneric(p) +} +func (d *Digest) read(out []byte) (n int, err error) { + return d.readGeneric(out) +} +func (d *Digest) sum(b []byte) []byte { + return d.sumGeneric(b) +} diff --git a/src/crypto/internal/fips140/sha3/sha3_arm64.s b/src/crypto/internal/fips140/sha3/sha3_arm64.s new file mode 100644 index 0000000000..7688d178d5 --- /dev/null +++ b/src/crypto/internal/fips140/sha3/sha3_arm64.s @@ -0,0 +1,165 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !purego + +#include "textflag.h" + +// func keccakF1600NEON(a *[200]byte) +TEXT ·keccakF1600NEON(SB), $200-8 + MOVD a+0(FP), R0 + MOVD $round_consts<>(SB), R1 + MOVD $24, R2 // counter for loop + + VLD1.P 16(R0), [V0.D1, V1.D1] + VLD1.P 16(R0), [V2.D1, V3.D1] + VLD1.P 16(R0), [V4.D1, V5.D1] + VLD1.P 16(R0), [V6.D1, V7.D1] + VLD1.P 16(R0), [V8.D1, V9.D1] + VLD1.P 16(R0), [V10.D1, V11.D1] + VLD1.P 16(R0), [V12.D1, V13.D1] + VLD1.P 16(R0), [V14.D1, V15.D1] + VLD1.P 16(R0), [V16.D1, V17.D1] + VLD1.P 16(R0), [V18.D1, V19.D1] + VLD1.P 16(R0), [V20.D1, V21.D1] + VLD1.P 16(R0), [V22.D1, V23.D1] + VLD1 (R0), [V24.D1] + + SUB $192, R0, R0 + +loop: + // theta + VEOR3 V20.B16, V15.B16, V10.B16, V25.B16 + VEOR3 V21.B16, V16.B16, V11.B16, V26.B16 + VEOR3 V22.B16, V17.B16, V12.B16, V27.B16 + VEOR3 V23.B16, V18.B16, V13.B16, V28.B16 + VEOR3 V24.B16, V19.B16, V14.B16, V29.B16 + VEOR3 V25.B16, V5.B16, V0.B16, V25.B16 + VEOR3 V26.B16, V6.B16, V1.B16, V26.B16 + VEOR3 V27.B16, V7.B16, V2.B16, V27.B16 + VEOR3 V28.B16, V8.B16, V3.B16, V28.B16 + VEOR3 V29.B16, V9.B16, V4.B16, V29.B16 + + VRAX1 V27.D2, V25.D2, V30.D2 + VRAX1 V28.D2, V26.D2, V31.D2 + VRAX1 V29.D2, V27.D2, V27.D2 + VRAX1 V25.D2, V28.D2, V28.D2 + VRAX1 V26.D2, V29.D2, V29.D2 + + // theta and rho and Pi + VEOR V29.B16, V0.B16, V0.B16 + + VXAR $63, V30.D2, V1.D2, V25.D2 + + VXAR $20, V30.D2, V6.D2, V1.D2 + VXAR $44, V28.D2, V9.D2, V6.D2 + VXAR $3, V31.D2, V22.D2, V9.D2 + VXAR $25, V28.D2, V14.D2, V22.D2 + VXAR $46, V29.D2, V20.D2, V14.D2 + + VXAR $2, V31.D2, V2.D2, V26.D2 + + VXAR $21, V31.D2, V12.D2, V2.D2 + VXAR $39, V27.D2, V13.D2, V12.D2 + VXAR $56, V28.D2, V19.D2, V13.D2 + VXAR $8, V27.D2, V23.D2, V19.D2 + VXAR $23, V29.D2, V15.D2, V23.D2 + + VXAR $37, V28.D2, V4.D2, V15.D2 + + VXAR $50, V28.D2, V24.D2, V28.D2 + VXAR $62, V30.D2, V21.D2, V24.D2 + VXAR $9, V27.D2, V8.D2, V8.D2 + VXAR $19, V30.D2, V16.D2, V4.D2 + VXAR $28, V29.D2, V5.D2, V16.D2 + + VXAR $36, V27.D2, V3.D2, V5.D2 + + VXAR $43, V27.D2, V18.D2, V27.D2 + VXAR $49, V31.D2, V17.D2, V3.D2 + VXAR $54, V30.D2, V11.D2, V30.D2 + VXAR $58, V31.D2, V7.D2, V31.D2 + VXAR $61, V29.D2, V10.D2, V29.D2 + + // chi and iota + VBCAX V8.B16, V22.B16, V26.B16, V20.B16 + VBCAX V22.B16, V23.B16, V8.B16, V21.B16 + VBCAX V23.B16, V24.B16, V22.B16, V22.B16 + VBCAX V24.B16, V26.B16, V23.B16, V23.B16 + VBCAX V26.B16, V8.B16, V24.B16, V24.B16 + + VLD1R.P 8(R1), [V26.D2] + + VBCAX V3.B16, V19.B16, V30.B16, V17.B16 + VBCAX V19.B16, V15.B16, V3.B16, V18.B16 + VBCAX V15.B16, V16.B16, V19.B16, V19.B16 + VBCAX V16.B16, V30.B16, V15.B16, V15.B16 + VBCAX V30.B16, V3.B16, V16.B16, V16.B16 + + VBCAX V31.B16, V12.B16, V25.B16, V10.B16 + VBCAX V12.B16, V13.B16, V31.B16, V11.B16 + VBCAX V13.B16, V14.B16, V12.B16, V12.B16 + VBCAX V14.B16, V25.B16, V13.B16, V13.B16 + VBCAX V25.B16, V31.B16, V14.B16, V14.B16 + + VBCAX V4.B16, V9.B16, V29.B16, V7.B16 + VBCAX V9.B16, V5.B16, V4.B16, V8.B16 + VBCAX V5.B16, V6.B16, V9.B16, V9.B16 + VBCAX V6.B16, V29.B16, V5.B16, V5.B16 + VBCAX V29.B16, V4.B16, V6.B16, V6.B16 + + VBCAX V28.B16, V0.B16, V27.B16, V3.B16 + VBCAX V0.B16, V1.B16, V28.B16, V4.B16 + + VBCAX V1.B16, V2.B16, V0.B16, V0.B16 // iota (chi part) + + VBCAX V2.B16, V27.B16, V1.B16, V1.B16 + VBCAX V27.B16, V28.B16, V2.B16, V2.B16 + + VEOR V26.B16, V0.B16, V0.B16 // iota + + SUB $1, R2, R2 + CBNZ R2, loop + + VST1.P [V0.D1, V1.D1], 16(R0) + VST1.P [V2.D1, V3.D1], 16(R0) + VST1.P [V4.D1, V5.D1], 16(R0) + VST1.P [V6.D1, V7.D1], 16(R0) + VST1.P [V8.D1, V9.D1], 16(R0) + VST1.P [V10.D1, V11.D1], 16(R0) + VST1.P [V12.D1, V13.D1], 16(R0) + VST1.P [V14.D1, V15.D1], 16(R0) + VST1.P [V16.D1, V17.D1], 16(R0) + VST1.P [V18.D1, V19.D1], 16(R0) + VST1.P [V20.D1, V21.D1], 16(R0) + VST1.P [V22.D1, V23.D1], 16(R0) + VST1 [V24.D1], (R0) + + RET + +DATA round_consts<>+0x00(SB)/8, $0x0000000000000001 +DATA round_consts<>+0x08(SB)/8, $0x0000000000008082 +DATA round_consts<>+0x10(SB)/8, $0x800000000000808a +DATA round_consts<>+0x18(SB)/8, $0x8000000080008000 +DATA round_consts<>+0x20(SB)/8, $0x000000000000808b +DATA round_consts<>+0x28(SB)/8, $0x0000000080000001 +DATA round_consts<>+0x30(SB)/8, $0x8000000080008081 +DATA round_consts<>+0x38(SB)/8, $0x8000000000008009 +DATA round_consts<>+0x40(SB)/8, $0x000000000000008a +DATA round_consts<>+0x48(SB)/8, $0x0000000000000088 +DATA round_consts<>+0x50(SB)/8, $0x0000000080008009 +DATA round_consts<>+0x58(SB)/8, $0x000000008000000a +DATA round_consts<>+0x60(SB)/8, $0x000000008000808b +DATA round_consts<>+0x68(SB)/8, $0x800000000000008b +DATA round_consts<>+0x70(SB)/8, $0x8000000000008089 +DATA round_consts<>+0x78(SB)/8, $0x8000000000008003 +DATA round_consts<>+0x80(SB)/8, $0x8000000000008002 +DATA round_consts<>+0x88(SB)/8, $0x8000000000000080 +DATA round_consts<>+0x90(SB)/8, $0x000000000000800a +DATA round_consts<>+0x98(SB)/8, $0x800000008000000a +DATA round_consts<>+0xA0(SB)/8, $0x8000000080008081 +DATA round_consts<>+0xA8(SB)/8, $0x8000000000008080 +DATA round_consts<>+0xB0(SB)/8, $0x0000000080000001 +DATA round_consts<>+0xB8(SB)/8, $0x8000000080008008 +GLOBL round_consts<>(SB), NOPTR|RODATA, $192 diff --git a/src/crypto/internal/fips140/sha3/sha3_noasm.go b/src/crypto/internal/fips140/sha3/sha3_noasm.go index 0bcfc73d02..1ce3edfb6f 100644 --- a/src/crypto/internal/fips140/sha3/sha3_noasm.go +++ b/src/crypto/internal/fips140/sha3/sha3_noasm.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build (!amd64 && !s390x) || purego +//go:build (!amd64 && !arm64 && !s390x) || purego package sha3 diff --git a/src/crypto/internal/fips140/sha3/sha3_s390x.s b/src/crypto/internal/fips140/sha3/sha3_s390x.s index c3944da628..0ce277160e 100644 --- a/src/crypto/internal/fips140/sha3/sha3_s390x.s +++ b/src/crypto/internal/fips140/sha3/sha3_s390x.s @@ -13,7 +13,7 @@ TEXT ·kimd(SB), NOFRAME|NOSPLIT, $0-40 LMG src+16(FP), R2, R3 // R2=base, R3=len continue: - WORD $0xB93E0002 // KIMD --, R2 + KIMD R0, R2 BVS continue // continue if interrupted MOVD $0, R0 // reset R0 for pre-go1.8 compilers RET @@ -26,7 +26,7 @@ TEXT ·klmd(SB), NOFRAME|NOSPLIT, $0-64 LMG src+40(FP), R4, R5 // R4=base, R5=len continue: - WORD $0xB93F0024 // KLMD R2, R4 + KLMD R2, R4 BVS continue // continue if interrupted MOVD $0, R0 // reset R0 for pre-go1.8 compilers RET diff --git a/src/crypto/internal/fips140/sha512/_asm/sha512block_amd64_asm.go b/src/crypto/internal/fips140/sha512/_asm/sha512block_amd64_asm.go index ed7b1766bf..7e7572cb1e 100644 --- a/src/crypto/internal/fips140/sha512/_asm/sha512block_amd64_asm.go +++ b/src/crypto/internal/fips140/sha512/_asm/sha512block_amd64_asm.go @@ -146,217 +146,10 @@ func main() { Package("crypto/internal/fips140/sha512") ConstraintExpr("!purego") - blockAMD64() blockAVX2() Generate() } -// Wt = Mt; for 0 <= t <= 15 -// -// Line 50 -func MSGSCHEDULE0(index int) { - MOVQ(Mem{Base: SI}.Offset(index*8), RAX) - BSWAPQ(RAX) - MOVQ(RAX, Mem{Base: BP}.Offset(index*8)) -} - -// Wt = SIGMA1(Wt-2) + Wt-7 + SIGMA0(Wt-15) + Wt-16; for 16 <= t <= 79 -// -// SIGMA0(x) = ROTR(1,x) XOR ROTR(8,x) XOR SHR(7,x) -// SIGMA1(x) = ROTR(19,x) XOR ROTR(61,x) XOR SHR(6,x) -// -// Line 58 -func MSGSCHEDULE1(index int) { - MOVQ(Mem{Base: BP}.Offset((index-2)*8), RAX) - MOVQ(RAX, RCX) - RORQ(Imm(19), RAX) - MOVQ(RCX, RDX) - RORQ(Imm(61), RCX) - SHRQ(Imm(6), RDX) - MOVQ(Mem{Base: BP}.Offset((index-15)*8), RBX) - XORQ(RCX, RAX) - MOVQ(RBX, RCX) - XORQ(RDX, RAX) - RORQ(Imm(1), RBX) - MOVQ(RCX, RDX) - SHRQ(Imm(7), RDX) - RORQ(Imm(8), RCX) - ADDQ(Mem{Base: BP}.Offset((index-7)*8), RAX) - XORQ(RCX, RBX) - XORQ(RDX, RBX) - ADDQ(Mem{Base: BP}.Offset((index-16)*8), RBX) - ADDQ(RBX, RAX) - MOVQ(RAX, Mem{Base: BP}.Offset((index)*8)) -} - -// Calculate T1 in AX - uses AX, CX and DX registers. -// h is also used as an accumulator. Wt is passed in AX. -// -// T1 = h + BIGSIGMA1(e) + Ch(e, f, g) + Kt + Wt -// BIGSIGMA1(x) = ROTR(14,x) XOR ROTR(18,x) XOR ROTR(41,x) -// Ch(x, y, z) = (x AND y) XOR (NOT x AND z) -// -// Line 85 -func SHA512T1(konst uint64, e, f, g, h GPPhysical) { - MOVQ(U64(konst), RDX) - ADDQ(RAX, h) - MOVQ(e, RAX) - ADDQ(RDX, h) - MOVQ(e, RCX) - RORQ(U8(14), RAX) - MOVQ(e, RDX) - RORQ(U8(18), RCX) - XORQ(RCX, RAX) - MOVQ(e, RCX) - RORQ(U8(41), RDX) - ANDQ(f, RCX) - XORQ(RAX, RDX) - MOVQ(e, RAX) - NOTQ(RAX) - ADDQ(RDX, h) - ANDQ(g, RAX) - XORQ(RCX, RAX) - ADDQ(h, RAX) -} - -// Calculate T2 in BX - uses BX, CX, DX and DI registers. -// -// T2 = BIGSIGMA0(a) + Maj(a, b, c) -// BIGSIGMA0(x) = ROTR(28,x) XOR ROTR(34,x) XOR ROTR(39,x) -// Maj(x, y, z) = (x AND y) XOR (x AND z) XOR (y AND z) -// -// Line 110 -func SHA512T2(a, b, c GPPhysical) { - MOVQ(a, RDI) - MOVQ(c, RBX) - RORQ(Imm(28), RDI) - MOVQ(a, RDX) - ANDQ(b, RBX) - RORQ(Imm(34), RDX) - MOVQ(a, RCX) - ANDQ(c, RCX) - XORQ(RDX, RDI) - XORQ(RCX, RBX) - MOVQ(a, RDX) - MOVQ(b, RCX) - RORQ(Imm(39), RDX) - ANDQ(a, RCX) - XORQ(RCX, RBX) - XORQ(RDX, RDI) - ADDQ(RDI, RBX) -} - -// Calculate T1 and T2, then e = d + T1 and a = T1 + T2. -// The values for e and a are stored in d and h, ready for rotation. -// -// Line 131 -func SHA512ROUND(index int, konst uint64, a, b, c, d, e, f, g, h GPPhysical) { - SHA512T1(konst, e, f, g, h) - SHA512T2(a, b, c) - MOVQ(RBX, h) - ADDQ(RAX, d) - ADDQ(RAX, h) -} - -// Line 169 -func SHA512ROUND0(index int, konst uint64, a, b, c, d, e, f, g, h GPPhysical) { - MSGSCHEDULE0(index) - SHA512ROUND(index, konst, a, b, c, d, e, f, g, h) -} - -// Line 142 -func SHA512ROUND1(index int, konst uint64, a, b, c, d, e, f, g, h GPPhysical) { - MSGSCHEDULE1(index) - SHA512ROUND(index, konst, a, b, c, d, e, f, g, h) -} - -// Line 146 -func blockAMD64() { - Implement("blockAMD64") - AllocLocal(648) - - Load(Param("p").Base(), RSI) - Load(Param("p").Len(), RDX) - SHRQ(Imm(7), RDX) - SHLQ(Imm(7), RDX) - - LEAQ(Mem{Base: SI, Index: DX, Scale: 1}, RDI) - MOVQ(RDI, Mem{Base: SP}.Offset(640)) - CMPQ(RSI, RDI) - JEQ(LabelRef("end")) - - Load(Param("dig"), RBP) - MOVQ(Mem{Base: BP}.Offset(0*8), R8) // a = H0 - MOVQ(Mem{Base: BP}.Offset(1*8), R9) // b = H1 - MOVQ(Mem{Base: BP}.Offset(2*8), R10) // c = H2 - MOVQ(Mem{Base: BP}.Offset(3*8), R11) // d = H3 - MOVQ(Mem{Base: BP}.Offset(4*8), R12) // e = H4 - MOVQ(Mem{Base: BP}.Offset(5*8), R13) // f = H5 - MOVQ(Mem{Base: BP}.Offset(6*8), R14) // g = H6 - MOVQ(Mem{Base: BP}.Offset(7*8), R15) // h = H7 - PSHUFFLE_BYTE_FLIP_MASK_DATA() - loop() - end() -} - -func rotateRight(slice *[]GPPhysical) []GPPhysical { - n := len(*slice) - new := make([]GPPhysical, n) - for i, reg := range *slice { - new[(i+1)%n] = reg - } - return new -} - -// Line 167 -func loop() { - Label("loop") - MOVQ(RSP, RBP) // message schedule - - n := len(_K) - regs := []GPPhysical{R8, R9, R10, R11, R12, R13, R14, R15} - - for i := 0; i < 16; i++ { - SHA512ROUND0(i, _K[i], regs[0], regs[1], regs[2], regs[3], regs[4], regs[5], regs[6], regs[7]) - regs = rotateRight(®s) - } - - for i := 16; i < n; i++ { - SHA512ROUND1(i, _K[i], regs[0], regs[1], regs[2], regs[3], regs[4], regs[5], regs[6], regs[7]) - regs = rotateRight(®s) - } - - Load(Param("dig"), RBP) - - BP_Mem := Mem{Base: BP} - ADDQ(BP_Mem.Offset(0*8), R8) // H0 = a + H0 - MOVQ(R8, BP_Mem.Offset(0*8)) - ADDQ(BP_Mem.Offset(1*8), R9) // H1 = b + H1 - MOVQ(R9, BP_Mem.Offset(1*8)) - ADDQ(BP_Mem.Offset(2*8), R10) // H2 = c + H2 - MOVQ(R10, BP_Mem.Offset(2*8)) - ADDQ(BP_Mem.Offset(3*8), R11) // H3 = d + H3 - MOVQ(R11, BP_Mem.Offset(3*8)) - ADDQ(BP_Mem.Offset(4*8), R12) // H4 = e + H4 - MOVQ(R12, BP_Mem.Offset(4*8)) - ADDQ(BP_Mem.Offset(5*8), R13) // H5 = f + H5 - MOVQ(R13, BP_Mem.Offset(5*8)) - ADDQ(BP_Mem.Offset(6*8), R14) // H6 = g + H6 - MOVQ(R14, BP_Mem.Offset(6*8)) - ADDQ(BP_Mem.Offset(7*8), R15) // H7 = h + H7 - MOVQ(R15, BP_Mem.Offset(7*8)) - - ADDQ(Imm(128), RSI) - CMPQ(RSI, Mem{Base: SP}.Offset(640)) - JB(LabelRef("loop")) -} - -// Line 274 -func end() { - Label("end") - RET() -} - // Version below is based on "Fast SHA512 Implementations on Intel // Architecture Processors" White-paper // https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/fast-sha512-implementations-ia-processors-paper.pdf diff --git a/src/crypto/internal/fips140/sha512/sha512.go b/src/crypto/internal/fips140/sha512/sha512.go index 55c90a8cd6..3e7a5e11f1 100644 --- a/src/crypto/internal/fips140/sha512/sha512.go +++ b/src/crypto/internal/fips140/sha512/sha512.go @@ -10,6 +10,7 @@ import ( "crypto/internal/fips140" "crypto/internal/fips140deps/byteorder" "errors" + "hash" ) const ( @@ -194,6 +195,11 @@ func consumeUint64(b []byte) ([]byte, uint64) { return b[8:], byteorder.BEUint64(b) } +func (d *Digest) Clone() (hash.Cloner, error) { + r := *d + return &r, nil +} + // New returns a new Digest computing the SHA-512 hash. func New() *Digest { d := &Digest{size: size512} diff --git a/src/crypto/internal/fips140/sha512/sha512block_amd64.go b/src/crypto/internal/fips140/sha512/sha512block_amd64.go index 185909ec5d..7059b88716 100644 --- a/src/crypto/internal/fips140/sha512/sha512block_amd64.go +++ b/src/crypto/internal/fips140/sha512/sha512block_amd64.go @@ -20,13 +20,10 @@ func init() { //go:noescape func blockAVX2(dig *Digest, p []byte) -//go:noescape -func blockAMD64(dig *Digest, p []byte) - func block(dig *Digest, p []byte) { if useAVX2 { blockAVX2(dig, p) } else { - blockAMD64(dig, p) + blockGeneric(dig, p) } } diff --git a/src/crypto/internal/fips140/sha512/sha512block_amd64.s b/src/crypto/internal/fips140/sha512/sha512block_amd64.s index ce77d20c04..e11d509ab4 100644 --- a/src/crypto/internal/fips140/sha512/sha512block_amd64.s +++ b/src/crypto/internal/fips140/sha512/sha512block_amd64.s @@ -4,4506 +4,6 @@ #include "textflag.h" -// func blockAMD64(dig *Digest, p []byte) -TEXT ·blockAMD64(SB), $648-32 - MOVQ p_base+8(FP), SI - MOVQ p_len+16(FP), DX - SHRQ $0x07, DX - SHLQ $0x07, DX - LEAQ (SI)(DX*1), DI - MOVQ DI, 640(SP) - CMPQ SI, DI - JEQ end - MOVQ dig+0(FP), BP - MOVQ (BP), R8 - MOVQ 8(BP), R9 - MOVQ 16(BP), R10 - MOVQ 24(BP), R11 - MOVQ 32(BP), R12 - MOVQ 40(BP), R13 - MOVQ 48(BP), R14 - MOVQ 56(BP), R15 - -loop: - MOVQ SP, BP - MOVQ (SI), AX - BSWAPQ AX - MOVQ AX, (BP) - MOVQ $0x428a2f98d728ae22, DX - ADDQ AX, R15 - MOVQ R12, AX - ADDQ DX, R15 - MOVQ R12, CX - RORQ $0x0e, AX - MOVQ R12, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R12, CX - RORQ $0x29, DX - ANDQ R13, CX - XORQ AX, DX - MOVQ R12, AX - NOTQ AX - ADDQ DX, R15 - ANDQ R14, AX - XORQ CX, AX - ADDQ R15, AX - MOVQ R8, DI - MOVQ R10, BX - RORQ $0x1c, DI - MOVQ R8, DX - ANDQ R9, BX - RORQ $0x22, DX - MOVQ R8, CX - ANDQ R10, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R8, DX - MOVQ R9, CX - RORQ $0x27, DX - ANDQ R8, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R15 - ADDQ AX, R11 - ADDQ AX, R15 - MOVQ 8(SI), AX - BSWAPQ AX - MOVQ AX, 8(BP) - MOVQ $0x7137449123ef65cd, DX - ADDQ AX, R14 - MOVQ R11, AX - ADDQ DX, R14 - MOVQ R11, CX - RORQ $0x0e, AX - MOVQ R11, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R11, CX - RORQ $0x29, DX - ANDQ R12, CX - XORQ AX, DX - MOVQ R11, AX - NOTQ AX - ADDQ DX, R14 - ANDQ R13, AX - XORQ CX, AX - ADDQ R14, AX - MOVQ R15, DI - MOVQ R9, BX - RORQ $0x1c, DI - MOVQ R15, DX - ANDQ R8, BX - RORQ $0x22, DX - MOVQ R15, CX - ANDQ R9, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R15, DX - MOVQ R8, CX - RORQ $0x27, DX - ANDQ R15, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R14 - ADDQ AX, R10 - ADDQ AX, R14 - MOVQ 16(SI), AX - BSWAPQ AX - MOVQ AX, 16(BP) - MOVQ $0xb5c0fbcfec4d3b2f, DX - ADDQ AX, R13 - MOVQ R10, AX - ADDQ DX, R13 - MOVQ R10, CX - RORQ $0x0e, AX - MOVQ R10, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R10, CX - RORQ $0x29, DX - ANDQ R11, CX - XORQ AX, DX - MOVQ R10, AX - NOTQ AX - ADDQ DX, R13 - ANDQ R12, AX - XORQ CX, AX - ADDQ R13, AX - MOVQ R14, DI - MOVQ R8, BX - RORQ $0x1c, DI - MOVQ R14, DX - ANDQ R15, BX - RORQ $0x22, DX - MOVQ R14, CX - ANDQ R8, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R14, DX - MOVQ R15, CX - RORQ $0x27, DX - ANDQ R14, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R13 - ADDQ AX, R9 - ADDQ AX, R13 - MOVQ 24(SI), AX - BSWAPQ AX - MOVQ AX, 24(BP) - MOVQ $0xe9b5dba58189dbbc, DX - ADDQ AX, R12 - MOVQ R9, AX - ADDQ DX, R12 - MOVQ R9, CX - RORQ $0x0e, AX - MOVQ R9, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R9, CX - RORQ $0x29, DX - ANDQ R10, CX - XORQ AX, DX - MOVQ R9, AX - NOTQ AX - ADDQ DX, R12 - ANDQ R11, AX - XORQ CX, AX - ADDQ R12, AX - MOVQ R13, DI - MOVQ R15, BX - RORQ $0x1c, DI - MOVQ R13, DX - ANDQ R14, BX - RORQ $0x22, DX - MOVQ R13, CX - ANDQ R15, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R13, DX - MOVQ R14, CX - RORQ $0x27, DX - ANDQ R13, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R12 - ADDQ AX, R8 - ADDQ AX, R12 - MOVQ 32(SI), AX - BSWAPQ AX - MOVQ AX, 32(BP) - MOVQ $0x3956c25bf348b538, DX - ADDQ AX, R11 - MOVQ R8, AX - ADDQ DX, R11 - MOVQ R8, CX - RORQ $0x0e, AX - MOVQ R8, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R8, CX - RORQ $0x29, DX - ANDQ R9, CX - XORQ AX, DX - MOVQ R8, AX - NOTQ AX - ADDQ DX, R11 - ANDQ R10, AX - XORQ CX, AX - ADDQ R11, AX - MOVQ R12, DI - MOVQ R14, BX - RORQ $0x1c, DI - MOVQ R12, DX - ANDQ R13, BX - RORQ $0x22, DX - MOVQ R12, CX - ANDQ R14, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R12, DX - MOVQ R13, CX - RORQ $0x27, DX - ANDQ R12, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R11 - ADDQ AX, R15 - ADDQ AX, R11 - MOVQ 40(SI), AX - BSWAPQ AX - MOVQ AX, 40(BP) - MOVQ $0x59f111f1b605d019, DX - ADDQ AX, R10 - MOVQ R15, AX - ADDQ DX, R10 - MOVQ R15, CX - RORQ $0x0e, AX - MOVQ R15, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R15, CX - RORQ $0x29, DX - ANDQ R8, CX - XORQ AX, DX - MOVQ R15, AX - NOTQ AX - ADDQ DX, R10 - ANDQ R9, AX - XORQ CX, AX - ADDQ R10, AX - MOVQ R11, DI - MOVQ R13, BX - RORQ $0x1c, DI - MOVQ R11, DX - ANDQ R12, BX - RORQ $0x22, DX - MOVQ R11, CX - ANDQ R13, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R11, DX - MOVQ R12, CX - RORQ $0x27, DX - ANDQ R11, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R10 - ADDQ AX, R14 - ADDQ AX, R10 - MOVQ 48(SI), AX - BSWAPQ AX - MOVQ AX, 48(BP) - MOVQ $0x923f82a4af194f9b, DX - ADDQ AX, R9 - MOVQ R14, AX - ADDQ DX, R9 - MOVQ R14, CX - RORQ $0x0e, AX - MOVQ R14, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R14, CX - RORQ $0x29, DX - ANDQ R15, CX - XORQ AX, DX - MOVQ R14, AX - NOTQ AX - ADDQ DX, R9 - ANDQ R8, AX - XORQ CX, AX - ADDQ R9, AX - MOVQ R10, DI - MOVQ R12, BX - RORQ $0x1c, DI - MOVQ R10, DX - ANDQ R11, BX - RORQ $0x22, DX - MOVQ R10, CX - ANDQ R12, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R10, DX - MOVQ R11, CX - RORQ $0x27, DX - ANDQ R10, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R9 - ADDQ AX, R13 - ADDQ AX, R9 - MOVQ 56(SI), AX - BSWAPQ AX - MOVQ AX, 56(BP) - MOVQ $0xab1c5ed5da6d8118, DX - ADDQ AX, R8 - MOVQ R13, AX - ADDQ DX, R8 - MOVQ R13, CX - RORQ $0x0e, AX - MOVQ R13, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R13, CX - RORQ $0x29, DX - ANDQ R14, CX - XORQ AX, DX - MOVQ R13, AX - NOTQ AX - ADDQ DX, R8 - ANDQ R15, AX - XORQ CX, AX - ADDQ R8, AX - MOVQ R9, DI - MOVQ R11, BX - RORQ $0x1c, DI - MOVQ R9, DX - ANDQ R10, BX - RORQ $0x22, DX - MOVQ R9, CX - ANDQ R11, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R9, DX - MOVQ R10, CX - RORQ $0x27, DX - ANDQ R9, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R8 - ADDQ AX, R12 - ADDQ AX, R8 - MOVQ 64(SI), AX - BSWAPQ AX - MOVQ AX, 64(BP) - MOVQ $0xd807aa98a3030242, DX - ADDQ AX, R15 - MOVQ R12, AX - ADDQ DX, R15 - MOVQ R12, CX - RORQ $0x0e, AX - MOVQ R12, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R12, CX - RORQ $0x29, DX - ANDQ R13, CX - XORQ AX, DX - MOVQ R12, AX - NOTQ AX - ADDQ DX, R15 - ANDQ R14, AX - XORQ CX, AX - ADDQ R15, AX - MOVQ R8, DI - MOVQ R10, BX - RORQ $0x1c, DI - MOVQ R8, DX - ANDQ R9, BX - RORQ $0x22, DX - MOVQ R8, CX - ANDQ R10, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R8, DX - MOVQ R9, CX - RORQ $0x27, DX - ANDQ R8, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R15 - ADDQ AX, R11 - ADDQ AX, R15 - MOVQ 72(SI), AX - BSWAPQ AX - MOVQ AX, 72(BP) - MOVQ $0x12835b0145706fbe, DX - ADDQ AX, R14 - MOVQ R11, AX - ADDQ DX, R14 - MOVQ R11, CX - RORQ $0x0e, AX - MOVQ R11, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R11, CX - RORQ $0x29, DX - ANDQ R12, CX - XORQ AX, DX - MOVQ R11, AX - NOTQ AX - ADDQ DX, R14 - ANDQ R13, AX - XORQ CX, AX - ADDQ R14, AX - MOVQ R15, DI - MOVQ R9, BX - RORQ $0x1c, DI - MOVQ R15, DX - ANDQ R8, BX - RORQ $0x22, DX - MOVQ R15, CX - ANDQ R9, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R15, DX - MOVQ R8, CX - RORQ $0x27, DX - ANDQ R15, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R14 - ADDQ AX, R10 - ADDQ AX, R14 - MOVQ 80(SI), AX - BSWAPQ AX - MOVQ AX, 80(BP) - MOVQ $0x243185be4ee4b28c, DX - ADDQ AX, R13 - MOVQ R10, AX - ADDQ DX, R13 - MOVQ R10, CX - RORQ $0x0e, AX - MOVQ R10, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R10, CX - RORQ $0x29, DX - ANDQ R11, CX - XORQ AX, DX - MOVQ R10, AX - NOTQ AX - ADDQ DX, R13 - ANDQ R12, AX - XORQ CX, AX - ADDQ R13, AX - MOVQ R14, DI - MOVQ R8, BX - RORQ $0x1c, DI - MOVQ R14, DX - ANDQ R15, BX - RORQ $0x22, DX - MOVQ R14, CX - ANDQ R8, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R14, DX - MOVQ R15, CX - RORQ $0x27, DX - ANDQ R14, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R13 - ADDQ AX, R9 - ADDQ AX, R13 - MOVQ 88(SI), AX - BSWAPQ AX - MOVQ AX, 88(BP) - MOVQ $0x550c7dc3d5ffb4e2, DX - ADDQ AX, R12 - MOVQ R9, AX - ADDQ DX, R12 - MOVQ R9, CX - RORQ $0x0e, AX - MOVQ R9, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R9, CX - RORQ $0x29, DX - ANDQ R10, CX - XORQ AX, DX - MOVQ R9, AX - NOTQ AX - ADDQ DX, R12 - ANDQ R11, AX - XORQ CX, AX - ADDQ R12, AX - MOVQ R13, DI - MOVQ R15, BX - RORQ $0x1c, DI - MOVQ R13, DX - ANDQ R14, BX - RORQ $0x22, DX - MOVQ R13, CX - ANDQ R15, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R13, DX - MOVQ R14, CX - RORQ $0x27, DX - ANDQ R13, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R12 - ADDQ AX, R8 - ADDQ AX, R12 - MOVQ 96(SI), AX - BSWAPQ AX - MOVQ AX, 96(BP) - MOVQ $0x72be5d74f27b896f, DX - ADDQ AX, R11 - MOVQ R8, AX - ADDQ DX, R11 - MOVQ R8, CX - RORQ $0x0e, AX - MOVQ R8, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R8, CX - RORQ $0x29, DX - ANDQ R9, CX - XORQ AX, DX - MOVQ R8, AX - NOTQ AX - ADDQ DX, R11 - ANDQ R10, AX - XORQ CX, AX - ADDQ R11, AX - MOVQ R12, DI - MOVQ R14, BX - RORQ $0x1c, DI - MOVQ R12, DX - ANDQ R13, BX - RORQ $0x22, DX - MOVQ R12, CX - ANDQ R14, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R12, DX - MOVQ R13, CX - RORQ $0x27, DX - ANDQ R12, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R11 - ADDQ AX, R15 - ADDQ AX, R11 - MOVQ 104(SI), AX - BSWAPQ AX - MOVQ AX, 104(BP) - MOVQ $0x80deb1fe3b1696b1, DX - ADDQ AX, R10 - MOVQ R15, AX - ADDQ DX, R10 - MOVQ R15, CX - RORQ $0x0e, AX - MOVQ R15, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R15, CX - RORQ $0x29, DX - ANDQ R8, CX - XORQ AX, DX - MOVQ R15, AX - NOTQ AX - ADDQ DX, R10 - ANDQ R9, AX - XORQ CX, AX - ADDQ R10, AX - MOVQ R11, DI - MOVQ R13, BX - RORQ $0x1c, DI - MOVQ R11, DX - ANDQ R12, BX - RORQ $0x22, DX - MOVQ R11, CX - ANDQ R13, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R11, DX - MOVQ R12, CX - RORQ $0x27, DX - ANDQ R11, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R10 - ADDQ AX, R14 - ADDQ AX, R10 - MOVQ 112(SI), AX - BSWAPQ AX - MOVQ AX, 112(BP) - MOVQ $0x9bdc06a725c71235, DX - ADDQ AX, R9 - MOVQ R14, AX - ADDQ DX, R9 - MOVQ R14, CX - RORQ $0x0e, AX - MOVQ R14, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R14, CX - RORQ $0x29, DX - ANDQ R15, CX - XORQ AX, DX - MOVQ R14, AX - NOTQ AX - ADDQ DX, R9 - ANDQ R8, AX - XORQ CX, AX - ADDQ R9, AX - MOVQ R10, DI - MOVQ R12, BX - RORQ $0x1c, DI - MOVQ R10, DX - ANDQ R11, BX - RORQ $0x22, DX - MOVQ R10, CX - ANDQ R12, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R10, DX - MOVQ R11, CX - RORQ $0x27, DX - ANDQ R10, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R9 - ADDQ AX, R13 - ADDQ AX, R9 - MOVQ 120(SI), AX - BSWAPQ AX - MOVQ AX, 120(BP) - MOVQ $0xc19bf174cf692694, DX - ADDQ AX, R8 - MOVQ R13, AX - ADDQ DX, R8 - MOVQ R13, CX - RORQ $0x0e, AX - MOVQ R13, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R13, CX - RORQ $0x29, DX - ANDQ R14, CX - XORQ AX, DX - MOVQ R13, AX - NOTQ AX - ADDQ DX, R8 - ANDQ R15, AX - XORQ CX, AX - ADDQ R8, AX - MOVQ R9, DI - MOVQ R11, BX - RORQ $0x1c, DI - MOVQ R9, DX - ANDQ R10, BX - RORQ $0x22, DX - MOVQ R9, CX - ANDQ R11, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R9, DX - MOVQ R10, CX - RORQ $0x27, DX - ANDQ R9, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R8 - ADDQ AX, R12 - ADDQ AX, R8 - MOVQ 112(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 8(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 72(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ (BP), BX - ADDQ BX, AX - MOVQ AX, 128(BP) - MOVQ $0xe49b69c19ef14ad2, DX - ADDQ AX, R15 - MOVQ R12, AX - ADDQ DX, R15 - MOVQ R12, CX - RORQ $0x0e, AX - MOVQ R12, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R12, CX - RORQ $0x29, DX - ANDQ R13, CX - XORQ AX, DX - MOVQ R12, AX - NOTQ AX - ADDQ DX, R15 - ANDQ R14, AX - XORQ CX, AX - ADDQ R15, AX - MOVQ R8, DI - MOVQ R10, BX - RORQ $0x1c, DI - MOVQ R8, DX - ANDQ R9, BX - RORQ $0x22, DX - MOVQ R8, CX - ANDQ R10, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R8, DX - MOVQ R9, CX - RORQ $0x27, DX - ANDQ R8, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R15 - ADDQ AX, R11 - ADDQ AX, R15 - MOVQ 120(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 16(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 80(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 8(BP), BX - ADDQ BX, AX - MOVQ AX, 136(BP) - MOVQ $0xefbe4786384f25e3, DX - ADDQ AX, R14 - MOVQ R11, AX - ADDQ DX, R14 - MOVQ R11, CX - RORQ $0x0e, AX - MOVQ R11, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R11, CX - RORQ $0x29, DX - ANDQ R12, CX - XORQ AX, DX - MOVQ R11, AX - NOTQ AX - ADDQ DX, R14 - ANDQ R13, AX - XORQ CX, AX - ADDQ R14, AX - MOVQ R15, DI - MOVQ R9, BX - RORQ $0x1c, DI - MOVQ R15, DX - ANDQ R8, BX - RORQ $0x22, DX - MOVQ R15, CX - ANDQ R9, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R15, DX - MOVQ R8, CX - RORQ $0x27, DX - ANDQ R15, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R14 - ADDQ AX, R10 - ADDQ AX, R14 - MOVQ 128(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 24(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 88(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 16(BP), BX - ADDQ BX, AX - MOVQ AX, 144(BP) - MOVQ $0x0fc19dc68b8cd5b5, DX - ADDQ AX, R13 - MOVQ R10, AX - ADDQ DX, R13 - MOVQ R10, CX - RORQ $0x0e, AX - MOVQ R10, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R10, CX - RORQ $0x29, DX - ANDQ R11, CX - XORQ AX, DX - MOVQ R10, AX - NOTQ AX - ADDQ DX, R13 - ANDQ R12, AX - XORQ CX, AX - ADDQ R13, AX - MOVQ R14, DI - MOVQ R8, BX - RORQ $0x1c, DI - MOVQ R14, DX - ANDQ R15, BX - RORQ $0x22, DX - MOVQ R14, CX - ANDQ R8, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R14, DX - MOVQ R15, CX - RORQ $0x27, DX - ANDQ R14, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R13 - ADDQ AX, R9 - ADDQ AX, R13 - MOVQ 136(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 32(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 96(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 24(BP), BX - ADDQ BX, AX - MOVQ AX, 152(BP) - MOVQ $0x240ca1cc77ac9c65, DX - ADDQ AX, R12 - MOVQ R9, AX - ADDQ DX, R12 - MOVQ R9, CX - RORQ $0x0e, AX - MOVQ R9, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R9, CX - RORQ $0x29, DX - ANDQ R10, CX - XORQ AX, DX - MOVQ R9, AX - NOTQ AX - ADDQ DX, R12 - ANDQ R11, AX - XORQ CX, AX - ADDQ R12, AX - MOVQ R13, DI - MOVQ R15, BX - RORQ $0x1c, DI - MOVQ R13, DX - ANDQ R14, BX - RORQ $0x22, DX - MOVQ R13, CX - ANDQ R15, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R13, DX - MOVQ R14, CX - RORQ $0x27, DX - ANDQ R13, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R12 - ADDQ AX, R8 - ADDQ AX, R12 - MOVQ 144(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 40(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 104(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 32(BP), BX - ADDQ BX, AX - MOVQ AX, 160(BP) - MOVQ $0x2de92c6f592b0275, DX - ADDQ AX, R11 - MOVQ R8, AX - ADDQ DX, R11 - MOVQ R8, CX - RORQ $0x0e, AX - MOVQ R8, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R8, CX - RORQ $0x29, DX - ANDQ R9, CX - XORQ AX, DX - MOVQ R8, AX - NOTQ AX - ADDQ DX, R11 - ANDQ R10, AX - XORQ CX, AX - ADDQ R11, AX - MOVQ R12, DI - MOVQ R14, BX - RORQ $0x1c, DI - MOVQ R12, DX - ANDQ R13, BX - RORQ $0x22, DX - MOVQ R12, CX - ANDQ R14, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R12, DX - MOVQ R13, CX - RORQ $0x27, DX - ANDQ R12, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R11 - ADDQ AX, R15 - ADDQ AX, R11 - MOVQ 152(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 48(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 112(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 40(BP), BX - ADDQ BX, AX - MOVQ AX, 168(BP) - MOVQ $0x4a7484aa6ea6e483, DX - ADDQ AX, R10 - MOVQ R15, AX - ADDQ DX, R10 - MOVQ R15, CX - RORQ $0x0e, AX - MOVQ R15, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R15, CX - RORQ $0x29, DX - ANDQ R8, CX - XORQ AX, DX - MOVQ R15, AX - NOTQ AX - ADDQ DX, R10 - ANDQ R9, AX - XORQ CX, AX - ADDQ R10, AX - MOVQ R11, DI - MOVQ R13, BX - RORQ $0x1c, DI - MOVQ R11, DX - ANDQ R12, BX - RORQ $0x22, DX - MOVQ R11, CX - ANDQ R13, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R11, DX - MOVQ R12, CX - RORQ $0x27, DX - ANDQ R11, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R10 - ADDQ AX, R14 - ADDQ AX, R10 - MOVQ 160(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 56(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 120(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 48(BP), BX - ADDQ BX, AX - MOVQ AX, 176(BP) - MOVQ $0x5cb0a9dcbd41fbd4, DX - ADDQ AX, R9 - MOVQ R14, AX - ADDQ DX, R9 - MOVQ R14, CX - RORQ $0x0e, AX - MOVQ R14, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R14, CX - RORQ $0x29, DX - ANDQ R15, CX - XORQ AX, DX - MOVQ R14, AX - NOTQ AX - ADDQ DX, R9 - ANDQ R8, AX - XORQ CX, AX - ADDQ R9, AX - MOVQ R10, DI - MOVQ R12, BX - RORQ $0x1c, DI - MOVQ R10, DX - ANDQ R11, BX - RORQ $0x22, DX - MOVQ R10, CX - ANDQ R12, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R10, DX - MOVQ R11, CX - RORQ $0x27, DX - ANDQ R10, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R9 - ADDQ AX, R13 - ADDQ AX, R9 - MOVQ 168(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 64(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 128(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 56(BP), BX - ADDQ BX, AX - MOVQ AX, 184(BP) - MOVQ $0x76f988da831153b5, DX - ADDQ AX, R8 - MOVQ R13, AX - ADDQ DX, R8 - MOVQ R13, CX - RORQ $0x0e, AX - MOVQ R13, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R13, CX - RORQ $0x29, DX - ANDQ R14, CX - XORQ AX, DX - MOVQ R13, AX - NOTQ AX - ADDQ DX, R8 - ANDQ R15, AX - XORQ CX, AX - ADDQ R8, AX - MOVQ R9, DI - MOVQ R11, BX - RORQ $0x1c, DI - MOVQ R9, DX - ANDQ R10, BX - RORQ $0x22, DX - MOVQ R9, CX - ANDQ R11, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R9, DX - MOVQ R10, CX - RORQ $0x27, DX - ANDQ R9, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R8 - ADDQ AX, R12 - ADDQ AX, R8 - MOVQ 176(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 72(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 136(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 64(BP), BX - ADDQ BX, AX - MOVQ AX, 192(BP) - MOVQ $0x983e5152ee66dfab, DX - ADDQ AX, R15 - MOVQ R12, AX - ADDQ DX, R15 - MOVQ R12, CX - RORQ $0x0e, AX - MOVQ R12, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R12, CX - RORQ $0x29, DX - ANDQ R13, CX - XORQ AX, DX - MOVQ R12, AX - NOTQ AX - ADDQ DX, R15 - ANDQ R14, AX - XORQ CX, AX - ADDQ R15, AX - MOVQ R8, DI - MOVQ R10, BX - RORQ $0x1c, DI - MOVQ R8, DX - ANDQ R9, BX - RORQ $0x22, DX - MOVQ R8, CX - ANDQ R10, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R8, DX - MOVQ R9, CX - RORQ $0x27, DX - ANDQ R8, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R15 - ADDQ AX, R11 - ADDQ AX, R15 - MOVQ 184(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 80(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 144(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 72(BP), BX - ADDQ BX, AX - MOVQ AX, 200(BP) - MOVQ $0xa831c66d2db43210, DX - ADDQ AX, R14 - MOVQ R11, AX - ADDQ DX, R14 - MOVQ R11, CX - RORQ $0x0e, AX - MOVQ R11, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R11, CX - RORQ $0x29, DX - ANDQ R12, CX - XORQ AX, DX - MOVQ R11, AX - NOTQ AX - ADDQ DX, R14 - ANDQ R13, AX - XORQ CX, AX - ADDQ R14, AX - MOVQ R15, DI - MOVQ R9, BX - RORQ $0x1c, DI - MOVQ R15, DX - ANDQ R8, BX - RORQ $0x22, DX - MOVQ R15, CX - ANDQ R9, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R15, DX - MOVQ R8, CX - RORQ $0x27, DX - ANDQ R15, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R14 - ADDQ AX, R10 - ADDQ AX, R14 - MOVQ 192(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 88(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 152(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 80(BP), BX - ADDQ BX, AX - MOVQ AX, 208(BP) - MOVQ $0xb00327c898fb213f, DX - ADDQ AX, R13 - MOVQ R10, AX - ADDQ DX, R13 - MOVQ R10, CX - RORQ $0x0e, AX - MOVQ R10, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R10, CX - RORQ $0x29, DX - ANDQ R11, CX - XORQ AX, DX - MOVQ R10, AX - NOTQ AX - ADDQ DX, R13 - ANDQ R12, AX - XORQ CX, AX - ADDQ R13, AX - MOVQ R14, DI - MOVQ R8, BX - RORQ $0x1c, DI - MOVQ R14, DX - ANDQ R15, BX - RORQ $0x22, DX - MOVQ R14, CX - ANDQ R8, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R14, DX - MOVQ R15, CX - RORQ $0x27, DX - ANDQ R14, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R13 - ADDQ AX, R9 - ADDQ AX, R13 - MOVQ 200(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 96(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 160(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 88(BP), BX - ADDQ BX, AX - MOVQ AX, 216(BP) - MOVQ $0xbf597fc7beef0ee4, DX - ADDQ AX, R12 - MOVQ R9, AX - ADDQ DX, R12 - MOVQ R9, CX - RORQ $0x0e, AX - MOVQ R9, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R9, CX - RORQ $0x29, DX - ANDQ R10, CX - XORQ AX, DX - MOVQ R9, AX - NOTQ AX - ADDQ DX, R12 - ANDQ R11, AX - XORQ CX, AX - ADDQ R12, AX - MOVQ R13, DI - MOVQ R15, BX - RORQ $0x1c, DI - MOVQ R13, DX - ANDQ R14, BX - RORQ $0x22, DX - MOVQ R13, CX - ANDQ R15, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R13, DX - MOVQ R14, CX - RORQ $0x27, DX - ANDQ R13, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R12 - ADDQ AX, R8 - ADDQ AX, R12 - MOVQ 208(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 104(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 168(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 96(BP), BX - ADDQ BX, AX - MOVQ AX, 224(BP) - MOVQ $0xc6e00bf33da88fc2, DX - ADDQ AX, R11 - MOVQ R8, AX - ADDQ DX, R11 - MOVQ R8, CX - RORQ $0x0e, AX - MOVQ R8, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R8, CX - RORQ $0x29, DX - ANDQ R9, CX - XORQ AX, DX - MOVQ R8, AX - NOTQ AX - ADDQ DX, R11 - ANDQ R10, AX - XORQ CX, AX - ADDQ R11, AX - MOVQ R12, DI - MOVQ R14, BX - RORQ $0x1c, DI - MOVQ R12, DX - ANDQ R13, BX - RORQ $0x22, DX - MOVQ R12, CX - ANDQ R14, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R12, DX - MOVQ R13, CX - RORQ $0x27, DX - ANDQ R12, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R11 - ADDQ AX, R15 - ADDQ AX, R11 - MOVQ 216(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 112(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 176(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 104(BP), BX - ADDQ BX, AX - MOVQ AX, 232(BP) - MOVQ $0xd5a79147930aa725, DX - ADDQ AX, R10 - MOVQ R15, AX - ADDQ DX, R10 - MOVQ R15, CX - RORQ $0x0e, AX - MOVQ R15, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R15, CX - RORQ $0x29, DX - ANDQ R8, CX - XORQ AX, DX - MOVQ R15, AX - NOTQ AX - ADDQ DX, R10 - ANDQ R9, AX - XORQ CX, AX - ADDQ R10, AX - MOVQ R11, DI - MOVQ R13, BX - RORQ $0x1c, DI - MOVQ R11, DX - ANDQ R12, BX - RORQ $0x22, DX - MOVQ R11, CX - ANDQ R13, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R11, DX - MOVQ R12, CX - RORQ $0x27, DX - ANDQ R11, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R10 - ADDQ AX, R14 - ADDQ AX, R10 - MOVQ 224(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 120(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 184(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 112(BP), BX - ADDQ BX, AX - MOVQ AX, 240(BP) - MOVQ $0x06ca6351e003826f, DX - ADDQ AX, R9 - MOVQ R14, AX - ADDQ DX, R9 - MOVQ R14, CX - RORQ $0x0e, AX - MOVQ R14, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R14, CX - RORQ $0x29, DX - ANDQ R15, CX - XORQ AX, DX - MOVQ R14, AX - NOTQ AX - ADDQ DX, R9 - ANDQ R8, AX - XORQ CX, AX - ADDQ R9, AX - MOVQ R10, DI - MOVQ R12, BX - RORQ $0x1c, DI - MOVQ R10, DX - ANDQ R11, BX - RORQ $0x22, DX - MOVQ R10, CX - ANDQ R12, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R10, DX - MOVQ R11, CX - RORQ $0x27, DX - ANDQ R10, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R9 - ADDQ AX, R13 - ADDQ AX, R9 - MOVQ 232(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 128(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 192(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 120(BP), BX - ADDQ BX, AX - MOVQ AX, 248(BP) - MOVQ $0x142929670a0e6e70, DX - ADDQ AX, R8 - MOVQ R13, AX - ADDQ DX, R8 - MOVQ R13, CX - RORQ $0x0e, AX - MOVQ R13, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R13, CX - RORQ $0x29, DX - ANDQ R14, CX - XORQ AX, DX - MOVQ R13, AX - NOTQ AX - ADDQ DX, R8 - ANDQ R15, AX - XORQ CX, AX - ADDQ R8, AX - MOVQ R9, DI - MOVQ R11, BX - RORQ $0x1c, DI - MOVQ R9, DX - ANDQ R10, BX - RORQ $0x22, DX - MOVQ R9, CX - ANDQ R11, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R9, DX - MOVQ R10, CX - RORQ $0x27, DX - ANDQ R9, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R8 - ADDQ AX, R12 - ADDQ AX, R8 - MOVQ 240(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 136(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 200(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 128(BP), BX - ADDQ BX, AX - MOVQ AX, 256(BP) - MOVQ $0x27b70a8546d22ffc, DX - ADDQ AX, R15 - MOVQ R12, AX - ADDQ DX, R15 - MOVQ R12, CX - RORQ $0x0e, AX - MOVQ R12, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R12, CX - RORQ $0x29, DX - ANDQ R13, CX - XORQ AX, DX - MOVQ R12, AX - NOTQ AX - ADDQ DX, R15 - ANDQ R14, AX - XORQ CX, AX - ADDQ R15, AX - MOVQ R8, DI - MOVQ R10, BX - RORQ $0x1c, DI - MOVQ R8, DX - ANDQ R9, BX - RORQ $0x22, DX - MOVQ R8, CX - ANDQ R10, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R8, DX - MOVQ R9, CX - RORQ $0x27, DX - ANDQ R8, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R15 - ADDQ AX, R11 - ADDQ AX, R15 - MOVQ 248(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 144(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 208(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 136(BP), BX - ADDQ BX, AX - MOVQ AX, 264(BP) - MOVQ $0x2e1b21385c26c926, DX - ADDQ AX, R14 - MOVQ R11, AX - ADDQ DX, R14 - MOVQ R11, CX - RORQ $0x0e, AX - MOVQ R11, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R11, CX - RORQ $0x29, DX - ANDQ R12, CX - XORQ AX, DX - MOVQ R11, AX - NOTQ AX - ADDQ DX, R14 - ANDQ R13, AX - XORQ CX, AX - ADDQ R14, AX - MOVQ R15, DI - MOVQ R9, BX - RORQ $0x1c, DI - MOVQ R15, DX - ANDQ R8, BX - RORQ $0x22, DX - MOVQ R15, CX - ANDQ R9, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R15, DX - MOVQ R8, CX - RORQ $0x27, DX - ANDQ R15, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R14 - ADDQ AX, R10 - ADDQ AX, R14 - MOVQ 256(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 152(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 216(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 144(BP), BX - ADDQ BX, AX - MOVQ AX, 272(BP) - MOVQ $0x4d2c6dfc5ac42aed, DX - ADDQ AX, R13 - MOVQ R10, AX - ADDQ DX, R13 - MOVQ R10, CX - RORQ $0x0e, AX - MOVQ R10, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R10, CX - RORQ $0x29, DX - ANDQ R11, CX - XORQ AX, DX - MOVQ R10, AX - NOTQ AX - ADDQ DX, R13 - ANDQ R12, AX - XORQ CX, AX - ADDQ R13, AX - MOVQ R14, DI - MOVQ R8, BX - RORQ $0x1c, DI - MOVQ R14, DX - ANDQ R15, BX - RORQ $0x22, DX - MOVQ R14, CX - ANDQ R8, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R14, DX - MOVQ R15, CX - RORQ $0x27, DX - ANDQ R14, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R13 - ADDQ AX, R9 - ADDQ AX, R13 - MOVQ 264(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 160(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 224(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 152(BP), BX - ADDQ BX, AX - MOVQ AX, 280(BP) - MOVQ $0x53380d139d95b3df, DX - ADDQ AX, R12 - MOVQ R9, AX - ADDQ DX, R12 - MOVQ R9, CX - RORQ $0x0e, AX - MOVQ R9, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R9, CX - RORQ $0x29, DX - ANDQ R10, CX - XORQ AX, DX - MOVQ R9, AX - NOTQ AX - ADDQ DX, R12 - ANDQ R11, AX - XORQ CX, AX - ADDQ R12, AX - MOVQ R13, DI - MOVQ R15, BX - RORQ $0x1c, DI - MOVQ R13, DX - ANDQ R14, BX - RORQ $0x22, DX - MOVQ R13, CX - ANDQ R15, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R13, DX - MOVQ R14, CX - RORQ $0x27, DX - ANDQ R13, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R12 - ADDQ AX, R8 - ADDQ AX, R12 - MOVQ 272(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 168(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 232(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 160(BP), BX - ADDQ BX, AX - MOVQ AX, 288(BP) - MOVQ $0x650a73548baf63de, DX - ADDQ AX, R11 - MOVQ R8, AX - ADDQ DX, R11 - MOVQ R8, CX - RORQ $0x0e, AX - MOVQ R8, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R8, CX - RORQ $0x29, DX - ANDQ R9, CX - XORQ AX, DX - MOVQ R8, AX - NOTQ AX - ADDQ DX, R11 - ANDQ R10, AX - XORQ CX, AX - ADDQ R11, AX - MOVQ R12, DI - MOVQ R14, BX - RORQ $0x1c, DI - MOVQ R12, DX - ANDQ R13, BX - RORQ $0x22, DX - MOVQ R12, CX - ANDQ R14, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R12, DX - MOVQ R13, CX - RORQ $0x27, DX - ANDQ R12, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R11 - ADDQ AX, R15 - ADDQ AX, R11 - MOVQ 280(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 176(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 240(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 168(BP), BX - ADDQ BX, AX - MOVQ AX, 296(BP) - MOVQ $0x766a0abb3c77b2a8, DX - ADDQ AX, R10 - MOVQ R15, AX - ADDQ DX, R10 - MOVQ R15, CX - RORQ $0x0e, AX - MOVQ R15, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R15, CX - RORQ $0x29, DX - ANDQ R8, CX - XORQ AX, DX - MOVQ R15, AX - NOTQ AX - ADDQ DX, R10 - ANDQ R9, AX - XORQ CX, AX - ADDQ R10, AX - MOVQ R11, DI - MOVQ R13, BX - RORQ $0x1c, DI - MOVQ R11, DX - ANDQ R12, BX - RORQ $0x22, DX - MOVQ R11, CX - ANDQ R13, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R11, DX - MOVQ R12, CX - RORQ $0x27, DX - ANDQ R11, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R10 - ADDQ AX, R14 - ADDQ AX, R10 - MOVQ 288(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 184(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 248(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 176(BP), BX - ADDQ BX, AX - MOVQ AX, 304(BP) - MOVQ $0x81c2c92e47edaee6, DX - ADDQ AX, R9 - MOVQ R14, AX - ADDQ DX, R9 - MOVQ R14, CX - RORQ $0x0e, AX - MOVQ R14, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R14, CX - RORQ $0x29, DX - ANDQ R15, CX - XORQ AX, DX - MOVQ R14, AX - NOTQ AX - ADDQ DX, R9 - ANDQ R8, AX - XORQ CX, AX - ADDQ R9, AX - MOVQ R10, DI - MOVQ R12, BX - RORQ $0x1c, DI - MOVQ R10, DX - ANDQ R11, BX - RORQ $0x22, DX - MOVQ R10, CX - ANDQ R12, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R10, DX - MOVQ R11, CX - RORQ $0x27, DX - ANDQ R10, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R9 - ADDQ AX, R13 - ADDQ AX, R9 - MOVQ 296(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 192(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 256(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 184(BP), BX - ADDQ BX, AX - MOVQ AX, 312(BP) - MOVQ $0x92722c851482353b, DX - ADDQ AX, R8 - MOVQ R13, AX - ADDQ DX, R8 - MOVQ R13, CX - RORQ $0x0e, AX - MOVQ R13, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R13, CX - RORQ $0x29, DX - ANDQ R14, CX - XORQ AX, DX - MOVQ R13, AX - NOTQ AX - ADDQ DX, R8 - ANDQ R15, AX - XORQ CX, AX - ADDQ R8, AX - MOVQ R9, DI - MOVQ R11, BX - RORQ $0x1c, DI - MOVQ R9, DX - ANDQ R10, BX - RORQ $0x22, DX - MOVQ R9, CX - ANDQ R11, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R9, DX - MOVQ R10, CX - RORQ $0x27, DX - ANDQ R9, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R8 - ADDQ AX, R12 - ADDQ AX, R8 - MOVQ 304(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 200(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 264(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 192(BP), BX - ADDQ BX, AX - MOVQ AX, 320(BP) - MOVQ $0xa2bfe8a14cf10364, DX - ADDQ AX, R15 - MOVQ R12, AX - ADDQ DX, R15 - MOVQ R12, CX - RORQ $0x0e, AX - MOVQ R12, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R12, CX - RORQ $0x29, DX - ANDQ R13, CX - XORQ AX, DX - MOVQ R12, AX - NOTQ AX - ADDQ DX, R15 - ANDQ R14, AX - XORQ CX, AX - ADDQ R15, AX - MOVQ R8, DI - MOVQ R10, BX - RORQ $0x1c, DI - MOVQ R8, DX - ANDQ R9, BX - RORQ $0x22, DX - MOVQ R8, CX - ANDQ R10, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R8, DX - MOVQ R9, CX - RORQ $0x27, DX - ANDQ R8, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R15 - ADDQ AX, R11 - ADDQ AX, R15 - MOVQ 312(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 208(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 272(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 200(BP), BX - ADDQ BX, AX - MOVQ AX, 328(BP) - MOVQ $0xa81a664bbc423001, DX - ADDQ AX, R14 - MOVQ R11, AX - ADDQ DX, R14 - MOVQ R11, CX - RORQ $0x0e, AX - MOVQ R11, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R11, CX - RORQ $0x29, DX - ANDQ R12, CX - XORQ AX, DX - MOVQ R11, AX - NOTQ AX - ADDQ DX, R14 - ANDQ R13, AX - XORQ CX, AX - ADDQ R14, AX - MOVQ R15, DI - MOVQ R9, BX - RORQ $0x1c, DI - MOVQ R15, DX - ANDQ R8, BX - RORQ $0x22, DX - MOVQ R15, CX - ANDQ R9, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R15, DX - MOVQ R8, CX - RORQ $0x27, DX - ANDQ R15, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R14 - ADDQ AX, R10 - ADDQ AX, R14 - MOVQ 320(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 216(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 280(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 208(BP), BX - ADDQ BX, AX - MOVQ AX, 336(BP) - MOVQ $0xc24b8b70d0f89791, DX - ADDQ AX, R13 - MOVQ R10, AX - ADDQ DX, R13 - MOVQ R10, CX - RORQ $0x0e, AX - MOVQ R10, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R10, CX - RORQ $0x29, DX - ANDQ R11, CX - XORQ AX, DX - MOVQ R10, AX - NOTQ AX - ADDQ DX, R13 - ANDQ R12, AX - XORQ CX, AX - ADDQ R13, AX - MOVQ R14, DI - MOVQ R8, BX - RORQ $0x1c, DI - MOVQ R14, DX - ANDQ R15, BX - RORQ $0x22, DX - MOVQ R14, CX - ANDQ R8, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R14, DX - MOVQ R15, CX - RORQ $0x27, DX - ANDQ R14, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R13 - ADDQ AX, R9 - ADDQ AX, R13 - MOVQ 328(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 224(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 288(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 216(BP), BX - ADDQ BX, AX - MOVQ AX, 344(BP) - MOVQ $0xc76c51a30654be30, DX - ADDQ AX, R12 - MOVQ R9, AX - ADDQ DX, R12 - MOVQ R9, CX - RORQ $0x0e, AX - MOVQ R9, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R9, CX - RORQ $0x29, DX - ANDQ R10, CX - XORQ AX, DX - MOVQ R9, AX - NOTQ AX - ADDQ DX, R12 - ANDQ R11, AX - XORQ CX, AX - ADDQ R12, AX - MOVQ R13, DI - MOVQ R15, BX - RORQ $0x1c, DI - MOVQ R13, DX - ANDQ R14, BX - RORQ $0x22, DX - MOVQ R13, CX - ANDQ R15, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R13, DX - MOVQ R14, CX - RORQ $0x27, DX - ANDQ R13, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R12 - ADDQ AX, R8 - ADDQ AX, R12 - MOVQ 336(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 232(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 296(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 224(BP), BX - ADDQ BX, AX - MOVQ AX, 352(BP) - MOVQ $0xd192e819d6ef5218, DX - ADDQ AX, R11 - MOVQ R8, AX - ADDQ DX, R11 - MOVQ R8, CX - RORQ $0x0e, AX - MOVQ R8, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R8, CX - RORQ $0x29, DX - ANDQ R9, CX - XORQ AX, DX - MOVQ R8, AX - NOTQ AX - ADDQ DX, R11 - ANDQ R10, AX - XORQ CX, AX - ADDQ R11, AX - MOVQ R12, DI - MOVQ R14, BX - RORQ $0x1c, DI - MOVQ R12, DX - ANDQ R13, BX - RORQ $0x22, DX - MOVQ R12, CX - ANDQ R14, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R12, DX - MOVQ R13, CX - RORQ $0x27, DX - ANDQ R12, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R11 - ADDQ AX, R15 - ADDQ AX, R11 - MOVQ 344(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 240(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 304(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 232(BP), BX - ADDQ BX, AX - MOVQ AX, 360(BP) - MOVQ $0xd69906245565a910, DX - ADDQ AX, R10 - MOVQ R15, AX - ADDQ DX, R10 - MOVQ R15, CX - RORQ $0x0e, AX - MOVQ R15, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R15, CX - RORQ $0x29, DX - ANDQ R8, CX - XORQ AX, DX - MOVQ R15, AX - NOTQ AX - ADDQ DX, R10 - ANDQ R9, AX - XORQ CX, AX - ADDQ R10, AX - MOVQ R11, DI - MOVQ R13, BX - RORQ $0x1c, DI - MOVQ R11, DX - ANDQ R12, BX - RORQ $0x22, DX - MOVQ R11, CX - ANDQ R13, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R11, DX - MOVQ R12, CX - RORQ $0x27, DX - ANDQ R11, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R10 - ADDQ AX, R14 - ADDQ AX, R10 - MOVQ 352(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 248(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 312(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 240(BP), BX - ADDQ BX, AX - MOVQ AX, 368(BP) - MOVQ $0xf40e35855771202a, DX - ADDQ AX, R9 - MOVQ R14, AX - ADDQ DX, R9 - MOVQ R14, CX - RORQ $0x0e, AX - MOVQ R14, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R14, CX - RORQ $0x29, DX - ANDQ R15, CX - XORQ AX, DX - MOVQ R14, AX - NOTQ AX - ADDQ DX, R9 - ANDQ R8, AX - XORQ CX, AX - ADDQ R9, AX - MOVQ R10, DI - MOVQ R12, BX - RORQ $0x1c, DI - MOVQ R10, DX - ANDQ R11, BX - RORQ $0x22, DX - MOVQ R10, CX - ANDQ R12, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R10, DX - MOVQ R11, CX - RORQ $0x27, DX - ANDQ R10, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R9 - ADDQ AX, R13 - ADDQ AX, R9 - MOVQ 360(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 256(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 320(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 248(BP), BX - ADDQ BX, AX - MOVQ AX, 376(BP) - MOVQ $0x106aa07032bbd1b8, DX - ADDQ AX, R8 - MOVQ R13, AX - ADDQ DX, R8 - MOVQ R13, CX - RORQ $0x0e, AX - MOVQ R13, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R13, CX - RORQ $0x29, DX - ANDQ R14, CX - XORQ AX, DX - MOVQ R13, AX - NOTQ AX - ADDQ DX, R8 - ANDQ R15, AX - XORQ CX, AX - ADDQ R8, AX - MOVQ R9, DI - MOVQ R11, BX - RORQ $0x1c, DI - MOVQ R9, DX - ANDQ R10, BX - RORQ $0x22, DX - MOVQ R9, CX - ANDQ R11, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R9, DX - MOVQ R10, CX - RORQ $0x27, DX - ANDQ R9, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R8 - ADDQ AX, R12 - ADDQ AX, R8 - MOVQ 368(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 264(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 328(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 256(BP), BX - ADDQ BX, AX - MOVQ AX, 384(BP) - MOVQ $0x19a4c116b8d2d0c8, DX - ADDQ AX, R15 - MOVQ R12, AX - ADDQ DX, R15 - MOVQ R12, CX - RORQ $0x0e, AX - MOVQ R12, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R12, CX - RORQ $0x29, DX - ANDQ R13, CX - XORQ AX, DX - MOVQ R12, AX - NOTQ AX - ADDQ DX, R15 - ANDQ R14, AX - XORQ CX, AX - ADDQ R15, AX - MOVQ R8, DI - MOVQ R10, BX - RORQ $0x1c, DI - MOVQ R8, DX - ANDQ R9, BX - RORQ $0x22, DX - MOVQ R8, CX - ANDQ R10, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R8, DX - MOVQ R9, CX - RORQ $0x27, DX - ANDQ R8, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R15 - ADDQ AX, R11 - ADDQ AX, R15 - MOVQ 376(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 272(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 336(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 264(BP), BX - ADDQ BX, AX - MOVQ AX, 392(BP) - MOVQ $0x1e376c085141ab53, DX - ADDQ AX, R14 - MOVQ R11, AX - ADDQ DX, R14 - MOVQ R11, CX - RORQ $0x0e, AX - MOVQ R11, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R11, CX - RORQ $0x29, DX - ANDQ R12, CX - XORQ AX, DX - MOVQ R11, AX - NOTQ AX - ADDQ DX, R14 - ANDQ R13, AX - XORQ CX, AX - ADDQ R14, AX - MOVQ R15, DI - MOVQ R9, BX - RORQ $0x1c, DI - MOVQ R15, DX - ANDQ R8, BX - RORQ $0x22, DX - MOVQ R15, CX - ANDQ R9, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R15, DX - MOVQ R8, CX - RORQ $0x27, DX - ANDQ R15, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R14 - ADDQ AX, R10 - ADDQ AX, R14 - MOVQ 384(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 280(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 344(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 272(BP), BX - ADDQ BX, AX - MOVQ AX, 400(BP) - MOVQ $0x2748774cdf8eeb99, DX - ADDQ AX, R13 - MOVQ R10, AX - ADDQ DX, R13 - MOVQ R10, CX - RORQ $0x0e, AX - MOVQ R10, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R10, CX - RORQ $0x29, DX - ANDQ R11, CX - XORQ AX, DX - MOVQ R10, AX - NOTQ AX - ADDQ DX, R13 - ANDQ R12, AX - XORQ CX, AX - ADDQ R13, AX - MOVQ R14, DI - MOVQ R8, BX - RORQ $0x1c, DI - MOVQ R14, DX - ANDQ R15, BX - RORQ $0x22, DX - MOVQ R14, CX - ANDQ R8, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R14, DX - MOVQ R15, CX - RORQ $0x27, DX - ANDQ R14, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R13 - ADDQ AX, R9 - ADDQ AX, R13 - MOVQ 392(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 288(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 352(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 280(BP), BX - ADDQ BX, AX - MOVQ AX, 408(BP) - MOVQ $0x34b0bcb5e19b48a8, DX - ADDQ AX, R12 - MOVQ R9, AX - ADDQ DX, R12 - MOVQ R9, CX - RORQ $0x0e, AX - MOVQ R9, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R9, CX - RORQ $0x29, DX - ANDQ R10, CX - XORQ AX, DX - MOVQ R9, AX - NOTQ AX - ADDQ DX, R12 - ANDQ R11, AX - XORQ CX, AX - ADDQ R12, AX - MOVQ R13, DI - MOVQ R15, BX - RORQ $0x1c, DI - MOVQ R13, DX - ANDQ R14, BX - RORQ $0x22, DX - MOVQ R13, CX - ANDQ R15, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R13, DX - MOVQ R14, CX - RORQ $0x27, DX - ANDQ R13, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R12 - ADDQ AX, R8 - ADDQ AX, R12 - MOVQ 400(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 296(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 360(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 288(BP), BX - ADDQ BX, AX - MOVQ AX, 416(BP) - MOVQ $0x391c0cb3c5c95a63, DX - ADDQ AX, R11 - MOVQ R8, AX - ADDQ DX, R11 - MOVQ R8, CX - RORQ $0x0e, AX - MOVQ R8, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R8, CX - RORQ $0x29, DX - ANDQ R9, CX - XORQ AX, DX - MOVQ R8, AX - NOTQ AX - ADDQ DX, R11 - ANDQ R10, AX - XORQ CX, AX - ADDQ R11, AX - MOVQ R12, DI - MOVQ R14, BX - RORQ $0x1c, DI - MOVQ R12, DX - ANDQ R13, BX - RORQ $0x22, DX - MOVQ R12, CX - ANDQ R14, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R12, DX - MOVQ R13, CX - RORQ $0x27, DX - ANDQ R12, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R11 - ADDQ AX, R15 - ADDQ AX, R11 - MOVQ 408(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 304(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 368(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 296(BP), BX - ADDQ BX, AX - MOVQ AX, 424(BP) - MOVQ $0x4ed8aa4ae3418acb, DX - ADDQ AX, R10 - MOVQ R15, AX - ADDQ DX, R10 - MOVQ R15, CX - RORQ $0x0e, AX - MOVQ R15, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R15, CX - RORQ $0x29, DX - ANDQ R8, CX - XORQ AX, DX - MOVQ R15, AX - NOTQ AX - ADDQ DX, R10 - ANDQ R9, AX - XORQ CX, AX - ADDQ R10, AX - MOVQ R11, DI - MOVQ R13, BX - RORQ $0x1c, DI - MOVQ R11, DX - ANDQ R12, BX - RORQ $0x22, DX - MOVQ R11, CX - ANDQ R13, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R11, DX - MOVQ R12, CX - RORQ $0x27, DX - ANDQ R11, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R10 - ADDQ AX, R14 - ADDQ AX, R10 - MOVQ 416(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 312(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 376(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 304(BP), BX - ADDQ BX, AX - MOVQ AX, 432(BP) - MOVQ $0x5b9cca4f7763e373, DX - ADDQ AX, R9 - MOVQ R14, AX - ADDQ DX, R9 - MOVQ R14, CX - RORQ $0x0e, AX - MOVQ R14, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R14, CX - RORQ $0x29, DX - ANDQ R15, CX - XORQ AX, DX - MOVQ R14, AX - NOTQ AX - ADDQ DX, R9 - ANDQ R8, AX - XORQ CX, AX - ADDQ R9, AX - MOVQ R10, DI - MOVQ R12, BX - RORQ $0x1c, DI - MOVQ R10, DX - ANDQ R11, BX - RORQ $0x22, DX - MOVQ R10, CX - ANDQ R12, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R10, DX - MOVQ R11, CX - RORQ $0x27, DX - ANDQ R10, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R9 - ADDQ AX, R13 - ADDQ AX, R9 - MOVQ 424(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 320(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 384(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 312(BP), BX - ADDQ BX, AX - MOVQ AX, 440(BP) - MOVQ $0x682e6ff3d6b2b8a3, DX - ADDQ AX, R8 - MOVQ R13, AX - ADDQ DX, R8 - MOVQ R13, CX - RORQ $0x0e, AX - MOVQ R13, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R13, CX - RORQ $0x29, DX - ANDQ R14, CX - XORQ AX, DX - MOVQ R13, AX - NOTQ AX - ADDQ DX, R8 - ANDQ R15, AX - XORQ CX, AX - ADDQ R8, AX - MOVQ R9, DI - MOVQ R11, BX - RORQ $0x1c, DI - MOVQ R9, DX - ANDQ R10, BX - RORQ $0x22, DX - MOVQ R9, CX - ANDQ R11, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R9, DX - MOVQ R10, CX - RORQ $0x27, DX - ANDQ R9, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R8 - ADDQ AX, R12 - ADDQ AX, R8 - MOVQ 432(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 328(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 392(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 320(BP), BX - ADDQ BX, AX - MOVQ AX, 448(BP) - MOVQ $0x748f82ee5defb2fc, DX - ADDQ AX, R15 - MOVQ R12, AX - ADDQ DX, R15 - MOVQ R12, CX - RORQ $0x0e, AX - MOVQ R12, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R12, CX - RORQ $0x29, DX - ANDQ R13, CX - XORQ AX, DX - MOVQ R12, AX - NOTQ AX - ADDQ DX, R15 - ANDQ R14, AX - XORQ CX, AX - ADDQ R15, AX - MOVQ R8, DI - MOVQ R10, BX - RORQ $0x1c, DI - MOVQ R8, DX - ANDQ R9, BX - RORQ $0x22, DX - MOVQ R8, CX - ANDQ R10, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R8, DX - MOVQ R9, CX - RORQ $0x27, DX - ANDQ R8, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R15 - ADDQ AX, R11 - ADDQ AX, R15 - MOVQ 440(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 336(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 400(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 328(BP), BX - ADDQ BX, AX - MOVQ AX, 456(BP) - MOVQ $0x78a5636f43172f60, DX - ADDQ AX, R14 - MOVQ R11, AX - ADDQ DX, R14 - MOVQ R11, CX - RORQ $0x0e, AX - MOVQ R11, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R11, CX - RORQ $0x29, DX - ANDQ R12, CX - XORQ AX, DX - MOVQ R11, AX - NOTQ AX - ADDQ DX, R14 - ANDQ R13, AX - XORQ CX, AX - ADDQ R14, AX - MOVQ R15, DI - MOVQ R9, BX - RORQ $0x1c, DI - MOVQ R15, DX - ANDQ R8, BX - RORQ $0x22, DX - MOVQ R15, CX - ANDQ R9, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R15, DX - MOVQ R8, CX - RORQ $0x27, DX - ANDQ R15, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R14 - ADDQ AX, R10 - ADDQ AX, R14 - MOVQ 448(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 344(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 408(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 336(BP), BX - ADDQ BX, AX - MOVQ AX, 464(BP) - MOVQ $0x84c87814a1f0ab72, DX - ADDQ AX, R13 - MOVQ R10, AX - ADDQ DX, R13 - MOVQ R10, CX - RORQ $0x0e, AX - MOVQ R10, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R10, CX - RORQ $0x29, DX - ANDQ R11, CX - XORQ AX, DX - MOVQ R10, AX - NOTQ AX - ADDQ DX, R13 - ANDQ R12, AX - XORQ CX, AX - ADDQ R13, AX - MOVQ R14, DI - MOVQ R8, BX - RORQ $0x1c, DI - MOVQ R14, DX - ANDQ R15, BX - RORQ $0x22, DX - MOVQ R14, CX - ANDQ R8, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R14, DX - MOVQ R15, CX - RORQ $0x27, DX - ANDQ R14, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R13 - ADDQ AX, R9 - ADDQ AX, R13 - MOVQ 456(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 352(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 416(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 344(BP), BX - ADDQ BX, AX - MOVQ AX, 472(BP) - MOVQ $0x8cc702081a6439ec, DX - ADDQ AX, R12 - MOVQ R9, AX - ADDQ DX, R12 - MOVQ R9, CX - RORQ $0x0e, AX - MOVQ R9, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R9, CX - RORQ $0x29, DX - ANDQ R10, CX - XORQ AX, DX - MOVQ R9, AX - NOTQ AX - ADDQ DX, R12 - ANDQ R11, AX - XORQ CX, AX - ADDQ R12, AX - MOVQ R13, DI - MOVQ R15, BX - RORQ $0x1c, DI - MOVQ R13, DX - ANDQ R14, BX - RORQ $0x22, DX - MOVQ R13, CX - ANDQ R15, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R13, DX - MOVQ R14, CX - RORQ $0x27, DX - ANDQ R13, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R12 - ADDQ AX, R8 - ADDQ AX, R12 - MOVQ 464(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 360(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 424(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 352(BP), BX - ADDQ BX, AX - MOVQ AX, 480(BP) - MOVQ $0x90befffa23631e28, DX - ADDQ AX, R11 - MOVQ R8, AX - ADDQ DX, R11 - MOVQ R8, CX - RORQ $0x0e, AX - MOVQ R8, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R8, CX - RORQ $0x29, DX - ANDQ R9, CX - XORQ AX, DX - MOVQ R8, AX - NOTQ AX - ADDQ DX, R11 - ANDQ R10, AX - XORQ CX, AX - ADDQ R11, AX - MOVQ R12, DI - MOVQ R14, BX - RORQ $0x1c, DI - MOVQ R12, DX - ANDQ R13, BX - RORQ $0x22, DX - MOVQ R12, CX - ANDQ R14, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R12, DX - MOVQ R13, CX - RORQ $0x27, DX - ANDQ R12, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R11 - ADDQ AX, R15 - ADDQ AX, R11 - MOVQ 472(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 368(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 432(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 360(BP), BX - ADDQ BX, AX - MOVQ AX, 488(BP) - MOVQ $0xa4506cebde82bde9, DX - ADDQ AX, R10 - MOVQ R15, AX - ADDQ DX, R10 - MOVQ R15, CX - RORQ $0x0e, AX - MOVQ R15, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R15, CX - RORQ $0x29, DX - ANDQ R8, CX - XORQ AX, DX - MOVQ R15, AX - NOTQ AX - ADDQ DX, R10 - ANDQ R9, AX - XORQ CX, AX - ADDQ R10, AX - MOVQ R11, DI - MOVQ R13, BX - RORQ $0x1c, DI - MOVQ R11, DX - ANDQ R12, BX - RORQ $0x22, DX - MOVQ R11, CX - ANDQ R13, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R11, DX - MOVQ R12, CX - RORQ $0x27, DX - ANDQ R11, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R10 - ADDQ AX, R14 - ADDQ AX, R10 - MOVQ 480(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 376(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 440(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 368(BP), BX - ADDQ BX, AX - MOVQ AX, 496(BP) - MOVQ $0xbef9a3f7b2c67915, DX - ADDQ AX, R9 - MOVQ R14, AX - ADDQ DX, R9 - MOVQ R14, CX - RORQ $0x0e, AX - MOVQ R14, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R14, CX - RORQ $0x29, DX - ANDQ R15, CX - XORQ AX, DX - MOVQ R14, AX - NOTQ AX - ADDQ DX, R9 - ANDQ R8, AX - XORQ CX, AX - ADDQ R9, AX - MOVQ R10, DI - MOVQ R12, BX - RORQ $0x1c, DI - MOVQ R10, DX - ANDQ R11, BX - RORQ $0x22, DX - MOVQ R10, CX - ANDQ R12, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R10, DX - MOVQ R11, CX - RORQ $0x27, DX - ANDQ R10, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R9 - ADDQ AX, R13 - ADDQ AX, R9 - MOVQ 488(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 384(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 448(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 376(BP), BX - ADDQ BX, AX - MOVQ AX, 504(BP) - MOVQ $0xc67178f2e372532b, DX - ADDQ AX, R8 - MOVQ R13, AX - ADDQ DX, R8 - MOVQ R13, CX - RORQ $0x0e, AX - MOVQ R13, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R13, CX - RORQ $0x29, DX - ANDQ R14, CX - XORQ AX, DX - MOVQ R13, AX - NOTQ AX - ADDQ DX, R8 - ANDQ R15, AX - XORQ CX, AX - ADDQ R8, AX - MOVQ R9, DI - MOVQ R11, BX - RORQ $0x1c, DI - MOVQ R9, DX - ANDQ R10, BX - RORQ $0x22, DX - MOVQ R9, CX - ANDQ R11, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R9, DX - MOVQ R10, CX - RORQ $0x27, DX - ANDQ R9, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R8 - ADDQ AX, R12 - ADDQ AX, R8 - MOVQ 496(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 392(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 456(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 384(BP), BX - ADDQ BX, AX - MOVQ AX, 512(BP) - MOVQ $0xca273eceea26619c, DX - ADDQ AX, R15 - MOVQ R12, AX - ADDQ DX, R15 - MOVQ R12, CX - RORQ $0x0e, AX - MOVQ R12, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R12, CX - RORQ $0x29, DX - ANDQ R13, CX - XORQ AX, DX - MOVQ R12, AX - NOTQ AX - ADDQ DX, R15 - ANDQ R14, AX - XORQ CX, AX - ADDQ R15, AX - MOVQ R8, DI - MOVQ R10, BX - RORQ $0x1c, DI - MOVQ R8, DX - ANDQ R9, BX - RORQ $0x22, DX - MOVQ R8, CX - ANDQ R10, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R8, DX - MOVQ R9, CX - RORQ $0x27, DX - ANDQ R8, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R15 - ADDQ AX, R11 - ADDQ AX, R15 - MOVQ 504(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 400(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 464(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 392(BP), BX - ADDQ BX, AX - MOVQ AX, 520(BP) - MOVQ $0xd186b8c721c0c207, DX - ADDQ AX, R14 - MOVQ R11, AX - ADDQ DX, R14 - MOVQ R11, CX - RORQ $0x0e, AX - MOVQ R11, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R11, CX - RORQ $0x29, DX - ANDQ R12, CX - XORQ AX, DX - MOVQ R11, AX - NOTQ AX - ADDQ DX, R14 - ANDQ R13, AX - XORQ CX, AX - ADDQ R14, AX - MOVQ R15, DI - MOVQ R9, BX - RORQ $0x1c, DI - MOVQ R15, DX - ANDQ R8, BX - RORQ $0x22, DX - MOVQ R15, CX - ANDQ R9, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R15, DX - MOVQ R8, CX - RORQ $0x27, DX - ANDQ R15, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R14 - ADDQ AX, R10 - ADDQ AX, R14 - MOVQ 512(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 408(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 472(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 400(BP), BX - ADDQ BX, AX - MOVQ AX, 528(BP) - MOVQ $0xeada7dd6cde0eb1e, DX - ADDQ AX, R13 - MOVQ R10, AX - ADDQ DX, R13 - MOVQ R10, CX - RORQ $0x0e, AX - MOVQ R10, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R10, CX - RORQ $0x29, DX - ANDQ R11, CX - XORQ AX, DX - MOVQ R10, AX - NOTQ AX - ADDQ DX, R13 - ANDQ R12, AX - XORQ CX, AX - ADDQ R13, AX - MOVQ R14, DI - MOVQ R8, BX - RORQ $0x1c, DI - MOVQ R14, DX - ANDQ R15, BX - RORQ $0x22, DX - MOVQ R14, CX - ANDQ R8, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R14, DX - MOVQ R15, CX - RORQ $0x27, DX - ANDQ R14, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R13 - ADDQ AX, R9 - ADDQ AX, R13 - MOVQ 520(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 416(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 480(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 408(BP), BX - ADDQ BX, AX - MOVQ AX, 536(BP) - MOVQ $0xf57d4f7fee6ed178, DX - ADDQ AX, R12 - MOVQ R9, AX - ADDQ DX, R12 - MOVQ R9, CX - RORQ $0x0e, AX - MOVQ R9, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R9, CX - RORQ $0x29, DX - ANDQ R10, CX - XORQ AX, DX - MOVQ R9, AX - NOTQ AX - ADDQ DX, R12 - ANDQ R11, AX - XORQ CX, AX - ADDQ R12, AX - MOVQ R13, DI - MOVQ R15, BX - RORQ $0x1c, DI - MOVQ R13, DX - ANDQ R14, BX - RORQ $0x22, DX - MOVQ R13, CX - ANDQ R15, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R13, DX - MOVQ R14, CX - RORQ $0x27, DX - ANDQ R13, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R12 - ADDQ AX, R8 - ADDQ AX, R12 - MOVQ 528(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 424(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 488(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 416(BP), BX - ADDQ BX, AX - MOVQ AX, 544(BP) - MOVQ $0x06f067aa72176fba, DX - ADDQ AX, R11 - MOVQ R8, AX - ADDQ DX, R11 - MOVQ R8, CX - RORQ $0x0e, AX - MOVQ R8, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R8, CX - RORQ $0x29, DX - ANDQ R9, CX - XORQ AX, DX - MOVQ R8, AX - NOTQ AX - ADDQ DX, R11 - ANDQ R10, AX - XORQ CX, AX - ADDQ R11, AX - MOVQ R12, DI - MOVQ R14, BX - RORQ $0x1c, DI - MOVQ R12, DX - ANDQ R13, BX - RORQ $0x22, DX - MOVQ R12, CX - ANDQ R14, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R12, DX - MOVQ R13, CX - RORQ $0x27, DX - ANDQ R12, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R11 - ADDQ AX, R15 - ADDQ AX, R11 - MOVQ 536(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 432(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 496(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 424(BP), BX - ADDQ BX, AX - MOVQ AX, 552(BP) - MOVQ $0x0a637dc5a2c898a6, DX - ADDQ AX, R10 - MOVQ R15, AX - ADDQ DX, R10 - MOVQ R15, CX - RORQ $0x0e, AX - MOVQ R15, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R15, CX - RORQ $0x29, DX - ANDQ R8, CX - XORQ AX, DX - MOVQ R15, AX - NOTQ AX - ADDQ DX, R10 - ANDQ R9, AX - XORQ CX, AX - ADDQ R10, AX - MOVQ R11, DI - MOVQ R13, BX - RORQ $0x1c, DI - MOVQ R11, DX - ANDQ R12, BX - RORQ $0x22, DX - MOVQ R11, CX - ANDQ R13, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R11, DX - MOVQ R12, CX - RORQ $0x27, DX - ANDQ R11, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R10 - ADDQ AX, R14 - ADDQ AX, R10 - MOVQ 544(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 440(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 504(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 432(BP), BX - ADDQ BX, AX - MOVQ AX, 560(BP) - MOVQ $0x113f9804bef90dae, DX - ADDQ AX, R9 - MOVQ R14, AX - ADDQ DX, R9 - MOVQ R14, CX - RORQ $0x0e, AX - MOVQ R14, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R14, CX - RORQ $0x29, DX - ANDQ R15, CX - XORQ AX, DX - MOVQ R14, AX - NOTQ AX - ADDQ DX, R9 - ANDQ R8, AX - XORQ CX, AX - ADDQ R9, AX - MOVQ R10, DI - MOVQ R12, BX - RORQ $0x1c, DI - MOVQ R10, DX - ANDQ R11, BX - RORQ $0x22, DX - MOVQ R10, CX - ANDQ R12, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R10, DX - MOVQ R11, CX - RORQ $0x27, DX - ANDQ R10, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R9 - ADDQ AX, R13 - ADDQ AX, R9 - MOVQ 552(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 448(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 512(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 440(BP), BX - ADDQ BX, AX - MOVQ AX, 568(BP) - MOVQ $0x1b710b35131c471b, DX - ADDQ AX, R8 - MOVQ R13, AX - ADDQ DX, R8 - MOVQ R13, CX - RORQ $0x0e, AX - MOVQ R13, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R13, CX - RORQ $0x29, DX - ANDQ R14, CX - XORQ AX, DX - MOVQ R13, AX - NOTQ AX - ADDQ DX, R8 - ANDQ R15, AX - XORQ CX, AX - ADDQ R8, AX - MOVQ R9, DI - MOVQ R11, BX - RORQ $0x1c, DI - MOVQ R9, DX - ANDQ R10, BX - RORQ $0x22, DX - MOVQ R9, CX - ANDQ R11, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R9, DX - MOVQ R10, CX - RORQ $0x27, DX - ANDQ R9, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R8 - ADDQ AX, R12 - ADDQ AX, R8 - MOVQ 560(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 456(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 520(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 448(BP), BX - ADDQ BX, AX - MOVQ AX, 576(BP) - MOVQ $0x28db77f523047d84, DX - ADDQ AX, R15 - MOVQ R12, AX - ADDQ DX, R15 - MOVQ R12, CX - RORQ $0x0e, AX - MOVQ R12, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R12, CX - RORQ $0x29, DX - ANDQ R13, CX - XORQ AX, DX - MOVQ R12, AX - NOTQ AX - ADDQ DX, R15 - ANDQ R14, AX - XORQ CX, AX - ADDQ R15, AX - MOVQ R8, DI - MOVQ R10, BX - RORQ $0x1c, DI - MOVQ R8, DX - ANDQ R9, BX - RORQ $0x22, DX - MOVQ R8, CX - ANDQ R10, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R8, DX - MOVQ R9, CX - RORQ $0x27, DX - ANDQ R8, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R15 - ADDQ AX, R11 - ADDQ AX, R15 - MOVQ 568(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 464(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 528(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 456(BP), BX - ADDQ BX, AX - MOVQ AX, 584(BP) - MOVQ $0x32caab7b40c72493, DX - ADDQ AX, R14 - MOVQ R11, AX - ADDQ DX, R14 - MOVQ R11, CX - RORQ $0x0e, AX - MOVQ R11, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R11, CX - RORQ $0x29, DX - ANDQ R12, CX - XORQ AX, DX - MOVQ R11, AX - NOTQ AX - ADDQ DX, R14 - ANDQ R13, AX - XORQ CX, AX - ADDQ R14, AX - MOVQ R15, DI - MOVQ R9, BX - RORQ $0x1c, DI - MOVQ R15, DX - ANDQ R8, BX - RORQ $0x22, DX - MOVQ R15, CX - ANDQ R9, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R15, DX - MOVQ R8, CX - RORQ $0x27, DX - ANDQ R15, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R14 - ADDQ AX, R10 - ADDQ AX, R14 - MOVQ 576(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 472(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 536(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 464(BP), BX - ADDQ BX, AX - MOVQ AX, 592(BP) - MOVQ $0x3c9ebe0a15c9bebc, DX - ADDQ AX, R13 - MOVQ R10, AX - ADDQ DX, R13 - MOVQ R10, CX - RORQ $0x0e, AX - MOVQ R10, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R10, CX - RORQ $0x29, DX - ANDQ R11, CX - XORQ AX, DX - MOVQ R10, AX - NOTQ AX - ADDQ DX, R13 - ANDQ R12, AX - XORQ CX, AX - ADDQ R13, AX - MOVQ R14, DI - MOVQ R8, BX - RORQ $0x1c, DI - MOVQ R14, DX - ANDQ R15, BX - RORQ $0x22, DX - MOVQ R14, CX - ANDQ R8, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R14, DX - MOVQ R15, CX - RORQ $0x27, DX - ANDQ R14, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R13 - ADDQ AX, R9 - ADDQ AX, R13 - MOVQ 584(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 480(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 544(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 472(BP), BX - ADDQ BX, AX - MOVQ AX, 600(BP) - MOVQ $0x431d67c49c100d4c, DX - ADDQ AX, R12 - MOVQ R9, AX - ADDQ DX, R12 - MOVQ R9, CX - RORQ $0x0e, AX - MOVQ R9, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R9, CX - RORQ $0x29, DX - ANDQ R10, CX - XORQ AX, DX - MOVQ R9, AX - NOTQ AX - ADDQ DX, R12 - ANDQ R11, AX - XORQ CX, AX - ADDQ R12, AX - MOVQ R13, DI - MOVQ R15, BX - RORQ $0x1c, DI - MOVQ R13, DX - ANDQ R14, BX - RORQ $0x22, DX - MOVQ R13, CX - ANDQ R15, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R13, DX - MOVQ R14, CX - RORQ $0x27, DX - ANDQ R13, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R12 - ADDQ AX, R8 - ADDQ AX, R12 - MOVQ 592(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 488(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 552(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 480(BP), BX - ADDQ BX, AX - MOVQ AX, 608(BP) - MOVQ $0x4cc5d4becb3e42b6, DX - ADDQ AX, R11 - MOVQ R8, AX - ADDQ DX, R11 - MOVQ R8, CX - RORQ $0x0e, AX - MOVQ R8, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R8, CX - RORQ $0x29, DX - ANDQ R9, CX - XORQ AX, DX - MOVQ R8, AX - NOTQ AX - ADDQ DX, R11 - ANDQ R10, AX - XORQ CX, AX - ADDQ R11, AX - MOVQ R12, DI - MOVQ R14, BX - RORQ $0x1c, DI - MOVQ R12, DX - ANDQ R13, BX - RORQ $0x22, DX - MOVQ R12, CX - ANDQ R14, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R12, DX - MOVQ R13, CX - RORQ $0x27, DX - ANDQ R12, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R11 - ADDQ AX, R15 - ADDQ AX, R11 - MOVQ 600(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 496(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 560(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 488(BP), BX - ADDQ BX, AX - MOVQ AX, 616(BP) - MOVQ $0x597f299cfc657e2a, DX - ADDQ AX, R10 - MOVQ R15, AX - ADDQ DX, R10 - MOVQ R15, CX - RORQ $0x0e, AX - MOVQ R15, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R15, CX - RORQ $0x29, DX - ANDQ R8, CX - XORQ AX, DX - MOVQ R15, AX - NOTQ AX - ADDQ DX, R10 - ANDQ R9, AX - XORQ CX, AX - ADDQ R10, AX - MOVQ R11, DI - MOVQ R13, BX - RORQ $0x1c, DI - MOVQ R11, DX - ANDQ R12, BX - RORQ $0x22, DX - MOVQ R11, CX - ANDQ R13, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R11, DX - MOVQ R12, CX - RORQ $0x27, DX - ANDQ R11, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R10 - ADDQ AX, R14 - ADDQ AX, R10 - MOVQ 608(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 504(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 568(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 496(BP), BX - ADDQ BX, AX - MOVQ AX, 624(BP) - MOVQ $0x5fcb6fab3ad6faec, DX - ADDQ AX, R9 - MOVQ R14, AX - ADDQ DX, R9 - MOVQ R14, CX - RORQ $0x0e, AX - MOVQ R14, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R14, CX - RORQ $0x29, DX - ANDQ R15, CX - XORQ AX, DX - MOVQ R14, AX - NOTQ AX - ADDQ DX, R9 - ANDQ R8, AX - XORQ CX, AX - ADDQ R9, AX - MOVQ R10, DI - MOVQ R12, BX - RORQ $0x1c, DI - MOVQ R10, DX - ANDQ R11, BX - RORQ $0x22, DX - MOVQ R10, CX - ANDQ R12, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R10, DX - MOVQ R11, CX - RORQ $0x27, DX - ANDQ R10, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R9 - ADDQ AX, R13 - ADDQ AX, R9 - MOVQ 616(BP), AX - MOVQ AX, CX - RORQ $0x13, AX - MOVQ CX, DX - RORQ $0x3d, CX - SHRQ $0x06, DX - MOVQ 512(BP), BX - XORQ CX, AX - MOVQ BX, CX - XORQ DX, AX - RORQ $0x01, BX - MOVQ CX, DX - SHRQ $0x07, DX - RORQ $0x08, CX - ADDQ 576(BP), AX - XORQ CX, BX - XORQ DX, BX - ADDQ 504(BP), BX - ADDQ BX, AX - MOVQ AX, 632(BP) - MOVQ $0x6c44198c4a475817, DX - ADDQ AX, R8 - MOVQ R13, AX - ADDQ DX, R8 - MOVQ R13, CX - RORQ $0x0e, AX - MOVQ R13, DX - RORQ $0x12, CX - XORQ CX, AX - MOVQ R13, CX - RORQ $0x29, DX - ANDQ R14, CX - XORQ AX, DX - MOVQ R13, AX - NOTQ AX - ADDQ DX, R8 - ANDQ R15, AX - XORQ CX, AX - ADDQ R8, AX - MOVQ R9, DI - MOVQ R11, BX - RORQ $0x1c, DI - MOVQ R9, DX - ANDQ R10, BX - RORQ $0x22, DX - MOVQ R9, CX - ANDQ R11, CX - XORQ DX, DI - XORQ CX, BX - MOVQ R9, DX - MOVQ R10, CX - RORQ $0x27, DX - ANDQ R9, CX - XORQ CX, BX - XORQ DX, DI - ADDQ DI, BX - MOVQ BX, R8 - ADDQ AX, R12 - ADDQ AX, R8 - MOVQ dig+0(FP), BP - ADDQ (BP), R8 - MOVQ R8, (BP) - ADDQ 8(BP), R9 - MOVQ R9, 8(BP) - ADDQ 16(BP), R10 - MOVQ R10, 16(BP) - ADDQ 24(BP), R11 - MOVQ R11, 24(BP) - ADDQ 32(BP), R12 - MOVQ R12, 32(BP) - ADDQ 40(BP), R13 - MOVQ R13, 40(BP) - ADDQ 48(BP), R14 - MOVQ R14, 48(BP) - ADDQ 56(BP), R15 - MOVQ R15, 56(BP) - ADDQ $0x80, SI - CMPQ SI, 640(SP) - JB loop - -end: - RET - -DATA PSHUFFLE_BYTE_FLIP_MASK<>+0(SB)/8, $0x0001020304050607 -DATA PSHUFFLE_BYTE_FLIP_MASK<>+8(SB)/8, $0x08090a0b0c0d0e0f -DATA PSHUFFLE_BYTE_FLIP_MASK<>+16(SB)/8, $0x1011121314151617 -DATA PSHUFFLE_BYTE_FLIP_MASK<>+24(SB)/8, $0x18191a1b1c1d1e1f -GLOBL PSHUFFLE_BYTE_FLIP_MASK<>(SB), RODATA|NOPTR, $32 - // func blockAVX2(dig *Digest, p []byte) // Requires: AVX, AVX2, BMI2 TEXT ·blockAVX2(SB), NOSPLIT, $56-32 @@ -5391,6 +891,12 @@ done_hash: VZEROUPPER RET +DATA PSHUFFLE_BYTE_FLIP_MASK<>+0(SB)/8, $0x0001020304050607 +DATA PSHUFFLE_BYTE_FLIP_MASK<>+8(SB)/8, $0x08090a0b0c0d0e0f +DATA PSHUFFLE_BYTE_FLIP_MASK<>+16(SB)/8, $0x1011121314151617 +DATA PSHUFFLE_BYTE_FLIP_MASK<>+24(SB)/8, $0x18191a1b1c1d1e1f +GLOBL PSHUFFLE_BYTE_FLIP_MASK<>(SB), RODATA|NOPTR, $32 + DATA MASK_YMM_LO<>+0(SB)/8, $0x0000000000000000 DATA MASK_YMM_LO<>+8(SB)/8, $0x0000000000000000 DATA MASK_YMM_LO<>+16(SB)/8, $0xffffffffffffffff diff --git a/src/crypto/internal/fips140/ssh/kdf.go b/src/crypto/internal/fips140/ssh/kdf.go index 837af199c4..431deda8dd 100644 --- a/src/crypto/internal/fips140/ssh/kdf.go +++ b/src/crypto/internal/fips140/ssh/kdf.go @@ -7,8 +7,8 @@ package ssh import ( - "crypto/internal/fips140" _ "crypto/internal/fips140/check" + "hash" ) type Direction struct { @@ -24,7 +24,7 @@ func init() { ClientKeys = Direction{[]byte{'A'}, []byte{'C'}, []byte{'E'}} } -func Keys[Hash fips140.Hash](hash func() Hash, d Direction, +func Keys[Hash hash.Hash](hash func() Hash, d Direction, K, H, sessionID []byte, ivKeyLen, keyLen, macKeyLen int, ) (ivKey, key, macKey []byte) { diff --git a/src/crypto/internal/fips140/tls12/tls12.go b/src/crypto/internal/fips140/tls12/tls12.go index b07e02c85f..5b4dcae101 100644 --- a/src/crypto/internal/fips140/tls12/tls12.go +++ b/src/crypto/internal/fips140/tls12/tls12.go @@ -9,11 +9,12 @@ import ( "crypto/internal/fips140/hmac" "crypto/internal/fips140/sha256" "crypto/internal/fips140/sha512" + "hash" ) // PRF implements the TLS 1.2 pseudo-random function, as defined in RFC 5246, // Section 5 and allowed by SP 800-135, Revision 1, Section 4.2.2. -func PRF[H fips140.Hash](hash func() H, secret []byte, label string, seed []byte, keyLen int) []byte { +func PRF[H hash.Hash](hash func() H, secret []byte, label string, seed []byte, keyLen int) []byte { labelAndSeed := make([]byte, len(label)+len(seed)) copy(labelAndSeed, label) copy(labelAndSeed[len(label):], seed) @@ -24,7 +25,7 @@ func PRF[H fips140.Hash](hash func() H, secret []byte, label string, seed []byte } // pHash implements the P_hash function, as defined in RFC 5246, Section 5. -func pHash[H fips140.Hash](hash func() H, result, secret, seed []byte) { +func pHash[H hash.Hash](hash func() H, result, secret, seed []byte) { h := hmac.New(hash, secret) h.Write(seed) a := h.Sum(nil) @@ -48,7 +49,7 @@ const extendedMasterSecretLabel = "extended master secret" // MasterSecret implements the TLS 1.2 extended master secret derivation, as // defined in RFC 7627 and allowed by SP 800-135, Revision 1, Section 4.2.2. -func MasterSecret[H fips140.Hash](hash func() H, preMasterSecret, transcript []byte) []byte { +func MasterSecret[H hash.Hash](hash func() H, preMasterSecret, transcript []byte) []byte { // "The TLS 1.2 KDF is an approved KDF when the following conditions are // satisfied: [...] (3) P_HASH uses either SHA-256, SHA-384 or SHA-512." h := hash() diff --git a/src/crypto/internal/fips140/tls13/tls13.go b/src/crypto/internal/fips140/tls13/tls13.go index 009844a507..f2c2423a25 100644 --- a/src/crypto/internal/fips140/tls13/tls13.go +++ b/src/crypto/internal/fips140/tls13/tls13.go @@ -7,9 +7,9 @@ package tls13 import ( - "crypto/internal/fips140" "crypto/internal/fips140/hkdf" "crypto/internal/fips140deps/byteorder" + "hash" ) // We don't set the service indicator in this package but we delegate that to @@ -17,7 +17,7 @@ import ( // its own. // ExpandLabel implements HKDF-Expand-Label from RFC 8446, Section 7.1. -func ExpandLabel[H fips140.Hash](hash func() H, secret []byte, label string, context []byte, length int) []byte { +func ExpandLabel[H hash.Hash](hash func() H, secret []byte, label string, context []byte, length int) []byte { if len("tls13 ")+len(label) > 255 || len(context) > 255 { // It should be impossible for this to panic: labels are fixed strings, // and context is either a fixed-length computed hash, or parsed from a @@ -39,14 +39,14 @@ func ExpandLabel[H fips140.Hash](hash func() H, secret []byte, label string, con return hkdf.Expand(hash, secret, string(hkdfLabel), length) } -func extract[H fips140.Hash](hash func() H, newSecret, currentSecret []byte) []byte { +func extract[H hash.Hash](hash func() H, newSecret, currentSecret []byte) []byte { if newSecret == nil { newSecret = make([]byte, hash().Size()) } return hkdf.Extract(hash, newSecret, currentSecret) } -func deriveSecret[H fips140.Hash](hash func() H, secret []byte, label string, transcript fips140.Hash) []byte { +func deriveSecret[H hash.Hash](hash func() H, secret []byte, label string, transcript hash.Hash) []byte { if transcript == nil { transcript = hash() } @@ -67,13 +67,13 @@ const ( type EarlySecret struct { secret []byte - hash func() fips140.Hash + hash func() hash.Hash } -func NewEarlySecret[H fips140.Hash](hash func() H, psk []byte) *EarlySecret { +func NewEarlySecret[H hash.Hash](h func() H, psk []byte) *EarlySecret { return &EarlySecret{ - secret: extract(hash, psk, nil), - hash: func() fips140.Hash { return hash() }, + secret: extract(h, psk, nil), + hash: func() hash.Hash { return h() }, } } @@ -83,13 +83,13 @@ func (s *EarlySecret) ResumptionBinderKey() []byte { // ClientEarlyTrafficSecret derives the client_early_traffic_secret from the // early secret and the transcript up to the ClientHello. -func (s *EarlySecret) ClientEarlyTrafficSecret(transcript fips140.Hash) []byte { +func (s *EarlySecret) ClientEarlyTrafficSecret(transcript hash.Hash) []byte { return deriveSecret(s.hash, s.secret, clientEarlyTrafficLabel, transcript) } type HandshakeSecret struct { secret []byte - hash func() fips140.Hash + hash func() hash.Hash } func (s *EarlySecret) HandshakeSecret(sharedSecret []byte) *HandshakeSecret { @@ -102,19 +102,19 @@ func (s *EarlySecret) HandshakeSecret(sharedSecret []byte) *HandshakeSecret { // ClientHandshakeTrafficSecret derives the client_handshake_traffic_secret from // the handshake secret and the transcript up to the ServerHello. -func (s *HandshakeSecret) ClientHandshakeTrafficSecret(transcript fips140.Hash) []byte { +func (s *HandshakeSecret) ClientHandshakeTrafficSecret(transcript hash.Hash) []byte { return deriveSecret(s.hash, s.secret, clientHandshakeTrafficLabel, transcript) } // ServerHandshakeTrafficSecret derives the server_handshake_traffic_secret from // the handshake secret and the transcript up to the ServerHello. -func (s *HandshakeSecret) ServerHandshakeTrafficSecret(transcript fips140.Hash) []byte { +func (s *HandshakeSecret) ServerHandshakeTrafficSecret(transcript hash.Hash) []byte { return deriveSecret(s.hash, s.secret, serverHandshakeTrafficLabel, transcript) } type MasterSecret struct { secret []byte - hash func() fips140.Hash + hash func() hash.Hash } func (s *HandshakeSecret) MasterSecret() *MasterSecret { @@ -127,30 +127,30 @@ func (s *HandshakeSecret) MasterSecret() *MasterSecret { // ClientApplicationTrafficSecret derives the client_application_traffic_secret_0 // from the master secret and the transcript up to the server Finished. -func (s *MasterSecret) ClientApplicationTrafficSecret(transcript fips140.Hash) []byte { +func (s *MasterSecret) ClientApplicationTrafficSecret(transcript hash.Hash) []byte { return deriveSecret(s.hash, s.secret, clientApplicationTrafficLabel, transcript) } // ServerApplicationTrafficSecret derives the server_application_traffic_secret_0 // from the master secret and the transcript up to the server Finished. -func (s *MasterSecret) ServerApplicationTrafficSecret(transcript fips140.Hash) []byte { +func (s *MasterSecret) ServerApplicationTrafficSecret(transcript hash.Hash) []byte { return deriveSecret(s.hash, s.secret, serverApplicationTrafficLabel, transcript) } // ResumptionMasterSecret derives the resumption_master_secret from the master secret // and the transcript up to the client Finished. -func (s *MasterSecret) ResumptionMasterSecret(transcript fips140.Hash) []byte { +func (s *MasterSecret) ResumptionMasterSecret(transcript hash.Hash) []byte { return deriveSecret(s.hash, s.secret, resumptionLabel, transcript) } type ExporterMasterSecret struct { secret []byte - hash func() fips140.Hash + hash func() hash.Hash } // ExporterMasterSecret derives the exporter_master_secret from the master secret // and the transcript up to the server Finished. -func (s *MasterSecret) ExporterMasterSecret(transcript fips140.Hash) *ExporterMasterSecret { +func (s *MasterSecret) ExporterMasterSecret(transcript hash.Hash) *ExporterMasterSecret { return &ExporterMasterSecret{ secret: deriveSecret(s.hash, s.secret, exporterLabel, transcript), hash: s.hash, @@ -159,7 +159,7 @@ func (s *MasterSecret) ExporterMasterSecret(transcript fips140.Hash) *ExporterMa // EarlyExporterMasterSecret derives the exporter_master_secret from the early secret // and the transcript up to the ClientHello. -func (s *EarlySecret) EarlyExporterMasterSecret(transcript fips140.Hash) *ExporterMasterSecret { +func (s *EarlySecret) EarlyExporterMasterSecret(transcript hash.Hash) *ExporterMasterSecret { return &ExporterMasterSecret{ secret: deriveSecret(s.hash, s.secret, earlyExporterLabel, transcript), hash: s.hash, diff --git a/src/crypto/internal/fips140deps/cpu/cpu.go b/src/crypto/internal/fips140deps/cpu/cpu.go index 311e4f541b..2dfcc1a4d4 100644 --- a/src/crypto/internal/fips140deps/cpu/cpu.go +++ b/src/crypto/internal/fips140deps/cpu/cpu.go @@ -22,6 +22,7 @@ var ( ARM64HasPMULL = cpu.ARM64.HasPMULL ARM64HasSHA2 = cpu.ARM64.HasSHA2 ARM64HasSHA512 = cpu.ARM64.HasSHA512 + ARM64HasSHA3 = cpu.ARM64.HasSHA3 LOONG64HasLSX = cpu.Loong64.HasLSX LOONG64HasLASX = cpu.Loong64.HasLASX diff --git a/src/crypto/internal/fips140test/acvp_test.go b/src/crypto/internal/fips140test/acvp_test.go index ddb234bab6..5871bde8be 100644 --- a/src/crypto/internal/fips140test/acvp_test.go +++ b/src/crypto/internal/fips140test/acvp_test.go @@ -50,6 +50,7 @@ import ( "encoding/binary" "errors" "fmt" + "hash" "internal/testenv" "io" "math/big" @@ -198,32 +199,32 @@ var ( "cSHAKE-256": cmdCShakeAft(func(N, S []byte) *sha3.SHAKE { return sha3.NewCShake256(N, S) }), "cSHAKE-256/MCT": cmdCShakeMct(func(N, S []byte) *sha3.SHAKE { return sha3.NewCShake256(N, S) }), - "HMAC-SHA2-224": cmdHmacAft(func() fips140.Hash { return sha256.New224() }), - "HMAC-SHA2-256": cmdHmacAft(func() fips140.Hash { return sha256.New() }), - "HMAC-SHA2-384": cmdHmacAft(func() fips140.Hash { return sha512.New384() }), - "HMAC-SHA2-512": cmdHmacAft(func() fips140.Hash { return sha512.New() }), - "HMAC-SHA2-512/224": cmdHmacAft(func() fips140.Hash { return sha512.New512_224() }), - "HMAC-SHA2-512/256": cmdHmacAft(func() fips140.Hash { return sha512.New512_256() }), - "HMAC-SHA3-224": cmdHmacAft(func() fips140.Hash { return sha3.New224() }), - "HMAC-SHA3-256": cmdHmacAft(func() fips140.Hash { return sha3.New256() }), - "HMAC-SHA3-384": cmdHmacAft(func() fips140.Hash { return sha3.New384() }), - "HMAC-SHA3-512": cmdHmacAft(func() fips140.Hash { return sha3.New512() }), + "HMAC-SHA2-224": cmdHmacAft(func() hash.Hash { return sha256.New224() }), + "HMAC-SHA2-256": cmdHmacAft(func() hash.Hash { return sha256.New() }), + "HMAC-SHA2-384": cmdHmacAft(func() hash.Hash { return sha512.New384() }), + "HMAC-SHA2-512": cmdHmacAft(func() hash.Hash { return sha512.New() }), + "HMAC-SHA2-512/224": cmdHmacAft(func() hash.Hash { return sha512.New512_224() }), + "HMAC-SHA2-512/256": cmdHmacAft(func() hash.Hash { return sha512.New512_256() }), + "HMAC-SHA3-224": cmdHmacAft(func() hash.Hash { return sha3.New224() }), + "HMAC-SHA3-256": cmdHmacAft(func() hash.Hash { return sha3.New256() }), + "HMAC-SHA3-384": cmdHmacAft(func() hash.Hash { return sha3.New384() }), + "HMAC-SHA3-512": cmdHmacAft(func() hash.Hash { return sha3.New512() }), - "HKDF/SHA2-224": cmdHkdfAft(func() fips140.Hash { return sha256.New224() }), - "HKDF/SHA2-256": cmdHkdfAft(func() fips140.Hash { return sha256.New() }), - "HKDF/SHA2-384": cmdHkdfAft(func() fips140.Hash { return sha512.New384() }), - "HKDF/SHA2-512": cmdHkdfAft(func() fips140.Hash { return sha512.New() }), - "HKDF/SHA2-512/224": cmdHkdfAft(func() fips140.Hash { return sha512.New512_224() }), - "HKDF/SHA2-512/256": cmdHkdfAft(func() fips140.Hash { return sha512.New512_256() }), - "HKDF/SHA3-224": cmdHkdfAft(func() fips140.Hash { return sha3.New224() }), - "HKDF/SHA3-256": cmdHkdfAft(func() fips140.Hash { return sha3.New256() }), - "HKDF/SHA3-384": cmdHkdfAft(func() fips140.Hash { return sha3.New384() }), - "HKDF/SHA3-512": cmdHkdfAft(func() fips140.Hash { return sha3.New512() }), + "HKDF/SHA2-224": cmdHkdfAft(func() hash.Hash { return sha256.New224() }), + "HKDF/SHA2-256": cmdHkdfAft(func() hash.Hash { return sha256.New() }), + "HKDF/SHA2-384": cmdHkdfAft(func() hash.Hash { return sha512.New384() }), + "HKDF/SHA2-512": cmdHkdfAft(func() hash.Hash { return sha512.New() }), + "HKDF/SHA2-512/224": cmdHkdfAft(func() hash.Hash { return sha512.New512_224() }), + "HKDF/SHA2-512/256": cmdHkdfAft(func() hash.Hash { return sha512.New512_256() }), + "HKDF/SHA3-224": cmdHkdfAft(func() hash.Hash { return sha3.New224() }), + "HKDF/SHA3-256": cmdHkdfAft(func() hash.Hash { return sha3.New256() }), + "HKDF/SHA3-384": cmdHkdfAft(func() hash.Hash { return sha3.New384() }), + "HKDF/SHA3-512": cmdHkdfAft(func() hash.Hash { return sha3.New512() }), - "HKDFExtract/SHA2-256": cmdHkdfExtractAft(func() fips140.Hash { return sha256.New() }), - "HKDFExtract/SHA2-384": cmdHkdfExtractAft(func() fips140.Hash { return sha512.New384() }), - "HKDFExpandLabel/SHA2-256": cmdHkdfExpandLabelAft(func() fips140.Hash { return sha256.New() }), - "HKDFExpandLabel/SHA2-384": cmdHkdfExpandLabelAft(func() fips140.Hash { return sha512.New384() }), + "HKDFExtract/SHA2-256": cmdHkdfExtractAft(func() hash.Hash { return sha256.New() }), + "HKDFExtract/SHA2-384": cmdHkdfExtractAft(func() hash.Hash { return sha512.New384() }), + "HKDFExpandLabel/SHA2-256": cmdHkdfExpandLabelAft(func() hash.Hash { return sha256.New() }), + "HKDFExpandLabel/SHA2-384": cmdHkdfExpandLabelAft(func() hash.Hash { return sha512.New384() }), "PBKDF": cmdPbkdf(), @@ -234,16 +235,16 @@ var ( "ML-KEM-1024/encap": cmdMlKem1024EncapAft(), "ML-KEM-1024/decap": cmdMlKem1024DecapAft(), - "hmacDRBG/SHA2-224": cmdHmacDrbgAft(func() fips140.Hash { return sha256.New224() }), - "hmacDRBG/SHA2-256": cmdHmacDrbgAft(func() fips140.Hash { return sha256.New() }), - "hmacDRBG/SHA2-384": cmdHmacDrbgAft(func() fips140.Hash { return sha512.New384() }), - "hmacDRBG/SHA2-512": cmdHmacDrbgAft(func() fips140.Hash { return sha512.New() }), - "hmacDRBG/SHA2-512/224": cmdHmacDrbgAft(func() fips140.Hash { return sha512.New512_224() }), - "hmacDRBG/SHA2-512/256": cmdHmacDrbgAft(func() fips140.Hash { return sha512.New512_256() }), - "hmacDRBG/SHA3-224": cmdHmacDrbgAft(func() fips140.Hash { return sha3.New224() }), - "hmacDRBG/SHA3-256": cmdHmacDrbgAft(func() fips140.Hash { return sha3.New256() }), - "hmacDRBG/SHA3-384": cmdHmacDrbgAft(func() fips140.Hash { return sha3.New384() }), - "hmacDRBG/SHA3-512": cmdHmacDrbgAft(func() fips140.Hash { return sha3.New512() }), + "hmacDRBG/SHA2-224": cmdHmacDrbgAft(func() hash.Hash { return sha256.New224() }), + "hmacDRBG/SHA2-256": cmdHmacDrbgAft(func() hash.Hash { return sha256.New() }), + "hmacDRBG/SHA2-384": cmdHmacDrbgAft(func() hash.Hash { return sha512.New384() }), + "hmacDRBG/SHA2-512": cmdHmacDrbgAft(func() hash.Hash { return sha512.New() }), + "hmacDRBG/SHA2-512/224": cmdHmacDrbgAft(func() hash.Hash { return sha512.New512_224() }), + "hmacDRBG/SHA2-512/256": cmdHmacDrbgAft(func() hash.Hash { return sha512.New512_256() }), + "hmacDRBG/SHA3-224": cmdHmacDrbgAft(func() hash.Hash { return sha3.New224() }), + "hmacDRBG/SHA3-256": cmdHmacDrbgAft(func() hash.Hash { return sha3.New256() }), + "hmacDRBG/SHA3-384": cmdHmacDrbgAft(func() hash.Hash { return sha3.New384() }), + "hmacDRBG/SHA3-512": cmdHmacDrbgAft(func() hash.Hash { return sha3.New512() }), "EDDSA/keyGen": cmdEddsaKeyGenAft(), "EDDSA/keyVer": cmdEddsaKeyVerAft(), @@ -270,20 +271,20 @@ var ( // Note: Only SHA2-256, SHA2-384 and SHA2-512 are valid hash functions for TLSKDF. // See https://pages.nist.gov/ACVP/draft-celi-acvp-kdf-tls.html#section-7.2.1 - "TLSKDF/1.2/SHA2-256": cmdTlsKdf12Aft(func() fips140.Hash { return sha256.New() }), - "TLSKDF/1.2/SHA2-384": cmdTlsKdf12Aft(func() fips140.Hash { return sha512.New384() }), - "TLSKDF/1.2/SHA2-512": cmdTlsKdf12Aft(func() fips140.Hash { return sha512.New() }), + "TLSKDF/1.2/SHA2-256": cmdTlsKdf12Aft(func() hash.Hash { return sha256.New() }), + "TLSKDF/1.2/SHA2-384": cmdTlsKdf12Aft(func() hash.Hash { return sha512.New384() }), + "TLSKDF/1.2/SHA2-512": cmdTlsKdf12Aft(func() hash.Hash { return sha512.New() }), // Note: only SHA2-224, SHA2-256, SHA2-384 and SHA2-512 are valid hash functions for SSHKDF. // See https://pages.nist.gov/ACVP/draft-celi-acvp-kdf-ssh.html#section-7.2.1 - "SSHKDF/SHA2-224/client": cmdSshKdfAft(func() fips140.Hash { return sha256.New224() }, ssh.ClientKeys), - "SSHKDF/SHA2-224/server": cmdSshKdfAft(func() fips140.Hash { return sha256.New224() }, ssh.ServerKeys), - "SSHKDF/SHA2-256/client": cmdSshKdfAft(func() fips140.Hash { return sha256.New() }, ssh.ClientKeys), - "SSHKDF/SHA2-256/server": cmdSshKdfAft(func() fips140.Hash { return sha256.New() }, ssh.ServerKeys), - "SSHKDF/SHA2-384/client": cmdSshKdfAft(func() fips140.Hash { return sha512.New384() }, ssh.ClientKeys), - "SSHKDF/SHA2-384/server": cmdSshKdfAft(func() fips140.Hash { return sha512.New384() }, ssh.ServerKeys), - "SSHKDF/SHA2-512/client": cmdSshKdfAft(func() fips140.Hash { return sha512.New() }, ssh.ClientKeys), - "SSHKDF/SHA2-512/server": cmdSshKdfAft(func() fips140.Hash { return sha512.New() }, ssh.ServerKeys), + "SSHKDF/SHA2-224/client": cmdSshKdfAft(func() hash.Hash { return sha256.New224() }, ssh.ClientKeys), + "SSHKDF/SHA2-224/server": cmdSshKdfAft(func() hash.Hash { return sha256.New224() }, ssh.ServerKeys), + "SSHKDF/SHA2-256/client": cmdSshKdfAft(func() hash.Hash { return sha256.New() }, ssh.ClientKeys), + "SSHKDF/SHA2-256/server": cmdSshKdfAft(func() hash.Hash { return sha256.New() }, ssh.ServerKeys), + "SSHKDF/SHA2-384/client": cmdSshKdfAft(func() hash.Hash { return sha512.New384() }, ssh.ClientKeys), + "SSHKDF/SHA2-384/server": cmdSshKdfAft(func() hash.Hash { return sha512.New384() }, ssh.ServerKeys), + "SSHKDF/SHA2-512/client": cmdSshKdfAft(func() hash.Hash { return sha512.New() }, ssh.ClientKeys), + "SSHKDF/SHA2-512/server": cmdSshKdfAft(func() hash.Hash { return sha512.New() }, ssh.ServerKeys), "ECDH/P-224": cmdEcdhAftVal(ecdh.P224()), "ECDH/P-256": cmdEcdhAftVal(ecdh.P256()), @@ -295,58 +296,58 @@ var ( "RSA/keyGen": cmdRsaKeyGenAft(), - "RSA/sigGen/SHA2-224/pkcs1v1.5": cmdRsaSigGenAft(func() fips140.Hash { return sha256.New224() }, "SHA-224", false), - "RSA/sigGen/SHA2-256/pkcs1v1.5": cmdRsaSigGenAft(func() fips140.Hash { return sha256.New() }, "SHA-256", false), - "RSA/sigGen/SHA2-384/pkcs1v1.5": cmdRsaSigGenAft(func() fips140.Hash { return sha512.New384() }, "SHA-384", false), - "RSA/sigGen/SHA2-512/pkcs1v1.5": cmdRsaSigGenAft(func() fips140.Hash { return sha512.New() }, "SHA-512", false), - "RSA/sigGen/SHA2-224/pss": cmdRsaSigGenAft(func() fips140.Hash { return sha256.New224() }, "SHA-224", true), - "RSA/sigGen/SHA2-256/pss": cmdRsaSigGenAft(func() fips140.Hash { return sha256.New() }, "SHA-256", true), - "RSA/sigGen/SHA2-384/pss": cmdRsaSigGenAft(func() fips140.Hash { return sha512.New384() }, "SHA-384", true), - "RSA/sigGen/SHA2-512/pss": cmdRsaSigGenAft(func() fips140.Hash { return sha512.New() }, "SHA-512", true), + "RSA/sigGen/SHA2-224/pkcs1v1.5": cmdRsaSigGenAft(func() hash.Hash { return sha256.New224() }, "SHA-224", false), + "RSA/sigGen/SHA2-256/pkcs1v1.5": cmdRsaSigGenAft(func() hash.Hash { return sha256.New() }, "SHA-256", false), + "RSA/sigGen/SHA2-384/pkcs1v1.5": cmdRsaSigGenAft(func() hash.Hash { return sha512.New384() }, "SHA-384", false), + "RSA/sigGen/SHA2-512/pkcs1v1.5": cmdRsaSigGenAft(func() hash.Hash { return sha512.New() }, "SHA-512", false), + "RSA/sigGen/SHA2-224/pss": cmdRsaSigGenAft(func() hash.Hash { return sha256.New224() }, "SHA-224", true), + "RSA/sigGen/SHA2-256/pss": cmdRsaSigGenAft(func() hash.Hash { return sha256.New() }, "SHA-256", true), + "RSA/sigGen/SHA2-384/pss": cmdRsaSigGenAft(func() hash.Hash { return sha512.New384() }, "SHA-384", true), + "RSA/sigGen/SHA2-512/pss": cmdRsaSigGenAft(func() hash.Hash { return sha512.New() }, "SHA-512", true), - "RSA/sigVer/SHA2-224/pkcs1v1.5": cmdRsaSigVerAft(func() fips140.Hash { return sha256.New224() }, "SHA-224", false), - "RSA/sigVer/SHA2-256/pkcs1v1.5": cmdRsaSigVerAft(func() fips140.Hash { return sha256.New() }, "SHA-256", false), - "RSA/sigVer/SHA2-384/pkcs1v1.5": cmdRsaSigVerAft(func() fips140.Hash { return sha512.New384() }, "SHA-384", false), - "RSA/sigVer/SHA2-512/pkcs1v1.5": cmdRsaSigVerAft(func() fips140.Hash { return sha512.New() }, "SHA-512", false), - "RSA/sigVer/SHA2-224/pss": cmdRsaSigVerAft(func() fips140.Hash { return sha256.New224() }, "SHA-224", true), - "RSA/sigVer/SHA2-256/pss": cmdRsaSigVerAft(func() fips140.Hash { return sha256.New() }, "SHA-256", true), - "RSA/sigVer/SHA2-384/pss": cmdRsaSigVerAft(func() fips140.Hash { return sha512.New384() }, "SHA-384", true), - "RSA/sigVer/SHA2-512/pss": cmdRsaSigVerAft(func() fips140.Hash { return sha512.New() }, "SHA-512", true), + "RSA/sigVer/SHA2-224/pkcs1v1.5": cmdRsaSigVerAft(func() hash.Hash { return sha256.New224() }, "SHA-224", false), + "RSA/sigVer/SHA2-256/pkcs1v1.5": cmdRsaSigVerAft(func() hash.Hash { return sha256.New() }, "SHA-256", false), + "RSA/sigVer/SHA2-384/pkcs1v1.5": cmdRsaSigVerAft(func() hash.Hash { return sha512.New384() }, "SHA-384", false), + "RSA/sigVer/SHA2-512/pkcs1v1.5": cmdRsaSigVerAft(func() hash.Hash { return sha512.New() }, "SHA-512", false), + "RSA/sigVer/SHA2-224/pss": cmdRsaSigVerAft(func() hash.Hash { return sha256.New224() }, "SHA-224", true), + "RSA/sigVer/SHA2-256/pss": cmdRsaSigVerAft(func() hash.Hash { return sha256.New() }, "SHA-256", true), + "RSA/sigVer/SHA2-384/pss": cmdRsaSigVerAft(func() hash.Hash { return sha512.New384() }, "SHA-384", true), + "RSA/sigVer/SHA2-512/pss": cmdRsaSigVerAft(func() hash.Hash { return sha512.New() }, "SHA-512", true), "KDF-counter": cmdKdfCounterAft(), "KDF-feedback": cmdKdfFeedbackAft(), - "OneStepNoCounter/HMAC-SHA2-224": cmdOneStepNoCounterHmacAft(func() fips140.Hash { return sha256.New224() }), - "OneStepNoCounter/HMAC-SHA2-256": cmdOneStepNoCounterHmacAft(func() fips140.Hash { return sha256.New() }), - "OneStepNoCounter/HMAC-SHA2-384": cmdOneStepNoCounterHmacAft(func() fips140.Hash { return sha512.New384() }), - "OneStepNoCounter/HMAC-SHA2-512": cmdOneStepNoCounterHmacAft(func() fips140.Hash { return sha512.New() }), - "OneStepNoCounter/HMAC-SHA2-512/224": cmdOneStepNoCounterHmacAft(func() fips140.Hash { return sha512.New512_224() }), - "OneStepNoCounter/HMAC-SHA2-512/256": cmdOneStepNoCounterHmacAft(func() fips140.Hash { return sha512.New512_256() }), - "OneStepNoCounter/HMAC-SHA3-224": cmdOneStepNoCounterHmacAft(func() fips140.Hash { return sha3.New224() }), - "OneStepNoCounter/HMAC-SHA3-256": cmdOneStepNoCounterHmacAft(func() fips140.Hash { return sha3.New256() }), - "OneStepNoCounter/HMAC-SHA3-384": cmdOneStepNoCounterHmacAft(func() fips140.Hash { return sha3.New384() }), - "OneStepNoCounter/HMAC-SHA3-512": cmdOneStepNoCounterHmacAft(func() fips140.Hash { return sha3.New512() }), + "OneStepNoCounter/HMAC-SHA2-224": cmdOneStepNoCounterHmacAft(func() hash.Hash { return sha256.New224() }), + "OneStepNoCounter/HMAC-SHA2-256": cmdOneStepNoCounterHmacAft(func() hash.Hash { return sha256.New() }), + "OneStepNoCounter/HMAC-SHA2-384": cmdOneStepNoCounterHmacAft(func() hash.Hash { return sha512.New384() }), + "OneStepNoCounter/HMAC-SHA2-512": cmdOneStepNoCounterHmacAft(func() hash.Hash { return sha512.New() }), + "OneStepNoCounter/HMAC-SHA2-512/224": cmdOneStepNoCounterHmacAft(func() hash.Hash { return sha512.New512_224() }), + "OneStepNoCounter/HMAC-SHA2-512/256": cmdOneStepNoCounterHmacAft(func() hash.Hash { return sha512.New512_256() }), + "OneStepNoCounter/HMAC-SHA3-224": cmdOneStepNoCounterHmacAft(func() hash.Hash { return sha3.New224() }), + "OneStepNoCounter/HMAC-SHA3-256": cmdOneStepNoCounterHmacAft(func() hash.Hash { return sha3.New256() }), + "OneStepNoCounter/HMAC-SHA3-384": cmdOneStepNoCounterHmacAft(func() hash.Hash { return sha3.New384() }), + "OneStepNoCounter/HMAC-SHA3-512": cmdOneStepNoCounterHmacAft(func() hash.Hash { return sha3.New512() }), - "KTS-IFC/SHA2-224/initiator": cmdKtsIfcInitiatorAft(func() fips140.Hash { return sha256.New224() }), - "KTS-IFC/SHA2-224/responder": cmdKtsIfcResponderAft(func() fips140.Hash { return sha256.New224() }), - "KTS-IFC/SHA2-256/initiator": cmdKtsIfcInitiatorAft(func() fips140.Hash { return sha256.New() }), - "KTS-IFC/SHA2-256/responder": cmdKtsIfcResponderAft(func() fips140.Hash { return sha256.New() }), - "KTS-IFC/SHA2-384/initiator": cmdKtsIfcInitiatorAft(func() fips140.Hash { return sha512.New384() }), - "KTS-IFC/SHA2-384/responder": cmdKtsIfcResponderAft(func() fips140.Hash { return sha512.New384() }), - "KTS-IFC/SHA2-512/initiator": cmdKtsIfcInitiatorAft(func() fips140.Hash { return sha512.New() }), - "KTS-IFC/SHA2-512/responder": cmdKtsIfcResponderAft(func() fips140.Hash { return sha512.New() }), - "KTS-IFC/SHA2-512/224/initiator": cmdKtsIfcInitiatorAft(func() fips140.Hash { return sha512.New512_224() }), - "KTS-IFC/SHA2-512/224/responder": cmdKtsIfcResponderAft(func() fips140.Hash { return sha512.New512_224() }), - "KTS-IFC/SHA2-512/256/initiator": cmdKtsIfcInitiatorAft(func() fips140.Hash { return sha512.New512_256() }), - "KTS-IFC/SHA2-512/256/responder": cmdKtsIfcResponderAft(func() fips140.Hash { return sha512.New512_256() }), - "KTS-IFC/SHA3-224/initiator": cmdKtsIfcInitiatorAft(func() fips140.Hash { return sha3.New224() }), - "KTS-IFC/SHA3-224/responder": cmdKtsIfcResponderAft(func() fips140.Hash { return sha3.New224() }), - "KTS-IFC/SHA3-256/initiator": cmdKtsIfcInitiatorAft(func() fips140.Hash { return sha3.New256() }), - "KTS-IFC/SHA3-256/responder": cmdKtsIfcResponderAft(func() fips140.Hash { return sha3.New256() }), - "KTS-IFC/SHA3-384/initiator": cmdKtsIfcInitiatorAft(func() fips140.Hash { return sha3.New384() }), - "KTS-IFC/SHA3-384/responder": cmdKtsIfcResponderAft(func() fips140.Hash { return sha3.New384() }), - "KTS-IFC/SHA3-512/initiator": cmdKtsIfcInitiatorAft(func() fips140.Hash { return sha3.New512() }), - "KTS-IFC/SHA3-512/responder": cmdKtsIfcResponderAft(func() fips140.Hash { return sha3.New512() }), + "KTS-IFC/SHA2-224/initiator": cmdKtsIfcInitiatorAft(func() hash.Hash { return sha256.New224() }), + "KTS-IFC/SHA2-224/responder": cmdKtsIfcResponderAft(func() hash.Hash { return sha256.New224() }), + "KTS-IFC/SHA2-256/initiator": cmdKtsIfcInitiatorAft(func() hash.Hash { return sha256.New() }), + "KTS-IFC/SHA2-256/responder": cmdKtsIfcResponderAft(func() hash.Hash { return sha256.New() }), + "KTS-IFC/SHA2-384/initiator": cmdKtsIfcInitiatorAft(func() hash.Hash { return sha512.New384() }), + "KTS-IFC/SHA2-384/responder": cmdKtsIfcResponderAft(func() hash.Hash { return sha512.New384() }), + "KTS-IFC/SHA2-512/initiator": cmdKtsIfcInitiatorAft(func() hash.Hash { return sha512.New() }), + "KTS-IFC/SHA2-512/responder": cmdKtsIfcResponderAft(func() hash.Hash { return sha512.New() }), + "KTS-IFC/SHA2-512/224/initiator": cmdKtsIfcInitiatorAft(func() hash.Hash { return sha512.New512_224() }), + "KTS-IFC/SHA2-512/224/responder": cmdKtsIfcResponderAft(func() hash.Hash { return sha512.New512_224() }), + "KTS-IFC/SHA2-512/256/initiator": cmdKtsIfcInitiatorAft(func() hash.Hash { return sha512.New512_256() }), + "KTS-IFC/SHA2-512/256/responder": cmdKtsIfcResponderAft(func() hash.Hash { return sha512.New512_256() }), + "KTS-IFC/SHA3-224/initiator": cmdKtsIfcInitiatorAft(func() hash.Hash { return sha3.New224() }), + "KTS-IFC/SHA3-224/responder": cmdKtsIfcResponderAft(func() hash.Hash { return sha3.New224() }), + "KTS-IFC/SHA3-256/initiator": cmdKtsIfcInitiatorAft(func() hash.Hash { return sha3.New256() }), + "KTS-IFC/SHA3-256/responder": cmdKtsIfcResponderAft(func() hash.Hash { return sha3.New256() }), + "KTS-IFC/SHA3-384/initiator": cmdKtsIfcInitiatorAft(func() hash.Hash { return sha3.New384() }), + "KTS-IFC/SHA3-384/responder": cmdKtsIfcResponderAft(func() hash.Hash { return sha3.New384() }), + "KTS-IFC/SHA3-512/initiator": cmdKtsIfcInitiatorAft(func() hash.Hash { return sha3.New512() }), + "KTS-IFC/SHA3-512/responder": cmdKtsIfcResponderAft(func() hash.Hash { return sha3.New512() }), } ) @@ -473,7 +474,7 @@ func cmdGetConfig() command { // and writes the resulting digest as a response. // // See https://pages.nist.gov/ACVP/draft-celi-acvp-sha.html -func cmdHashAft(h fips140.Hash) command { +func cmdHashAft(h hash.Hash) command { return command{ requiredArgs: 1, // Message to hash. handler: func(args [][]byte) ([][]byte, error) { @@ -501,7 +502,7 @@ func cmdHashAft(h fips140.Hash) command { // // [0]: https://pages.nist.gov/ACVP/draft-celi-acvp-sha.html#section-6.2 // [1]: https://boringssl.googlesource.com/boringssl/+/refs/heads/master/util/fipstools/acvp/ACVP.md#testing-other-fips-modules -func cmdHashMct(h fips140.Hash) command { +func cmdHashMct(h hash.Hash) command { return command{ requiredArgs: 1, // Seed message. handler: func(args [][]byte) ([][]byte, error) { @@ -545,7 +546,7 @@ func cmdHashMct(h fips140.Hash) command { // like that handler it does not perform the outer 100 iterations. // // [0]: https://pages.nist.gov/ACVP/draft-celi-acvp-sha3.html#section-6.2.1 -func cmdSha3Mct(h fips140.Hash) command { +func cmdSha3Mct(h hash.Hash) command { return command{ requiredArgs: 1, // Seed message. handler: func(args [][]byte) ([][]byte, error) { @@ -712,7 +713,7 @@ func cmdCShakeMct(hFn func(N, S []byte) *sha3.SHAKE) command { } } -func cmdHmacAft(h func() fips140.Hash) command { +func cmdHmacAft(h func() hash.Hash) command { return command{ requiredArgs: 2, // Message and key handler: func(args [][]byte) ([][]byte, error) { @@ -725,7 +726,7 @@ func cmdHmacAft(h func() fips140.Hash) command { } } -func cmdHkdfAft(h func() fips140.Hash) command { +func cmdHkdfAft(h func() hash.Hash) command { return command{ requiredArgs: 4, // Key, salt, info, length bytes handler: func(args [][]byte) ([][]byte, error) { @@ -739,7 +740,7 @@ func cmdHkdfAft(h func() fips140.Hash) command { } } -func cmdHkdfExtractAft(h func() fips140.Hash) command { +func cmdHkdfExtractAft(h func() hash.Hash) command { return command{ requiredArgs: 2, // secret, salt handler: func(args [][]byte) ([][]byte, error) { @@ -751,7 +752,7 @@ func cmdHkdfExtractAft(h func() fips140.Hash) command { } } -func cmdHkdfExpandLabelAft(h func() fips140.Hash) command { +func cmdHkdfExpandLabelAft(h func() hash.Hash) command { return command{ requiredArgs: 4, // output length, secret, label, transcript hash handler: func(args [][]byte) ([][]byte, error) { @@ -990,7 +991,7 @@ func pointFromAffine(curve elliptic.Curve, x, y *big.Int) ([]byte, error) { return buf, nil } -func signEcdsa[P ecdsa.Point[P], H fips140.Hash](c *ecdsa.Curve[P], h func() H, sigType ecdsaSigType, q []byte, sk []byte, digest []byte) (*ecdsa.Signature, error) { +func signEcdsa[P ecdsa.Point[P], H hash.Hash](c *ecdsa.Curve[P], h func() H, sigType ecdsaSigType, q []byte, sk []byte, digest []byte) (*ecdsa.Signature, error) { priv, err := ecdsa.NewPrivateKey(c, sk, q) if err != nil { return nil, fmt.Errorf("invalid private key: %w", err) @@ -1120,30 +1121,30 @@ func verifyEcdsa[P ecdsa.Point[P]](c *ecdsa.Curve[P], q []byte, digest []byte, s return ecdsa.Verify(c, pub, digest, sig) } -func lookupHash(name string) (func() fips140.Hash, error) { - var h func() fips140.Hash +func lookupHash(name string) (func() hash.Hash, error) { + var h func() hash.Hash switch name { case "SHA2-224": - h = func() fips140.Hash { return sha256.New224() } + h = func() hash.Hash { return sha256.New224() } case "SHA2-256": - h = func() fips140.Hash { return sha256.New() } + h = func() hash.Hash { return sha256.New() } case "SHA2-384": - h = func() fips140.Hash { return sha512.New384() } + h = func() hash.Hash { return sha512.New384() } case "SHA2-512": - h = func() fips140.Hash { return sha512.New() } + h = func() hash.Hash { return sha512.New() } case "SHA2-512/224": - h = func() fips140.Hash { return sha512.New512_224() } + h = func() hash.Hash { return sha512.New512_224() } case "SHA2-512/256": - h = func() fips140.Hash { return sha512.New512_256() } + h = func() hash.Hash { return sha512.New512_256() } case "SHA3-224": - h = func() fips140.Hash { return sha3.New224() } + h = func() hash.Hash { return sha3.New224() } case "SHA3-256": - h = func() fips140.Hash { return sha3.New256() } + h = func() hash.Hash { return sha3.New256() } case "SHA3-384": - h = func() fips140.Hash { return sha3.New384() } + h = func() hash.Hash { return sha3.New384() } case "SHA3-512": - h = func() fips140.Hash { return sha3.New512() } + h = func() hash.Hash { return sha3.New512() } default: return nil, fmt.Errorf("unknown hash name: %q", name) } @@ -1518,7 +1519,7 @@ func cmdCmacAesVerifyAft() command { } } -func cmdTlsKdf12Aft(h func() fips140.Hash) command { +func cmdTlsKdf12Aft(h func() hash.Hash) command { return command{ requiredArgs: 5, // Number output bytes, secret, label, seed1, seed2 handler: func(args [][]byte) ([][]byte, error) { @@ -1533,7 +1534,7 @@ func cmdTlsKdf12Aft(h func() fips140.Hash) command { } } -func cmdSshKdfAft(hFunc func() fips140.Hash, direction ssh.Direction) command { +func cmdSshKdfAft(hFunc func() hash.Hash, direction ssh.Direction) command { return command{ requiredArgs: 4, // K, H, SessionID, cipher handler: func(args [][]byte) ([][]byte, error) { @@ -1599,7 +1600,7 @@ func cmdEcdhAftVal[P ecdh.Point[P]](curve *ecdh.Curve[P]) command { } } -func cmdHmacDrbgAft(h func() fips140.Hash) command { +func cmdHmacDrbgAft(h func() hash.Hash) command { return command{ requiredArgs: 6, // Output length, entropy, personalization, ad1, ad2, nonce handler: func(args [][]byte) ([][]byte, error) { @@ -1623,7 +1624,7 @@ func cmdHmacDrbgAft(h func() fips140.Hash) command { // * Uninstantiate // See Table 7 in draft-vassilev-acvp-drbg out := make([]byte, outLen) - drbg := ecdsa.TestingOnlyNewDRBG(h, entropy, nonce, personalization) + drbg := ecdsa.TestingOnlyNewDRBG(func() fips140.Hash { return h() }, entropy, nonce, personalization) drbg.Generate(out) drbg.Generate(out) @@ -1868,7 +1869,7 @@ func cmdRsaKeyGenAft() command { } } -func cmdRsaSigGenAft(hashFunc func() fips140.Hash, hashName string, pss bool) command { +func cmdRsaSigGenAft(hashFunc func() hash.Hash, hashName string, pss bool) command { return command{ requiredArgs: 2, // Modulus bit-size, message handler: func(args [][]byte) ([][]byte, error) { @@ -1906,7 +1907,7 @@ func cmdRsaSigGenAft(hashFunc func() fips140.Hash, hashName string, pss bool) co } } -func cmdRsaSigVerAft(hashFunc func() fips140.Hash, hashName string, pss bool) command { +func cmdRsaSigVerAft(hashFunc func() hash.Hash, hashName string, pss bool) command { return command{ requiredArgs: 4, // n, e, message, signature handler: func(args [][]byte) ([][]byte, error) { @@ -1966,7 +1967,7 @@ func getRSAKey(bits int) (*rsa.PrivateKey, error) { return key, nil } -func cmdOneStepNoCounterHmacAft(h func() fips140.Hash) command { +func cmdOneStepNoCounterHmacAft(h func() hash.Hash) command { return command{ requiredArgs: 4, // key, info, salt, outBytes handler: func(args [][]byte) ([][]byte, error) { @@ -1994,7 +1995,7 @@ func cmdOneStepNoCounterHmacAft(h func() fips140.Hash) command { } } -func cmdKtsIfcInitiatorAft(h func() fips140.Hash) command { +func cmdKtsIfcInitiatorAft(h func() hash.Hash) command { return command{ requiredArgs: 3, // output bytes, n bytes, e bytes handler: func(args [][]byte) ([][]byte, error) { @@ -2034,7 +2035,7 @@ func cmdKtsIfcInitiatorAft(h func() fips140.Hash) command { } } -func cmdKtsIfcResponderAft(h func() fips140.Hash) command { +func cmdKtsIfcResponderAft(h func() hash.Hash) command { return command{ requiredArgs: 6, // n bytes, e bytes, p bytes, q bytes, d bytes, c bytes handler: func(args [][]byte) ([][]byte, error) { diff --git a/src/crypto/md5/md5.go b/src/crypto/md5/md5.go index dc586fb217..9274f89d3e 100644 --- a/src/crypto/md5/md5.go +++ b/src/crypto/md5/md5.go @@ -104,6 +104,11 @@ func consumeUint32(b []byte) ([]byte, uint32) { return b[4:], byteorder.BEUint32(b[0:4]) } +func (d *digest) Clone() (hash.Cloner, error) { + r := *d + return &r, nil +} + // New returns a new [hash.Hash] computing the MD5 checksum. The Hash // also implements [encoding.BinaryMarshaler], [encoding.BinaryAppender] and // [encoding.BinaryUnmarshaler] to marshal and unmarshal the internal diff --git a/src/crypto/md5/md5_test.go b/src/crypto/md5/md5_test.go index c0bb15f05b..403ff2881f 100644 --- a/src/crypto/md5/md5_test.go +++ b/src/crypto/md5/md5_test.go @@ -270,10 +270,17 @@ func TestMD5Hash(t *testing.T) { } func TestExtraMethods(t *testing.T) { - h := New() + h := maybeCloner(New()) cryptotest.NoExtraMethods(t, &h, "MarshalBinary", "UnmarshalBinary", "AppendBinary") } +func maybeCloner(h hash.Hash) any { + if c, ok := h.(hash.Cloner); ok { + return &c + } + return &h +} + var bench = New() var buf = make([]byte, 1024*1024*8+1) var sum = make([]byte, bench.Size()) diff --git a/src/crypto/sha1/_asm/sha1block_amd64_asm.go b/src/crypto/sha1/_asm/sha1block_amd64_asm.go index 750f5ce31c..dbd171c08b 100644 --- a/src/crypto/sha1/_asm/sha1block_amd64_asm.go +++ b/src/crypto/sha1/_asm/sha1block_amd64_asm.go @@ -23,231 +23,11 @@ import ( func main() { Package("crypto/sha1") ConstraintExpr("!purego") - blockAMD64() blockAVX2() + blockSHANI() Generate() } -func LOAD(index int) { - MOVL(Mem{Base: SI}.Offset(index*4), R10L) - BSWAPL(R10L) - MOVL(R10L, Mem{Base: SP}.Offset(index*4)) -} - -func SHUFFLE(index int) { - MOVL(Mem{Base: SP}.Offset(((index)&0xf)*4), R10L) - XORL(Mem{Base: SP}.Offset(((index-3)&0xf)*4), R10L) - XORL(Mem{Base: SP}.Offset(((index-8)&0xf)*4), R10L) - XORL(Mem{Base: SP}.Offset(((index-14)&0xf)*4), R10L) - ROLL(Imm(1), R10L) - MOVL(R10L, Mem{Base: SP}.Offset(((index)&0xf)*4)) -} - -func FUNC1(a, b, c, d, e GPPhysical) { - MOVL(d, R9L) - XORL(c, R9L) - ANDL(b, R9L) - XORL(d, R9L) -} - -func FUNC2(a, b, c, d, e GPPhysical) { - MOVL(b, R9L) - XORL(c, R9L) - XORL(d, R9L) -} - -func FUNC3(a, b, c, d, e GPPhysical) { - MOVL(b, R8L) - ORL(c, R8L) - ANDL(d, R8L) - MOVL(b, R9L) - ANDL(c, R9L) - ORL(R8L, R9L) -} - -func FUNC4(a, b, c, d, e GPPhysical) { - FUNC2(a, b, c, d, e) -} - -func MIX(a, b, c, d, e GPPhysical, konst int) { - ROLL(Imm(30), b) - ADDL(R9L, e) - MOVL(a, R8L) - ROLL(Imm(5), R8L) - LEAL(Mem{Base: e, Index: R10L, Scale: 1}.Offset(konst), e) - ADDL(R8L, e) -} - -func ROUND1(a, b, c, d, e GPPhysical, index int) { - LOAD(index) - FUNC1(a, b, c, d, e) - MIX(a, b, c, d, e, 0x5A827999) -} - -func ROUND1x(a, b, c, d, e GPPhysical, index int) { - SHUFFLE(index) - FUNC1(a, b, c, d, e) - MIX(a, b, c, d, e, 0x5A827999) -} - -func ROUND2(a, b, c, d, e GPPhysical, index int) { - SHUFFLE(index) - FUNC2(a, b, c, d, e) - MIX(a, b, c, d, e, 0x6ED9EBA1) -} - -func ROUND3(a, b, c, d, e GPPhysical, index int) { - SHUFFLE(index) - FUNC3(a, b, c, d, e) - MIX(a, b, c, d, e, 0x8F1BBCDC) -} - -func ROUND4(a, b, c, d, e GPPhysical, index int) { - SHUFFLE(index) - FUNC4(a, b, c, d, e) - MIX(a, b, c, d, e, 0xCA62C1D6) -} - -func blockAMD64() { - Implement("blockAMD64") - Attributes(NOSPLIT) - AllocLocal(64) - - Load(Param("dig"), RBP) - Load(Param("p").Base(), RSI) - Load(Param("p").Len(), RDX) - SHRQ(Imm(6), RDX) - SHLQ(Imm(6), RDX) - - LEAQ(Mem{Base: SI, Index: DX, Scale: 1}, RDI) - MOVL(Mem{Base: BP}.Offset(0*4), EAX) - MOVL(Mem{Base: BP}.Offset(1*4), EBX) - MOVL(Mem{Base: BP}.Offset(2*4), ECX) - MOVL(Mem{Base: BP}.Offset(3*4), EDX) - MOVL(Mem{Base: BP}.Offset(4*4), EBP) - - CMPQ(RSI, RDI) - JEQ(LabelRef("end")) - - loop_amd64() - end() -} - -func loop_amd64() { - Label("loop") - MOVL(EAX, R11L) - MOVL(EBX, R12L) - MOVL(ECX, R13L) - MOVL(EDX, R14L) - MOVL(EBP, R15L) - - ROUND1(EAX, EBX, ECX, EDX, EBP, 0) - ROUND1(EBP, EAX, EBX, ECX, EDX, 1) - ROUND1(EDX, EBP, EAX, EBX, ECX, 2) - ROUND1(ECX, EDX, EBP, EAX, EBX, 3) - ROUND1(EBX, ECX, EDX, EBP, EAX, 4) - ROUND1(EAX, EBX, ECX, EDX, EBP, 5) - ROUND1(EBP, EAX, EBX, ECX, EDX, 6) - ROUND1(EDX, EBP, EAX, EBX, ECX, 7) - ROUND1(ECX, EDX, EBP, EAX, EBX, 8) - ROUND1(EBX, ECX, EDX, EBP, EAX, 9) - ROUND1(EAX, EBX, ECX, EDX, EBP, 10) - ROUND1(EBP, EAX, EBX, ECX, EDX, 11) - ROUND1(EDX, EBP, EAX, EBX, ECX, 12) - ROUND1(ECX, EDX, EBP, EAX, EBX, 13) - ROUND1(EBX, ECX, EDX, EBP, EAX, 14) - ROUND1(EAX, EBX, ECX, EDX, EBP, 15) - - ROUND1x(EBP, EAX, EBX, ECX, EDX, 16) - ROUND1x(EDX, EBP, EAX, EBX, ECX, 17) - ROUND1x(ECX, EDX, EBP, EAX, EBX, 18) - ROUND1x(EBX, ECX, EDX, EBP, EAX, 19) - - ROUND2(EAX, EBX, ECX, EDX, EBP, 20) - ROUND2(EBP, EAX, EBX, ECX, EDX, 21) - ROUND2(EDX, EBP, EAX, EBX, ECX, 22) - ROUND2(ECX, EDX, EBP, EAX, EBX, 23) - ROUND2(EBX, ECX, EDX, EBP, EAX, 24) - ROUND2(EAX, EBX, ECX, EDX, EBP, 25) - ROUND2(EBP, EAX, EBX, ECX, EDX, 26) - ROUND2(EDX, EBP, EAX, EBX, ECX, 27) - ROUND2(ECX, EDX, EBP, EAX, EBX, 28) - ROUND2(EBX, ECX, EDX, EBP, EAX, 29) - ROUND2(EAX, EBX, ECX, EDX, EBP, 30) - ROUND2(EBP, EAX, EBX, ECX, EDX, 31) - ROUND2(EDX, EBP, EAX, EBX, ECX, 32) - ROUND2(ECX, EDX, EBP, EAX, EBX, 33) - ROUND2(EBX, ECX, EDX, EBP, EAX, 34) - ROUND2(EAX, EBX, ECX, EDX, EBP, 35) - ROUND2(EBP, EAX, EBX, ECX, EDX, 36) - ROUND2(EDX, EBP, EAX, EBX, ECX, 37) - ROUND2(ECX, EDX, EBP, EAX, EBX, 38) - ROUND2(EBX, ECX, EDX, EBP, EAX, 39) - - ROUND3(EAX, EBX, ECX, EDX, EBP, 40) - ROUND3(EBP, EAX, EBX, ECX, EDX, 41) - ROUND3(EDX, EBP, EAX, EBX, ECX, 42) - ROUND3(ECX, EDX, EBP, EAX, EBX, 43) - ROUND3(EBX, ECX, EDX, EBP, EAX, 44) - ROUND3(EAX, EBX, ECX, EDX, EBP, 45) - ROUND3(EBP, EAX, EBX, ECX, EDX, 46) - ROUND3(EDX, EBP, EAX, EBX, ECX, 47) - ROUND3(ECX, EDX, EBP, EAX, EBX, 48) - ROUND3(EBX, ECX, EDX, EBP, EAX, 49) - ROUND3(EAX, EBX, ECX, EDX, EBP, 50) - ROUND3(EBP, EAX, EBX, ECX, EDX, 51) - ROUND3(EDX, EBP, EAX, EBX, ECX, 52) - ROUND3(ECX, EDX, EBP, EAX, EBX, 53) - ROUND3(EBX, ECX, EDX, EBP, EAX, 54) - ROUND3(EAX, EBX, ECX, EDX, EBP, 55) - ROUND3(EBP, EAX, EBX, ECX, EDX, 56) - ROUND3(EDX, EBP, EAX, EBX, ECX, 57) - ROUND3(ECX, EDX, EBP, EAX, EBX, 58) - ROUND3(EBX, ECX, EDX, EBP, EAX, 59) - - ROUND4(EAX, EBX, ECX, EDX, EBP, 60) - ROUND4(EBP, EAX, EBX, ECX, EDX, 61) - ROUND4(EDX, EBP, EAX, EBX, ECX, 62) - ROUND4(ECX, EDX, EBP, EAX, EBX, 63) - ROUND4(EBX, ECX, EDX, EBP, EAX, 64) - ROUND4(EAX, EBX, ECX, EDX, EBP, 65) - ROUND4(EBP, EAX, EBX, ECX, EDX, 66) - ROUND4(EDX, EBP, EAX, EBX, ECX, 67) - ROUND4(ECX, EDX, EBP, EAX, EBX, 68) - ROUND4(EBX, ECX, EDX, EBP, EAX, 69) - ROUND4(EAX, EBX, ECX, EDX, EBP, 70) - ROUND4(EBP, EAX, EBX, ECX, EDX, 71) - ROUND4(EDX, EBP, EAX, EBX, ECX, 72) - ROUND4(ECX, EDX, EBP, EAX, EBX, 73) - ROUND4(EBX, ECX, EDX, EBP, EAX, 74) - ROUND4(EAX, EBX, ECX, EDX, EBP, 75) - ROUND4(EBP, EAX, EBX, ECX, EDX, 76) - ROUND4(EDX, EBP, EAX, EBX, ECX, 77) - ROUND4(ECX, EDX, EBP, EAX, EBX, 78) - ROUND4(EBX, ECX, EDX, EBP, EAX, 79) - - ADDL(R11L, EAX) - ADDL(R12L, EBX) - ADDL(R13L, ECX) - ADDL(R14L, EDX) - ADDL(R15L, EBP) - - ADDQ(Imm(64), RSI) - CMPQ(RSI, RDI) - JB(LabelRef("loop")) -} - -func end() { - Label("end") - Load(Param("dig"), RDI) - MOVL(EAX, Mem{Base: DI}.Offset(0*4)) - MOVL(EBX, Mem{Base: DI}.Offset(1*4)) - MOVL(ECX, Mem{Base: DI}.Offset(2*4)) - MOVL(EDX, Mem{Base: DI}.Offset(3*4)) - MOVL(EBP, Mem{Base: DI}.Offset(4*4)) - RET() -} - // This is the implementation using AVX2, BMI1 and BMI2. It is based on: // "SHA-1 implementation with Intel(R) AVX2 instruction set extensions" // From http://software.intel.com/en-us/articles diff --git a/src/crypto/sha1/_asm/sha1block_amd64_shani.go b/src/crypto/sha1/_asm/sha1block_amd64_shani.go new file mode 100644 index 0000000000..0a0160a823 --- /dev/null +++ b/src/crypto/sha1/_asm/sha1block_amd64_shani.go @@ -0,0 +1,164 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + "fmt" + + . "github.com/mmcloughlin/avo/build" + . "github.com/mmcloughlin/avo/operand" + . "github.com/mmcloughlin/avo/reg" +) + +// Implement the SHA-1 block function using the Intel(R) SHA extensions +// (SHA1RNDS4, SHA1NEXTE, SHA1MSG1, and SHA1MSG2). This implementation requires +// the AVX, SHA, SSE2, SSE4.1, and SSSE3 extensions. +// +// Reference: +// S. Gulley, et al, "New Instructions Supporting the Secure Hash +// Algorithm on Intel® Architecture Processors", July 2013 +// https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sha-extensions.html + +func blockSHANI() { + Implement("blockSHANI") + + digest := Load(Param("dig"), RDI) + data := Load(Param("p").Base(), RSI) + len := Load(Param("p").Len(), RDX) + + abcd := XMM() + msg0, msg1, msg2, msg3 := XMM(), XMM(), XMM(), XMM() + e0, e1 := XMM(), XMM() + shufMask := XMM() + + CMPQ(len, Imm(0)) + JEQ(LabelRef("done")) + ADDQ(data, len) + + stackPtr := GP64() + { + Comment("Allocate space on the stack for saving ABCD and E0, and align it to 16 bytes") + local := AllocLocal(32 + 16) + LEAQ(local.Offset(15), stackPtr) + tmp := GP64() + MOVQ(U64(15), tmp) + NOTQ(tmp) + ANDQ(tmp, stackPtr) + } + e0_save := Mem{Base: stackPtr} + abcd_save := Mem{Base: stackPtr}.Offset(16) + + Comment("Load initial hash state") + PINSRD(Imm(3), Mem{Base: digest}.Offset(16), e0) + VMOVDQU(Mem{Base: digest}, abcd) + PAND(upperMask(), e0) + PSHUFD(Imm(0x1b), abcd, abcd) + + VMOVDQA(flipMask(), shufMask) + + Label("loop") + + Comment("Save ABCD and E working values") + VMOVDQA(e0, e0_save) + VMOVDQA(abcd, abcd_save) + + Comment("Rounds 0-3") + VMOVDQU(Mem{Base: data}, msg0) + PSHUFB(shufMask, msg0) + PADDD(msg0, e0) + VMOVDQA(abcd, e1) + SHA1RNDS4(Imm(0), e0, abcd) + + Comment("Rounds 4-7") + VMOVDQU(Mem{Base: data}.Offset(16), msg1) + PSHUFB(shufMask, msg1) + SHA1NEXTE(msg1, e1) + VMOVDQA(abcd, e0) + SHA1RNDS4(Imm(0), e1, abcd) + SHA1MSG1(msg1, msg0) + + Comment("Rounds 8-11") + VMOVDQU(Mem{Base: data}.Offset(16*2), msg2) + PSHUFB(shufMask, msg2) + SHA1NEXTE(msg2, e0) + VMOVDQA(abcd, e1) + SHA1RNDS4(Imm(0), e0, abcd) + SHA1MSG1(msg2, msg1) + PXOR(msg2, msg0) + + // Rounds 12 through 67 use the same repeated pattern, with e0 and e1 ping-ponging + // back and forth, and each of the msg temporaries moving up one every four rounds. + msgs := []VecVirtual{msg3, msg0, msg1, msg2} + for i := range 14 { + Comment(fmt.Sprintf("Rounds %d-%d", 12+(i*4), 12+(i*4)+3)) + a, b := e1, e0 + if i == 0 { + VMOVDQU(Mem{Base: data}.Offset(16*3), msg3) + PSHUFB(shufMask, msg3) + } + if i%2 == 1 { + a, b = e0, e1 + } + imm := uint64((12 + i*4) / 20) + + SHA1NEXTE(msgs[i%4], a) + VMOVDQA(abcd, b) + SHA1MSG2(msgs[i%4], msgs[(1+i)%4]) + SHA1RNDS4(Imm(imm), a, abcd) + SHA1MSG1(msgs[i%4], msgs[(3+i)%4]) + PXOR(msgs[i%4], msgs[(2+i)%4]) + } + + Comment("Rounds 68-71") + SHA1NEXTE(msg1, e1) + VMOVDQA(abcd, e0) + SHA1MSG2(msg1, msg2) + SHA1RNDS4(Imm(3), e1, abcd) + PXOR(msg1, msg3) + + Comment("Rounds 72-75") + SHA1NEXTE(msg2, e0) + VMOVDQA(abcd, e1) + SHA1MSG2(msg2, msg3) + SHA1RNDS4(Imm(3), e0, abcd) + + Comment("Rounds 76-79") + SHA1NEXTE(msg3, e1) + VMOVDQA(abcd, e0) + SHA1RNDS4(Imm(3), e1, abcd) + + Comment("Add saved E and ABCD") + SHA1NEXTE(e0_save, e0) + PADDD(abcd_save, abcd) + + Comment("Check if we are done, if not return to the loop") + ADDQ(Imm(64), data) + CMPQ(data, len) + JNE(LabelRef("loop")) + + Comment("Write the hash state back to digest") + PSHUFD(Imm(0x1b), abcd, abcd) + VMOVDQU(abcd, Mem{Base: digest}) + PEXTRD(Imm(3), e0, Mem{Base: digest}.Offset(16)) + + Label("done") + RET() +} + +func flipMask() Mem { + mask := GLOBL("shuffle_mask", RODATA) + // 0x000102030405060708090a0b0c0d0e0f + DATA(0x00, U64(0x08090a0b0c0d0e0f)) + DATA(0x08, U64(0x0001020304050607)) + return mask +} + +func upperMask() Mem { + mask := GLOBL("upper_mask", RODATA) + // 0xFFFFFFFF000000000000000000000000 + DATA(0x00, U64(0x0000000000000000)) + DATA(0x08, U64(0xFFFFFFFF00000000)) + return mask +} diff --git a/src/crypto/sha1/fallback_test.go b/src/crypto/sha1/fallback_test.go deleted file mode 100644 index b869a939f6..0000000000 --- a/src/crypto/sha1/fallback_test.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build s390x && !purego - -package sha1 - -import ( - "fmt" - "io" - "testing" -) - -// Tests the fallback code path in case the optimized asm -// implementation cannot be used. -// See also TestBlockGeneric. -func TestGenericPath(t *testing.T) { - if !useAsm { - t.Skipf("assembly implementation unavailable") - } - useAsm = false - defer func() { useAsm = true }() - c := New() - in := "ΑΒΓΔΕϜΖΗΘΙΚΛΜΝΞΟΠϺϘΡΣΤΥΦΧΨΩ" - gold := "0f58c2bb130f8182375f325c18342215255387e5" - if _, err := io.WriteString(c, in); err != nil { - t.Fatalf("could not write to c: %v", err) - } - out := fmt.Sprintf("%x", c.Sum(nil)) - if out != gold { - t.Fatalf("mismatch: got %s, wanted %s", out, gold) - } -} diff --git a/src/crypto/sha1/issue15617_test.go b/src/crypto/sha1/issue15617_test.go index 116c78ff74..402c57482c 100644 --- a/src/crypto/sha1/issue15617_test.go +++ b/src/crypto/sha1/issue15617_test.go @@ -7,21 +7,24 @@ package sha1_test import ( + "crypto/internal/cryptotest" "crypto/sha1" "syscall" "testing" ) func TestOutOfBoundsRead(t *testing.T) { - const pageSize = 4 << 10 - data, err := syscall.Mmap(0, 0, 2*pageSize, syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_ANON|syscall.MAP_PRIVATE) - if err != nil { - panic(err) - } - if err := syscall.Mprotect(data[pageSize:], syscall.PROT_NONE); err != nil { - panic(err) - } - for i := 0; i < pageSize; i++ { - sha1.Sum(data[pageSize-i : pageSize]) - } + cryptotest.TestAllImplementations(t, "sha1", func(t *testing.T) { + const pageSize = 4 << 10 + data, err := syscall.Mmap(0, 0, 2*pageSize, syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_ANON|syscall.MAP_PRIVATE) + if err != nil { + panic(err) + } + if err := syscall.Mprotect(data[pageSize:], syscall.PROT_NONE); err != nil { + panic(err) + } + for i := 0; i < pageSize; i++ { + sha1.Sum(data[pageSize-i : pageSize]) + } + }) } diff --git a/src/crypto/sha1/sha1.go b/src/crypto/sha1/sha1.go index d2ffaac0ae..3acc5b11fb 100644 --- a/src/crypto/sha1/sha1.go +++ b/src/crypto/sha1/sha1.go @@ -93,6 +93,11 @@ func consumeUint32(b []byte) ([]byte, uint32) { return b[4:], byteorder.BEUint32(b) } +func (d *digest) Clone() (hash.Cloner, error) { + r := *d + return &r, nil +} + func (d *digest) Reset() { d.h[0] = init0 d.h[1] = init1 diff --git a/src/crypto/sha1/sha1_test.go b/src/crypto/sha1/sha1_test.go index f9243dbf50..ef6e5ddcbb 100644 --- a/src/crypto/sha1/sha1_test.go +++ b/src/crypto/sha1/sha1_test.go @@ -10,7 +10,6 @@ import ( "bytes" "crypto/internal/boring" "crypto/internal/cryptotest" - "crypto/rand" "encoding" "fmt" "hash" @@ -60,6 +59,9 @@ var golden = []sha1Test{ } func TestGolden(t *testing.T) { + cryptotest.TestAllImplementations(t, "sha1", testGolden) +} +func testGolden(t *testing.T) { for i := 0; i < len(golden); i++ { g := golden[i] s := fmt.Sprintf("%x", Sum([]byte(g.in))) @@ -97,6 +99,9 @@ func TestGolden(t *testing.T) { } func TestGoldenMarshal(t *testing.T) { + cryptotest.TestAllImplementations(t, "sha1", testGoldenMarshal) +} +func testGoldenMarshal(t *testing.T) { h := New() h2 := New() for _, g := range golden { @@ -156,23 +161,6 @@ func TestBlockSize(t *testing.T) { } } -// Tests that blockGeneric (pure Go) and block (in assembly for some architectures) match. -func TestBlockGeneric(t *testing.T) { - if boring.Enabled { - t.Skip("BoringCrypto doesn't expose digest") - } - for i := 1; i < 30; i++ { // arbitrary factor - gen, asm := New().(*digest), New().(*digest) - buf := make([]byte, BlockSize*i) - rand.Read(buf) - blockGeneric(gen, buf) - block(asm, buf) - if *gen != *asm { - t.Errorf("For %#v block and blockGeneric resulted in different states", buf) - } - } -} - // Tests for unmarshaling hashes that have hashed a large amount of data // The initial hash generation is omitted from the test, because it takes a long time. // The test contains some already-generated states, and their expected sums @@ -210,8 +198,10 @@ func safeSum(h hash.Hash) (sum []byte, err error) { } func TestLargeHashes(t *testing.T) { + cryptotest.TestAllImplementations(t, "sha1", testLargeHashes) +} +func testLargeHashes(t *testing.T) { for i, test := range largeUnmarshalTests { - h := New() if err := h.(encoding.BinaryUnmarshaler).UnmarshalBinary([]byte(test.state)); err != nil { t.Errorf("test %d could not unmarshal: %v", i, err) @@ -246,15 +236,24 @@ func TestAllocations(t *testing.T) { } func TestSHA1Hash(t *testing.T) { - cryptotest.TestHash(t, New) + cryptotest.TestAllImplementations(t, "sha1", func(t *testing.T) { + cryptotest.TestHash(t, New) + }) } func TestExtraMethods(t *testing.T) { - h := New() + h := maybeCloner(New()) cryptotest.NoExtraMethods(t, &h, "ConstantTimeSum", "MarshalBinary", "UnmarshalBinary", "AppendBinary") } +func maybeCloner(h hash.Hash) any { + if c, ok := h.(hash.Cloner); ok { + return &c + } + return &h +} + var bench = New() var buf = make([]byte, 8192) diff --git a/src/crypto/sha1/sha1block_amd64.go b/src/crypto/sha1/sha1block_amd64.go index 10376d1dcc..1f78e2d78b 100644 --- a/src/crypto/sha1/sha1block_amd64.go +++ b/src/crypto/sha1/sha1block_amd64.go @@ -6,31 +6,41 @@ package sha1 -import "internal/cpu" +import ( + "crypto/internal/impl" + "internal/cpu" +) //go:noescape func blockAVX2(dig *digest, p []byte) //go:noescape -func blockAMD64(dig *digest, p []byte) +func blockSHANI(dig *digest, p []byte) var useAVX2 = cpu.X86.HasAVX && cpu.X86.HasAVX2 && cpu.X86.HasBMI1 && cpu.X86.HasBMI2 +var useSHANI = cpu.X86.HasAVX && cpu.X86.HasSHA && cpu.X86.HasSSE41 && cpu.X86.HasSSSE3 + +func init() { + impl.Register("sha1", "AVX2", &useAVX2) + impl.Register("sha1", "SHA-NI", &useSHANI) +} func block(dig *digest, p []byte) { - if useAVX2 && len(p) >= 256 { - // blockAVX2 calculates sha1 for 2 block per iteration - // it also interleaves precalculation for next block. - // So it may read up-to 192 bytes past end of p - // We may add checks inside blockAVX2, but this will - // just turn it into a copy of blockAMD64, - // so call it directly, instead. + if useSHANI { + blockSHANI(dig, p) + } else if useAVX2 && len(p) >= 256 { + // blockAVX2 calculates sha1 for 2 block per iteration and also + // interleaves precalculation for next block. So it may read up-to 192 + // bytes past end of p. We could add checks inside blockAVX2, but this + // would just turn it into a copy of the old pre-AVX2 amd64 SHA1 + // assembly implementation, so just call blockGeneric instead. safeLen := len(p) - 128 if safeLen%128 != 0 { safeLen -= 64 } blockAVX2(dig, p[:safeLen]) - blockAMD64(dig, p[safeLen:]) + blockGeneric(dig, p[safeLen:]) } else { - blockAMD64(dig, p) + blockGeneric(dig, p) } } diff --git a/src/crypto/sha1/sha1block_amd64.s b/src/crypto/sha1/sha1block_amd64.s index 9c7aa14677..4e0c43ee4e 100644 --- a/src/crypto/sha1/sha1block_amd64.s +++ b/src/crypto/sha1/sha1block_amd64.s @@ -4,1278 +4,6 @@ #include "textflag.h" -// func blockAMD64(dig *digest, p []byte) -TEXT ·blockAMD64(SB), NOSPLIT, $64-32 - MOVQ dig+0(FP), BP - MOVQ p_base+8(FP), SI - MOVQ p_len+16(FP), DX - SHRQ $0x06, DX - SHLQ $0x06, DX - LEAQ (SI)(DX*1), DI - MOVL (BP), AX - MOVL 4(BP), BX - MOVL 8(BP), CX - MOVL 12(BP), DX - MOVL 16(BP), BP - CMPQ SI, DI - JEQ end - -loop: - MOVL AX, R11 - MOVL BX, R12 - MOVL CX, R13 - MOVL DX, R14 - MOVL BP, R15 - MOVL (SI), R10 - BSWAPL R10 - MOVL R10, (SP) - MOVL DX, R9 - XORL CX, R9 - ANDL BX, R9 - XORL DX, R9 - ROLL $0x1e, BX - ADDL R9, BP - MOVL AX, R8 - ROLL $0x05, R8 - LEAL 1518500249(BP)(R10*1), BP - ADDL R8, BP - MOVL 4(SI), R10 - BSWAPL R10 - MOVL R10, 4(SP) - MOVL CX, R9 - XORL BX, R9 - ANDL AX, R9 - XORL CX, R9 - ROLL $0x1e, AX - ADDL R9, DX - MOVL BP, R8 - ROLL $0x05, R8 - LEAL 1518500249(DX)(R10*1), DX - ADDL R8, DX - MOVL 8(SI), R10 - BSWAPL R10 - MOVL R10, 8(SP) - MOVL BX, R9 - XORL AX, R9 - ANDL BP, R9 - XORL BX, R9 - ROLL $0x1e, BP - ADDL R9, CX - MOVL DX, R8 - ROLL $0x05, R8 - LEAL 1518500249(CX)(R10*1), CX - ADDL R8, CX - MOVL 12(SI), R10 - BSWAPL R10 - MOVL R10, 12(SP) - MOVL AX, R9 - XORL BP, R9 - ANDL DX, R9 - XORL AX, R9 - ROLL $0x1e, DX - ADDL R9, BX - MOVL CX, R8 - ROLL $0x05, R8 - LEAL 1518500249(BX)(R10*1), BX - ADDL R8, BX - MOVL 16(SI), R10 - BSWAPL R10 - MOVL R10, 16(SP) - MOVL BP, R9 - XORL DX, R9 - ANDL CX, R9 - XORL BP, R9 - ROLL $0x1e, CX - ADDL R9, AX - MOVL BX, R8 - ROLL $0x05, R8 - LEAL 1518500249(AX)(R10*1), AX - ADDL R8, AX - MOVL 20(SI), R10 - BSWAPL R10 - MOVL R10, 20(SP) - MOVL DX, R9 - XORL CX, R9 - ANDL BX, R9 - XORL DX, R9 - ROLL $0x1e, BX - ADDL R9, BP - MOVL AX, R8 - ROLL $0x05, R8 - LEAL 1518500249(BP)(R10*1), BP - ADDL R8, BP - MOVL 24(SI), R10 - BSWAPL R10 - MOVL R10, 24(SP) - MOVL CX, R9 - XORL BX, R9 - ANDL AX, R9 - XORL CX, R9 - ROLL $0x1e, AX - ADDL R9, DX - MOVL BP, R8 - ROLL $0x05, R8 - LEAL 1518500249(DX)(R10*1), DX - ADDL R8, DX - MOVL 28(SI), R10 - BSWAPL R10 - MOVL R10, 28(SP) - MOVL BX, R9 - XORL AX, R9 - ANDL BP, R9 - XORL BX, R9 - ROLL $0x1e, BP - ADDL R9, CX - MOVL DX, R8 - ROLL $0x05, R8 - LEAL 1518500249(CX)(R10*1), CX - ADDL R8, CX - MOVL 32(SI), R10 - BSWAPL R10 - MOVL R10, 32(SP) - MOVL AX, R9 - XORL BP, R9 - ANDL DX, R9 - XORL AX, R9 - ROLL $0x1e, DX - ADDL R9, BX - MOVL CX, R8 - ROLL $0x05, R8 - LEAL 1518500249(BX)(R10*1), BX - ADDL R8, BX - MOVL 36(SI), R10 - BSWAPL R10 - MOVL R10, 36(SP) - MOVL BP, R9 - XORL DX, R9 - ANDL CX, R9 - XORL BP, R9 - ROLL $0x1e, CX - ADDL R9, AX - MOVL BX, R8 - ROLL $0x05, R8 - LEAL 1518500249(AX)(R10*1), AX - ADDL R8, AX - MOVL 40(SI), R10 - BSWAPL R10 - MOVL R10, 40(SP) - MOVL DX, R9 - XORL CX, R9 - ANDL BX, R9 - XORL DX, R9 - ROLL $0x1e, BX - ADDL R9, BP - MOVL AX, R8 - ROLL $0x05, R8 - LEAL 1518500249(BP)(R10*1), BP - ADDL R8, BP - MOVL 44(SI), R10 - BSWAPL R10 - MOVL R10, 44(SP) - MOVL CX, R9 - XORL BX, R9 - ANDL AX, R9 - XORL CX, R9 - ROLL $0x1e, AX - ADDL R9, DX - MOVL BP, R8 - ROLL $0x05, R8 - LEAL 1518500249(DX)(R10*1), DX - ADDL R8, DX - MOVL 48(SI), R10 - BSWAPL R10 - MOVL R10, 48(SP) - MOVL BX, R9 - XORL AX, R9 - ANDL BP, R9 - XORL BX, R9 - ROLL $0x1e, BP - ADDL R9, CX - MOVL DX, R8 - ROLL $0x05, R8 - LEAL 1518500249(CX)(R10*1), CX - ADDL R8, CX - MOVL 52(SI), R10 - BSWAPL R10 - MOVL R10, 52(SP) - MOVL AX, R9 - XORL BP, R9 - ANDL DX, R9 - XORL AX, R9 - ROLL $0x1e, DX - ADDL R9, BX - MOVL CX, R8 - ROLL $0x05, R8 - LEAL 1518500249(BX)(R10*1), BX - ADDL R8, BX - MOVL 56(SI), R10 - BSWAPL R10 - MOVL R10, 56(SP) - MOVL BP, R9 - XORL DX, R9 - ANDL CX, R9 - XORL BP, R9 - ROLL $0x1e, CX - ADDL R9, AX - MOVL BX, R8 - ROLL $0x05, R8 - LEAL 1518500249(AX)(R10*1), AX - ADDL R8, AX - MOVL 60(SI), R10 - BSWAPL R10 - MOVL R10, 60(SP) - MOVL DX, R9 - XORL CX, R9 - ANDL BX, R9 - XORL DX, R9 - ROLL $0x1e, BX - ADDL R9, BP - MOVL AX, R8 - ROLL $0x05, R8 - LEAL 1518500249(BP)(R10*1), BP - ADDL R8, BP - MOVL (SP), R10 - XORL 52(SP), R10 - XORL 32(SP), R10 - XORL 8(SP), R10 - ROLL $0x01, R10 - MOVL R10, (SP) - MOVL CX, R9 - XORL BX, R9 - ANDL AX, R9 - XORL CX, R9 - ROLL $0x1e, AX - ADDL R9, DX - MOVL BP, R8 - ROLL $0x05, R8 - LEAL 1518500249(DX)(R10*1), DX - ADDL R8, DX - MOVL 4(SP), R10 - XORL 56(SP), R10 - XORL 36(SP), R10 - XORL 12(SP), R10 - ROLL $0x01, R10 - MOVL R10, 4(SP) - MOVL BX, R9 - XORL AX, R9 - ANDL BP, R9 - XORL BX, R9 - ROLL $0x1e, BP - ADDL R9, CX - MOVL DX, R8 - ROLL $0x05, R8 - LEAL 1518500249(CX)(R10*1), CX - ADDL R8, CX - MOVL 8(SP), R10 - XORL 60(SP), R10 - XORL 40(SP), R10 - XORL 16(SP), R10 - ROLL $0x01, R10 - MOVL R10, 8(SP) - MOVL AX, R9 - XORL BP, R9 - ANDL DX, R9 - XORL AX, R9 - ROLL $0x1e, DX - ADDL R9, BX - MOVL CX, R8 - ROLL $0x05, R8 - LEAL 1518500249(BX)(R10*1), BX - ADDL R8, BX - MOVL 12(SP), R10 - XORL (SP), R10 - XORL 44(SP), R10 - XORL 20(SP), R10 - ROLL $0x01, R10 - MOVL R10, 12(SP) - MOVL BP, R9 - XORL DX, R9 - ANDL CX, R9 - XORL BP, R9 - ROLL $0x1e, CX - ADDL R9, AX - MOVL BX, R8 - ROLL $0x05, R8 - LEAL 1518500249(AX)(R10*1), AX - ADDL R8, AX - MOVL 16(SP), R10 - XORL 4(SP), R10 - XORL 48(SP), R10 - XORL 24(SP), R10 - ROLL $0x01, R10 - MOVL R10, 16(SP) - MOVL BX, R9 - XORL CX, R9 - XORL DX, R9 - ROLL $0x1e, BX - ADDL R9, BP - MOVL AX, R8 - ROLL $0x05, R8 - LEAL 1859775393(BP)(R10*1), BP - ADDL R8, BP - MOVL 20(SP), R10 - XORL 8(SP), R10 - XORL 52(SP), R10 - XORL 28(SP), R10 - ROLL $0x01, R10 - MOVL R10, 20(SP) - MOVL AX, R9 - XORL BX, R9 - XORL CX, R9 - ROLL $0x1e, AX - ADDL R9, DX - MOVL BP, R8 - ROLL $0x05, R8 - LEAL 1859775393(DX)(R10*1), DX - ADDL R8, DX - MOVL 24(SP), R10 - XORL 12(SP), R10 - XORL 56(SP), R10 - XORL 32(SP), R10 - ROLL $0x01, R10 - MOVL R10, 24(SP) - MOVL BP, R9 - XORL AX, R9 - XORL BX, R9 - ROLL $0x1e, BP - ADDL R9, CX - MOVL DX, R8 - ROLL $0x05, R8 - LEAL 1859775393(CX)(R10*1), CX - ADDL R8, CX - MOVL 28(SP), R10 - XORL 16(SP), R10 - XORL 60(SP), R10 - XORL 36(SP), R10 - ROLL $0x01, R10 - MOVL R10, 28(SP) - MOVL DX, R9 - XORL BP, R9 - XORL AX, R9 - ROLL $0x1e, DX - ADDL R9, BX - MOVL CX, R8 - ROLL $0x05, R8 - LEAL 1859775393(BX)(R10*1), BX - ADDL R8, BX - MOVL 32(SP), R10 - XORL 20(SP), R10 - XORL (SP), R10 - XORL 40(SP), R10 - ROLL $0x01, R10 - MOVL R10, 32(SP) - MOVL CX, R9 - XORL DX, R9 - XORL BP, R9 - ROLL $0x1e, CX - ADDL R9, AX - MOVL BX, R8 - ROLL $0x05, R8 - LEAL 1859775393(AX)(R10*1), AX - ADDL R8, AX - MOVL 36(SP), R10 - XORL 24(SP), R10 - XORL 4(SP), R10 - XORL 44(SP), R10 - ROLL $0x01, R10 - MOVL R10, 36(SP) - MOVL BX, R9 - XORL CX, R9 - XORL DX, R9 - ROLL $0x1e, BX - ADDL R9, BP - MOVL AX, R8 - ROLL $0x05, R8 - LEAL 1859775393(BP)(R10*1), BP - ADDL R8, BP - MOVL 40(SP), R10 - XORL 28(SP), R10 - XORL 8(SP), R10 - XORL 48(SP), R10 - ROLL $0x01, R10 - MOVL R10, 40(SP) - MOVL AX, R9 - XORL BX, R9 - XORL CX, R9 - ROLL $0x1e, AX - ADDL R9, DX - MOVL BP, R8 - ROLL $0x05, R8 - LEAL 1859775393(DX)(R10*1), DX - ADDL R8, DX - MOVL 44(SP), R10 - XORL 32(SP), R10 - XORL 12(SP), R10 - XORL 52(SP), R10 - ROLL $0x01, R10 - MOVL R10, 44(SP) - MOVL BP, R9 - XORL AX, R9 - XORL BX, R9 - ROLL $0x1e, BP - ADDL R9, CX - MOVL DX, R8 - ROLL $0x05, R8 - LEAL 1859775393(CX)(R10*1), CX - ADDL R8, CX - MOVL 48(SP), R10 - XORL 36(SP), R10 - XORL 16(SP), R10 - XORL 56(SP), R10 - ROLL $0x01, R10 - MOVL R10, 48(SP) - MOVL DX, R9 - XORL BP, R9 - XORL AX, R9 - ROLL $0x1e, DX - ADDL R9, BX - MOVL CX, R8 - ROLL $0x05, R8 - LEAL 1859775393(BX)(R10*1), BX - ADDL R8, BX - MOVL 52(SP), R10 - XORL 40(SP), R10 - XORL 20(SP), R10 - XORL 60(SP), R10 - ROLL $0x01, R10 - MOVL R10, 52(SP) - MOVL CX, R9 - XORL DX, R9 - XORL BP, R9 - ROLL $0x1e, CX - ADDL R9, AX - MOVL BX, R8 - ROLL $0x05, R8 - LEAL 1859775393(AX)(R10*1), AX - ADDL R8, AX - MOVL 56(SP), R10 - XORL 44(SP), R10 - XORL 24(SP), R10 - XORL (SP), R10 - ROLL $0x01, R10 - MOVL R10, 56(SP) - MOVL BX, R9 - XORL CX, R9 - XORL DX, R9 - ROLL $0x1e, BX - ADDL R9, BP - MOVL AX, R8 - ROLL $0x05, R8 - LEAL 1859775393(BP)(R10*1), BP - ADDL R8, BP - MOVL 60(SP), R10 - XORL 48(SP), R10 - XORL 28(SP), R10 - XORL 4(SP), R10 - ROLL $0x01, R10 - MOVL R10, 60(SP) - MOVL AX, R9 - XORL BX, R9 - XORL CX, R9 - ROLL $0x1e, AX - ADDL R9, DX - MOVL BP, R8 - ROLL $0x05, R8 - LEAL 1859775393(DX)(R10*1), DX - ADDL R8, DX - MOVL (SP), R10 - XORL 52(SP), R10 - XORL 32(SP), R10 - XORL 8(SP), R10 - ROLL $0x01, R10 - MOVL R10, (SP) - MOVL BP, R9 - XORL AX, R9 - XORL BX, R9 - ROLL $0x1e, BP - ADDL R9, CX - MOVL DX, R8 - ROLL $0x05, R8 - LEAL 1859775393(CX)(R10*1), CX - ADDL R8, CX - MOVL 4(SP), R10 - XORL 56(SP), R10 - XORL 36(SP), R10 - XORL 12(SP), R10 - ROLL $0x01, R10 - MOVL R10, 4(SP) - MOVL DX, R9 - XORL BP, R9 - XORL AX, R9 - ROLL $0x1e, DX - ADDL R9, BX - MOVL CX, R8 - ROLL $0x05, R8 - LEAL 1859775393(BX)(R10*1), BX - ADDL R8, BX - MOVL 8(SP), R10 - XORL 60(SP), R10 - XORL 40(SP), R10 - XORL 16(SP), R10 - ROLL $0x01, R10 - MOVL R10, 8(SP) - MOVL CX, R9 - XORL DX, R9 - XORL BP, R9 - ROLL $0x1e, CX - ADDL R9, AX - MOVL BX, R8 - ROLL $0x05, R8 - LEAL 1859775393(AX)(R10*1), AX - ADDL R8, AX - MOVL 12(SP), R10 - XORL (SP), R10 - XORL 44(SP), R10 - XORL 20(SP), R10 - ROLL $0x01, R10 - MOVL R10, 12(SP) - MOVL BX, R9 - XORL CX, R9 - XORL DX, R9 - ROLL $0x1e, BX - ADDL R9, BP - MOVL AX, R8 - ROLL $0x05, R8 - LEAL 1859775393(BP)(R10*1), BP - ADDL R8, BP - MOVL 16(SP), R10 - XORL 4(SP), R10 - XORL 48(SP), R10 - XORL 24(SP), R10 - ROLL $0x01, R10 - MOVL R10, 16(SP) - MOVL AX, R9 - XORL BX, R9 - XORL CX, R9 - ROLL $0x1e, AX - ADDL R9, DX - MOVL BP, R8 - ROLL $0x05, R8 - LEAL 1859775393(DX)(R10*1), DX - ADDL R8, DX - MOVL 20(SP), R10 - XORL 8(SP), R10 - XORL 52(SP), R10 - XORL 28(SP), R10 - ROLL $0x01, R10 - MOVL R10, 20(SP) - MOVL BP, R9 - XORL AX, R9 - XORL BX, R9 - ROLL $0x1e, BP - ADDL R9, CX - MOVL DX, R8 - ROLL $0x05, R8 - LEAL 1859775393(CX)(R10*1), CX - ADDL R8, CX - MOVL 24(SP), R10 - XORL 12(SP), R10 - XORL 56(SP), R10 - XORL 32(SP), R10 - ROLL $0x01, R10 - MOVL R10, 24(SP) - MOVL DX, R9 - XORL BP, R9 - XORL AX, R9 - ROLL $0x1e, DX - ADDL R9, BX - MOVL CX, R8 - ROLL $0x05, R8 - LEAL 1859775393(BX)(R10*1), BX - ADDL R8, BX - MOVL 28(SP), R10 - XORL 16(SP), R10 - XORL 60(SP), R10 - XORL 36(SP), R10 - ROLL $0x01, R10 - MOVL R10, 28(SP) - MOVL CX, R9 - XORL DX, R9 - XORL BP, R9 - ROLL $0x1e, CX - ADDL R9, AX - MOVL BX, R8 - ROLL $0x05, R8 - LEAL 1859775393(AX)(R10*1), AX - ADDL R8, AX - MOVL 32(SP), R10 - XORL 20(SP), R10 - XORL (SP), R10 - XORL 40(SP), R10 - ROLL $0x01, R10 - MOVL R10, 32(SP) - MOVL BX, R8 - ORL CX, R8 - ANDL DX, R8 - MOVL BX, R9 - ANDL CX, R9 - ORL R8, R9 - ROLL $0x1e, BX - ADDL R9, BP - MOVL AX, R8 - ROLL $0x05, R8 - LEAL 2400959708(BP)(R10*1), BP - ADDL R8, BP - MOVL 36(SP), R10 - XORL 24(SP), R10 - XORL 4(SP), R10 - XORL 44(SP), R10 - ROLL $0x01, R10 - MOVL R10, 36(SP) - MOVL AX, R8 - ORL BX, R8 - ANDL CX, R8 - MOVL AX, R9 - ANDL BX, R9 - ORL R8, R9 - ROLL $0x1e, AX - ADDL R9, DX - MOVL BP, R8 - ROLL $0x05, R8 - LEAL 2400959708(DX)(R10*1), DX - ADDL R8, DX - MOVL 40(SP), R10 - XORL 28(SP), R10 - XORL 8(SP), R10 - XORL 48(SP), R10 - ROLL $0x01, R10 - MOVL R10, 40(SP) - MOVL BP, R8 - ORL AX, R8 - ANDL BX, R8 - MOVL BP, R9 - ANDL AX, R9 - ORL R8, R9 - ROLL $0x1e, BP - ADDL R9, CX - MOVL DX, R8 - ROLL $0x05, R8 - LEAL 2400959708(CX)(R10*1), CX - ADDL R8, CX - MOVL 44(SP), R10 - XORL 32(SP), R10 - XORL 12(SP), R10 - XORL 52(SP), R10 - ROLL $0x01, R10 - MOVL R10, 44(SP) - MOVL DX, R8 - ORL BP, R8 - ANDL AX, R8 - MOVL DX, R9 - ANDL BP, R9 - ORL R8, R9 - ROLL $0x1e, DX - ADDL R9, BX - MOVL CX, R8 - ROLL $0x05, R8 - LEAL 2400959708(BX)(R10*1), BX - ADDL R8, BX - MOVL 48(SP), R10 - XORL 36(SP), R10 - XORL 16(SP), R10 - XORL 56(SP), R10 - ROLL $0x01, R10 - MOVL R10, 48(SP) - MOVL CX, R8 - ORL DX, R8 - ANDL BP, R8 - MOVL CX, R9 - ANDL DX, R9 - ORL R8, R9 - ROLL $0x1e, CX - ADDL R9, AX - MOVL BX, R8 - ROLL $0x05, R8 - LEAL 2400959708(AX)(R10*1), AX - ADDL R8, AX - MOVL 52(SP), R10 - XORL 40(SP), R10 - XORL 20(SP), R10 - XORL 60(SP), R10 - ROLL $0x01, R10 - MOVL R10, 52(SP) - MOVL BX, R8 - ORL CX, R8 - ANDL DX, R8 - MOVL BX, R9 - ANDL CX, R9 - ORL R8, R9 - ROLL $0x1e, BX - ADDL R9, BP - MOVL AX, R8 - ROLL $0x05, R8 - LEAL 2400959708(BP)(R10*1), BP - ADDL R8, BP - MOVL 56(SP), R10 - XORL 44(SP), R10 - XORL 24(SP), R10 - XORL (SP), R10 - ROLL $0x01, R10 - MOVL R10, 56(SP) - MOVL AX, R8 - ORL BX, R8 - ANDL CX, R8 - MOVL AX, R9 - ANDL BX, R9 - ORL R8, R9 - ROLL $0x1e, AX - ADDL R9, DX - MOVL BP, R8 - ROLL $0x05, R8 - LEAL 2400959708(DX)(R10*1), DX - ADDL R8, DX - MOVL 60(SP), R10 - XORL 48(SP), R10 - XORL 28(SP), R10 - XORL 4(SP), R10 - ROLL $0x01, R10 - MOVL R10, 60(SP) - MOVL BP, R8 - ORL AX, R8 - ANDL BX, R8 - MOVL BP, R9 - ANDL AX, R9 - ORL R8, R9 - ROLL $0x1e, BP - ADDL R9, CX - MOVL DX, R8 - ROLL $0x05, R8 - LEAL 2400959708(CX)(R10*1), CX - ADDL R8, CX - MOVL (SP), R10 - XORL 52(SP), R10 - XORL 32(SP), R10 - XORL 8(SP), R10 - ROLL $0x01, R10 - MOVL R10, (SP) - MOVL DX, R8 - ORL BP, R8 - ANDL AX, R8 - MOVL DX, R9 - ANDL BP, R9 - ORL R8, R9 - ROLL $0x1e, DX - ADDL R9, BX - MOVL CX, R8 - ROLL $0x05, R8 - LEAL 2400959708(BX)(R10*1), BX - ADDL R8, BX - MOVL 4(SP), R10 - XORL 56(SP), R10 - XORL 36(SP), R10 - XORL 12(SP), R10 - ROLL $0x01, R10 - MOVL R10, 4(SP) - MOVL CX, R8 - ORL DX, R8 - ANDL BP, R8 - MOVL CX, R9 - ANDL DX, R9 - ORL R8, R9 - ROLL $0x1e, CX - ADDL R9, AX - MOVL BX, R8 - ROLL $0x05, R8 - LEAL 2400959708(AX)(R10*1), AX - ADDL R8, AX - MOVL 8(SP), R10 - XORL 60(SP), R10 - XORL 40(SP), R10 - XORL 16(SP), R10 - ROLL $0x01, R10 - MOVL R10, 8(SP) - MOVL BX, R8 - ORL CX, R8 - ANDL DX, R8 - MOVL BX, R9 - ANDL CX, R9 - ORL R8, R9 - ROLL $0x1e, BX - ADDL R9, BP - MOVL AX, R8 - ROLL $0x05, R8 - LEAL 2400959708(BP)(R10*1), BP - ADDL R8, BP - MOVL 12(SP), R10 - XORL (SP), R10 - XORL 44(SP), R10 - XORL 20(SP), R10 - ROLL $0x01, R10 - MOVL R10, 12(SP) - MOVL AX, R8 - ORL BX, R8 - ANDL CX, R8 - MOVL AX, R9 - ANDL BX, R9 - ORL R8, R9 - ROLL $0x1e, AX - ADDL R9, DX - MOVL BP, R8 - ROLL $0x05, R8 - LEAL 2400959708(DX)(R10*1), DX - ADDL R8, DX - MOVL 16(SP), R10 - XORL 4(SP), R10 - XORL 48(SP), R10 - XORL 24(SP), R10 - ROLL $0x01, R10 - MOVL R10, 16(SP) - MOVL BP, R8 - ORL AX, R8 - ANDL BX, R8 - MOVL BP, R9 - ANDL AX, R9 - ORL R8, R9 - ROLL $0x1e, BP - ADDL R9, CX - MOVL DX, R8 - ROLL $0x05, R8 - LEAL 2400959708(CX)(R10*1), CX - ADDL R8, CX - MOVL 20(SP), R10 - XORL 8(SP), R10 - XORL 52(SP), R10 - XORL 28(SP), R10 - ROLL $0x01, R10 - MOVL R10, 20(SP) - MOVL DX, R8 - ORL BP, R8 - ANDL AX, R8 - MOVL DX, R9 - ANDL BP, R9 - ORL R8, R9 - ROLL $0x1e, DX - ADDL R9, BX - MOVL CX, R8 - ROLL $0x05, R8 - LEAL 2400959708(BX)(R10*1), BX - ADDL R8, BX - MOVL 24(SP), R10 - XORL 12(SP), R10 - XORL 56(SP), R10 - XORL 32(SP), R10 - ROLL $0x01, R10 - MOVL R10, 24(SP) - MOVL CX, R8 - ORL DX, R8 - ANDL BP, R8 - MOVL CX, R9 - ANDL DX, R9 - ORL R8, R9 - ROLL $0x1e, CX - ADDL R9, AX - MOVL BX, R8 - ROLL $0x05, R8 - LEAL 2400959708(AX)(R10*1), AX - ADDL R8, AX - MOVL 28(SP), R10 - XORL 16(SP), R10 - XORL 60(SP), R10 - XORL 36(SP), R10 - ROLL $0x01, R10 - MOVL R10, 28(SP) - MOVL BX, R8 - ORL CX, R8 - ANDL DX, R8 - MOVL BX, R9 - ANDL CX, R9 - ORL R8, R9 - ROLL $0x1e, BX - ADDL R9, BP - MOVL AX, R8 - ROLL $0x05, R8 - LEAL 2400959708(BP)(R10*1), BP - ADDL R8, BP - MOVL 32(SP), R10 - XORL 20(SP), R10 - XORL (SP), R10 - XORL 40(SP), R10 - ROLL $0x01, R10 - MOVL R10, 32(SP) - MOVL AX, R8 - ORL BX, R8 - ANDL CX, R8 - MOVL AX, R9 - ANDL BX, R9 - ORL R8, R9 - ROLL $0x1e, AX - ADDL R9, DX - MOVL BP, R8 - ROLL $0x05, R8 - LEAL 2400959708(DX)(R10*1), DX - ADDL R8, DX - MOVL 36(SP), R10 - XORL 24(SP), R10 - XORL 4(SP), R10 - XORL 44(SP), R10 - ROLL $0x01, R10 - MOVL R10, 36(SP) - MOVL BP, R8 - ORL AX, R8 - ANDL BX, R8 - MOVL BP, R9 - ANDL AX, R9 - ORL R8, R9 - ROLL $0x1e, BP - ADDL R9, CX - MOVL DX, R8 - ROLL $0x05, R8 - LEAL 2400959708(CX)(R10*1), CX - ADDL R8, CX - MOVL 40(SP), R10 - XORL 28(SP), R10 - XORL 8(SP), R10 - XORL 48(SP), R10 - ROLL $0x01, R10 - MOVL R10, 40(SP) - MOVL DX, R8 - ORL BP, R8 - ANDL AX, R8 - MOVL DX, R9 - ANDL BP, R9 - ORL R8, R9 - ROLL $0x1e, DX - ADDL R9, BX - MOVL CX, R8 - ROLL $0x05, R8 - LEAL 2400959708(BX)(R10*1), BX - ADDL R8, BX - MOVL 44(SP), R10 - XORL 32(SP), R10 - XORL 12(SP), R10 - XORL 52(SP), R10 - ROLL $0x01, R10 - MOVL R10, 44(SP) - MOVL CX, R8 - ORL DX, R8 - ANDL BP, R8 - MOVL CX, R9 - ANDL DX, R9 - ORL R8, R9 - ROLL $0x1e, CX - ADDL R9, AX - MOVL BX, R8 - ROLL $0x05, R8 - LEAL 2400959708(AX)(R10*1), AX - ADDL R8, AX - MOVL 48(SP), R10 - XORL 36(SP), R10 - XORL 16(SP), R10 - XORL 56(SP), R10 - ROLL $0x01, R10 - MOVL R10, 48(SP) - MOVL BX, R9 - XORL CX, R9 - XORL DX, R9 - ROLL $0x1e, BX - ADDL R9, BP - MOVL AX, R8 - ROLL $0x05, R8 - LEAL 3395469782(BP)(R10*1), BP - ADDL R8, BP - MOVL 52(SP), R10 - XORL 40(SP), R10 - XORL 20(SP), R10 - XORL 60(SP), R10 - ROLL $0x01, R10 - MOVL R10, 52(SP) - MOVL AX, R9 - XORL BX, R9 - XORL CX, R9 - ROLL $0x1e, AX - ADDL R9, DX - MOVL BP, R8 - ROLL $0x05, R8 - LEAL 3395469782(DX)(R10*1), DX - ADDL R8, DX - MOVL 56(SP), R10 - XORL 44(SP), R10 - XORL 24(SP), R10 - XORL (SP), R10 - ROLL $0x01, R10 - MOVL R10, 56(SP) - MOVL BP, R9 - XORL AX, R9 - XORL BX, R9 - ROLL $0x1e, BP - ADDL R9, CX - MOVL DX, R8 - ROLL $0x05, R8 - LEAL 3395469782(CX)(R10*1), CX - ADDL R8, CX - MOVL 60(SP), R10 - XORL 48(SP), R10 - XORL 28(SP), R10 - XORL 4(SP), R10 - ROLL $0x01, R10 - MOVL R10, 60(SP) - MOVL DX, R9 - XORL BP, R9 - XORL AX, R9 - ROLL $0x1e, DX - ADDL R9, BX - MOVL CX, R8 - ROLL $0x05, R8 - LEAL 3395469782(BX)(R10*1), BX - ADDL R8, BX - MOVL (SP), R10 - XORL 52(SP), R10 - XORL 32(SP), R10 - XORL 8(SP), R10 - ROLL $0x01, R10 - MOVL R10, (SP) - MOVL CX, R9 - XORL DX, R9 - XORL BP, R9 - ROLL $0x1e, CX - ADDL R9, AX - MOVL BX, R8 - ROLL $0x05, R8 - LEAL 3395469782(AX)(R10*1), AX - ADDL R8, AX - MOVL 4(SP), R10 - XORL 56(SP), R10 - XORL 36(SP), R10 - XORL 12(SP), R10 - ROLL $0x01, R10 - MOVL R10, 4(SP) - MOVL BX, R9 - XORL CX, R9 - XORL DX, R9 - ROLL $0x1e, BX - ADDL R9, BP - MOVL AX, R8 - ROLL $0x05, R8 - LEAL 3395469782(BP)(R10*1), BP - ADDL R8, BP - MOVL 8(SP), R10 - XORL 60(SP), R10 - XORL 40(SP), R10 - XORL 16(SP), R10 - ROLL $0x01, R10 - MOVL R10, 8(SP) - MOVL AX, R9 - XORL BX, R9 - XORL CX, R9 - ROLL $0x1e, AX - ADDL R9, DX - MOVL BP, R8 - ROLL $0x05, R8 - LEAL 3395469782(DX)(R10*1), DX - ADDL R8, DX - MOVL 12(SP), R10 - XORL (SP), R10 - XORL 44(SP), R10 - XORL 20(SP), R10 - ROLL $0x01, R10 - MOVL R10, 12(SP) - MOVL BP, R9 - XORL AX, R9 - XORL BX, R9 - ROLL $0x1e, BP - ADDL R9, CX - MOVL DX, R8 - ROLL $0x05, R8 - LEAL 3395469782(CX)(R10*1), CX - ADDL R8, CX - MOVL 16(SP), R10 - XORL 4(SP), R10 - XORL 48(SP), R10 - XORL 24(SP), R10 - ROLL $0x01, R10 - MOVL R10, 16(SP) - MOVL DX, R9 - XORL BP, R9 - XORL AX, R9 - ROLL $0x1e, DX - ADDL R9, BX - MOVL CX, R8 - ROLL $0x05, R8 - LEAL 3395469782(BX)(R10*1), BX - ADDL R8, BX - MOVL 20(SP), R10 - XORL 8(SP), R10 - XORL 52(SP), R10 - XORL 28(SP), R10 - ROLL $0x01, R10 - MOVL R10, 20(SP) - MOVL CX, R9 - XORL DX, R9 - XORL BP, R9 - ROLL $0x1e, CX - ADDL R9, AX - MOVL BX, R8 - ROLL $0x05, R8 - LEAL 3395469782(AX)(R10*1), AX - ADDL R8, AX - MOVL 24(SP), R10 - XORL 12(SP), R10 - XORL 56(SP), R10 - XORL 32(SP), R10 - ROLL $0x01, R10 - MOVL R10, 24(SP) - MOVL BX, R9 - XORL CX, R9 - XORL DX, R9 - ROLL $0x1e, BX - ADDL R9, BP - MOVL AX, R8 - ROLL $0x05, R8 - LEAL 3395469782(BP)(R10*1), BP - ADDL R8, BP - MOVL 28(SP), R10 - XORL 16(SP), R10 - XORL 60(SP), R10 - XORL 36(SP), R10 - ROLL $0x01, R10 - MOVL R10, 28(SP) - MOVL AX, R9 - XORL BX, R9 - XORL CX, R9 - ROLL $0x1e, AX - ADDL R9, DX - MOVL BP, R8 - ROLL $0x05, R8 - LEAL 3395469782(DX)(R10*1), DX - ADDL R8, DX - MOVL 32(SP), R10 - XORL 20(SP), R10 - XORL (SP), R10 - XORL 40(SP), R10 - ROLL $0x01, R10 - MOVL R10, 32(SP) - MOVL BP, R9 - XORL AX, R9 - XORL BX, R9 - ROLL $0x1e, BP - ADDL R9, CX - MOVL DX, R8 - ROLL $0x05, R8 - LEAL 3395469782(CX)(R10*1), CX - ADDL R8, CX - MOVL 36(SP), R10 - XORL 24(SP), R10 - XORL 4(SP), R10 - XORL 44(SP), R10 - ROLL $0x01, R10 - MOVL R10, 36(SP) - MOVL DX, R9 - XORL BP, R9 - XORL AX, R9 - ROLL $0x1e, DX - ADDL R9, BX - MOVL CX, R8 - ROLL $0x05, R8 - LEAL 3395469782(BX)(R10*1), BX - ADDL R8, BX - MOVL 40(SP), R10 - XORL 28(SP), R10 - XORL 8(SP), R10 - XORL 48(SP), R10 - ROLL $0x01, R10 - MOVL R10, 40(SP) - MOVL CX, R9 - XORL DX, R9 - XORL BP, R9 - ROLL $0x1e, CX - ADDL R9, AX - MOVL BX, R8 - ROLL $0x05, R8 - LEAL 3395469782(AX)(R10*1), AX - ADDL R8, AX - MOVL 44(SP), R10 - XORL 32(SP), R10 - XORL 12(SP), R10 - XORL 52(SP), R10 - ROLL $0x01, R10 - MOVL R10, 44(SP) - MOVL BX, R9 - XORL CX, R9 - XORL DX, R9 - ROLL $0x1e, BX - ADDL R9, BP - MOVL AX, R8 - ROLL $0x05, R8 - LEAL 3395469782(BP)(R10*1), BP - ADDL R8, BP - MOVL 48(SP), R10 - XORL 36(SP), R10 - XORL 16(SP), R10 - XORL 56(SP), R10 - ROLL $0x01, R10 - MOVL R10, 48(SP) - MOVL AX, R9 - XORL BX, R9 - XORL CX, R9 - ROLL $0x1e, AX - ADDL R9, DX - MOVL BP, R8 - ROLL $0x05, R8 - LEAL 3395469782(DX)(R10*1), DX - ADDL R8, DX - MOVL 52(SP), R10 - XORL 40(SP), R10 - XORL 20(SP), R10 - XORL 60(SP), R10 - ROLL $0x01, R10 - MOVL R10, 52(SP) - MOVL BP, R9 - XORL AX, R9 - XORL BX, R9 - ROLL $0x1e, BP - ADDL R9, CX - MOVL DX, R8 - ROLL $0x05, R8 - LEAL 3395469782(CX)(R10*1), CX - ADDL R8, CX - MOVL 56(SP), R10 - XORL 44(SP), R10 - XORL 24(SP), R10 - XORL (SP), R10 - ROLL $0x01, R10 - MOVL R10, 56(SP) - MOVL DX, R9 - XORL BP, R9 - XORL AX, R9 - ROLL $0x1e, DX - ADDL R9, BX - MOVL CX, R8 - ROLL $0x05, R8 - LEAL 3395469782(BX)(R10*1), BX - ADDL R8, BX - MOVL 60(SP), R10 - XORL 48(SP), R10 - XORL 28(SP), R10 - XORL 4(SP), R10 - ROLL $0x01, R10 - MOVL R10, 60(SP) - MOVL CX, R9 - XORL DX, R9 - XORL BP, R9 - ROLL $0x1e, CX - ADDL R9, AX - MOVL BX, R8 - ROLL $0x05, R8 - LEAL 3395469782(AX)(R10*1), AX - ADDL R8, AX - ADDL R11, AX - ADDL R12, BX - ADDL R13, CX - ADDL R14, DX - ADDL R15, BP - ADDQ $0x40, SI - CMPQ SI, DI - JB loop - -end: - MOVQ dig+0(FP), DI - MOVL AX, (DI) - MOVL BX, 4(DI) - MOVL CX, 8(DI) - MOVL DX, 12(DI) - MOVL BP, 16(DI) - RET - // func blockAVX2(dig *digest, p []byte) // Requires: AVX, AVX2, BMI, BMI2, CMOV TEXT ·blockAVX2(SB), $1408-32 @@ -3049,3 +1777,212 @@ DATA BSWAP_SHUFB_CTL<>+20(SB)/4, $0x04050607 DATA BSWAP_SHUFB_CTL<>+24(SB)/4, $0x08090a0b DATA BSWAP_SHUFB_CTL<>+28(SB)/4, $0x0c0d0e0f GLOBL BSWAP_SHUFB_CTL<>(SB), RODATA, $32 + +// func blockSHANI(dig *digest, p []byte) +// Requires: AVX, SHA, SSE2, SSE4.1, SSSE3 +TEXT ·blockSHANI(SB), $48-32 + MOVQ dig+0(FP), DI + MOVQ p_base+8(FP), SI + MOVQ p_len+16(FP), DX + CMPQ DX, $0x00 + JEQ done + ADDQ SI, DX + + // Allocate space on the stack for saving ABCD and E0, and align it to 16 bytes + LEAQ 15(SP), AX + MOVQ $0x000000000000000f, CX + NOTQ CX + ANDQ CX, AX + + // Load initial hash state + PINSRD $0x03, 16(DI), X5 + VMOVDQU (DI), X0 + PAND upper_mask<>+0(SB), X5 + PSHUFD $0x1b, X0, X0 + VMOVDQA shuffle_mask<>+0(SB), X7 + +loop: + // Save ABCD and E working values + VMOVDQA X5, (AX) + VMOVDQA X0, 16(AX) + + // Rounds 0-3 + VMOVDQU (SI), X1 + PSHUFB X7, X1 + PADDD X1, X5 + VMOVDQA X0, X6 + SHA1RNDS4 $0x00, X5, X0 + + // Rounds 4-7 + VMOVDQU 16(SI), X2 + PSHUFB X7, X2 + SHA1NEXTE X2, X6 + VMOVDQA X0, X5 + SHA1RNDS4 $0x00, X6, X0 + SHA1MSG1 X2, X1 + + // Rounds 8-11 + VMOVDQU 32(SI), X3 + PSHUFB X7, X3 + SHA1NEXTE X3, X5 + VMOVDQA X0, X6 + SHA1RNDS4 $0x00, X5, X0 + SHA1MSG1 X3, X2 + PXOR X3, X1 + + // Rounds 12-15 + VMOVDQU 48(SI), X4 + PSHUFB X7, X4 + SHA1NEXTE X4, X6 + VMOVDQA X0, X5 + SHA1MSG2 X4, X1 + SHA1RNDS4 $0x00, X6, X0 + SHA1MSG1 X4, X3 + PXOR X4, X2 + + // Rounds 16-19 + SHA1NEXTE X1, X5 + VMOVDQA X0, X6 + SHA1MSG2 X1, X2 + SHA1RNDS4 $0x00, X5, X0 + SHA1MSG1 X1, X4 + PXOR X1, X3 + + // Rounds 20-23 + SHA1NEXTE X2, X6 + VMOVDQA X0, X5 + SHA1MSG2 X2, X3 + SHA1RNDS4 $0x01, X6, X0 + SHA1MSG1 X2, X1 + PXOR X2, X4 + + // Rounds 24-27 + SHA1NEXTE X3, X5 + VMOVDQA X0, X6 + SHA1MSG2 X3, X4 + SHA1RNDS4 $0x01, X5, X0 + SHA1MSG1 X3, X2 + PXOR X3, X1 + + // Rounds 28-31 + SHA1NEXTE X4, X6 + VMOVDQA X0, X5 + SHA1MSG2 X4, X1 + SHA1RNDS4 $0x01, X6, X0 + SHA1MSG1 X4, X3 + PXOR X4, X2 + + // Rounds 32-35 + SHA1NEXTE X1, X5 + VMOVDQA X0, X6 + SHA1MSG2 X1, X2 + SHA1RNDS4 $0x01, X5, X0 + SHA1MSG1 X1, X4 + PXOR X1, X3 + + // Rounds 36-39 + SHA1NEXTE X2, X6 + VMOVDQA X0, X5 + SHA1MSG2 X2, X3 + SHA1RNDS4 $0x01, X6, X0 + SHA1MSG1 X2, X1 + PXOR X2, X4 + + // Rounds 40-43 + SHA1NEXTE X3, X5 + VMOVDQA X0, X6 + SHA1MSG2 X3, X4 + SHA1RNDS4 $0x02, X5, X0 + SHA1MSG1 X3, X2 + PXOR X3, X1 + + // Rounds 44-47 + SHA1NEXTE X4, X6 + VMOVDQA X0, X5 + SHA1MSG2 X4, X1 + SHA1RNDS4 $0x02, X6, X0 + SHA1MSG1 X4, X3 + PXOR X4, X2 + + // Rounds 48-51 + SHA1NEXTE X1, X5 + VMOVDQA X0, X6 + SHA1MSG2 X1, X2 + SHA1RNDS4 $0x02, X5, X0 + SHA1MSG1 X1, X4 + PXOR X1, X3 + + // Rounds 52-55 + SHA1NEXTE X2, X6 + VMOVDQA X0, X5 + SHA1MSG2 X2, X3 + SHA1RNDS4 $0x02, X6, X0 + SHA1MSG1 X2, X1 + PXOR X2, X4 + + // Rounds 56-59 + SHA1NEXTE X3, X5 + VMOVDQA X0, X6 + SHA1MSG2 X3, X4 + SHA1RNDS4 $0x02, X5, X0 + SHA1MSG1 X3, X2 + PXOR X3, X1 + + // Rounds 60-63 + SHA1NEXTE X4, X6 + VMOVDQA X0, X5 + SHA1MSG2 X4, X1 + SHA1RNDS4 $0x03, X6, X0 + SHA1MSG1 X4, X3 + PXOR X4, X2 + + // Rounds 64-67 + SHA1NEXTE X1, X5 + VMOVDQA X0, X6 + SHA1MSG2 X1, X2 + SHA1RNDS4 $0x03, X5, X0 + SHA1MSG1 X1, X4 + PXOR X1, X3 + + // Rounds 68-71 + SHA1NEXTE X2, X6 + VMOVDQA X0, X5 + SHA1MSG2 X2, X3 + SHA1RNDS4 $0x03, X6, X0 + PXOR X2, X4 + + // Rounds 72-75 + SHA1NEXTE X3, X5 + VMOVDQA X0, X6 + SHA1MSG2 X3, X4 + SHA1RNDS4 $0x03, X5, X0 + + // Rounds 76-79 + SHA1NEXTE X4, X6 + VMOVDQA X0, X5 + SHA1RNDS4 $0x03, X6, X0 + + // Add saved E and ABCD + SHA1NEXTE (AX), X5 + PADDD 16(AX), X0 + + // Check if we are done, if not return to the loop + ADDQ $0x40, SI + CMPQ SI, DX + JNE loop + + // Write the hash state back to digest + PSHUFD $0x1b, X0, X0 + VMOVDQU X0, (DI) + PEXTRD $0x03, X5, 16(DI) + +done: + RET + +DATA upper_mask<>+0(SB)/8, $0x0000000000000000 +DATA upper_mask<>+8(SB)/8, $0xffffffff00000000 +GLOBL upper_mask<>(SB), RODATA, $16 + +DATA shuffle_mask<>+0(SB)/8, $0x08090a0b0c0d0e0f +DATA shuffle_mask<>+8(SB)/8, $0x0001020304050607 +GLOBL shuffle_mask<>(SB), RODATA, $16 diff --git a/src/crypto/sha1/sha1block_arm64.go b/src/crypto/sha1/sha1block_arm64.go index e6d96a9080..b972a1e62e 100644 --- a/src/crypto/sha1/sha1block_arm64.go +++ b/src/crypto/sha1/sha1block_arm64.go @@ -6,7 +6,16 @@ package sha1 -import "internal/cpu" +import ( + "crypto/internal/impl" + "internal/cpu" +) + +var useSHA1 = cpu.ARM64.HasSHA1 + +func init() { + impl.Register("sha1", "Armv8.0", &useSHA1) +} var k = []uint32{ 0x5A827999, @@ -19,10 +28,10 @@ var k = []uint32{ func sha1block(h []uint32, p []byte, k []uint32) func block(dig *digest, p []byte) { - if !cpu.ARM64.HasSHA1 { - blockGeneric(dig, p) - } else { + if useSHA1 { h := dig.h[:] sha1block(h, p, k) + } else { + blockGeneric(dig, p) } } diff --git a/src/crypto/sha1/sha1block_decl.go b/src/crypto/sha1/sha1block_decl.go index 46f41a1cc2..887d8cad01 100644 --- a/src/crypto/sha1/sha1block_decl.go +++ b/src/crypto/sha1/sha1block_decl.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build (386 || arm || loong64 || s390x) && !purego +//go:build (386 || arm || loong64) && !purego package sha1 diff --git a/src/crypto/sha1/sha1block_s390x.go b/src/crypto/sha1/sha1block_s390x.go index f8b0d8ba31..104220c8bd 100644 --- a/src/crypto/sha1/sha1block_s390x.go +++ b/src/crypto/sha1/sha1block_s390x.go @@ -6,6 +6,26 @@ package sha1 -import "internal/cpu" +import ( + "crypto/internal/impl" + "internal/cpu" +) -var useAsm = cpu.S390X.HasSHA1 +var useSHA1 = cpu.S390X.HasSHA1 + +func init() { + // CP Assist for Cryptographic Functions (CPACF) + // https://www.ibm.com/docs/en/zos/3.1.0?topic=icsf-cp-assist-cryptographic-functions-cpacf + impl.Register("sha1", "CPACF", &useSHA1) +} + +//go:noescape +func blockS390X(dig *digest, p []byte) + +func block(dig *digest, p []byte) { + if useSHA1 { + blockS390X(dig, p) + } else { + blockGeneric(dig, p) + } +} diff --git a/src/crypto/sha1/sha1block_s390x.s b/src/crypto/sha1/sha1block_s390x.s index 7a2f4e39c4..3ddc9b586a 100644 --- a/src/crypto/sha1/sha1block_s390x.s +++ b/src/crypto/sha1/sha1block_s390x.s @@ -6,17 +6,12 @@ #include "textflag.h" -// func block(dig *digest, p []byte) -TEXT ·block(SB), NOSPLIT|NOFRAME, $0-32 - MOVBZ ·useAsm(SB), R4 +// func blockS390X(dig *digest, p []byte) +TEXT ·blockS390X(SB), NOSPLIT|NOFRAME, $0-32 LMG dig+0(FP), R1, R3 // R2 = &p[0], R3 = len(p) MOVBZ $1, R0 // SHA-1 function code - CMPBEQ R4, $0, generic loop: KIMD R0, R2 // compute intermediate message digest (KIMD) BVS loop // continue if interrupted RET - -generic: - BR ·blockGeneric(SB) diff --git a/src/crypto/sha256/sha256_test.go b/src/crypto/sha256/sha256_test.go index 38a7f25afb..11b24db7d6 100644 --- a/src/crypto/sha256/sha256_test.go +++ b/src/crypto/sha256/sha256_test.go @@ -403,18 +403,25 @@ func TestHash(t *testing.T) { func TestExtraMethods(t *testing.T) { t.Run("SHA-224", func(t *testing.T) { cryptotest.TestAllImplementations(t, "sha256", func(t *testing.T) { - h := New224() - cryptotest.NoExtraMethods(t, &h, "MarshalBinary", "UnmarshalBinary", "AppendBinary") + h := maybeCloner(New224()) + cryptotest.NoExtraMethods(t, h, "MarshalBinary", "UnmarshalBinary", "AppendBinary") }) }) t.Run("SHA-256", func(t *testing.T) { cryptotest.TestAllImplementations(t, "sha256", func(t *testing.T) { - h := New() - cryptotest.NoExtraMethods(t, &h, "MarshalBinary", "UnmarshalBinary", "AppendBinary") + h := maybeCloner(New()) + cryptotest.NoExtraMethods(t, h, "MarshalBinary", "UnmarshalBinary", "AppendBinary") }) }) } +func maybeCloner(h hash.Hash) any { + if c, ok := h.(hash.Cloner); ok { + return &c + } + return &h +} + var bench = New() func benchmarkSize(b *testing.B, size int) { diff --git a/src/crypto/sha3/sha3.go b/src/crypto/sha3/sha3.go index a6c5ae55f1..2a1b3ca700 100644 --- a/src/crypto/sha3/sha3.go +++ b/src/crypto/sha3/sha3.go @@ -166,6 +166,12 @@ func (s *SHA3) UnmarshalBinary(data []byte) error { return s.s.UnmarshalBinary(data) } +// Clone implements [hash.Cloner]. +func (d *SHA3) Clone() (hash.Cloner, error) { + r := *d + return &r, nil +} + // SHAKE is an instance of a SHAKE extendable output function. type SHAKE struct { s sha3.SHAKE diff --git a/src/crypto/sha3/sha3_test.go b/src/crypto/sha3/sha3_test.go index f88e51d3e7..15ee877236 100644 --- a/src/crypto/sha3/sha3_test.go +++ b/src/crypto/sha3/sha3_test.go @@ -7,9 +7,9 @@ package sha3_test import ( "bytes" "crypto/internal/cryptotest" - "crypto/internal/fips140" . "crypto/sha3" "encoding/hex" + "hash" "io" "math/rand" "strings" @@ -42,13 +42,14 @@ var testShakes = map[string]struct { "cSHAKE256": {NewCSHAKE256, "CSHAKE256", "CustomString"}, } -// decodeHex converts a hex-encoded string into a raw byte string. -func decodeHex(s string) []byte { - b, err := hex.DecodeString(s) - if err != nil { - panic(err) - } - return b +func TestSHA3Hash(t *testing.T) { + cryptotest.TestAllImplementations(t, "sha3", func(t *testing.T) { + for name, f := range testDigests { + t.Run(name, func(t *testing.T) { + cryptotest.TestHash(t, func() hash.Hash { return f() }) + }) + } + }) } // TestUnalignedWrite tests that writing data in an arbitrary pattern with @@ -450,7 +451,7 @@ func testMarshalUnmarshalSHAKE(t *testing.T, h *SHAKE) { } // benchmarkHash tests the speed to hash num buffers of buflen each. -func benchmarkHash(b *testing.B, h fips140.Hash, size, num int) { +func benchmarkHash(b *testing.B, h hash.Hash, size, num int) { b.StopTimer() h.Reset() data := sequentialBytes(size) diff --git a/src/crypto/sha512/sha512_test.go b/src/crypto/sha512/sha512_test.go index 7e80f49dea..080bf694f0 100644 --- a/src/crypto/sha512/sha512_test.go +++ b/src/crypto/sha512/sha512_test.go @@ -966,30 +966,37 @@ func TestHash(t *testing.T) { func TestExtraMethods(t *testing.T) { t.Run("SHA-384", func(t *testing.T) { cryptotest.TestAllImplementations(t, "sha512", func(t *testing.T) { - h := New384() - cryptotest.NoExtraMethods(t, &h, "MarshalBinary", "UnmarshalBinary", "AppendBinary") + h := maybeCloner(New384()) + cryptotest.NoExtraMethods(t, h, "MarshalBinary", "UnmarshalBinary", "AppendBinary") }) }) t.Run("SHA-512/224", func(t *testing.T) { cryptotest.TestAllImplementations(t, "sha512", func(t *testing.T) { - h := New512_224() - cryptotest.NoExtraMethods(t, &h, "MarshalBinary", "UnmarshalBinary", "AppendBinary") + h := maybeCloner(New512_224()) + cryptotest.NoExtraMethods(t, h, "MarshalBinary", "UnmarshalBinary", "AppendBinary") }) }) t.Run("SHA-512/256", func(t *testing.T) { cryptotest.TestAllImplementations(t, "sha512", func(t *testing.T) { - h := New512_256() - cryptotest.NoExtraMethods(t, &h, "MarshalBinary", "UnmarshalBinary", "AppendBinary") + h := maybeCloner(New512_256()) + cryptotest.NoExtraMethods(t, h, "MarshalBinary", "UnmarshalBinary", "AppendBinary") }) }) t.Run("SHA-512", func(t *testing.T) { cryptotest.TestAllImplementations(t, "sha512", func(t *testing.T) { - h := New() - cryptotest.NoExtraMethods(t, &h, "MarshalBinary", "UnmarshalBinary", "AppendBinary") + h := maybeCloner(New()) + cryptotest.NoExtraMethods(t, h, "MarshalBinary", "UnmarshalBinary", "AppendBinary") }) }) } +func maybeCloner(h hash.Hash) any { + if c, ok := h.(hash.Cloner); ok { + return &c + } + return &h +} + var bench = New() var buf = make([]byte, 8192) diff --git a/src/crypto/tls/auth.go b/src/crypto/tls/auth.go index 81a85851ee..2d0596689f 100644 --- a/src/crypto/tls/auth.go +++ b/src/crypto/tls/auth.go @@ -219,8 +219,8 @@ func signatureSchemesForCertificate(version uint16, cert *Certificate) []Signatu } // Filter out any unsupported signature algorithms, for example due to - // FIPS 140-3 policy, or any downstream changes to defaults.go. - supportedAlgs := supportedSignatureAlgorithms() + // FIPS 140-3 policy, tlssha1=0, or any downstream changes to defaults.go. + supportedAlgs := supportedSignatureAlgorithms(version) sigAlgs = slices.DeleteFunc(sigAlgs, func(sigAlg SignatureScheme) bool { return !isSupportedSignatureAlgorithm(sigAlg, supportedAlgs) }) @@ -239,6 +239,11 @@ func selectSignatureScheme(vers uint16, c *Certificate, peerAlgs []SignatureSche if len(peerAlgs) == 0 && vers == VersionTLS12 { // For TLS 1.2, if the client didn't send signature_algorithms then we // can assume that it supports SHA1. See RFC 5246, Section 7.4.1.4.1. + // RFC 9155 made signature_algorithms mandatory in TLS 1.2, and we gated + // it behind the tlssha1 GODEBUG setting. + if tlssha1.Value() != "1" { + return 0, errors.New("tls: missing signature_algorithms from TLS 1.2 peer") + } peerAlgs = []SignatureScheme{PKCS1WithSHA1, ECDSAWithSHA1} } // Pick signature scheme in the peer's preference order, as our diff --git a/src/crypto/tls/auth_test.go b/src/crypto/tls/auth_test.go index 9036f4c8d2..727bdc4df7 100644 --- a/src/crypto/tls/auth_test.go +++ b/src/crypto/tls/auth_test.go @@ -7,6 +7,7 @@ package tls import ( "crypto" "crypto/tls/internal/fips140tls" + "os" "testing" ) @@ -33,35 +34,41 @@ func TestSignatureSelection(t *testing.T) { cert *Certificate peerSigAlgs []SignatureScheme tlsVersion uint16 + godebug string expectedSigAlg SignatureScheme expectedSigType uint8 expectedHash crypto.Hash }{ - {rsaCert, []SignatureScheme{PKCS1WithSHA1, PKCS1WithSHA256}, VersionTLS12, PKCS1WithSHA1, signaturePKCS1v15, crypto.SHA1}, - {rsaCert, []SignatureScheme{PKCS1WithSHA512, PKCS1WithSHA1}, VersionTLS12, PKCS1WithSHA512, signaturePKCS1v15, crypto.SHA512}, - {rsaCert, []SignatureScheme{PSSWithSHA256, PKCS1WithSHA256}, VersionTLS12, PSSWithSHA256, signatureRSAPSS, crypto.SHA256}, - {pkcs1Cert, []SignatureScheme{PSSWithSHA256, PKCS1WithSHA256}, VersionTLS12, PKCS1WithSHA256, signaturePKCS1v15, crypto.SHA256}, - {rsaCert, []SignatureScheme{PSSWithSHA384, PKCS1WithSHA1}, VersionTLS13, PSSWithSHA384, signatureRSAPSS, crypto.SHA384}, - {ecdsaCert, []SignatureScheme{ECDSAWithSHA1}, VersionTLS12, ECDSAWithSHA1, signatureECDSA, crypto.SHA1}, - {ecdsaCert, []SignatureScheme{ECDSAWithP256AndSHA256}, VersionTLS12, ECDSAWithP256AndSHA256, signatureECDSA, crypto.SHA256}, - {ecdsaCert, []SignatureScheme{ECDSAWithP256AndSHA256}, VersionTLS13, ECDSAWithP256AndSHA256, signatureECDSA, crypto.SHA256}, - {ed25519Cert, []SignatureScheme{Ed25519}, VersionTLS12, Ed25519, signatureEd25519, directSigning}, - {ed25519Cert, []SignatureScheme{Ed25519}, VersionTLS13, Ed25519, signatureEd25519, directSigning}, + {rsaCert, []SignatureScheme{PKCS1WithSHA1, PKCS1WithSHA256}, VersionTLS12, "", PKCS1WithSHA256, signaturePKCS1v15, crypto.SHA256}, + {rsaCert, []SignatureScheme{PKCS1WithSHA1, PKCS1WithSHA256}, VersionTLS12, "tlssha1=1", PKCS1WithSHA1, signaturePKCS1v15, crypto.SHA1}, + {rsaCert, []SignatureScheme{PKCS1WithSHA512, PKCS1WithSHA1}, VersionTLS12, "", PKCS1WithSHA512, signaturePKCS1v15, crypto.SHA512}, + {rsaCert, []SignatureScheme{PSSWithSHA256, PKCS1WithSHA256}, VersionTLS12, "", PSSWithSHA256, signatureRSAPSS, crypto.SHA256}, + {pkcs1Cert, []SignatureScheme{PSSWithSHA256, PKCS1WithSHA256}, VersionTLS12, "", PKCS1WithSHA256, signaturePKCS1v15, crypto.SHA256}, + {rsaCert, []SignatureScheme{PSSWithSHA384, PKCS1WithSHA1}, VersionTLS13, "", PSSWithSHA384, signatureRSAPSS, crypto.SHA384}, + {rsaCert, []SignatureScheme{PKCS1WithSHA1, PSSWithSHA384}, VersionTLS13, "", PSSWithSHA384, signatureRSAPSS, crypto.SHA384}, + {ecdsaCert, []SignatureScheme{ECDSAWithSHA1, ECDSAWithP256AndSHA256}, VersionTLS12, "", ECDSAWithP256AndSHA256, signatureECDSA, crypto.SHA256}, + {ecdsaCert, []SignatureScheme{ECDSAWithSHA1}, VersionTLS12, "tlssha1=1", ECDSAWithSHA1, signatureECDSA, crypto.SHA1}, + {ecdsaCert, []SignatureScheme{ECDSAWithP256AndSHA256}, VersionTLS12, "", ECDSAWithP256AndSHA256, signatureECDSA, crypto.SHA256}, + {ecdsaCert, []SignatureScheme{ECDSAWithP256AndSHA256}, VersionTLS13, "", ECDSAWithP256AndSHA256, signatureECDSA, crypto.SHA256}, + {ed25519Cert, []SignatureScheme{Ed25519}, VersionTLS12, "", Ed25519, signatureEd25519, directSigning}, + {ed25519Cert, []SignatureScheme{Ed25519}, VersionTLS13, "", Ed25519, signatureEd25519, directSigning}, // TLS 1.2 without signature_algorithms extension - {rsaCert, nil, VersionTLS12, PKCS1WithSHA1, signaturePKCS1v15, crypto.SHA1}, - {ecdsaCert, nil, VersionTLS12, ECDSAWithSHA1, signatureECDSA, crypto.SHA1}, + {rsaCert, nil, VersionTLS12, "tlssha1=1", PKCS1WithSHA1, signaturePKCS1v15, crypto.SHA1}, + {ecdsaCert, nil, VersionTLS12, "tlssha1=1", ECDSAWithSHA1, signatureECDSA, crypto.SHA1}, // TLS 1.2 does not restrict the ECDSA curve (our ecdsaCert is P-256) - {ecdsaCert, []SignatureScheme{ECDSAWithP384AndSHA384}, VersionTLS12, ECDSAWithP384AndSHA384, signatureECDSA, crypto.SHA384}, + {ecdsaCert, []SignatureScheme{ECDSAWithP384AndSHA384}, VersionTLS12, "", ECDSAWithP384AndSHA384, signatureECDSA, crypto.SHA384}, } for testNo, test := range tests { - if fips140tls.Required() && (test.expectedHash == crypto.SHA1 || test.expectedSigAlg == Ed25519) { + if fips140tls.Required() && test.expectedHash == crypto.SHA1 { t.Logf("skipping test[%d] - not compatible with TLS FIPS mode", testNo) continue } + savedGODEBUG := os.Getenv("GODEBUG") + os.Setenv("GODEBUG", savedGODEBUG+","+test.godebug) sigAlg, err := selectSignatureScheme(test.tlsVersion, test.cert, test.peerSigAlgs) if err != nil { @@ -80,6 +87,8 @@ func TestSignatureSelection(t *testing.T) { if test.expectedHash != hashFunc { t.Errorf("test[%d]: expected hash function %#x, got %#x", testNo, test.expectedHash, hashFunc) } + + os.Setenv("GODEBUG", savedGODEBUG) } brokenCert := &Certificate{ @@ -116,6 +125,11 @@ func TestSignatureSelection(t *testing.T) { {ecdsaCert, []SignatureScheme{ECDSAWithSHA1}, VersionTLS13}, // The key can be too small for the hash. {rsaCert, []SignatureScheme{PSSWithSHA512}, VersionTLS12}, + // SHA-1 requires tlssha1=1 + {rsaCert, []SignatureScheme{PKCS1WithSHA1}, VersionTLS12}, + {ecdsaCert, []SignatureScheme{ECDSAWithSHA1}, VersionTLS12}, + {rsaCert, nil, VersionTLS12}, + {ecdsaCert, nil, VersionTLS12}, } for testNo, test := range badTests { @@ -159,7 +173,7 @@ func TestLegacyTypeAndHash(t *testing.T) { // TestSupportedSignatureAlgorithms checks that all supportedSignatureAlgorithms // have valid type and hash information. func TestSupportedSignatureAlgorithms(t *testing.T) { - for _, sigAlg := range supportedSignatureAlgorithms() { + for _, sigAlg := range supportedSignatureAlgorithms(VersionTLS12) { sigType, hash, err := typeAndHashFromSignatureScheme(sigAlg) if err != nil { t.Errorf("%v: unexpected error: %v", sigAlg, err) diff --git a/src/crypto/tls/bogo_config.json b/src/crypto/tls/bogo_config.json index 61585938d7..1bc647ce60 100644 --- a/src/crypto/tls/bogo_config.json +++ b/src/crypto/tls/bogo_config.json @@ -8,7 +8,7 @@ "TLS-ECH-Client-Rejected-OverrideName-TLS12": "We won't attempt to negotiate 1.2 if ECH is enabled", "TLS-ECH-Client-Reject-TLS12-NoFalseStart": "We won't attempt to negotiate 1.2 if ECH is enabled", "TLS-ECH-Client-TLS12SessionTicket": "We won't attempt to negotiate 1.2 if ECH is enabled", - "TLS-ECH-Client-TLS12SessionID": "We won't attempt to negotiate 1.2 if ECH is enabled", + "TLS-ECH-Client-TLS12SessionID": "We won't attempt to negotiate 1.2 if ECH is enabled, and we don't support session ID resumption", "TLS-ECH-Client-Reject-ResumeInnerSession-TLS12": "We won't attempt to negotiate 1.2 if ECH is enabled (we could possibly test this if we had the ability to indicate not to send ECH on resumption?)", @@ -20,6 +20,8 @@ "TLS-ECH-Client-Reject-NoChannelID-TLS13": "We don't support sending channel ID", "TLS-ECH-Client-Reject-NoChannelID-TLS12": "We don't support sending channel ID", + "ServerAuth-SHA1-Fallback*": "We don't ever support SHA-1 in TLS 1.2, so we fail if there are no signature_algorithms", + "TLS-ECH-Client-GREASE-IgnoreHRRExtension": "We don't support ECH GREASE because we don't fallback to plaintext", "TLS-ECH-Client-NoSupportedConfigs-GREASE": "We don't support ECH GREASE because we don't fallback to plaintext", "TLS-ECH-Client-GREASEExtensions": "We don't support ECH GREASE because we don't fallback to plaintext", @@ -61,27 +63,15 @@ "BadRSAClientKeyExchange-4": "crypto/tls doesn't check the version number in the premaster secret - see processClientKeyExchange comment", "BadRSAClientKeyExchange-5": "crypto/tls doesn't check the version number in the premaster secret - see processClientKeyExchange comment", "CheckLeafCurve": "TODO: first pass, this should be fixed", - "DisabledCurve-HelloRetryRequest-TLS13": "TODO: first pass, this should be fixed", - "UnsupportedCurve": "TODO: first pass, this should be fixed", - "SupportTicketsWithSessionID": "TODO: first pass, this should be fixed", - "NoNullCompression-TLS12": "TODO: first pass, this should be fixed", + "SupportTicketsWithSessionID": "We don't support session ID resumption", "KeyUpdate-RequestACK": "TODO: first pass, this should be fixed", - "IgnoreClientVersionOrder": "RFC 8446 4.2.1 says supported_versions is in client pref order", "SupportedVersionSelection-TLS12": "TODO: first pass, this should be fixed", - "DuplicateExtensionServer-TLS-TLS1": "TODO: first pass, this should be fixed", - "DuplicateExtensionClient-TLS-TLS1": "TODO: first pass, this should be fixed", "UnsolicitedServerNameAck-TLS-TLS1": "TODO: first pass, this should be fixed", "TicketSessionIDLength-33-TLS-TLS1": "TODO: first pass, this should be fixed", - "DuplicateExtensionServer-TLS-TLS11": "TODO: first pass, this should be fixed", - "DuplicateExtensionClient-TLS-TLS11": "TODO: first pass, this should be fixed", "UnsolicitedServerNameAck-TLS-TLS11": "TODO: first pass, this should be fixed", "TicketSessionIDLength-33-TLS-TLS11": "TODO: first pass, this should be fixed", - "DuplicateExtensionServer-TLS-TLS12": "TODO: first pass, this should be fixed", - "DuplicateExtensionClient-TLS-TLS12": "TODO: first pass, this should be fixed", "UnsolicitedServerNameAck-TLS-TLS12": "TODO: first pass, this should be fixed", "TicketSessionIDLength-33-TLS-TLS12": "TODO: first pass, this should be fixed", - "DuplicateExtensionClient-TLS-TLS13": "TODO: first pass, this should be fixed", - "DuplicateExtensionServer-TLS-TLS13": "TODO: first pass, this should be fixed", "UnsolicitedServerNameAck-TLS-TLS13": "TODO: first pass, this should be fixed", "RenegotiationInfo-Forbidden-TLS13": "TODO: first pass, this should be fixed", "EMS-Forbidden-TLS13": "TODO: first pass, this should be fixed", @@ -163,7 +153,7 @@ "TrailingMessageData-TLS13-ClientCertificate-TLS": "TODO: first pass, this should be fixed", "TrailingMessageData-TLS13-ClientCertificateVerify-TLS": "TODO: first pass, this should be fixed", "TrailingMessageData-TLS13-ServerCertificate-TLS": "TODO: first pass, this should be fixed", - "ResumeTLS12SessionID-TLS13": "TODO: first pass, this should be fixed", + "ResumeTLS12SessionID-TLS13": "We don't support session ID resumption", "SkipEarlyData-TLS13": "TODO: first pass, this should be fixed", "DuplicateKeyShares-TLS13": "TODO: first pass, this should be fixed", "Server-TooLongSessionID-TLS13": "TODO: first pass, this should be fixed", diff --git a/src/crypto/tls/cache.go b/src/crypto/tls/cache.go index 807f522947..a2c255af88 100644 --- a/src/crypto/tls/cache.go +++ b/src/crypto/tls/cache.go @@ -8,78 +8,19 @@ import ( "crypto/x509" "runtime" "sync" - "sync/atomic" + "weak" ) -type cacheEntry struct { - refs atomic.Int64 - cert *x509.Certificate -} +// weakCertCache provides a cache of *x509.Certificates, allowing multiple +// connections to reuse parsed certificates, instead of re-parsing the +// certificate for every connection, which is an expensive operation. +type weakCertCache struct{ sync.Map } -// certCache implements an intern table for reference counted x509.Certificates, -// implemented in a similar fashion to BoringSSL's CRYPTO_BUFFER_POOL. This -// allows for a single x509.Certificate to be kept in memory and referenced from -// multiple Conns. Returned references should not be mutated by callers. Certificates -// are still safe to use after they are removed from the cache. -// -// Certificates are returned wrapped in an activeCert struct that should be held by -// the caller. When references to the activeCert are freed, the number of references -// to the certificate in the cache is decremented. Once the number of references -// reaches zero, the entry is evicted from the cache. -// -// The main difference between this implementation and CRYPTO_BUFFER_POOL is that -// CRYPTO_BUFFER_POOL is a more generic structure which supports blobs of data, -// rather than specific structures. Since we only care about x509.Certificates, -// certCache is implemented as a specific cache, rather than a generic one. -// -// See https://boringssl.googlesource.com/boringssl/+/master/include/openssl/pool.h -// and https://boringssl.googlesource.com/boringssl/+/master/crypto/pool/pool.c -// for the BoringSSL reference. -type certCache struct { - sync.Map -} - -var globalCertCache = new(certCache) - -// activeCert is a handle to a certificate held in the cache. Once there are -// no alive activeCerts for a given certificate, the certificate is removed -// from the cache by a cleanup. -type activeCert struct { - cert *x509.Certificate -} - -// active increments the number of references to the entry, wraps the -// certificate in the entry in an activeCert, and sets the cleanup. -// -// Note that there is a race between active and the cleanup set on the -// returned activeCert, triggered if active is called after the ref count is -// decremented such that refs may be > 0 when evict is called. We consider this -// safe, since the caller holding an activeCert for an entry that is no longer -// in the cache is fine, with the only side effect being the memory overhead of -// there being more than one distinct reference to a certificate alive at once. -func (cc *certCache) active(e *cacheEntry) *activeCert { - e.refs.Add(1) - a := &activeCert{e.cert} - runtime.AddCleanup(a, func(ce *cacheEntry) { - if ce.refs.Add(-1) == 0 { - cc.evict(ce) +func (wcc *weakCertCache) newCert(der []byte) (*x509.Certificate, error) { + if entry, ok := wcc.Load(string(der)); ok { + if v := entry.(weak.Pointer[x509.Certificate]).Value(); v != nil { + return v, nil } - }, e) - return a -} - -// evict removes a cacheEntry from the cache. -func (cc *certCache) evict(e *cacheEntry) { - cc.Delete(string(e.cert.Raw)) -} - -// newCert returns a x509.Certificate parsed from der. If there is already a copy -// of the certificate in the cache, a reference to the existing certificate will -// be returned. Otherwise, a fresh certificate will be added to the cache, and -// the reference returned. The returned reference should not be mutated. -func (cc *certCache) newCert(der []byte) (*activeCert, error) { - if entry, ok := cc.Load(string(der)); ok { - return cc.active(entry.(*cacheEntry)), nil } cert, err := x509.ParseCertificate(der) @@ -87,9 +28,17 @@ func (cc *certCache) newCert(der []byte) (*activeCert, error) { return nil, err } - entry := &cacheEntry{cert: cert} - if entry, loaded := cc.LoadOrStore(string(der), entry); loaded { - return cc.active(entry.(*cacheEntry)), nil + wp := weak.Make(cert) + if entry, loaded := wcc.LoadOrStore(string(der), wp); !loaded { + runtime.AddCleanup(cert, func(_ any) { wcc.CompareAndDelete(string(der), entry) }, any(string(der))) + } else if v := entry.(weak.Pointer[x509.Certificate]).Value(); v != nil { + return v, nil + } else { + if wcc.CompareAndSwap(string(der), entry, wp) { + runtime.AddCleanup(cert, func(_ any) { wcc.CompareAndDelete(string(der), wp) }, any(string(der))) + } } - return cc.active(entry), nil + return cert, nil } + +var globalCertCache = new(weakCertCache) diff --git a/src/crypto/tls/cache_test.go b/src/crypto/tls/cache_test.go index ea6b726d5e..75a0508ec0 100644 --- a/src/crypto/tls/cache_test.go +++ b/src/crypto/tls/cache_test.go @@ -1,45 +1,39 @@ -// Copyright 2022 The Go Authors. All rights reserved. +// Copyright 2025 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. - package tls import ( "encoding/pem" - "fmt" "runtime" "testing" "time" ) -func TestCertCache(t *testing.T) { - cc := certCache{} +func TestWeakCertCache(t *testing.T) { + wcc := weakCertCache{} p, _ := pem.Decode([]byte(rsaCertPEM)) if p == nil { t.Fatal("Failed to decode certificate") } - certA, err := cc.newCert(p.Bytes) + certA, err := wcc.newCert(p.Bytes) if err != nil { t.Fatalf("newCert failed: %s", err) } - certB, err := cc.newCert(p.Bytes) + certB, err := wcc.newCert(p.Bytes) if err != nil { t.Fatalf("newCert failed: %s", err) } - if certA.cert != certB.cert { + if certA != certB { t.Fatal("newCert returned a unique reference for a duplicate certificate") } - if entry, ok := cc.Load(string(p.Bytes)); !ok { + if _, ok := wcc.Load(string(p.Bytes)); !ok { t.Fatal("cache does not contain expected entry") - } else { - if refs := entry.(*cacheEntry).refs.Load(); refs != 2 { - t.Fatalf("unexpected number of references: got %d, want 2", refs) - } } - timeoutRefCheck := func(t *testing.T, key string, count int64) { + timeoutRefCheck := func(t *testing.T, key string, present bool) { t.Helper() timeout := time.After(4 * time.Second) for { @@ -47,14 +41,8 @@ func TestCertCache(t *testing.T) { case <-timeout: t.Fatal("timed out waiting for expected ref count") default: - e, ok := cc.Load(key) - if !ok && count != 0 { - t.Fatal("cache does not contain expected key") - } else if count == 0 && !ok { - return - } - - if e.(*cacheEntry).refs.Load() == count { + _, ok := wcc.Load(key) + if ok == present { return } } @@ -77,7 +65,7 @@ func TestCertCache(t *testing.T) { certA = nil runtime.GC() - timeoutRefCheck(t, string(p.Bytes), 1) + timeoutRefCheck(t, string(p.Bytes), true) // Keep certB alive until at least now, so that we can // purposefully nil it and force the finalizer to be @@ -86,41 +74,5 @@ func TestCertCache(t *testing.T) { certB = nil runtime.GC() - timeoutRefCheck(t, string(p.Bytes), 0) -} - -func BenchmarkCertCache(b *testing.B) { - p, _ := pem.Decode([]byte(rsaCertPEM)) - if p == nil { - b.Fatal("Failed to decode certificate") - } - - cc := certCache{} - b.ReportAllocs() - b.ResetTimer() - // We expect that calling newCert additional times after - // the initial call should not cause additional allocations. - for extra := 0; extra < 4; extra++ { - b.Run(fmt.Sprint(extra), func(b *testing.B) { - actives := make([]*activeCert, extra+1) - b.ResetTimer() - for i := 0; i < b.N; i++ { - var err error - actives[0], err = cc.newCert(p.Bytes) - if err != nil { - b.Fatal(err) - } - for j := 0; j < extra; j++ { - actives[j+1], err = cc.newCert(p.Bytes) - if err != nil { - b.Fatal(err) - } - } - for j := 0; j < extra+1; j++ { - actives[j] = nil - } - runtime.GC() - } - }) - } + timeoutRefCheck(t, string(p.Bytes), false) } diff --git a/src/crypto/tls/common.go b/src/crypto/tls/common.go index cc00efdc54..6a1c53fe9c 100644 --- a/src/crypto/tls/common.go +++ b/src/crypto/tls/common.go @@ -837,6 +837,20 @@ type Config struct { // when ECH is rejected, even if set, and InsecureSkipVerify is ignored. EncryptedClientHelloRejectionVerify func(ConnectionState) error + // GetEncryptedClientHelloKeys, if not nil, is called when by a server when + // a client attempts ECH. + // + // If GetEncryptedClientHelloKeys is not nil, [EncryptedClientHelloKeys] is + // ignored. + // + // If GetEncryptedClientHelloKeys returns an error, the handshake will be + // aborted and the error will be returned. Otherwise, + // GetEncryptedClientHelloKeys must return a non-nil slice of + // [EncryptedClientHelloKey] that represents the acceptable ECH keys. + // + // For further details, see [EncryptedClientHelloKeys]. + GetEncryptedClientHelloKeys func(*ClientHelloInfo) ([]EncryptedClientHelloKey, error) + // EncryptedClientHelloKeys are the ECH keys to use when a client // attempts ECH. // @@ -847,6 +861,9 @@ type Config struct { // will send a list of configs to retry based on the set of // EncryptedClientHelloKeys which have the SendAsRetry field set. // + // If GetEncryptedClientHelloKeys is non-nil, EncryptedClientHelloKeys is + // ignored. + // // On the client side, this field is ignored. In order to configure ECH for // clients, see the EncryptedClientHelloConfigList field. EncryptedClientHelloKeys []EncryptedClientHelloKey @@ -935,6 +952,7 @@ func (c *Config) Clone() *Config { GetCertificate: c.GetCertificate, GetClientCertificate: c.GetClientCertificate, GetConfigForClient: c.GetConfigForClient, + GetEncryptedClientHelloKeys: c.GetEncryptedClientHelloKeys, VerifyPeerCertificate: c.VerifyPeerCertificate, VerifyConnection: c.VerifyConnection, RootCAs: c.RootCAs, @@ -1145,6 +1163,8 @@ const roleServer = false var tls10server = godebug.New("tls10server") +// supportedVersions returns the list of supported TLS versions, sorted from +// highest to lowest (and hence also in preference order). func (c *Config) supportedVersions(isClient bool) []uint16 { versions := make([]uint16, 0, len(supportedVersions)) for _, v := range supportedVersions { @@ -1215,11 +1235,11 @@ func (c *Config) supportsCurve(version uint16, curve CurveID) bool { } // mutualVersion returns the protocol version to use given the advertised -// versions of the peer. Priority is given to the peer preference order. +// versions of the peer. The highest supported version is preferred. func (c *Config) mutualVersion(isClient bool, peerVersions []uint16) (uint16, bool) { supportedVersions := c.supportedVersions(isClient) - for _, v := range peerVersions { - if slices.Contains(supportedVersions, v) { + for _, v := range supportedVersions { + if slices.Contains(peerVersions, v) { return v, true } } @@ -1664,12 +1684,35 @@ func unexpectedMessageError(wanted, got any) error { return fmt.Errorf("tls: received unexpected handshake message of type %T when waiting for %T", got, wanted) } -// supportedSignatureAlgorithms returns the supported signature algorithms. -func supportedSignatureAlgorithms() []SignatureScheme { +// supportedSignatureAlgorithms returns the supported signature algorithms for +// the given minimum TLS version, to advertise in ClientHello and +// CertificateRequest messages. +func supportedSignatureAlgorithms(minVers uint16) []SignatureScheme { + sigAlgs := defaultSupportedSignatureAlgorithms() if fips140tls.Required() { - return allowedSupportedSignatureAlgorithmsFIPS + sigAlgs = slices.DeleteFunc(sigAlgs, func(s SignatureScheme) bool { + return !slices.Contains(allowedSignatureAlgorithmsFIPS, s) + }) } - return defaultSupportedSignatureAlgorithms + if minVers > VersionTLS12 { + sigAlgs = slices.DeleteFunc(sigAlgs, func(s SignatureScheme) bool { + sigType, sigHash, _ := typeAndHashFromSignatureScheme(s) + return sigType == signaturePKCS1v15 || sigHash == crypto.SHA1 + }) + } + return sigAlgs +} + +// supportedSignatureAlgorithmsCert returns the supported algorithms for +// signatures in certificates. +func supportedSignatureAlgorithmsCert() []SignatureScheme { + sigAlgs := defaultSupportedSignatureAlgorithmsCert() + if fips140tls.Required() { + sigAlgs = slices.DeleteFunc(sigAlgs, func(s SignatureScheme) bool { + return !slices.Contains(allowedSignatureAlgorithmsFIPS, s) + }) + } + return sigAlgs } func isSupportedSignatureAlgorithm(sigAlg SignatureScheme, supportedSignatureAlgorithms []SignatureScheme) bool { diff --git a/src/crypto/tls/conn.go b/src/crypto/tls/conn.go index 1276665a2f..cd9b9778fd 100644 --- a/src/crypto/tls/conn.go +++ b/src/crypto/tls/conn.go @@ -54,9 +54,6 @@ type Conn struct { ocspResponse []byte // stapled OCSP response scts [][]byte // signed certificate timestamps from server peerCertificates []*x509.Certificate - // activeCertHandles contains the cache handles to certificates in - // peerCertificates that are used to track active references. - activeCertHandles []*activeCert // verifiedChains contains the certificate chains that we built, as // opposed to the ones presented by the server. verifiedChains [][]*x509.Certificate @@ -1182,7 +1179,7 @@ func (c *Conn) unmarshalHandshakeMessage(data []byte, transcript transcriptHash) data = append([]byte(nil), data...) if !m.unmarshal(data) { - return nil, c.in.setErrorLocked(c.sendAlert(alertUnexpectedMessage)) + return nil, c.in.setErrorLocked(c.sendAlert(alertDecodeError)) } if transcript != nil { diff --git a/src/crypto/tls/defaults.go b/src/crypto/tls/defaults.go index a3f43eb87e..3aa1bc2e4c 100644 --- a/src/crypto/tls/defaults.go +++ b/src/crypto/tls/defaults.go @@ -24,23 +24,67 @@ func defaultCurvePreferences() []CurveID { return []CurveID{X25519MLKEM768, X25519, CurveP256, CurveP384, CurveP521} } -// defaultSupportedSignatureAlgorithms contains the signature and hash algorithms that -// the code advertises as supported in a TLS 1.2+ ClientHello and in a TLS 1.2+ +var tlssha1 = godebug.New("tlssha1") + +// defaultSupportedSignatureAlgorithms returns the signature and hash algorithms that +// the code advertises and supports in a TLS 1.2+ ClientHello and in a TLS 1.2+ // CertificateRequest. The two fields are merged to match with TLS 1.3. // Note that in TLS 1.2, the ECDSA algorithms are not constrained to P-256, etc. -var defaultSupportedSignatureAlgorithms = []SignatureScheme{ - PSSWithSHA256, - ECDSAWithP256AndSHA256, - Ed25519, - PSSWithSHA384, - PSSWithSHA512, - PKCS1WithSHA256, - PKCS1WithSHA384, - PKCS1WithSHA512, - ECDSAWithP384AndSHA384, - ECDSAWithP521AndSHA512, - PKCS1WithSHA1, - ECDSAWithSHA1, +func defaultSupportedSignatureAlgorithms() []SignatureScheme { + if tlssha1.Value() == "1" { + return []SignatureScheme{ + PSSWithSHA256, + ECDSAWithP256AndSHA256, + Ed25519, + PSSWithSHA384, + PSSWithSHA512, + PKCS1WithSHA256, + PKCS1WithSHA384, + PKCS1WithSHA512, + ECDSAWithP384AndSHA384, + ECDSAWithP521AndSHA512, + PKCS1WithSHA1, + ECDSAWithSHA1, + } + } + return []SignatureScheme{ + PSSWithSHA256, + ECDSAWithP256AndSHA256, + Ed25519, + PSSWithSHA384, + PSSWithSHA512, + PKCS1WithSHA256, + PKCS1WithSHA384, + PKCS1WithSHA512, + ECDSAWithP384AndSHA384, + ECDSAWithP521AndSHA512, + } +} + +// defaultSupportedSignatureAlgorithmsCert returns the signature algorithms that +// the code advertises as supported for signatures in certificates. +// +// We include all algorithms, including SHA-1 and PKCS#1 v1.5, because it's more +// likely that something on our side will be willing to accept a *-with-SHA1 +// certificate (e.g. with a custom VerifyConnection or by a direct match with +// the CertPool), than that the peer would have a better certificate but is just +// choosing not to send it. crypto/x509 will refuse to verify important SHA-1 +// signatures anyway. +func defaultSupportedSignatureAlgorithmsCert() []SignatureScheme { + return []SignatureScheme{ + PSSWithSHA256, + ECDSAWithP256AndSHA256, + Ed25519, + PSSWithSHA384, + PSSWithSHA512, + PKCS1WithSHA256, + PKCS1WithSHA384, + PKCS1WithSHA512, + ECDSAWithP384AndSHA384, + ECDSAWithP521AndSHA512, + PKCS1WithSHA1, + ECDSAWithSHA1, + } } var tlsrsakex = godebug.New("tlsrsakex") diff --git a/src/crypto/tls/defaults_boring.go b/src/crypto/tls/defaults_boring.go index 96406acfca..e88f05cc50 100644 --- a/src/crypto/tls/defaults_boring.go +++ b/src/crypto/tls/defaults_boring.go @@ -31,7 +31,7 @@ var ( CurveP384, CurveP521, } - allowedSupportedSignatureAlgorithmsFIPS = []SignatureScheme{ + allowedSignatureAlgorithmsFIPS = []SignatureScheme{ PSSWithSHA256, PSSWithSHA384, PSSWithSHA512, diff --git a/src/crypto/tls/defaults_fips140.go b/src/crypto/tls/defaults_fips140.go index 472bb807f0..00176795eb 100644 --- a/src/crypto/tls/defaults_fips140.go +++ b/src/crypto/tls/defaults_fips140.go @@ -36,7 +36,7 @@ var ( CurveP384, CurveP521, } - allowedSupportedSignatureAlgorithmsFIPS = []SignatureScheme{ + allowedSignatureAlgorithmsFIPS = []SignatureScheme{ PSSWithSHA256, ECDSAWithP256AndSHA256, Ed25519, diff --git a/src/crypto/tls/ech.go b/src/crypto/tls/ech.go index 6d64191b8b..76727a8908 100644 --- a/src/crypto/tls/ech.go +++ b/src/crypto/tls/ech.go @@ -578,7 +578,7 @@ func marshalEncryptedClientHelloConfigList(configs []EncryptedClientHelloKey) ([ return builder.Bytes() } -func (c *Conn) processECHClientHello(outer *clientHelloMsg) (*clientHelloMsg, *echServerContext, error) { +func (c *Conn) processECHClientHello(outer *clientHelloMsg, echKeys []EncryptedClientHelloKey) (*clientHelloMsg, *echServerContext, error) { echType, echCiphersuite, configID, encap, payload, err := parseECHExt(outer.encryptedClientHello) if err != nil { if errors.Is(err, errInvalidECHExt) { @@ -594,11 +594,11 @@ func (c *Conn) processECHClientHello(outer *clientHelloMsg) (*clientHelloMsg, *e return outer, &echServerContext{inner: true}, nil } - if len(c.config.EncryptedClientHelloKeys) == 0 { + if len(echKeys) == 0 { return outer, nil, nil } - for _, echKey := range c.config.EncryptedClientHelloKeys { + for _, echKey := range echKeys { skip, config, err := parseECHConfig(echKey.Config) if err != nil || skip { c.sendAlert(alertInternalError) diff --git a/src/crypto/tls/fips140_test.go b/src/crypto/tls/fips140_test.go index c22ad485cc..46d3076864 100644 --- a/src/crypto/tls/fips140_test.go +++ b/src/crypto/tls/fips140_test.go @@ -195,7 +195,7 @@ func TestFIPSServerCipherSuites(t *testing.T) { keyShares: []keyShare{generateKeyShare(CurveP256)}, supportedPoints: []uint8{pointFormatUncompressed}, supportedVersions: []uint16{VersionTLS12}, - supportedSignatureAlgorithms: allowedSupportedSignatureAlgorithmsFIPS, + supportedSignatureAlgorithms: allowedSignatureAlgorithmsFIPS, } if isTLS13CipherSuite(id) { clientHello.supportedVersions = []uint16{VersionTLS13} @@ -265,7 +265,7 @@ func TestFIPSServerSignatureAndHash(t *testing.T) { testingOnlyForceClientHelloSignatureAlgorithms = nil }() - for _, sigHash := range defaultSupportedSignatureAlgorithms { + for _, sigHash := range defaultSupportedSignatureAlgorithms() { t.Run(fmt.Sprintf("%v", sigHash), func(t *testing.T) { serverConfig := testConfig.Clone() serverConfig.Certificates = make([]Certificate, 1) diff --git a/src/crypto/tls/handshake_client.go b/src/crypto/tls/handshake_client.go index bb5b7a042a..2d3a2ef25b 100644 --- a/src/crypto/tls/handshake_client.go +++ b/src/crypto/tls/handshake_client.go @@ -66,7 +66,10 @@ func (c *Conn) makeClientHello() (*clientHelloMsg, *keySharePrivateKeys, *echCli if len(supportedVersions) == 0 { return nil, nil, nil, errors.New("tls: no supported versions satisfy MinVersion and MaxVersion") } - maxVersion := config.maxSupportedVersion(roleClient) + // Since supportedVersions is sorted in descending order, the first element + // is the maximum version and the last element is the minimum version. + maxVersion := supportedVersions[0] + minVersion := supportedVersions[len(supportedVersions)-1] hello := &clientHelloMsg{ vers: maxVersion, @@ -120,18 +123,20 @@ func (c *Conn) makeClientHello() (*clientHelloMsg, *keySharePrivateKeys, *echCli } if maxVersion >= VersionTLS12 { - hello.supportedSignatureAlgorithms = supportedSignatureAlgorithms() + hello.supportedSignatureAlgorithms = supportedSignatureAlgorithms(minVersion) + hello.supportedSignatureAlgorithmsCert = supportedSignatureAlgorithmsCert() } if testingOnlyForceClientHelloSignatureAlgorithms != nil { hello.supportedSignatureAlgorithms = testingOnlyForceClientHelloSignatureAlgorithms } var keyShareKeys *keySharePrivateKeys - if hello.supportedVersions[0] == VersionTLS13 { + if maxVersion >= VersionTLS13 { // Reset the list of ciphers when the client only supports TLS 1.3. - if len(hello.supportedVersions) == 1 { + if minVersion >= VersionTLS13 { hello.cipherSuites = nil } + if fips140tls.Required() { hello.cipherSuites = append(hello.cipherSuites, allowedCipherSuitesTLS13FIPS...) } else if hasAESGCMHardwareSupport { @@ -823,6 +828,10 @@ func (hs *clientHandshakeState) doFullHandshake() error { } certVerify.hasSignatureAlgorithm = true certVerify.signatureAlgorithm = signatureAlgorithm + if sigHash == crypto.SHA1 { + tlssha1.Value() // ensure godebug is initialized + tlssha1.IncNonDefault() + } } else { sigType, sigHash, err = legacyTypeAndHashFromPublicKey(key.Public()) if err != nil { @@ -956,7 +965,6 @@ func (hs *clientHandshakeState) processServerHello() (bool, error) { hs.masterSecret = hs.session.secret c.extMasterSecret = hs.session.extMasterSecret c.peerCertificates = hs.session.peerCertificates - c.activeCertHandles = hs.c.activeCertHandles c.verifiedChains = hs.session.verifiedChains c.ocspResponse = hs.session.ocspResponse // Let the ServerHello SCTs override the session SCTs from the original @@ -1107,7 +1115,6 @@ func checkKeySize(n int) (max int, ok bool) { // verifyServerCertificate parses and verifies the provided chain, setting // c.verifiedChains and c.peerCertificates or sending the appropriate alert. func (c *Conn) verifyServerCertificate(certificates [][]byte) error { - activeHandles := make([]*activeCert, len(certificates)) certs := make([]*x509.Certificate, len(certificates)) for i, asn1Data := range certificates { cert, err := globalCertCache.newCert(asn1Data) @@ -1115,15 +1122,14 @@ func (c *Conn) verifyServerCertificate(certificates [][]byte) error { c.sendAlert(alertDecodeError) return errors.New("tls: failed to parse certificate from server: " + err.Error()) } - if cert.cert.PublicKeyAlgorithm == x509.RSA { - n := cert.cert.PublicKey.(*rsa.PublicKey).N.BitLen() + if cert.PublicKeyAlgorithm == x509.RSA { + n := cert.PublicKey.(*rsa.PublicKey).N.BitLen() if max, ok := checkKeySize(n); !ok { c.sendAlert(alertBadCertificate) return fmt.Errorf("tls: server sent certificate containing RSA key larger than %d bits", max) } } - activeHandles[i] = cert - certs[i] = cert.cert + certs[i] = cert } echRejected := c.config.EncryptedClientHelloConfigList != nil && !c.echAccepted @@ -1188,7 +1194,6 @@ func (c *Conn) verifyServerCertificate(certificates [][]byte) error { return fmt.Errorf("tls: server's certificate contains an unsupported type of public key: %T", certs[0].PublicKey) } - c.activeCertHandles = activeHandles c.peerCertificates = certs if c.config.VerifyPeerCertificate != nil && !echRejected { diff --git a/src/crypto/tls/handshake_client_tls13.go b/src/crypto/tls/handshake_client_tls13.go index 444c6f311c..bf3cab97b8 100644 --- a/src/crypto/tls/handshake_client_tls13.go +++ b/src/crypto/tls/handshake_client_tls13.go @@ -466,7 +466,6 @@ func (hs *clientHandshakeStateTLS13) processServerHello() error { hs.usingPSK = true c.didResume = true c.peerCertificates = hs.session.peerCertificates - c.activeCertHandles = hs.session.activeCertHandles c.verifiedChains = hs.session.verifiedChains c.ocspResponse = hs.session.ocspResponse c.scts = hs.session.scts @@ -676,7 +675,9 @@ func (hs *clientHandshakeStateTLS13) readServerCertificate() error { } // See RFC 8446, Section 4.4.3. - if !isSupportedSignatureAlgorithm(certVerify.signatureAlgorithm, supportedSignatureAlgorithms()) { + // We don't use hs.hello.supportedSignatureAlgorithms because it might + // include PKCS#1 v1.5 and SHA-1 if the ClientHello also supported TLS 1.2. + if !isSupportedSignatureAlgorithm(certVerify.signatureAlgorithm, supportedSignatureAlgorithms(c.vers)) { c.sendAlert(alertIllegalParameter) return errors.New("tls: certificate used with invalid signature algorithm") } @@ -685,8 +686,7 @@ func (hs *clientHandshakeStateTLS13) readServerCertificate() error { return c.sendAlert(alertInternalError) } if sigType == signaturePKCS1v15 || sigHash == crypto.SHA1 { - c.sendAlert(alertIllegalParameter) - return errors.New("tls: certificate used with invalid signature algorithm") + return c.sendAlert(alertInternalError) } signed := signedMessage(sigHash, serverSignatureContext, hs.transcript) if err := verifyHandshakeSignature(sigType, c.peerCertificates[0].PublicKey, diff --git a/src/crypto/tls/handshake_messages.go b/src/crypto/tls/handshake_messages.go index 6c6141c421..d9a475aab1 100644 --- a/src/crypto/tls/handshake_messages.go +++ b/src/crypto/tls/handshake_messages.go @@ -1056,6 +1056,7 @@ func (m *encryptedExtensionsMsg) unmarshal(data []byte) bool { return false } + seenExts := make(map[uint16]bool) for !extensions.Empty() { var extension uint16 var extData cryptobyte.String @@ -1064,6 +1065,11 @@ func (m *encryptedExtensionsMsg) unmarshal(data []byte) bool { return false } + if seenExts[extension] { + return false + } + seenExts[extension] = true + switch extension { case extensionALPN: var protoList cryptobyte.String @@ -1784,7 +1790,7 @@ func (m *certificateRequestMsg) unmarshal(data []byte) bool { } sigAndHashLen := uint16(data[0])<<8 | uint16(data[1]) data = data[2:] - if sigAndHashLen&1 != 0 { + if sigAndHashLen&1 != 0 || sigAndHashLen == 0 { return false } if len(data) < int(sigAndHashLen) { diff --git a/src/crypto/tls/handshake_messages_test.go b/src/crypto/tls/handshake_messages_test.go index aafb889b30..fa81a72b0d 100644 --- a/src/crypto/tls/handshake_messages_test.go +++ b/src/crypto/tls/handshake_messages_test.go @@ -72,10 +72,6 @@ func TestMarshalUnmarshal(t *testing.T) { break } - if m, ok := m.(*SessionState); ok { - m.activeCertHandles = nil - } - if ch, ok := m.(*clientHelloMsg); ok { // extensions is special cased, as it is only populated by the // server-side of a handshake and is not expected to roundtrip @@ -183,10 +179,10 @@ func (*clientHelloMsg) Generate(rand *rand.Rand, size int) reflect.Value { } } if rand.Intn(10) > 5 { - m.supportedSignatureAlgorithms = supportedSignatureAlgorithms() + m.supportedSignatureAlgorithms = supportedSignatureAlgorithms(VersionTLS12) } if rand.Intn(10) > 5 { - m.supportedSignatureAlgorithmsCert = supportedSignatureAlgorithms() + m.supportedSignatureAlgorithmsCert = supportedSignatureAlgorithms(VersionTLS12) } for i := 0; i < rand.Intn(5); i++ { m.alpnProtocols = append(m.alpnProtocols, randomString(rand.Intn(20)+1, rand)) @@ -477,10 +473,10 @@ func (*certificateRequestMsgTLS13) Generate(rand *rand.Rand, size int) reflect.V m.scts = true } if rand.Intn(10) > 5 { - m.supportedSignatureAlgorithms = supportedSignatureAlgorithms() + m.supportedSignatureAlgorithms = supportedSignatureAlgorithms(VersionTLS12) } if rand.Intn(10) > 5 { - m.supportedSignatureAlgorithmsCert = supportedSignatureAlgorithms() + m.supportedSignatureAlgorithmsCert = supportedSignatureAlgorithms(VersionTLS12) } if rand.Intn(10) > 5 { m.certificateAuthorities = make([][]byte, 3) diff --git a/src/crypto/tls/handshake_server.go b/src/crypto/tls/handshake_server.go index 5be74e2967..6848407e74 100644 --- a/src/crypto/tls/handshake_server.go +++ b/src/crypto/tls/handshake_server.go @@ -149,7 +149,15 @@ func (c *Conn) readClientHello(ctx context.Context) (*clientHelloMsg, *echServer // the contents of the client hello, since we may swap it out completely. var ech *echServerContext if len(clientHello.encryptedClientHello) != 0 { - clientHello, ech, err = c.processECHClientHello(clientHello) + echKeys := c.config.EncryptedClientHelloKeys + if c.config.GetEncryptedClientHelloKeys != nil { + echKeys, err = c.config.GetEncryptedClientHelloKeys(clientHelloInfo(ctx, c, clientHello)) + if err != nil { + c.sendAlert(alertInternalError) + return nil, nil, err + } + } + clientHello, ech, err = c.processECHClientHello(clientHello, echKeys) if err != nil { return nil, nil, err } @@ -225,7 +233,7 @@ func (hs *serverHandshakeState) processClientHello() error { } if !foundCompression { - c.sendAlert(alertHandshakeFailure) + c.sendAlert(alertIllegalParameter) return errors.New("tls: client does not support uncompressed connections") } @@ -642,7 +650,7 @@ func (hs *serverHandshakeState) doFullHandshake() error { } if c.vers >= VersionTLS12 { certReq.hasSignatureAlgorithm = true - certReq.supportedSignatureAlgorithms = supportedSignatureAlgorithms() + certReq.supportedSignatureAlgorithms = supportedSignatureAlgorithms(c.vers) } // An empty list of certificateAuthorities signals to @@ -764,6 +772,10 @@ func (hs *serverHandshakeState) doFullHandshake() error { if err != nil { return c.sendAlert(alertInternalError) } + if sigHash == crypto.SHA1 { + tlssha1.Value() // ensure godebug is initialized + tlssha1.IncNonDefault() + } } else { sigType, sigHash, err = legacyTypeAndHashFromPublicKey(pub) if err != nil { diff --git a/src/crypto/tls/handshake_server_test.go b/src/crypto/tls/handshake_server_test.go index c72974ef95..a6d64a506a 100644 --- a/src/crypto/tls/handshake_server_test.go +++ b/src/crypto/tls/handshake_server_test.go @@ -157,7 +157,7 @@ func TestRejectSNIWithTrailingDot(t *testing.T) { vers: VersionTLS12, random: make([]byte, 32), serverName: "foo.com.", - }, "unexpected message") + }, "decoding message") } func TestDontSelectECDSAWithRSAKey(t *testing.T) { diff --git a/src/crypto/tls/handshake_server_tls13.go b/src/crypto/tls/handshake_server_tls13.go index fbdf55d461..090ff67fb7 100644 --- a/src/crypto/tls/handshake_server_tls13.go +++ b/src/crypto/tls/handshake_server_tls13.go @@ -804,8 +804,16 @@ func (hs *serverHandshakeStateTLS13) sendServerParameters() error { // If client sent ECH extension, but we didn't accept it, // send retry configs, if available. - if len(hs.c.config.EncryptedClientHelloKeys) > 0 && len(hs.clientHello.encryptedClientHello) > 0 && hs.echContext == nil { - encryptedExtensions.echRetryConfigs, err = buildRetryConfigList(hs.c.config.EncryptedClientHelloKeys) + echKeys := hs.c.config.EncryptedClientHelloKeys + if hs.c.config.GetEncryptedClientHelloKeys != nil { + echKeys, err = hs.c.config.GetEncryptedClientHelloKeys(clientHelloInfo(hs.ctx, c, hs.clientHello)) + if err != nil { + c.sendAlert(alertInternalError) + return err + } + } + if len(echKeys) > 0 && len(hs.clientHello.encryptedClientHello) > 0 && hs.echContext == nil { + encryptedExtensions.echRetryConfigs, err = buildRetryConfigList(echKeys) if err != nil { c.sendAlert(alertInternalError) return err @@ -836,7 +844,8 @@ func (hs *serverHandshakeStateTLS13) sendServerCertificate() error { certReq := new(certificateRequestMsgTLS13) certReq.ocspStapling = true certReq.scts = true - certReq.supportedSignatureAlgorithms = supportedSignatureAlgorithms() + certReq.supportedSignatureAlgorithms = supportedSignatureAlgorithms(c.vers) + certReq.supportedSignatureAlgorithmsCert = supportedSignatureAlgorithmsCert() if c.config.ClientCAs != nil { certReq.certificateAuthorities = c.config.ClientCAs.Subjects() } @@ -1087,7 +1096,9 @@ func (hs *serverHandshakeStateTLS13) readClientCertificate() error { } // See RFC 8446, Section 4.4.3. - if !isSupportedSignatureAlgorithm(certVerify.signatureAlgorithm, supportedSignatureAlgorithms()) { + // We don't use certReq.supportedSignatureAlgorithms because it would + // require keeping the certificateRequestMsgTLS13 around in the hs. + if !isSupportedSignatureAlgorithm(certVerify.signatureAlgorithm, supportedSignatureAlgorithms(c.vers)) { c.sendAlert(alertIllegalParameter) return errors.New("tls: client certificate used with invalid signature algorithm") } @@ -1096,8 +1107,7 @@ func (hs *serverHandshakeStateTLS13) readClientCertificate() error { return c.sendAlert(alertInternalError) } if sigType == signaturePKCS1v15 || sigHash == crypto.SHA1 { - c.sendAlert(alertIllegalParameter) - return errors.New("tls: client certificate used with invalid signature algorithm") + return c.sendAlert(alertInternalError) } signed := signedMessage(sigHash, clientSignatureContext, hs.transcript) if err := verifyHandshakeSignature(sigType, c.peerCertificates[0].PublicKey, diff --git a/src/crypto/tls/key_agreement.go b/src/crypto/tls/key_agreement.go index 3e96242b97..3daa1aa40b 100644 --- a/src/crypto/tls/key_agreement.go +++ b/src/crypto/tls/key_agreement.go @@ -14,6 +14,7 @@ import ( "errors" "fmt" "io" + "slices" ) // A keyAgreement implements the client and server side of a TLS 1.0–1.2 key @@ -214,6 +215,10 @@ func (ka *ecdheKeyAgreement) generateServerKeyExchange(config *Config, cert *Cer if err != nil { return nil, err } + if sigHash == crypto.SHA1 { + tlssha1.Value() // ensure godebug is initialized + tlssha1.IncNonDefault() + } } else { sigType, sigHash, err = legacyTypeAndHashFromPublicKey(priv.Public()) if err != nil { @@ -293,6 +298,10 @@ func (ka *ecdheKeyAgreement) processServerKeyExchange(config *Config, clientHell return errServerKeyExchange } + if !slices.Contains(clientHello.supportedCurves, curveID) { + return errors.New("tls: server selected unoffered curve") + } + if _, ok := curveForCurveID(curveID); !ok { return errors.New("tls: server selected unsupported curve") } @@ -334,6 +343,10 @@ func (ka *ecdheKeyAgreement) processServerKeyExchange(config *Config, clientHell if err != nil { return err } + if sigHash == crypto.SHA1 { + tlssha1.Value() // ensure godebug is initialized + tlssha1.IncNonDefault() + } } else { sigType, sigHash, err = legacyTypeAndHashFromPublicKey(cert.PublicKey) if err != nil { diff --git a/src/crypto/tls/key_schedule.go b/src/crypto/tls/key_schedule.go index 38d6d3f7be..1426a276bf 100644 --- a/src/crypto/tls/key_schedule.go +++ b/src/crypto/tls/key_schedule.go @@ -82,18 +82,3 @@ func curveForCurveID(id CurveID) (ecdh.Curve, bool) { return nil, false } } - -func curveIDForCurve(curve ecdh.Curve) (CurveID, bool) { - switch curve { - case ecdh.X25519(): - return X25519, true - case ecdh.P256(): - return CurveP256, true - case ecdh.P384(): - return CurveP384, true - case ecdh.P521(): - return CurveP521, true - default: - return 0, false - } -} diff --git a/src/crypto/tls/quic_test.go b/src/crypto/tls/quic_test.go index 1bb2e55bdd..51cd4ef765 100644 --- a/src/crypto/tls/quic_test.go +++ b/src/crypto/tls/quic_test.go @@ -9,6 +9,7 @@ import ( "context" "errors" "reflect" + "strings" "testing" ) @@ -278,7 +279,7 @@ func TestQUICPostHandshakeClientAuthentication(t *testing.T) { certReq := new(certificateRequestMsgTLS13) certReq.ocspStapling = true certReq.scts = true - certReq.supportedSignatureAlgorithms = supportedSignatureAlgorithms() + certReq.supportedSignatureAlgorithms = supportedSignatureAlgorithms(VersionTLS13) certReqBytes, err := certReq.marshal() if err != nil { t.Fatal(err) @@ -308,11 +309,11 @@ func TestQUICPostHandshakeKeyUpdate(t *testing.T) { if err != nil { t.Fatal(err) } - if err := cli.conn.HandleData(QUICEncryptionLevelApplication, append([]byte{ - byte(typeKeyUpdate), - byte(0), byte(0), byte(len(keyUpdateBytes)), - }, keyUpdateBytes...)); !errors.Is(err, alertUnexpectedMessage) { - t.Fatalf("key update request: got error %v, want alertUnexpectedMessage", err) + expectedErr := "unexpected key update message" + if err = cli.conn.HandleData(QUICEncryptionLevelApplication, keyUpdateBytes); err == nil { + t.Fatalf("key update request: expected error from post-handshake key update, got nil") + } else if !strings.Contains(err.Error(), expectedErr) { + t.Fatalf("key update request: got error %v, expected substring %q", err, expectedErr) } } diff --git a/src/crypto/tls/testdata/Client-TLSv10-ClientCert-ECDSA-ECDSA b/src/crypto/tls/testdata/Client-TLSv10-ClientCert-ECDSA-ECDSA index b79aec6300..3bd86fd90e 100644 --- a/src/crypto/tls/testdata/Client-TLSv10-ClientCert-ECDSA-ECDSA +++ b/src/crypto/tls/testdata/Client-TLSv10-ClientCert-ECDSA-ECDSA @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 01 00 5d 02 00 00 59 03 01 58 ee cb 2c 2e |....]...Y..X..,.| -00000010 24 e7 e4 50 2b 4b 9c 0f ab f5 79 c1 12 b6 89 e5 |$..P+K....y.....| -00000020 83 41 06 cb 45 f6 66 e9 e1 d2 fe 20 95 fd 7f 15 |.A..E.f.... ....| -00000030 44 4e 44 18 9b fc 16 a7 8a a4 d9 f7 ca 49 85 e8 |DND..........I..| -00000040 00 ce 02 26 38 38 1b 8d 6d 16 f2 b8 c0 09 00 00 |...&88..m.......| +00000000 16 03 01 00 5d 02 00 00 59 03 01 1a 76 c4 d5 b5 |....]...Y...v...| +00000010 7e 30 1c 1e c3 62 8b 92 a8 19 9b 62 4e 36 a1 d3 |~0...b.....bN6..| +00000020 c8 e3 55 f6 64 5f 06 aa 19 9a 48 20 24 a4 2d a9 |..U.d_....H $.-.| +00000030 8a bd cf 4e 9b cf 7d c7 8e 8f e8 ed f5 09 37 ad |...N..}.......7.| +00000040 06 c9 6b a4 d5 de 7f 07 07 a6 9d c7 c0 09 00 00 |..k.............| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 01 02 0e 0b 00 02 0a 00 02 07 00 02 |................| 00000070 04 30 82 02 00 30 82 01 62 02 09 00 b8 bf 2d 47 |.0...0..b.....-G| @@ -57,17 +58,17 @@ 00000250 c9 86 2e dd d7 11 69 7f 85 7c 56 de fb 31 78 2b |......i..|V..1x+| 00000260 e4 c7 78 0d ae cb be 9e 4e 36 24 31 7b 6a 0f 39 |..x.....N6$1{j.9| 00000270 95 12 07 8f 2a 16 03 01 00 b5 0c 00 00 b1 03 00 |....*...........| -00000280 1d 20 b2 d4 b5 f1 3f 61 7d 07 30 8b fd 17 76 41 |. ....?a}.0...vA| -00000290 12 c5 e1 25 f1 e9 ad 68 26 55 4b f5 60 16 b0 44 |...%...h&UK.`..D| -000002a0 90 7a 00 8b 30 81 88 02 42 01 26 8b c1 0d 38 f2 |.z..0...B.&...8.| -000002b0 0f 22 de fd 81 53 5b 5a 87 b6 57 23 33 22 06 8f |."...S[Z..W#3"..| -000002c0 8b 59 f1 70 85 46 41 f2 b7 0c 80 77 df 40 08 77 |.Y.p.FA....w.@.w| -000002d0 e1 b8 21 7f 55 77 c7 b7 ef ef b5 31 ae a0 22 a8 |..!.Uw.....1..".| -000002e0 d3 e0 67 e8 67 bc a9 cb 03 47 76 02 42 00 f4 7a |..g.g....Gv.B..z| -000002f0 eb 2f d0 82 d7 06 75 35 e4 61 fb cf 27 93 95 29 |./....u5.a..'..)| -00000300 6e 2c b5 d4 01 45 5b b6 d9 72 e9 f9 13 a6 5f bd |n,...E[..r...._.| -00000310 24 76 3b 8e 48 7a ce 4f f5 c2 77 75 66 2d 18 6d |$v;.Hz.O..wuf-.m| -00000320 7d 9e c7 95 0c fe 0b 80 15 67 b2 f2 f6 5a dd 16 |}........g...Z..| +00000280 1d 20 3e 61 33 da 82 02 f5 6d 70 2d e5 07 df 43 |. >a3....mp-...C| +00000290 d7 e6 1a b2 81 3e 58 03 dc 27 37 34 3b 2e 5a d5 |.....>X..'74;.Z.| +000002a0 d4 1a 00 8b 30 81 88 02 42 00 8b 0c f4 0f fe 8c |....0...B.......| +000002b0 01 70 3a c5 e5 29 53 1c ad 6c f4 35 53 e3 e6 ce |.p:..)S..l.5S...| +000002c0 19 21 03 de f5 e3 df 8e e5 6b 43 00 08 b7 24 2c |.!.......kC...$,| +000002d0 27 9e 2b bc 2f 96 07 a0 f9 a9 6b d4 b7 75 a8 5d |'.+./.....k..u.]| +000002e0 99 13 ab 5a dd 35 56 08 6d 9c a1 02 42 01 29 62 |...Z.5V.m...B.)b| +000002f0 b9 64 8b 6d 91 b7 f5 59 73 9d 2d bc 9d 9a 5b 43 |.d.m...Ys.-...[C| +00000300 d8 d5 76 be 2a 8f c5 f0 2e 5d a8 be 7b d0 36 fe |..v.*....]..{.6.| +00000310 62 97 7f 17 96 f6 c3 b4 06 2a e2 cb 77 80 ff 28 |b........*..w..(| +00000320 02 64 cb bb c7 a9 77 4b 96 7d 07 11 7e e8 28 16 |.d....wK.}..~.(.| 00000330 03 01 00 0a 0d 00 00 06 03 01 02 40 00 00 16 03 |...........@....| 00000340 01 00 04 0e 00 00 00 |.......| >>> Flow 3 (client to server) @@ -106,30 +107,30 @@ 00000200 e4 fa cc b1 8a ce e2 23 a0 87 f0 e1 67 51 eb 16 |.......#....gQ..| 00000210 03 01 00 25 10 00 00 21 20 2f e5 7d a3 47 cd 62 |...%...! /.}.G.b| 00000220 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 cf |C.(.._.).0......| -00000230 c2 ed 90 99 5f 58 cb 3b 74 16 03 01 00 91 0f 00 |...._X.;t.......| -00000240 00 8d 00 8b 30 81 88 02 42 01 87 b2 c8 53 94 c3 |....0...B....S..| -00000250 9f ea 8a 04 35 1e 53 fb c0 db c5 43 e8 99 b7 81 |....5.S....C....| -00000260 43 fd 47 fd a6 cd 89 b5 0a b9 d0 5d 79 b0 c2 1a |C.G........]y...| -00000270 94 1f d8 2e 2b 8d 23 2a c8 08 63 98 f6 01 1f 8f |....+.#*..c.....| -00000280 67 60 3a 88 44 63 7e 8b 91 3e 48 02 42 00 e1 1f |g`:.Dc~..>H.B...| -00000290 69 9a 97 bb b6 e9 97 4d f5 f5 d7 23 56 be 1d ff |i......M...#V...| -000002a0 f0 22 67 8d a3 a1 13 33 5b f7 0b c2 a3 c8 5a 8c |."g....3[.....Z.| -000002b0 e8 65 b8 a8 7e 6c 99 11 db ab bd 80 0a ca dd 5a |.e..~l.........Z| -000002c0 d4 e0 28 12 38 7a b4 86 e7 3e 13 05 a1 3f 5f 14 |..(.8z...>...?_.| -000002d0 03 01 00 01 01 16 03 01 00 30 9a fa ce 11 0b 50 |.........0.....P| -000002e0 fa a1 59 9b 89 41 a9 0b 1b 74 dd 8f 7b a9 e0 39 |..Y..A...t..{..9| -000002f0 5d e3 cc ee 11 f4 27 15 bc 4c 8f e1 2c 51 ec 8e |].....'..L..,Q..| -00000300 ed 6c 97 75 4c e9 da fb 68 9d |.l.uL...h.| +00000230 c2 ed 90 99 5f 58 cb 3b 74 16 03 01 00 90 0f 00 |...._X.;t.......| +00000240 00 8c 00 8a 30 81 87 02 41 46 5f cc 88 bc 2b e5 |....0...AF_...+.| +00000250 20 33 a9 ff 52 bb 25 dc cf a1 08 45 b5 82 9a 1b | 3..R.%....E....| +00000260 53 04 18 b4 23 20 c4 d2 d8 92 9b 21 a7 ec 36 d6 |S...# .....!..6.| +00000270 63 35 68 4c 21 c4 0e 20 07 0c 8f 38 2f 9b b7 9e |c5hL!.. ...8/...| +00000280 e7 9d 6d ea da 1c a6 f1 c5 d3 02 42 01 ed 54 c8 |..m........B..T.| +00000290 9e b2 45 f1 1f 77 ee e3 a7 3a 40 9b fe 9b 1d 38 |..E..w...:@....8| +000002a0 ff 9b b4 c6 e7 94 07 b8 5f 93 bd 38 8d 31 dd 80 |........_..8.1..| +000002b0 2f 82 6e b5 85 8f 15 8b cd b2 04 81 e2 0b 2a fa |/.n...........*.| +000002c0 d9 4b 47 0b 86 26 8b 4e 83 a6 15 9e 93 15 14 03 |.KG..&.N........| +000002d0 01 00 01 01 16 03 01 00 30 f3 06 0e 6f 16 1b 0b |........0...o...| +000002e0 46 54 37 fd c6 80 0f ec 4b dd d7 d4 17 b2 d7 8d |FT7.....K.......| +000002f0 4e 6a 7f 2a af d2 ea 19 11 8f 23 57 b7 e7 2f b3 |Nj.*......#W../.| +00000300 97 f6 93 3f ac 0d 5c f8 f5 |...?..\..| >>> Flow 4 (server to client) -00000000 14 03 01 00 01 01 16 03 01 00 30 12 06 0c 4d 1c |..........0...M.| -00000010 81 47 06 5f b9 85 68 60 9c 26 4a 14 f2 40 60 7f |.G._..h`.&J..@`.| -00000020 d1 1e 51 9e f2 70 2f be 54 cb 42 b3 b3 8d 90 9c |..Q..p/.T.B.....| -00000030 9d d2 0d e2 f7 b6 56 31 11 af 5f |......V1.._| +00000000 14 03 01 00 01 01 16 03 01 00 30 03 aa a1 4c bf |..........0...L.| +00000010 ab 53 f3 96 e7 db b1 a4 d7 19 f7 2f c0 b7 32 ea |.S........./..2.| +00000020 bd f3 4a 7c 0d 4c df a4 5f a0 3d f3 1b 57 65 a1 |..J|.L.._.=..We.| +00000030 d1 31 ae 52 6e ed 15 d2 d9 23 68 |.1.Rn....#h| >>> Flow 5 (client to server) -00000000 17 03 01 00 20 0f d0 65 cd d4 59 d0 9e 07 06 6d |.... ..e..Y....m| -00000010 8a 11 34 d9 3a 31 59 70 02 39 08 ef 28 98 36 2f |..4.:1Yp.9..(.6/| -00000020 0d 5b d0 23 3f 17 03 01 00 20 5b 16 82 9c 29 c6 |.[.#?.... [...).| -00000030 78 34 76 09 5e bb 01 5e fc 01 b2 55 9b ef 67 a8 |x4v.^..^...U..g.| -00000040 ca 9f b9 6d b5 ea 87 48 8e 76 15 03 01 00 20 43 |...m...H.v.... C| -00000050 12 3b f6 99 31 67 d8 8a 94 d1 37 ef 01 ca a1 62 |.;..1g....7....b| -00000060 9f d7 2a eb 7e 37 79 d9 a4 07 15 5f fb 84 32 |..*.~7y...._..2| +00000000 17 03 01 00 20 aa 0c f4 30 17 b7 59 47 33 91 07 |.... ...0..YG3..| +00000010 cc 52 7b 52 f8 a0 82 44 25 03 0e b4 45 6e 0c 5a |.R{R...D%...En.Z| +00000020 37 6d d6 6d 80 17 03 01 00 20 bc c7 70 3b 94 cc |7m.m..... ..p;..| +00000030 09 db 15 84 d8 b9 c5 cf d6 01 91 93 5b 20 5a b1 |............[ Z.| +00000040 6a 43 23 30 7e 02 ea 8b e0 28 15 03 01 00 20 c2 |jC#0~....(.... .| +00000050 7f c9 90 b3 ef c6 52 68 44 df 05 30 17 39 d9 42 |......RhD..0.9.B| +00000060 76 7a 1d a1 17 2b fa b4 92 ca 40 a9 58 d4 87 |vz...+....@.X..| diff --git a/src/crypto/tls/testdata/Client-TLSv10-ClientCert-ECDSA-RSA b/src/crypto/tls/testdata/Client-TLSv10-ClientCert-ECDSA-RSA index b02fe3d25b..de3de89cd1 100644 --- a/src/crypto/tls/testdata/Client-TLSv10-ClientCert-ECDSA-RSA +++ b/src/crypto/tls/testdata/Client-TLSv10-ClientCert-ECDSA-RSA @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 01 00 5d 02 00 00 59 03 01 0b 4b bc a9 e8 |....]...Y...K...| -00000010 4a 08 69 de 73 f8 fc 53 c6 e9 cd cf 25 7a 5f b6 |J.i.s..S....%z_.| -00000020 60 48 65 3e f5 5f 9f 14 e7 38 a0 20 ec fe 94 b2 |`He>._...8. ....| -00000030 6d a9 d7 91 c4 92 6b 3e a4 2e 88 72 07 c3 47 12 |m.....k>...r..G.| -00000040 78 cc 45 86 f9 56 16 f9 d7 d9 38 c2 c0 13 00 00 |x.E..V....8.....| +00000000 16 03 01 00 5d 02 00 00 59 03 01 fc 68 73 9f 1a |....]...Y...hs..| +00000010 9d 3b 9b f9 10 cf b5 84 b9 31 f4 a8 e9 47 ab 33 |.;.......1...G.3| +00000020 55 42 0b c0 f2 8e fa e7 a0 39 55 20 56 cd 87 f6 |UB.......9U V...| +00000030 05 e0 b1 e9 aa b8 b2 ca 33 9d 46 02 fd d8 f0 11 |........3.F.....| +00000040 0e fc 96 7e b4 fa fc c2 f3 da c4 2b c0 13 00 00 |...~.......+....| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 01 02 59 0b 00 02 55 00 02 52 00 02 |......Y...U..R..| 00000070 4f 30 82 02 4b 30 82 01 b4 a0 03 02 01 02 02 09 |O0..K0..........| @@ -61,17 +62,17 @@ 00000290 73 bb b3 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 |s..Cw.......@.a.| 000002a0 4c 72 2b 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 |Lr+...F..M...>..| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 01 00 aa 0c 00 00 a6 03 00 1d 20 fc 77 2f |............ .w/| -000002d0 88 9a a9 71 3a 14 bf 27 27 40 e0 28 ce e8 e8 3b |...q:..''@.(...;| -000002e0 cd 0a 43 21 75 c9 93 70 9a 22 f1 ec 3a 00 80 d2 |..C!u..p."..:...| -000002f0 cd 71 ae f6 d8 54 5c f3 a4 da c7 64 51 b8 36 b8 |.q...T\....dQ.6.| -00000300 46 d5 8c b1 a0 43 9b f2 b5 2c 12 89 08 39 2b c3 |F....C...,...9+.| -00000310 79 4e 5d 3d 7e 7f d5 51 c3 c5 1e 9e 3b 7c 39 c4 |yN]=~..Q....;|9.| -00000320 c3 64 52 91 94 2f 2c ee aa 7c 0e ed fd 7a 65 bb |.dR../,..|...ze.| -00000330 5a 62 f4 45 24 3d e7 e3 f2 8a 72 74 a7 9d f2 d5 |Zb.E$=....rt....| -00000340 69 be dc 6e 23 fb 68 bb 6e 64 9e 43 a8 f4 08 2b |i..n#.h.nd.C...+| -00000350 86 be ea 88 40 13 5f 3f 0b 18 74 e3 43 76 be 98 |....@._?..t.Cv..| -00000360 b8 15 ea 4d cb 6e 23 3c 8b a9 ce d4 6a e3 13 16 |...M.n#<....j...| +000002c0 16 03 01 00 aa 0c 00 00 a6 03 00 1d 20 74 0e 72 |............ t.r| +000002d0 d9 71 10 de 9b f7 59 f0 c0 a2 b9 35 68 6a 3d f3 |.q....Y....5hj=.| +000002e0 27 fb 13 3d a1 c0 4c f6 17 9b f1 25 50 00 80 c2 |'..=..L....%P...| +000002f0 20 fd 4f 8b c9 6a fc 97 61 9d b3 b0 1d 2d 9a 2f | .O..j..a....-./| +00000300 90 15 44 a7 04 01 0b 6f a9 47 5d a1 46 aa 30 f1 |..D....o.G].F.0.| +00000310 5f 9b db 4d 8d 7a a4 99 3f 5c cb 4a ff 0a 49 b1 |_..M.z..?\.J..I.| +00000320 fc df 0a f7 31 90 a9 98 cd da 8c 49 a5 1f 0f c7 |....1......I....| +00000330 48 63 ee ff a8 fb 07 0a fe e1 d7 1b ed b3 3f ce |Hc............?.| +00000340 39 ef bb 50 e9 a0 f4 c1 6f a6 7e 5b c8 36 1a 76 |9..P....o.~[.6.v| +00000350 c8 00 3b e2 04 98 88 f1 fa 56 34 8f 02 86 0a 8e |..;......V4.....| +00000360 29 4f eb 70 fb 2f 21 ed 8d fa a9 91 66 c9 c0 16 |)O.p./!.....f...| 00000370 03 01 00 0a 0d 00 00 06 03 01 02 40 00 00 16 03 |...........@....| 00000380 01 00 04 0e 00 00 00 |.......| >>> Flow 3 (client to server) @@ -110,30 +111,30 @@ 00000200 e4 fa cc b1 8a ce e2 23 a0 87 f0 e1 67 51 eb 16 |.......#....gQ..| 00000210 03 01 00 25 10 00 00 21 20 2f e5 7d a3 47 cd 62 |...%...! /.}.G.b| 00000220 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 cf |C.(.._.).0......| -00000230 c2 ed 90 99 5f 58 cb 3b 74 16 03 01 00 90 0f 00 |...._X.;t.......| -00000240 00 8c 00 8a 30 81 87 02 41 2c f8 d2 c2 28 75 28 |....0...A,...(u(| -00000250 67 de 75 fb 7a 09 20 8a ec 06 a6 42 03 ad 3c 95 |g.u.z. ....B..<.| -00000260 bb 00 f6 10 71 c7 90 fe 08 16 fa ed 7d 71 24 a2 |....q.......}q$.| -00000270 b6 76 ce f9 1b ff a9 ff 05 b6 dd d8 63 2b 74 86 |.v..........c+t.| -00000280 65 f5 ef f7 36 41 47 77 b5 88 02 42 00 8a 80 f8 |e...6AGw...B....| -00000290 9b cf de a6 b7 c3 d8 48 a1 a0 47 7e cf 33 fc f7 |.......H..G~.3..| -000002a0 fc 87 40 cf 8d c3 81 85 c7 19 9e 37 9e 54 f7 3e |..@........7.T.>| -000002b0 d1 1c 42 83 21 d7 2e ae 02 7b 3c ce 97 f3 9b a0 |..B.!....{<.....| -000002c0 a3 4e b9 a0 9c 78 f0 7e 9c 96 fc 78 e6 08 14 03 |.N...x.~...x....| -000002d0 01 00 01 01 16 03 01 00 30 84 a0 4f 8d 01 40 ca |........0..O..@.| -000002e0 c0 fd ea 1a 9c df 27 cc 25 00 56 e2 30 05 c0 d9 |......'.%.V.0...| -000002f0 c7 21 48 37 6b 35 c3 a4 4e bf 67 98 87 78 0f 3c |.!H7k5..N.g..x.<| -00000300 74 72 4f 6a c5 0d fd 0c 84 |trOj.....| +00000230 c2 ed 90 99 5f 58 cb 3b 74 16 03 01 00 91 0f 00 |...._X.;t.......| +00000240 00 8d 00 8b 30 81 88 02 42 00 88 3e 14 10 fa b5 |....0...B..>....| +00000250 65 d8 03 71 7e b7 44 a5 db 04 85 d2 f4 5d c5 de |e..q~.D......]..| +00000260 71 e4 f9 ad 5e 47 6c 83 eb 6a 2b fc 8d 60 6b 1b |q...^Gl..j+..`k.| +00000270 55 89 7b 03 60 fb 9c b2 b1 42 ef 02 63 29 59 03 |U.{.`....B..c)Y.| +00000280 02 a8 48 4d 9a 3d f3 e9 6b ac 76 02 42 01 90 36 |..HM.=..k.v.B..6| +00000290 5d d0 ec dd 76 75 0c 97 66 7f 10 ec 1d 39 5e bb |]...vu..f....9^.| +000002a0 2c 81 9e 15 fa 59 3f e8 77 3f 33 03 b6 2d 02 5a |,....Y?.w?3..-.Z| +000002b0 28 82 53 7a 18 69 29 5b d9 7d ce 4f 94 d9 69 29 |(.Sz.i)[.}.O..i)| +000002c0 b2 84 87 4a 15 47 c6 da 6f c3 df ca 8a 58 0b 14 |...J.G..o....X..| +000002d0 03 01 00 01 01 16 03 01 00 30 89 15 96 15 9d 93 |.........0......| +000002e0 e3 ae 94 14 f9 ea 39 d7 3b d6 98 e1 ed c8 0a 3f |......9.;......?| +000002f0 6f 2c a2 9b cd c5 ea 1a 1f 27 89 1a 7d ff 60 07 |o,.......'..}.`.| +00000300 22 1f bc b8 56 3a ee 24 5a ff |"...V:.$Z.| >>> Flow 4 (server to client) -00000000 14 03 01 00 01 01 16 03 01 00 30 01 da 6e 2a 83 |..........0..n*.| -00000010 20 ad 52 16 f2 c6 c1 55 b8 77 0d 5f c6 48 dc e7 | .R....U.w._.H..| -00000020 72 29 88 0a 2b 1a d1 1e fd fb c0 c3 18 c8 43 47 |r)..+.........CG| -00000030 a9 8f d3 fe f3 d8 d2 a8 ce 79 44 |.........yD| +00000000 14 03 01 00 01 01 16 03 01 00 30 bf 0c 82 bd 43 |..........0....C| +00000010 ba 60 ec df 88 4d 48 be d5 c4 0c b5 7d c4 94 c4 |.`...MH.....}...| +00000020 15 6e 50 45 77 56 ce d5 e0 4c 15 fc da 96 0b 41 |.nPEwV...L.....A| +00000030 fd 70 39 e9 33 3f 57 77 f5 a3 67 |.p9.3?Ww..g| >>> Flow 5 (client to server) -00000000 17 03 01 00 20 e5 74 9a b9 0b 6c 43 0f 4e db e4 |.... .t...lC.N..| -00000010 ba 10 5d 9a f0 96 16 17 ad a5 42 d8 0d a3 39 86 |..].......B...9.| -00000020 6c f0 8a 64 70 17 03 01 00 20 d2 11 27 ea f2 80 |l..dp.... ..'...| -00000030 a5 5d ba 7b 99 4b 94 25 13 24 29 05 7b 64 00 51 |.].{.K.%.$).{d.Q| -00000040 14 8e d5 e9 e2 c0 5d 98 96 30 15 03 01 00 20 7e |......]..0.... ~| -00000050 87 d2 6c 5c b5 1c 11 72 e1 c4 e5 e0 f3 16 6b db |..l\...r......k.| -00000060 55 c3 c7 ae a9 38 d3 07 04 41 be c5 42 43 a4 |U....8...A..BC.| +00000000 17 03 01 00 20 50 1e 02 79 6b 4b 67 77 bb c0 a7 |.... P..ykKgw...| +00000010 ef 5a c1 cc bc 28 14 86 2c 83 4f 3f 34 97 c4 73 |.Z...(..,.O?4..s| +00000020 24 44 ad 59 8c 17 03 01 00 20 e3 52 89 d7 d1 9a |$D.Y..... .R....| +00000030 33 21 78 e4 41 36 b1 11 74 c0 73 fb ea c9 42 88 |3!x.A6..t.s...B.| +00000040 7f 71 ea 40 a0 3a 62 54 dc b7 15 03 01 00 20 4a |.q.@.:bT...... J| +00000050 ff f4 c6 c0 5f fd e2 b3 bd 4a a9 aa 19 64 2d 98 |...._....J...d-.| +00000060 f1 ea 56 4e 3a c9 1c be 8d fb c3 6c 2f 98 ff |..VN:......l/..| diff --git a/src/crypto/tls/testdata/Client-TLSv10-ClientCert-RSA-ECDSA b/src/crypto/tls/testdata/Client-TLSv10-ClientCert-RSA-ECDSA index ac8a0ebad3..8ce1bad190 100644 --- a/src/crypto/tls/testdata/Client-TLSv10-ClientCert-RSA-ECDSA +++ b/src/crypto/tls/testdata/Client-TLSv10-ClientCert-RSA-ECDSA @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 01 00 5d 02 00 00 59 03 01 6f 48 26 41 da |....]...Y..oH&A.| -00000010 73 82 d1 cf 84 ad 06 e9 76 39 dc e4 c8 34 af 53 |s.......v9...4.S| -00000020 06 ed ed 68 56 5f 76 11 4e f6 ff 20 55 fd 29 c5 |...hV_v.N.. U.).| -00000030 aa 56 af bd 5d 67 74 4f 08 8a 52 a1 7e cd b9 ac |.V..]gtO..R.~...| -00000040 31 a0 2f 45 25 1f b2 24 71 26 80 17 c0 09 00 00 |1./E%..$q&......| +00000000 16 03 01 00 5d 02 00 00 59 03 01 ef c9 5c 4d 29 |....]...Y....\M)| +00000010 07 24 2a 41 08 94 39 cc d3 fb 92 88 1c ff 64 6b |.$*A..9.......dk| +00000020 0a 14 41 89 c6 5d 9b 25 7e a7 04 20 a0 aa ad 46 |..A..].%~.. ...F| +00000030 14 01 d2 dd 37 44 05 4b 1d 9f ea e5 98 29 1e 36 |....7D.K.....).6| +00000040 09 e2 ab 90 93 ee c1 99 7d 17 77 9b c0 09 00 00 |........}.w.....| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 01 02 0e 0b 00 02 0a 00 02 07 00 02 |................| 00000070 04 30 82 02 00 30 82 01 62 02 09 00 b8 bf 2d 47 |.0...0..b.....-G| @@ -56,20 +57,20 @@ 00000240 8c 25 c1 33 13 83 0d 94 06 bb d4 37 7a f6 ec 7a |.%.3.......7z..z| 00000250 c9 86 2e dd d7 11 69 7f 85 7c 56 de fb 31 78 2b |......i..|V..1x+| 00000260 e4 c7 78 0d ae cb be 9e 4e 36 24 31 7b 6a 0f 39 |..x.....N6$1{j.9| -00000270 95 12 07 8f 2a 16 03 01 00 b3 0c 00 00 af 03 00 |....*...........| -00000280 1d 20 51 4c 6f eb 08 70 52 20 15 78 d3 f8 65 5e |. QLo..pR .x..e^| -00000290 0f 59 03 b7 d1 0e e9 7e be 42 d2 cd f3 57 c6 24 |.Y.....~.B...W.$| -000002a0 6b 2c 00 89 30 81 86 02 41 7b 1b ec 11 08 f4 8f |k,..0...A{......| -000002b0 db 2c c5 1b 33 b2 b0 b4 da 76 b9 a7 78 ed ee 0e |.,..3....v..x...| -000002c0 23 5c 4b b0 10 6e 41 12 b9 d4 68 c1 15 ea 70 0a |#\K..nA...h...p.| -000002d0 0c 91 c1 8d 4a 4d 41 c1 c3 25 f1 90 ef 95 f3 e1 |....JMA..%......| -000002e0 a8 30 4d ce 4d d1 eb 8c cf 9a 02 41 09 e0 8c 8e |.0M.M......A....| -000002f0 70 01 f1 5d b2 8a d1 61 bc 86 f4 85 2f 6c ac 2c |p..]...a..../l.,| -00000300 e8 bf 20 c7 81 46 21 6e 9b bd c1 83 71 34 8d 65 |.. ..F!n....q4.e| -00000310 fc 35 07 be c8 ad d4 3a c6 7b 40 1c f7 17 e3 d9 |.5.....:.{@.....| -00000320 96 19 d4 cd 0d d0 8c 4f b2 09 6a 4b 05 16 03 01 |.......O..jK....| -00000330 00 0a 0d 00 00 06 03 01 02 40 00 00 16 03 01 00 |.........@......| -00000340 04 0e 00 00 00 |.....| +00000270 95 12 07 8f 2a 16 03 01 00 b4 0c 00 00 b0 03 00 |....*...........| +00000280 1d 20 a4 4e 43 df 00 5c c7 1c e8 d4 8e 9b cf b0 |. .NC..\........| +00000290 36 85 64 7c d7 69 95 c0 b4 6f d8 0b 45 b8 a4 34 |6.d|.i...o..E..4| +000002a0 1a 18 00 8a 30 81 87 02 42 01 d0 4a 3f 65 9d 46 |....0...B..J?e.F| +000002b0 20 80 34 28 12 93 56 6e dc e4 0e 91 0b 45 4b 83 | .4(..Vn.....EK.| +000002c0 c5 e9 83 2c 41 d6 dc 49 15 15 e6 65 9f 18 ba a6 |...,A..I...e....| +000002d0 20 a6 de c7 20 7e 09 71 e6 59 86 9e aa 32 be 43 | ... ~.q.Y...2.C| +000002e0 b7 c3 27 98 ba 5b 49 9b 1d b9 67 02 41 4e 36 0e |..'..[I...g.AN6.| +000002f0 6d 29 c8 7d 0b d9 6f 06 92 ca 0b b9 33 7e 11 58 |m).}..o.....3~.X| +00000300 2f cc 06 ae ad 57 80 f4 38 a1 8a e3 6a ef 37 86 |/....W..8...j.7.| +00000310 58 1a 59 f9 4a 9a 64 89 5b 7c 8a 7a c5 78 dd b5 |X.Y.J.d.[|.z.x..| +00000320 6c 96 b8 23 ff fc 88 20 59 0b e9 74 99 b9 16 03 |l..#... Y..t....| +00000330 01 00 0a 0d 00 00 06 03 01 02 40 00 00 16 03 01 |..........@.....| +00000340 00 04 0e 00 00 00 |......| >>> Flow 3 (client to server) 00000000 16 03 01 01 fd 0b 00 01 f9 00 01 f6 00 01 f3 30 |...............0| 00000010 82 01 ef 30 82 01 58 a0 03 02 01 02 02 10 5c 19 |...0..X.......\.| @@ -106,29 +107,29 @@ 00000200 e5 35 16 03 01 00 25 10 00 00 21 20 2f e5 7d a3 |.5....%...! /.}.| 00000210 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 |G.bC.(.._.).0...| 00000220 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 16 03 01 00 |......._X.;t....| -00000230 86 0f 00 00 82 00 80 59 18 58 aa 18 70 84 a3 26 |.......Y.X..p..&| -00000240 8c 1d 77 52 a7 2d 00 e5 00 dc 24 1c f6 9b 9f 63 |..wR.-....$....c| -00000250 c8 84 8b dc e7 61 78 9c 28 0d 4c 3a 1e 5f a7 ce |.....ax.(.L:._..| -00000260 35 17 1c b1 de e0 01 32 35 6f 85 59 22 73 50 2a |5......25o.Y"sP*| -00000270 36 df 39 0c c8 c1 45 70 a2 e4 53 bb de e6 0e 6a |6.9...Ep..S....j| -00000280 fd 45 8e 4d eb 1f de 86 d3 fb 94 e4 8d 22 cd 30 |.E.M.........".0| -00000290 e7 29 de 65 f0 2a cd b8 3d b5 be 91 a3 7d 3b 30 |.).e.*..=....};0| -000002a0 1a a5 63 bd 84 1f 95 19 d1 fe 25 40 b8 8f ab 96 |..c.......%@....| -000002b0 59 42 e6 31 93 c0 39 14 03 01 00 01 01 16 03 01 |YB.1..9.........| -000002c0 00 30 a9 f7 c0 97 f4 b8 06 65 a6 7c fb 80 a1 79 |.0.......e.|...y| -000002d0 5f 44 72 55 13 d1 ca e3 9a 91 5d 1e 08 93 6d b5 |_DrU......]...m.| -000002e0 1c 5e 52 24 b1 ec db aa 3b bc fe db 18 0b 18 fe |.^R$....;.......| -000002f0 51 6a |Qj| +00000230 86 0f 00 00 82 00 80 a4 68 2d 1f 8a 97 43 76 aa |........h-...Cv.| +00000240 f9 24 95 20 62 13 c0 a3 45 c6 18 1c a3 34 70 02 |.$. b...E....4p.| +00000250 ff f5 01 4e ba e2 20 1c f9 06 a6 67 92 d9 e6 9d |...N.. ....g....| +00000260 a3 49 e0 75 3e 11 00 74 52 b1 36 58 4b 1e 54 83 |.I.u>..tR.6XK.T.| +00000270 e0 9a 48 4d df 2c ab fd cd 5e 7a cf c9 b8 32 08 |..HM.,...^z...2.| +00000280 74 e6 ae 75 20 f4 41 3a 7c a9 a3 19 38 a0 8d 05 |t..u .A:|...8...| +00000290 0a e9 3e 50 6c f6 f8 a3 89 a9 55 ea dc 3f be b1 |..>Pl.....U..?..| +000002a0 0a 92 83 cc f0 9b c9 e1 49 13 db 64 be 55 46 b5 |........I..d.UF.| +000002b0 12 b1 0b 88 32 e3 f1 14 03 01 00 01 01 16 03 01 |....2...........| +000002c0 00 30 81 77 0f 6c 7a bc a8 d2 41 f9 8b a7 da 96 |.0.w.lz...A.....| +000002d0 29 f1 2f b1 31 f3 57 03 09 21 5c fa dc f7 5c f6 |)./.1.W..!\...\.| +000002e0 7f a8 24 08 30 70 bb 34 16 22 f8 c6 b2 4d a7 16 |..$.0p.4."...M..| +000002f0 68 61 |ha| >>> Flow 4 (server to client) -00000000 14 03 01 00 01 01 16 03 01 00 30 e6 36 50 e7 a3 |..........0.6P..| -00000010 72 0a 6a 9f 18 17 91 51 ad 48 19 54 c8 6b c0 45 |r.j....Q.H.T.k.E| -00000020 d5 9b cb 08 34 d3 3a 73 74 04 3a 3d 24 b0 95 48 |....4.:st.:=$..H| -00000030 97 9e c5 83 4f 20 29 c8 dd 93 6c |....O )...l| +00000000 14 03 01 00 01 01 16 03 01 00 30 71 d2 ee cd f8 |..........0q....| +00000010 c5 fe b4 96 d5 02 ee cb f7 f8 93 34 f2 8a ed 71 |...........4...q| +00000020 9a b7 1f 01 9d fb 6c 3f ee 22 bb 5c b0 8c 08 f5 |......l?.".\....| +00000030 bf 1e d3 1c 12 ec 7b 86 05 bd e5 |......{....| >>> Flow 5 (client to server) -00000000 17 03 01 00 20 58 a1 0a 68 2c 04 68 7d e9 13 ce |.... X..h,.h}...| -00000010 69 4b 53 4a f6 fc e0 c8 0e 05 ad 19 d8 b3 37 67 |iKSJ..........7g| -00000020 f2 1f 3b 33 62 17 03 01 00 20 c2 e7 d3 d2 38 ba |..;3b.... ....8.| -00000030 27 13 ed d1 73 fc 9b f5 4f 61 f0 35 27 8e 54 52 |'...s...Oa.5'.TR| -00000040 b7 ce bd 6a 05 c6 61 95 1e 8a 15 03 01 00 20 6e |...j..a....... n| -00000050 07 21 86 31 f8 74 6b 45 4d 10 2f 5d e7 2b 64 77 |.!.1.tkEM./].+dw| -00000060 a9 7f 1e 49 ed d5 d4 1e 2e f2 b1 c5 4d 02 46 |...I........M.F| +00000000 17 03 01 00 20 8a 57 b3 89 76 41 f0 b3 51 da f4 |.... .W..vA..Q..| +00000010 e7 6a f8 46 75 77 4d 8b 67 41 f9 f9 eb a0 cd 12 |.j.FuwM.gA......| +00000020 78 08 12 d1 7b 17 03 01 00 20 9d 44 6a dd 48 ad |x...{.... .Dj.H.| +00000030 0a d9 3f 80 da b1 3d b3 50 be 40 c1 85 b5 bb 59 |..?...=.P.@....Y| +00000040 e8 b9 2a 9f f5 2e 98 d3 2b c1 15 03 01 00 20 bd |..*.....+..... .| +00000050 69 41 45 bb 53 de f8 b7 bf a5 87 12 02 32 1a 05 |iAE.S........2..| +00000060 09 94 40 a5 64 b3 31 7d 0d dc 01 ff 25 ca 31 |..@.d.1}....%.1| diff --git a/src/crypto/tls/testdata/Client-TLSv10-ClientCert-RSA-RSA b/src/crypto/tls/testdata/Client-TLSv10-ClientCert-RSA-RSA index 48eb1ce641..37d05fc481 100644 --- a/src/crypto/tls/testdata/Client-TLSv10-ClientCert-RSA-RSA +++ b/src/crypto/tls/testdata/Client-TLSv10-ClientCert-RSA-RSA @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 01 00 5d 02 00 00 59 03 01 24 71 03 c6 1d |....]...Y..$q...| -00000010 d4 f5 09 b2 3c d8 88 51 57 4c 90 07 4b 74 fe 1d |....<..QWL..Kt..| -00000020 c9 7f 00 78 9b a3 b2 1b ef 43 66 20 07 97 7c a6 |...x.....Cf ..|.| -00000030 9b c6 a9 47 42 ae 99 bf 59 fe 52 f6 da d9 1c 68 |...GB...Y.R....h| -00000040 c2 7a 53 3f 27 0d 11 87 9a 47 81 5c c0 13 00 00 |.zS?'....G.\....| +00000000 16 03 01 00 5d 02 00 00 59 03 01 71 32 68 84 f2 |....]...Y..q2h..| +00000010 93 91 32 5b 71 e6 d1 fd 26 83 00 87 0f 56 f3 8a |..2[q...&....V..| +00000020 70 17 5e c9 c3 b3 ce 61 9a 1d 4d 20 85 cc 39 26 |p.^....a..M ..9&| +00000030 32 1a 78 34 d5 d3 6c e2 df 89 f5 a0 51 2c f5 2d |2.x4..l.....Q,.-| +00000040 e0 17 51 e7 51 f4 61 8d 35 72 75 92 c0 13 00 00 |..Q.Q.a.5ru.....| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 01 02 59 0b 00 02 55 00 02 52 00 02 |......Y...U..R..| 00000070 4f 30 82 02 4b 30 82 01 b4 a0 03 02 01 02 02 09 |O0..K0..........| @@ -61,17 +62,17 @@ 00000290 73 bb b3 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 |s..Cw.......@.a.| 000002a0 4c 72 2b 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 |Lr+...F..M...>..| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 01 00 aa 0c 00 00 a6 03 00 1d 20 ad a7 d5 |............ ...| -000002d0 fc 63 e1 22 f8 1f 8d ad 50 09 1a 92 a4 57 ea 88 |.c."....P....W..| -000002e0 6d 9c 20 70 f1 8b 85 15 ec 8e b2 b3 07 00 80 b1 |m. p............| -000002f0 03 03 a7 cf 8f 73 e2 a3 29 0d 55 4a 06 72 db e5 |.....s..).UJ.r..| -00000300 65 41 44 49 05 1c 37 17 1c 02 6e b1 f4 e8 a9 bb |eADI..7...n.....| -00000310 00 24 3e 3a 3c d6 1c f6 dd 21 a4 e3 61 b0 1d 2e |.$>:<....!..a...| -00000320 77 11 53 51 4d 49 1e 07 bf 07 61 d1 54 f4 c7 24 |w.SQMI....a.T..$| -00000330 4f 7d 5c 5a fb 84 c0 9d 0e 52 12 b6 40 72 37 fd |O}\Z.....R..@r7.| -00000340 8c bd d0 8a b1 9e 2c 18 bc 04 a3 c2 90 a3 33 4c |......,.......3L| -00000350 06 7c 14 a8 73 7d d2 23 30 f9 31 12 56 31 60 19 |.|..s}.#0.1.V1`.| -00000360 d1 0d 31 c1 3c 25 66 62 5c 9b 13 5e 34 c6 69 16 |..1.<%fb\..^4.i.| +000002c0 16 03 01 00 aa 0c 00 00 a6 03 00 1d 20 3a 64 e7 |............ :d.| +000002d0 9a 59 c3 4e fc 40 5e 2f 5c 89 cd e1 94 85 4e 1f |.Y.N.@^/\.....N.| +000002e0 29 37 0b 53 fe 3a 13 76 56 25 2a 97 65 00 80 08 |)7.S.:.vV%*.e...| +000002f0 1c de 63 0d 31 9b 72 7b 85 0c 03 b0 08 ea 80 a1 |..c.1.r{........| +00000300 ee 00 03 f9 29 a3 ba 8e c8 71 3e b4 4d b3 28 54 |....)....q>.M.(T| +00000310 2c e7 11 3a 15 e0 43 06 f0 36 15 50 54 5e 88 48 |,..:..C..6.PT^.H| +00000320 ac c4 68 db 83 dc 0c 22 e4 99 4a 08 2a 00 7d 19 |..h...."..J.*.}.| +00000330 0d 74 ba 7a 27 9c 39 dc 29 41 52 cf a2 ac 29 94 |.t.z'.9.)AR...).| +00000340 e6 b0 87 60 e5 d3 58 af 3e 8e 41 bd be 48 ba 90 |...`..X.>.A..H..| +00000350 49 b2 b1 d3 8e b0 49 98 4a 12 70 60 c7 57 d9 a7 |I.....I.J.p`.W..| +00000360 db dc 41 b0 dc 81 37 1b 6d ac 9c 69 12 f4 fa 16 |..A...7.m..i....| 00000370 03 01 00 0a 0d 00 00 06 03 01 02 40 00 00 16 03 |...........@....| 00000380 01 00 04 0e 00 00 00 |.......| >>> Flow 3 (client to server) @@ -110,29 +111,29 @@ 00000200 e5 35 16 03 01 00 25 10 00 00 21 20 2f e5 7d a3 |.5....%...! /.}.| 00000210 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 |G.bC.(.._.).0...| 00000220 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 16 03 01 00 |......._X.;t....| -00000230 86 0f 00 00 82 00 80 59 e2 7d 00 66 f0 59 a0 19 |.......Y.}.f.Y..| -00000240 b6 4f 26 80 ad 31 b4 b3 c2 56 af 84 bf 88 15 7f |.O&..1...V......| -00000250 dc 29 fc 51 f2 cf 0d ec 52 46 c5 c5 cd 24 c1 93 |.).Q....RF...$..| -00000260 5b f6 06 09 ad bb 9a 4a ae 5d ec 57 f8 96 a8 b1 |[......J.].W....| -00000270 4b 81 45 7d 34 38 59 ea 76 47 76 1c 7f 7b 68 e9 |K.E}48Y.vGv..{h.| -00000280 89 7b 5d 4c b9 bc 5a 26 e1 f7 6c 42 f7 c6 6d bb |.{]L..Z&..lB..m.| -00000290 c0 c7 bd f6 5e 9e 51 d8 30 ec 9f da 56 0a b7 2a |....^.Q.0...V..*| -000002a0 6c 5e 50 d1 74 48 70 4a 88 62 16 a1 ba f2 01 e5 |l^P.tHpJ.b......| -000002b0 00 b6 eb cb e3 18 cf 14 03 01 00 01 01 16 03 01 |................| -000002c0 00 30 61 51 84 02 46 3c 10 62 b5 2a a2 8b 4e 2d |.0aQ..F<.b.*..N-| -000002d0 57 55 26 c5 46 f2 5d a1 f5 20 46 0d 63 fd 48 5a |WU&.F.].. F.c.HZ| -000002e0 f3 65 90 8c 1a bd 59 6e 5f d1 5c b6 ee 33 49 12 |.e....Yn_.\..3I.| -000002f0 46 ec |F.| +00000230 86 0f 00 00 82 00 80 21 34 0c d8 10 ac 90 53 f9 |.......!4.....S.| +00000240 18 52 42 05 ca e8 c7 4f 33 c4 43 4b 8e 7c e4 23 |.RB....O3.CK.|.#| +00000250 21 6d e4 07 ef 3f 06 d1 ea 1c 9d 3b e0 d2 66 36 |!m...?.....;..f6| +00000260 b5 c9 a1 da fe 54 fd e0 fe 0c b6 12 90 93 41 1f |.....T........A.| +00000270 43 00 00 e4 a4 04 14 af 00 3e 1b db 16 d6 07 4b |C........>.....K| +00000280 55 2f ed 55 e1 e1 a8 8b d8 e1 fe cb 41 1d fe bc |U/.U........A...| +00000290 6d d9 ba 8f 2b 1c 26 19 9d 93 a9 78 fb 8a 54 59 |m...+.&....x..TY| +000002a0 76 3b 0a df e6 71 2c c0 63 dd 22 8d c6 70 ef 0e |v;...q,.c."..p..| +000002b0 4f 1b 4c da 65 11 f6 14 03 01 00 01 01 16 03 01 |O.L.e...........| +000002c0 00 30 b5 c2 b0 f3 b6 6c 4a 99 de f2 98 2f 37 2b |.0.....lJ..../7+| +000002d0 8a d8 ab 96 91 c2 9b cc 56 5c fb e1 4f 5b 89 09 |........V\..O[..| +000002e0 5f 94 05 60 0e 83 b5 49 9a 15 9b 0f 5d 1a 2b a2 |_..`...I....].+.| +000002f0 11 23 |.#| >>> Flow 4 (server to client) -00000000 14 03 01 00 01 01 16 03 01 00 30 b1 3c 7f c3 15 |..........0.<...| -00000010 e4 fe bc 1a ee 0d ec 28 ce b0 f7 fd a4 0a e4 79 |.......(.......y| -00000020 37 09 68 de 58 f8 e8 76 7d 9c 09 35 42 7e 00 8e |7.h.X..v}..5B~..| -00000030 4c 8d d1 60 26 d4 09 c5 8b d0 96 |L..`&......| +00000000 14 03 01 00 01 01 16 03 01 00 30 63 a2 f0 9b 1c |..........0c....| +00000010 48 6d 23 54 62 b1 2a 19 e7 89 51 fd 0d 83 97 87 |Hm#Tb.*...Q.....| +00000020 9b 73 31 11 5e 42 56 62 62 37 4d e5 e6 72 8a 6d |.s1.^BVbb7M..r.m| +00000030 a3 02 2b 2c 9e a5 1a 5c 34 f2 0d |..+,...\4..| >>> Flow 5 (client to server) -00000000 17 03 01 00 20 6c bb 09 ee 1d 96 6c 63 5b b6 69 |.... l.....lc[.i| -00000010 bf ea ad 7a 85 36 a2 4b d2 f0 73 18 91 b1 42 e5 |...z.6.K..s...B.| -00000020 77 d0 6c ff ab 17 03 01 00 20 ed 85 78 3b bd 49 |w.l...... ..x;.I| -00000030 2c f3 02 24 f2 18 72 96 a0 49 6b 06 bd bb 54 25 |,..$..r..Ik...T%| -00000040 0a 3e ff 07 45 6b 6c cc a6 d2 15 03 01 00 20 07 |.>..Ekl....... .| -00000050 9a fb b7 cc 01 cd f7 b6 90 d3 b6 a7 31 15 99 e2 |............1...| -00000060 e7 e8 2b a5 c0 e8 a9 9d fe 4e 11 0d 4a d4 b7 |..+......N..J..| +00000000 17 03 01 00 20 63 1a 2c 25 27 68 ed de ba 94 52 |.... c.,%'h....R| +00000010 73 f2 7a 28 ed 8c e9 3f a2 48 9a 07 62 22 27 6d |s.z(...?.H..b"'m| +00000020 4e be ba e4 67 17 03 01 00 20 1d ee ac 7c fc a7 |N...g.... ...|..| +00000030 df 74 93 16 c6 ec 58 5e 04 5d 2e 98 0a ba 52 4f |.t....X^.]....RO| +00000040 a0 02 c5 79 c3 d6 f0 ab 8d 33 15 03 01 00 20 bb |...y.....3.... .| +00000050 54 a6 65 a7 c9 03 e7 83 ae a1 f3 26 9f 73 76 6b |T.e........&.svk| +00000060 e6 1e f7 e0 76 e5 ca 9f c8 87 14 ac 27 f1 e3 |....v.......'..| diff --git a/src/crypto/tls/testdata/Client-TLSv10-ECDHE-ECDSA-AES b/src/crypto/tls/testdata/Client-TLSv10-ECDHE-ECDSA-AES index ac354c50bc..a8593e249b 100644 --- a/src/crypto/tls/testdata/Client-TLSv10-ECDHE-ECDSA-AES +++ b/src/crypto/tls/testdata/Client-TLSv10-ECDHE-ECDSA-AES @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 01 00 5d 02 00 00 59 03 01 70 d2 b8 0b 74 |....]...Y..p...t| -00000010 93 b4 60 d7 ab 1d 0f f3 7c d0 b5 f8 a2 78 45 30 |..`.....|....xE0| -00000020 b1 41 9b b6 73 bd 05 d8 85 16 66 20 e8 26 8d 7a |.A..s.....f .&.z| -00000030 e2 da e0 a0 7a c9 19 d1 dd db 2b bc b4 b2 56 39 |....z.....+...V9| -00000040 9f e6 62 75 29 96 40 b3 0d c0 db 65 c0 09 00 00 |..bu).@....e....| +00000000 16 03 01 00 5d 02 00 00 59 03 01 3e 61 ab b7 94 |....]...Y..>a...| +00000010 d9 7c 76 db 26 b6 fc 86 00 8f c4 af bd c6 1a 22 |.|v.&.........."| +00000020 dd 72 ce 5d 2a 4c d8 61 a1 20 6b 20 c9 82 ca c9 |.r.]*L.a. k ....| +00000030 99 59 80 37 6c 01 d2 b3 b5 0d 68 9f 65 b0 15 7d |.Y.7l.....h.e..}| +00000040 a6 b0 15 b0 49 5a ae 38 d2 77 5e 06 c0 09 00 00 |....IZ.8.w^.....| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 01 02 0e 0b 00 02 0a 00 02 07 00 02 |................| 00000070 04 30 82 02 00 30 82 01 62 02 09 00 b8 bf 2d 47 |.0...0..b.....-G| @@ -56,37 +57,37 @@ 00000240 8c 25 c1 33 13 83 0d 94 06 bb d4 37 7a f6 ec 7a |.%.3.......7z..z| 00000250 c9 86 2e dd d7 11 69 7f 85 7c 56 de fb 31 78 2b |......i..|V..1x+| 00000260 e4 c7 78 0d ae cb be 9e 4e 36 24 31 7b 6a 0f 39 |..x.....N6$1{j.9| -00000270 95 12 07 8f 2a 16 03 01 00 b4 0c 00 00 b0 03 00 |....*...........| -00000280 1d 20 5f 81 8f 18 31 4e 64 fe 87 f2 da c6 45 45 |. _...1Nd.....EE| -00000290 54 e3 54 c6 a0 bb bf bd d1 01 c5 7b 08 d8 32 6b |T.T........{..2k| -000002a0 a8 31 00 8a 30 81 87 02 42 01 21 7e c2 26 cb 5e |.1..0...B.!~.&.^| -000002b0 f1 2a d2 9b 7f 3f b4 d4 28 5e 63 5a 20 aa 28 87 |.*...?..(^cZ .(.| -000002c0 bb dd 5c 6a 91 a2 2d 03 7a 69 67 8b ca 84 a6 1f |..\j..-.zig.....| -000002d0 d3 58 40 eb 5c 54 95 96 05 d0 37 63 e4 a6 1b 51 |.X@.\T....7c...Q| -000002e0 9a d0 93 31 82 e6 8e a0 af 29 64 02 41 4c ff ac |...1.....)d.AL..| -000002f0 44 74 e0 04 2c ab 1c 23 91 dc 06 36 ff 19 a1 60 |Dt..,..#...6...`| -00000300 19 d4 e5 d3 78 f5 ed d8 09 7b de 61 6f 65 2c 69 |....x....{.aoe,i| -00000310 a1 d2 5d 07 bf 99 26 2b 70 fa 34 26 30 41 59 3b |..]...&+p.4&0AY;| -00000320 bc a3 10 9c 92 fa 60 a7 df ea e4 8a 3a 76 16 03 |......`.....:v..| -00000330 01 00 04 0e 00 00 00 |.......| +00000270 95 12 07 8f 2a 16 03 01 00 b5 0c 00 00 b1 03 00 |....*...........| +00000280 1d 20 73 36 95 70 b0 c6 fd c6 cf 68 f3 77 1e 46 |. s6.p.....h.w.F| +00000290 c2 22 3e f8 e6 f4 37 82 73 8e 8d ec 40 64 0d a9 |.">...7.s...@d..| +000002a0 f7 6f 00 8b 30 81 88 02 42 01 2f 8b 24 b7 24 65 |.o..0...B./.$.$e| +000002b0 6e f8 a3 55 53 3f da 67 a2 b6 35 b3 ef 8b 87 39 |n..US?.g..5....9| +000002c0 2f 44 e8 a6 9d 2c 16 c1 82 a9 a9 f6 20 0f 1b 36 |/D...,...... ..6| +000002d0 32 b8 7a 96 2d 5a b0 4d 43 53 ec c9 06 82 83 0e |2.z.-Z.MCS......| +000002e0 fb 0b 8c f8 0b 47 b6 dd 19 4c 96 02 42 01 c6 7e |.....G...L..B..~| +000002f0 20 9e d9 2f 33 1f 5f 25 bc 79 a3 df 96 9d e0 05 | ../3._%.y......| +00000300 d7 72 75 29 7d b3 f2 0a 5e 81 39 71 b7 f9 68 e8 |.ru)}...^.9q..h.| +00000310 82 07 93 80 88 31 77 2c db 8b 58 49 28 c5 7b c1 |.....1w,..XI(.{.| +00000320 e3 84 3c b9 08 2e a0 ab 66 12 b9 3c b9 a2 e8 16 |..<.....f..<....| +00000330 03 01 00 04 0e 00 00 00 |........| >>> Flow 3 (client to server) 00000000 16 03 01 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 01 00 01 01 |....._X.;t......| -00000030 16 03 01 00 30 6d 2a 91 d7 c3 8f 1c d8 d4 cc 67 |....0m*........g| -00000040 ed 07 41 c2 9c 48 0d bd 7f 11 61 00 58 23 55 88 |..A..H....a.X#U.| -00000050 f9 bd da 92 bc e4 8d 47 c0 ac 72 43 7f 2d 0f b5 |.......G..rC.-..| -00000060 de bb 67 6e 9f |..gn.| +00000030 16 03 01 00 30 9a 24 ee 81 ee 6e b3 fe ab 63 04 |....0.$...n...c.| +00000040 ae b1 1b 11 91 b0 cc 45 b8 67 74 9e 92 15 fd b1 |.......E.gt.....| +00000050 b4 49 49 b4 f4 a5 61 01 1b ec 91 23 ec c0 98 8d |.II...a....#....| +00000060 ee 21 fd 29 95 |.!.).| >>> Flow 4 (server to client) -00000000 14 03 01 00 01 01 16 03 01 00 30 be 25 a7 fa 04 |..........0.%...| -00000010 a5 dd 58 c1 5f a6 31 f8 fc fc db 27 a1 c7 0b 7c |..X._.1....'...|| -00000020 a5 9a 0f bd 07 09 d9 9b 95 bf f4 a5 80 c7 7d bd |..............}.| -00000030 a0 37 25 68 46 63 37 37 5f 3d b2 |.7%hFc77_=.| +00000000 14 03 01 00 01 01 16 03 01 00 30 74 d2 f1 68 1e |..........0t..h.| +00000010 1e 11 8a eb 51 ae a6 19 af 60 09 c4 85 65 3e 71 |....Q....`...e>q| +00000020 af d0 94 14 c3 80 18 91 72 23 97 26 f8 91 2f d6 |........r#.&../.| +00000030 65 3c 02 06 10 d0 bb e7 92 57 b0 |e<.......W.| >>> Flow 5 (client to server) -00000000 17 03 01 00 20 98 6e bd 0c 0e 46 88 05 6d 67 b3 |.... .n...F..mg.| -00000010 a7 92 7a 3c f2 98 8b ab 07 9e 80 bc 7a 5e 70 1a |..z<........z^p.| -00000020 2b 3d 2f 28 c9 17 03 01 00 20 f1 a8 ac 45 f6 60 |+=/(..... ...E.`| -00000030 ac 76 4e 66 1b a1 23 65 9c 55 6b 0b d4 cb 0a 43 |.vNf..#e.Uk....C| -00000040 42 d1 1e 1b 61 45 16 8e a8 c2 15 03 01 00 20 3d |B...aE........ =| -00000050 c0 ac 27 49 be 69 0e 23 cd 1b ea 01 0f 97 66 34 |..'I.i.#......f4| -00000060 f8 bd a6 40 35 af 5b 1f cf 42 25 54 aa 2f 2e |...@5.[..B%T./.| +00000000 17 03 01 00 20 bf f3 92 9c 91 50 02 1e d2 29 17 |.... .....P...).| +00000010 2c 5d 5f 43 c9 de 49 db 7b 0b bf eb 77 c5 9a 37 |,]_C..I.{...w..7| +00000020 c7 e1 c3 83 a3 17 03 01 00 20 df 80 0b 7e 80 39 |......... ...~.9| +00000030 b3 46 d8 7c 09 7a a8 c1 3a 04 77 2f 94 30 eb 8e |.F.|.z..:.w/.0..| +00000040 5d 56 08 95 bb 50 80 76 4b e7 15 03 01 00 20 0e |]V...P.vK..... .| +00000050 91 ba 25 bb d6 f6 ee 42 e0 8e 08 a1 7f d5 8f e3 |..%....B........| +00000060 18 05 85 24 b6 0c 81 80 98 89 ae 2c 04 0e 8a |...$.......,...| diff --git a/src/crypto/tls/testdata/Client-TLSv10-ECDHE-RSA-AES b/src/crypto/tls/testdata/Client-TLSv10-ECDHE-RSA-AES index 694cd4ce89..b73fd761c4 100644 --- a/src/crypto/tls/testdata/Client-TLSv10-ECDHE-RSA-AES +++ b/src/crypto/tls/testdata/Client-TLSv10-ECDHE-RSA-AES @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 01 00 5d 02 00 00 59 03 01 5a a9 a1 6f fa |....]...Y..Z..o.| -00000010 19 95 38 9e 68 42 d7 0f 73 23 09 3f 01 5f e8 ae |..8.hB..s#.?._..| -00000020 d7 06 a2 9b d3 01 0f 0d 23 53 7d 20 55 2b 67 4e |........#S} U+gN| -00000030 8b 44 94 a5 25 ef b7 fb e1 c7 85 e8 15 60 f9 d7 |.D..%........`..| -00000040 6d a4 3f 3d 42 d7 78 a6 41 49 b7 12 c0 13 00 00 |m.?=B.x.AI......| +00000000 16 03 01 00 5d 02 00 00 59 03 01 79 f2 d6 96 d6 |....]...Y..y....| +00000010 6d c9 a1 7a 04 ba 6d 7d 29 8d 91 3f 8e 2e 17 0f |m..z..m})..?....| +00000020 c8 c4 3a e1 3c 64 00 28 f8 21 9d 20 16 7b 80 30 |..:...| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 01 00 aa 0c 00 00 a6 03 00 1d 20 a7 ec f4 |............ ...| -000002d0 c7 51 5e a0 fb 55 5a 01 34 cc d1 a6 22 df d6 00 |.Q^..UZ.4..."...| -000002e0 f5 73 e0 9e b8 9d 2a a9 49 3a 99 ba 17 00 80 14 |.s....*.I:......| -000002f0 95 47 77 a1 48 b4 e7 ba 6a e8 0e 4e ee 55 25 f5 |.Gw.H...j..N.U%.| -00000300 ea 82 65 b4 3f db a2 94 03 cc d3 6c 4a e6 cf 57 |..e.?......lJ..W| -00000310 25 4c 79 b8 fb ab dd 1f 68 e4 55 87 b1 46 12 30 |%Ly.....h.U..F.0| -00000320 5e 9f 3d 4a 52 24 76 50 c8 54 83 a2 b9 f5 a6 e0 |^.=JR$vP.T......| -00000330 ec e1 fb ae dd ca d2 c9 b2 31 d5 d4 73 f4 c0 0a |.........1..s...| -00000340 29 1c d3 8e 87 4c b4 0a 37 e8 77 e4 e2 a7 e9 9c |)....L..7.w.....| -00000350 04 ba af 31 dc 2e 5a b3 2e f3 58 e6 21 0a e2 1c |...1..Z...X.!...| -00000360 d4 c6 be b1 70 83 22 05 f8 78 12 6e bd 53 22 16 |....p."..x.n.S".| +000002c0 16 03 01 00 aa 0c 00 00 a6 03 00 1d 20 69 9e db |............ i..| +000002d0 5f 4b 5e 7d 1e 00 1e 91 a6 49 81 e3 d9 ee ea 5e |_K^}.....I.....^| +000002e0 5c 40 f0 68 fd dd eb 6e e4 85 58 91 70 00 80 8e |\@.h...n..X.p...| +000002f0 d6 64 01 3a 56 c2 58 5c 60 28 bc f6 bd 1e bf 73 |.d.:V.X\`(.....s| +00000300 21 b8 1a ea fb c2 df d5 f1 b9 4d d7 6f 1c 8b 24 |!.........M.o..$| +00000310 99 35 a5 ef 20 75 00 3e 83 34 da 40 4e ec e3 43 |.5.. u.>.4.@N..C| +00000320 04 a4 f2 1e bb 97 23 3e 21 32 88 43 80 99 ec 43 |......#>!2.C...C| +00000330 66 c3 09 87 1e e2 ad bb c3 1c db f7 9a 59 3a a8 |f............Y:.| +00000340 46 43 b6 3d 9a 6e c3 42 5b 1a 7d 85 dc db 96 cc |FC.=.n.B[.}.....| +00000350 8d 06 cc 08 d2 f0 09 c3 c6 ed 5f 3b f6 b0 a3 69 |.........._;...i| +00000360 6c a8 9a a5 ef ad 59 c1 07 96 e8 34 1d f0 d9 16 |l.....Y....4....| 00000370 03 01 00 04 0e 00 00 00 |........| >>> Flow 3 (client to server) 00000000 16 03 01 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 01 00 01 01 |....._X.;t......| -00000030 16 03 01 00 30 0f 56 a4 2c c6 11 a2 0a a8 f7 ff |....0.V.,.......| -00000040 6e 71 19 e9 e5 c0 e2 6b 86 9b b1 5d 46 8d 62 93 |nq.....k...]F.b.| -00000050 69 7c 28 6f 25 3d dc ce fa 6f 91 9e b8 8c 15 cd |i|(o%=...o......| -00000060 6a b1 72 ce a8 |j.r..| +00000030 16 03 01 00 30 d1 17 2f 22 e5 fa 78 a0 b3 d3 22 |....0../"..x..."| +00000040 ab cb d2 54 52 e6 b2 74 11 bd 3c 69 9a 71 e8 69 |...TR..t..>> Flow 4 (server to client) -00000000 14 03 01 00 01 01 16 03 01 00 30 d0 aa 00 27 9e |..........0...'.| -00000010 fb 56 22 9f 65 ab 3c cf 34 d9 a0 92 08 62 f2 fe |.V".e.<.4....b..| -00000020 29 4b 0c 14 b0 72 f5 c0 f8 2b 7e 1f 38 ad 68 7e |)K...r...+~.8.h~| -00000030 37 c3 fb 26 5a 5b 42 39 83 33 c0 |7..&Z[B9.3.| +00000000 14 03 01 00 01 01 16 03 01 00 30 d1 2e 43 5c f7 |..........0..C\.| +00000010 fc 5f 96 b7 e6 84 60 08 aa b3 22 d1 d9 e2 f3 4d |._....`..."....M| +00000020 c8 44 62 9b fa 0e 18 7c 84 fe 1e 75 09 4a f4 94 |.Db....|...u.J..| +00000030 67 03 91 79 90 26 70 2d 0e 97 6a |g..y.&p-..j| >>> Flow 5 (client to server) -00000000 17 03 01 00 20 0e 54 7f 5d b9 f2 73 9d a5 49 25 |.... .T.]..s..I%| -00000010 c6 b9 03 1e fb 84 76 a9 69 ca 25 79 c3 a4 60 18 |......v.i.%y..`.| -00000020 94 ff 92 47 4f 17 03 01 00 20 cd 19 d2 cd 7d 7d |...GO.... ....}}| -00000030 3b a1 65 ee 4e a2 f2 02 55 02 28 54 28 92 c9 ec |;.e.N...U.(T(...| -00000040 db 59 f6 7d 2f 9e 7b 66 0e be 15 03 01 00 20 4f |.Y.}/.{f...... O| -00000050 ab cd 12 5b c4 f4 03 0e 57 03 3d f5 4e 09 8b 83 |...[....W.=.N...| -00000060 8b c6 9c c7 eb 30 8c f2 43 f6 10 30 14 80 c5 |.....0..C..0...| +00000000 17 03 01 00 20 c9 ce 68 cc e9 a7 f7 1f 3c 19 76 |.... ..h.....<.v| +00000010 4e a6 2d 64 86 4d 35 9b 5e 5b 8b c7 a1 15 d9 d4 |N.-d.M5.^[......| +00000020 5e 59 67 df 4d 17 03 01 00 20 26 09 76 e2 16 41 |^Yg.M.... &.v..A| +00000030 a3 7f 3e 8e cc 75 ab a0 cf e1 42 8d 3c 51 d4 bb |..>..u....B.>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 01 00 5d 02 00 00 59 03 01 6f 36 7b f5 f4 |....]...Y..o6{..| -00000010 3b 49 31 64 aa 42 a7 8c a2 4d 00 a7 9c b9 b6 9c |;I1d.B...M......| -00000020 0d 2f 09 81 e8 ab 74 77 11 fe 0b 20 e0 b9 92 4d |./....tw... ...M| -00000030 e2 70 fd 58 ec 58 02 f2 b3 44 d2 3d 7f c9 ad ca |.p.X.X...D.=....| -00000040 5c 78 fe f9 36 67 a8 b7 a8 0f 7a 1a c0 13 00 00 |\x..6g....z.....| +00000000 16 03 01 00 5d 02 00 00 59 03 01 97 c9 b8 e6 c1 |....]...Y.......| +00000010 0e b3 68 29 30 ed ff df a6 f3 cd b7 e0 80 a9 76 |..h)0..........v| +00000020 84 1b 45 bb 42 29 e0 c8 7f 52 4b 20 95 97 03 66 |..E.B)...RK ...f| +00000030 6b 45 44 7c 5d 4b 9e 47 fc 72 53 5d 3c 8a 28 6e |kED|]K.G.rS]<.(n| +00000040 bc 40 6d c3 96 67 f9 f2 72 ec 6d 0d c0 13 00 00 |.@m..g..r.m.....| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 01 02 59 0b 00 02 55 00 02 52 00 02 |......Y...U..R..| 00000070 4f 30 82 02 4b 30 82 01 b4 a0 03 02 01 02 02 09 |O0..K0..........| @@ -61,36 +62,36 @@ 00000290 73 bb b3 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 |s..Cw.......@.a.| 000002a0 4c 72 2b 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 |Lr+...F..M...>..| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 01 00 aa 0c 00 00 a6 03 00 1d 20 10 69 5f |............ .i_| -000002d0 db e5 a8 1f 14 81 0c c7 35 d4 3c 22 ee 17 a3 21 |........5.<"...!| -000002e0 47 9b e2 3c 5a f6 f5 46 b9 73 2a 7f 62 00 80 49 |G..ukv.........Mf| -00000340 57 70 1a 4c 21 27 7f c8 69 f4 f4 83 5c 44 32 b4 |Wp.L!'..i...\D2.| -00000350 73 18 a3 c4 4a c1 71 92 04 7a 49 49 15 25 05 a0 |s...J.q..zII.%..| -00000360 61 69 f8 38 4b 9f 92 96 f4 6b 6b 4b 96 60 45 16 |ai.8K....kkK.`E.| +000002c0 16 03 01 00 aa 0c 00 00 a6 03 00 1d 20 15 0b 17 |............ ...| +000002d0 fd fb 69 3e 44 71 3c 68 b2 6a 99 9e 8c 57 ba e8 |..i>Dq.$.`....9...Z| +00000300 12 2c c9 3e a7 db 25 ab 32 32 e4 79 9e 0a 9f 98 |.,.>..%.22.y....| +00000310 99 cd be b3 28 34 40 e1 78 3e 3d 20 35 74 79 7f |....(4@.x>= 5ty.| +00000320 f6 c5 5d 4c 54 30 1d 64 31 49 78 bd a2 cb 62 5a |..]LT0.d1Ix...bZ| +00000330 89 1a bf 65 bf 7f 1c ff 7d 61 6c 7d d2 76 8c 9e |...e....}al}.v..| +00000340 e4 80 56 7d 96 79 48 36 ca c0 99 db 9b ea 3a e7 |..V}.yH6......:.| +00000350 a7 fe cb ed d8 3b 34 8c be d5 ee be 59 d5 e2 5f |.....;4.....Y.._| +00000360 59 17 f3 57 29 eb c8 0e ed 1a 06 79 c0 3c 16 16 |Y..W)......y.<..| 00000370 03 01 00 04 0e 00 00 00 |........| >>> Flow 3 (client to server) 00000000 16 03 01 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 01 00 01 01 |....._X.;t......| -00000030 16 03 01 00 30 e2 8b e2 aa 5a 35 c5 e5 68 ce f4 |....0....Z5..h..| -00000040 fa 51 3f 7b 3e 99 2f 21 b2 c6 b2 70 74 af ae ca |.Q?{>./!...pt...| -00000050 36 86 78 08 ea 8f 02 29 e6 a6 71 fa ad 7f c6 97 |6.x....)..q.....| -00000060 54 6f 88 a3 4b |To..K| +00000030 16 03 01 00 30 c6 d7 ad 2c 52 90 50 3c 50 ec 66 |....0...,R.P>> Flow 4 (server to client) -00000000 14 03 01 00 01 01 16 03 01 00 30 af 26 01 47 8a |..........0.&.G.| -00000010 a3 08 b2 79 1c fe fa 91 e8 4b a6 e1 ad 8e 59 b7 |...y.....K....Y.| -00000020 ea 41 ee 3e 3a aa 2f f2 07 9e 0d 90 3d 6f 92 d5 |.A.>:./.....=o..| -00000030 72 92 ad ae ee c8 5d 48 a0 25 46 |r.....]H.%F| +00000000 14 03 01 00 01 01 16 03 01 00 30 8c a1 03 f1 fb |..........0.....| +00000010 fe f8 1b 43 7b fb 10 59 c3 ed b3 34 b9 74 e1 89 |...C{..Y...4.t..| +00000020 7f 5c 9b 81 b1 4f 13 bf 67 c5 87 92 31 96 7f e7 |.\...O..g...1...| +00000030 35 7b b0 da 2c 79 2e be 43 f4 cf |5{..,y..C..| >>> Flow 5 (client to server) -00000000 17 03 01 00 20 29 2b 6a 75 2b 1b 94 f4 cb 80 14 |.... )+ju+......| -00000010 16 91 ec 08 77 5a 08 45 e7 51 2e a2 ec 03 f0 ca |....wZ.E.Q......| -00000020 35 88 20 3a 2e 17 03 01 00 20 59 0c 48 6f 66 8e |5. :..... Y.Hof.| -00000030 88 62 90 cc 33 39 62 ce 96 28 d0 2f 40 6e ed 14 |.b..39b..(./@n..| -00000040 94 72 88 d8 4a cb 73 24 a9 01 15 03 01 00 20 5c |.r..J.s$...... \| -00000050 8a 91 45 ed c9 38 e7 1d 71 02 b8 30 bf 24 0e 30 |..E..8..q..0.$.0| -00000060 6d fa 0a 4a 39 9f 56 b2 04 99 3e 67 bd bc d9 |m..J9.V...>g...| +00000000 17 03 01 00 20 61 e8 5a b2 15 88 f2 f9 e2 09 61 |.... a.Z.......a| +00000010 53 a5 7f 79 4b e8 c7 8d a9 5d 29 bf b9 0a 1d f7 |S..yK....]).....| +00000020 90 9f 3b 89 39 17 03 01 00 20 86 93 3b 08 7f 77 |..;.9.... ..;..w| +00000030 55 e5 51 06 ca 0e 80 96 9d 40 73 55 45 18 28 c7 |U.Q......@sUE.(.| +00000040 54 6a d8 15 d7 67 1e 4b 52 1e 15 03 01 00 20 56 |Tj...g.KR..... V| +00000050 d8 23 be 5a 8a a8 a4 8f 13 2f f0 34 24 90 96 87 |.#.Z...../.4$...| +00000060 59 48 3f 76 77 47 d5 eb 4d cb 80 00 bc 11 cf |YH?vwG..M......| diff --git a/src/crypto/tls/testdata/Client-TLSv10-RSA-RC4 b/src/crypto/tls/testdata/Client-TLSv10-RSA-RC4 index 8fce559c72..c217b1112a 100644 --- a/src/crypto/tls/testdata/Client-TLSv10-RSA-RC4 +++ b/src/crypto/tls/testdata/Client-TLSv10-RSA-RC4 @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 01 00 55 02 00 00 51 03 01 9b 6a cd e3 08 |....U...Q...j...| -00000010 29 e7 32 d1 53 14 f5 4a cf b7 61 1a 90 d6 9a 73 |).2.S..J..a....s| -00000020 ad 48 2a 08 ce d7 d7 cb f8 25 b1 20 c1 24 61 85 |.H*......%. .$a.| -00000030 31 d2 81 5e 8e c8 31 40 56 36 79 af bb f7 90 d3 |1..^..1@V6y.....| -00000040 06 5e 4b 5a 62 50 c0 d5 89 7f 35 70 00 05 00 00 |.^KZbP....5p....| +00000000 16 03 01 00 55 02 00 00 51 03 01 6a dd d7 0d bb |....U...Q..j....| +00000010 bd b4 9c de 87 94 32 27 fa 4b 66 e0 8b 95 f2 11 |......2'.Kf.....| +00000020 a0 a5 30 15 34 6f 76 6b f7 23 ec 20 ef 7d 52 7d |..0.4ovk.#. .}R}| +00000030 2c 3b 30 1b f2 16 e7 8f b6 62 64 79 51 5b 31 36 |,;0......bdyQ[16| +00000040 b7 59 b1 f9 d5 26 d6 21 94 ff 7f bd 00 05 00 00 |.Y...&.!........| 00000050 09 ff 01 00 01 00 00 17 00 00 16 03 01 02 59 0b |..............Y.| 00000060 00 02 55 00 02 52 00 02 4f 30 82 02 4b 30 82 01 |..U..R..O0..K0..| 00000070 b4 a0 03 02 01 02 02 09 00 e8 f0 9d 3f e2 5b ea |............?.[.| @@ -72,15 +73,15 @@ 00000060 c5 70 0f 08 83 48 e9 48 ef 6e 50 8b 05 7e e5 84 |.p...H.H.nP..~..| 00000070 25 fa 55 c7 ae 31 02 27 00 ef 3f 98 86 20 12 89 |%.U..1.'..?.. ..| 00000080 91 59 28 b4 f7 d7 af d2 69 61 35 14 03 01 00 01 |.Y(.....ia5.....| -00000090 01 16 03 01 00 24 b3 7b e6 d1 8f 79 04 e2 42 0f |.....$.{...y..B.| -000000a0 61 de d2 be 1e 4d 8f d4 6f 7e 2d 59 cf 23 ff 1e |a....M..o~-Y.#..| -000000b0 74 ea 2a 9c 7e e2 5b 23 05 2e |t.*.~.[#..| +00000090 01 16 03 01 00 24 0e 49 42 d7 a8 ca 08 09 a6 63 |.....$.IB......c| +000000a0 0f b1 4b 06 30 37 5e cb 3a c8 d6 ce f9 9c bf 2f |..K.07^.:....../| +000000b0 4a c1 c7 fb 2e 02 a6 b0 de ed |J.........| >>> Flow 4 (server to client) -00000000 14 03 01 00 01 01 16 03 01 00 24 3c 4e 68 82 8f |..........$>> Flow 5 (client to server) -00000000 17 03 01 00 1a e0 a4 39 3c 9c 5c 8e 60 db 8e 5c |.......9<.\.`..\| -00000010 13 aa 60 4a 1c f0 71 1b f2 4d a9 f8 52 07 bd 15 |..`J..q..M..R...| -00000020 03 01 00 16 9e f3 0a 66 42 77 5a 75 74 18 85 f1 |.......fBwZut...| -00000030 3c fb ea d4 b8 76 6d eb 48 3d |<....vm.H=| +00000000 17 03 01 00 1a d3 71 0b 8e 0d d4 e0 06 04 e2 30 |......q........0| +00000010 59 2c fe 84 81 45 1c e4 59 90 b1 b1 11 85 cb 15 |Y,...E..Y.......| +00000020 03 01 00 16 ad 5d 98 96 4e 9d 83 af b0 50 64 77 |.....]..N....Pdw| +00000030 62 a1 2b 1a 63 59 16 9e 60 da |b.+.cY..`.| diff --git a/src/crypto/tls/testdata/Client-TLSv11-ECDHE-ECDSA-AES b/src/crypto/tls/testdata/Client-TLSv11-ECDHE-ECDSA-AES index 0ad2db0575..dbaefe8eb3 100644 --- a/src/crypto/tls/testdata/Client-TLSv11-ECDHE-ECDSA-AES +++ b/src/crypto/tls/testdata/Client-TLSv11-ECDHE-ECDSA-AES @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 02 00 5d 02 00 00 59 03 02 51 70 ac 24 75 |....]...Y..Qp.$u| -00000010 53 94 02 c6 20 8e 22 0d b2 79 30 3b ee a1 00 44 |S... ."..y0;...D| -00000020 f3 1c b8 a3 4c 51 c4 d9 30 95 d4 20 ca 82 67 4f |....LQ..0.. ..gO| -00000030 8c 13 5f c2 7e fc e0 0c 04 5c e2 9a c2 a3 02 a1 |.._.~....\......| -00000040 bc fa ca 16 38 83 2e 5a c1 75 19 67 c0 09 00 00 |....8..Z.u.g....| +00000000 16 03 02 00 5d 02 00 00 59 03 02 14 c4 6e 18 e9 |....]...Y....n..| +00000010 5b 74 0d 7f 05 01 75 e3 a3 af 90 f0 ea e3 a8 f0 |[t....u.........| +00000020 6e b5 7d 29 97 4d f3 7e e9 06 20 20 ba 37 13 9f |n.}).M.~.. .7..| +00000030 4e dd 10 6d 52 96 14 d0 93 3b 99 5b c2 cd f3 9c |N..mR....;.[....| +00000040 48 c1 12 78 c2 e5 e7 9d a1 d6 b4 da c0 09 00 00 |H..x............| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 02 02 0e 0b 00 02 0a 00 02 07 00 02 |................| 00000070 04 30 82 02 00 30 82 01 62 02 09 00 b8 bf 2d 47 |.0...0..b.....-G| @@ -57,38 +58,38 @@ 00000250 c9 86 2e dd d7 11 69 7f 85 7c 56 de fb 31 78 2b |......i..|V..1x+| 00000260 e4 c7 78 0d ae cb be 9e 4e 36 24 31 7b 6a 0f 39 |..x.....N6$1{j.9| 00000270 95 12 07 8f 2a 16 03 02 00 b5 0c 00 00 b1 03 00 |....*...........| -00000280 1d 20 4a 31 cd 48 ea 05 09 8a 6d 78 c5 46 5d ea |. J1.H....mx.F].| -00000290 fb aa 62 79 17 70 31 5e 5a 95 c1 ce a9 52 3e 8e |..by.p1^Z....R>.| -000002a0 a1 7b 00 8b 30 81 88 02 42 01 e1 c6 99 40 d7 9f |.{..0...B....@..| -000002b0 15 41 f4 4f 54 5f 5d 14 bd a6 cc 18 6e 67 98 ab |.A.OT_].....ng..| -000002c0 6a 33 9d 54 68 94 2a 89 22 66 2d 20 97 e7 53 c9 |j3.Th.*."f- ..S.| -000002d0 f8 ee ad 64 46 6e 53 1d d6 57 55 6a 4c bc 37 1f |...dFnS..WUjL.7.| -000002e0 e7 9c c4 bb 23 cb af 27 2a 19 94 02 42 01 35 b4 |....#..'*...B.5.| -000002f0 a1 f0 c2 6d 34 f0 05 a7 25 9a 22 6c 3e 41 e7 a0 |...m4...%."l>A..| -00000300 1e 8f 5a 28 b1 5a 88 46 48 7e 40 93 f2 38 9d 33 |..Z(.Z.FH~@..8.3| -00000310 6b b5 92 ed 6d 44 07 03 c8 77 ee 3a 80 37 1e f9 |k...mD...w.:.7..| -00000320 4d 5c 2b 6d c5 15 07 b2 7c eb c5 f5 c5 14 dd 16 |M\+m....|.......| +00000280 1d 20 d1 90 13 d3 6d b1 e1 ec a3 e1 8b a1 d6 a6 |. ....m.........| +00000290 40 ac 8e cf 6e 42 06 7d a8 80 9a 9e a8 06 00 84 |@...nB.}........| +000002a0 69 1f 00 8b 30 81 88 02 42 01 b6 ba 66 1c de c4 |i...0...B...f...| +000002b0 8b a1 4a a7 0e f5 cb aa 5c 76 65 59 ba bb e2 7f |..J.....\veY....| +000002c0 a5 ee 91 26 77 40 e9 5d 25 73 5a d6 f9 b4 aa ac |...&w@.]%sZ.....| +000002d0 c8 bd 2b a4 95 b3 ef e0 c7 bb f1 d0 5e da 76 34 |..+.........^.v4| +000002e0 a4 34 5b 6c d6 c8 3b 13 b1 d0 12 02 42 01 e1 18 |.4[l..;.....B...| +000002f0 d5 90 79 c5 06 00 6b 7a 86 19 e0 2f 67 49 db 9e |..y...kz.../gI..| +00000300 4a 74 07 30 51 15 7b a1 01 89 9c 94 d8 17 18 a6 |Jt.0Q.{.........| +00000310 31 aa fb 4b 57 24 52 00 41 1d cc 36 89 6e b4 ed |1..KW$R.A..6.n..| +00000320 fc 23 33 63 dd 94 3b 40 6f f1 af d7 78 27 0c 16 |.#3c..;@o...x'..| 00000330 03 02 00 04 0e 00 00 00 |........| >>> Flow 3 (client to server) 00000000 16 03 02 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 02 00 01 01 |....._X.;t......| 00000030 16 03 02 00 40 00 00 00 00 00 00 00 00 00 00 00 |....@...........| -00000040 00 00 00 00 00 40 aa 15 c7 e0 2e f6 9e e8 aa 92 |.....@..........| -00000050 81 6d 83 8f 13 7e 7c d5 9f b9 bf ca 5d da fd 3c |.m...~|.....]..<| -00000060 ba c7 8e 8e 9a 93 86 21 49 15 04 9d b8 75 c1 fe |.......!I....u..| -00000070 5b a6 41 d5 46 |[.A.F| +00000040 00 00 00 00 00 bd f5 0b 25 31 b7 e6 3f 74 dc 39 |........%1..?t.9| +00000050 c8 a4 f5 3f 78 f5 6f 66 1b 59 53 51 40 d2 e1 14 |...?x.of.YSQ@...| +00000060 56 96 ea 1f 08 30 3f 66 ca e4 e4 a0 b5 9f 60 9b |V....0?f......`.| +00000070 f8 b0 c7 b8 79 |....y| >>> Flow 4 (server to client) -00000000 14 03 02 00 01 01 16 03 02 00 40 ba a7 6d aa 40 |..........@..m.@| -00000010 b5 94 f8 d6 84 38 7c 19 7f b9 e9 8b 0f a8 db 4c |.....8|........L| -00000020 68 cf 1e d4 e0 b2 7c 78 80 76 18 c7 a5 cf 57 2d |h.....|x.v....W-| -00000030 1e 3d 17 b2 ce 44 93 76 38 91 4b d0 7f 09 00 2f |.=...D.v8.K..../| -00000040 c2 da c7 32 70 de fd cb a4 99 90 |...2p......| +00000000 14 03 02 00 01 01 16 03 02 00 40 68 2d 60 78 1b |..........@h-`x.| +00000010 a7 b8 28 3a 2b f5 cd b8 ef 4e 8e ab 3c d5 67 7b |..(:+....N..<.g{| +00000020 1f 29 9e 59 de ca 43 3a 4c 0c f5 70 43 cb 0b 40 |.).Y..C:L..pC..@| +00000030 69 a3 7c f7 1a 3b 48 2f b8 a2 7c b4 4a 03 36 2a |i.|..;H/..|.J.6*| +00000040 24 c9 78 9a 06 6e 18 2e 4a c0 54 |$.x..n..J.T| >>> Flow 5 (client to server) 00000000 17 03 02 00 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........| -00000010 00 00 00 00 00 86 40 c2 e7 d4 56 43 6b e0 e4 96 |......@...VCk...| -00000020 41 74 2e b1 65 cd c6 93 06 71 f0 25 20 21 c5 1b |At..e....q.% !..| -00000030 d2 ea eb e4 06 15 03 02 00 30 00 00 00 00 00 00 |.........0......| -00000040 00 00 00 00 00 00 00 00 00 00 1e a9 c0 dc d8 23 |...............#| -00000050 f2 08 b0 c5 b2 2e 53 9b 23 50 8a 02 c6 41 9a 36 |......S.#P...A.6| -00000060 59 b1 23 d9 5e 91 45 cf 1b a1 |Y.#.^.E...| +00000010 00 00 00 00 00 f6 ff 38 da 12 09 78 fe de fb 0f |.......8...x....| +00000020 ea d3 5a d8 57 65 73 78 41 2d 0b 1b a4 8d f6 e7 |..Z.WesxA-......| +00000030 ed 58 97 c9 ea 15 03 02 00 30 00 00 00 00 00 00 |.X.......0......| +00000040 00 00 00 00 00 00 00 00 00 00 7d 4a 10 43 93 8a |..........}J.C..| +00000050 6d d2 50 34 92 22 24 f6 7a 9a c4 1f 57 e8 6d f8 |m.P4."$.z...W.m.| +00000060 74 c4 cb 8b e0 4d 99 dd ce 0a |t....M....| diff --git a/src/crypto/tls/testdata/Client-TLSv11-ECDHE-RSA-AES b/src/crypto/tls/testdata/Client-TLSv11-ECDHE-RSA-AES index 83c7d77102..d0093da76c 100644 --- a/src/crypto/tls/testdata/Client-TLSv11-ECDHE-RSA-AES +++ b/src/crypto/tls/testdata/Client-TLSv11-ECDHE-RSA-AES @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 02 00 5d 02 00 00 59 03 02 79 2f de f0 f3 |....]...Y..y/...| -00000010 97 6a 5e e3 07 66 d9 f2 8b e9 be 1a 97 9f 6d c8 |.j^..f........m.| -00000020 9d b5 88 57 fc 8c 5d 7f d7 3e 34 20 e5 4c 51 33 |...W..]..>4 .LQ3| -00000030 52 23 a0 52 77 ca 41 4a 1b e4 22 fb 1c 82 f8 e4 |R#.Rw.AJ..".....| -00000040 aa 13 c2 1a ce cd d5 42 de b0 e9 10 c0 13 00 00 |.......B........| +00000000 16 03 02 00 5d 02 00 00 59 03 02 3d 12 00 a1 c0 |....]...Y..=....| +00000010 6f b2 13 96 d8 c3 b6 4e 81 60 03 60 fa 9a 4b 54 |o......N.`.`..KT| +00000020 a9 1d e3 e9 10 e6 8d 84 e3 af 76 20 7c 6d 5c 41 |..........v |m\A| +00000030 f6 19 49 92 b0 d2 1d 74 22 5d 6a 3f c6 5e 77 c0 |..I....t"]j?.^w.| +00000040 c4 bb 31 2d 62 8d 7b 5c 66 6d c4 94 c0 13 00 00 |..1-b.{\fm......| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 02 02 59 0b 00 02 55 00 02 52 00 02 |......Y...U..R..| 00000070 4f 30 82 02 4b 30 82 01 b4 a0 03 02 01 02 02 09 |O0..K0..........| @@ -61,38 +62,38 @@ 00000290 73 bb b3 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 |s..Cw.......@.a.| 000002a0 4c 72 2b 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 |Lr+...F..M...>..| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 02 00 aa 0c 00 00 a6 03 00 1d 20 ef 2a b0 |............ .*.| -000002d0 da 99 1f 17 dc 29 38 43 c2 72 18 b6 ea ad 8f e6 |.....)8C.r......| -000002e0 f2 d2 81 e5 f6 2e 6c 5a 95 89 10 14 34 00 80 11 |......lZ....4...| -000002f0 ff 56 fa 9e 9f 0c b9 a9 57 c4 2c cb a1 ce 70 ca |.V......W.,...p.| -00000300 94 bd 5e 54 0e eb da ce 1b 19 ee bc aa bb 9c 10 |..^T............| -00000310 f8 6e 59 48 82 5e fe 3c 2e 28 6d 8a 2f 08 ce df |.nYH.^.<.(m./...| -00000320 52 e2 07 a6 68 68 69 fc 2b d7 fd 28 ef 48 85 c9 |R...hhi.+..(.H..| -00000330 70 75 b4 f4 04 2f 39 69 ee 1a aa 14 c9 7b e0 f7 |pu.../9i.....{..| -00000340 bc 50 76 df 24 57 8b a4 ca 87 8a b5 ff c9 13 9e |.Pv.$W..........| -00000350 d3 9e 2b e1 d4 6f 0c ce 61 83 e9 38 51 04 2e 23 |..+..o..a..8Q..#| -00000360 b4 f8 90 f4 0f 45 93 34 14 f4 ca 4f 13 02 89 16 |.....E.4...O....| +000002c0 16 03 02 00 aa 0c 00 00 a6 03 00 1d 20 73 f2 57 |............ s.W| +000002d0 12 5a 50 bb 9d 2d 14 f0 ca ee c1 41 bf da 9e 8e |.ZP..-.....A....| +000002e0 d5 a9 25 c3 84 07 e7 5c 35 87 8b 70 3d 00 80 d3 |..%....\5..p=...| +000002f0 86 1b 82 48 5c 14 9b cf e4 a0 2b 24 bc 8c ad e9 |...H\.....+$....| +00000300 7c 1e 4f da c2 22 10 91 76 47 bc 9f 64 ca 1c 69 ||.O.."..vG..d..i| +00000310 77 c0 c7 2c 50 ea 1a 07 d0 8c ec da aa ed 82 9d |w..,P...........| +00000320 a5 6c d6 27 05 f8 24 19 f9 d4 b1 c6 e3 0f 49 6f |.l.'..$.......Io| +00000330 e4 47 25 9a 36 f1 d3 ed b1 b5 a0 cc 66 50 75 64 |.G%.6.......fPud| +00000340 97 ee 3c 65 84 1b 62 f8 1a 8f 02 5a d4 2c 49 b3 |..>> Flow 3 (client to server) 00000000 16 03 02 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 02 00 01 01 |....._X.;t......| 00000030 16 03 02 00 40 00 00 00 00 00 00 00 00 00 00 00 |....@...........| -00000040 00 00 00 00 00 34 fa 43 0a 6f 38 d0 80 5d a1 d6 |.....4.C.o8..]..| -00000050 61 c9 62 a9 b2 14 88 b4 7d b9 dc 20 93 11 27 37 |a.b.....}.. ..'7| -00000060 5a 2a 5b d4 10 54 75 23 8d 39 4a 5b 51 80 48 f2 |Z*[..Tu#.9J[Q.H.| -00000070 16 64 e5 90 38 |.d..8| +00000040 00 00 00 00 00 93 60 ad fa 30 93 3e 31 6d 2c 0c |......`..0.>1m,.| +00000050 21 3d 6a 53 b1 51 f9 a9 1f 74 ee 42 7a 90 8a 08 |!=jS.Q...t.Bz...| +00000060 9e a0 7f 42 19 c4 28 06 77 bb 32 c1 a0 0d ec 71 |...B..(.w.2....q| +00000070 4f 20 89 c1 7d |O ..}| >>> Flow 4 (server to client) -00000000 14 03 02 00 01 01 16 03 02 00 40 f8 77 bf c0 dd |..........@.w...| -00000010 11 e1 3f 90 e0 1a c0 dc a6 6a b2 81 9b 1b 63 bc |..?......j....c.| -00000020 42 b6 23 b2 1f 95 36 38 56 f8 a4 e4 c1 c9 6f d2 |B.#...68V.....o.| -00000030 64 16 13 16 b7 25 53 ec a1 c2 94 de 8d ae 38 b9 |d....%S.......8.| -00000040 07 29 42 1d 16 3d fb 29 8b 76 15 |.)B..=.).v.| +00000000 14 03 02 00 01 01 16 03 02 00 40 fb 97 d9 4a c6 |..........@...J.| +00000010 10 21 6f 7b 77 ba e0 41 b2 50 d3 8c df 54 b1 9f |.!o{w..A.P...T..| +00000020 98 55 e7 0e fb bd 25 67 fb fb 5a 5c 86 b8 f0 17 |.U....%g..Z\....| +00000030 2b 56 b3 81 21 45 58 98 38 63 24 0a ec aa 17 55 |+V..!EX.8c$....U| +00000040 8c 46 67 a6 44 57 00 8d 49 83 28 |.Fg.DW..I.(| >>> Flow 5 (client to server) 00000000 17 03 02 00 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........| -00000010 00 00 00 00 00 59 ac 45 2f 3f 3b d3 5d 73 08 85 |.....Y.E/?;.]s..| -00000020 9a 0e 99 a2 ad 8d 4e de 52 e9 5b 8b 76 71 5d 5e |......N.R.[.vq]^| -00000030 6b ec 05 24 a5 15 03 02 00 30 00 00 00 00 00 00 |k..$.....0......| -00000040 00 00 00 00 00 00 00 00 00 00 92 ce 2d b7 15 d2 |............-...| -00000050 3b c5 42 ad aa 73 a8 e0 ac 26 d2 e7 ef c7 a9 72 |;.B..s...&.....r| -00000060 75 96 5c 8c 2d 60 6e 57 bd ef |u.\.-`nW..| +00000010 00 00 00 00 00 e7 87 56 3d 84 0b 17 94 41 94 67 |.......V=....A.g| +00000020 48 ff 0f e4 2d a9 1c 7a 68 fc 42 36 17 27 b0 66 |H...-..zh.B6.'.f| +00000030 af 97 25 90 a2 15 03 02 00 30 00 00 00 00 00 00 |..%......0......| +00000040 00 00 00 00 00 00 00 00 00 00 55 a4 8a bc 52 98 |..........U...R.| +00000050 07 3a dd 7a dc 4f 2c 8d f2 1b f0 76 09 ca 88 36 |.:.z.O,....v...6| +00000060 d4 fa f9 f4 b7 2e ce 6e 26 82 |.......n&.| diff --git a/src/crypto/tls/testdata/Client-TLSv11-RSA-RC4 b/src/crypto/tls/testdata/Client-TLSv11-RSA-RC4 index dd58620c47..64b06a8f17 100644 --- a/src/crypto/tls/testdata/Client-TLSv11-RSA-RC4 +++ b/src/crypto/tls/testdata/Client-TLSv11-RSA-RC4 @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 02 00 55 02 00 00 51 03 02 42 bb c8 01 43 |....U...Q..B...C| -00000010 e4 f7 10 09 bf 35 a3 c2 d7 ca 60 a9 60 be 1d 00 |.....5....`.`...| -00000020 92 33 b6 3e 56 2b c2 f7 29 e3 f9 20 8c d7 b6 90 |.3.>V+..).. ....| -00000030 03 f5 8b 55 e9 81 47 5b 84 ec 19 bc 32 58 c6 30 |...U..G[....2X.0| -00000040 f1 79 ea 51 a2 18 cc c0 4e 8a 8e cb 00 05 00 00 |.y.Q....N.......| +00000000 16 03 02 00 55 02 00 00 51 03 02 3d a4 ea 71 81 |....U...Q..=..q.| +00000010 c9 47 24 2b 53 22 83 07 df 5a 9e 76 ef ca d8 1b |.G$+S"...Z.v....| +00000020 1f 16 15 cd 7e e4 62 93 1e 5d a7 20 9d ac ea 5a |....~.b..]. ...Z| +00000030 9e e3 7c 14 94 9d 1b 9e 2a 7b 2d 80 55 85 2f 9e |..|.....*{-.U./.| +00000040 ed 17 20 79 66 a2 6c 88 81 cb b0 79 00 05 00 00 |.. yf.l....y....| 00000050 09 ff 01 00 01 00 00 17 00 00 16 03 02 02 59 0b |..............Y.| 00000060 00 02 55 00 02 52 00 02 4f 30 82 02 4b 30 82 01 |..U..R..O0..K0..| 00000070 b4 a0 03 02 01 02 02 09 00 e8 f0 9d 3f e2 5b ea |............?.[.| @@ -72,15 +73,15 @@ 00000060 c5 70 0f 08 83 48 e9 48 ef 6e 50 8b 05 7e e5 84 |.p...H.H.nP..~..| 00000070 25 fa 55 c7 ae 31 02 27 00 ef 3f 98 86 20 12 89 |%.U..1.'..?.. ..| 00000080 91 59 28 b4 f7 d7 af d2 69 61 35 14 03 02 00 01 |.Y(.....ia5.....| -00000090 01 16 03 02 00 24 a8 40 50 90 31 50 fc 5e d8 f5 |.....$.@P.1P.^..| -000000a0 64 7a a5 62 8d ad ce 03 34 c9 ab 16 31 45 bc 8b |dz.b....4...1E..| -000000b0 26 8b fa 38 7a 2e 60 42 86 46 |&..8z.`B.F| +00000090 01 16 03 02 00 24 30 52 7f 8a 5c 3a 31 65 87 8c |.....$0R..\:1e..| +000000a0 9e 31 8f b1 22 15 ed af 99 6c 19 47 46 fd e1 3b |.1.."....l.GF..;| +000000b0 b3 f4 3a 5b d8 e5 a6 1a 7c 5e |..:[....|^| >>> Flow 4 (server to client) -00000000 14 03 02 00 01 01 16 03 02 00 24 83 1d 5a 04 90 |..........$..Z..| -00000010 1f 8d 07 46 39 1e 3c cf cb 06 45 f5 88 9e 68 5c |...F9.<...E...h\| -00000020 96 a0 06 47 43 21 20 ce 90 1f 24 49 52 30 59 |...GC! ...$IR0Y| +00000000 14 03 02 00 01 01 16 03 02 00 24 c1 5d da 6d 6e |..........$.].mn| +00000010 55 3e 70 a4 52 15 d9 ba 88 a1 b7 f0 40 71 09 fa |U>p.R.......@q..| +00000020 3f 00 6f 39 72 88 89 a1 3d cf 7a 7a 97 15 b7 |?.o9r...=.zz...| >>> Flow 5 (client to server) -00000000 17 03 02 00 1a f9 9f c2 32 02 96 87 95 4b ba 17 |........2....K..| -00000010 1f b9 af fe 6a 87 38 d4 d8 b4 f8 1d ad 05 00 15 |....j.8.........| -00000020 03 02 00 16 54 07 15 34 f4 c3 a2 3e 01 9e 00 cb |....T..4...>....| -00000030 83 f7 58 79 e2 dc a4 b8 15 e9 |..Xy......| +00000000 17 03 02 00 1a 56 ea a4 ed 0f 9d 98 3b 48 bc 76 |.....V......;H.v| +00000010 35 3f fb 78 92 d9 ce ef 53 b2 ef a6 13 9a 4c 15 |5?.x....S.....L.| +00000020 03 02 00 16 b5 41 d0 98 50 73 73 90 c0 fe ec 11 |.....A..Pss.....| +00000030 ec 98 d5 fb 02 c0 11 11 29 1c |........).| diff --git a/src/crypto/tls/testdata/Client-TLSv12-AES128-GCM-SHA256 b/src/crypto/tls/testdata/Client-TLSv12-AES128-GCM-SHA256 index d88acc95f9..33e01c140b 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-AES128-GCM-SHA256 +++ b/src/crypto/tls/testdata/Client-TLSv12-AES128-GCM-SHA256 @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 55 02 00 00 51 03 03 d1 5c 30 66 38 |....U...Q...\0f8| -00000010 84 89 85 fe b6 87 de 62 8e b5 86 18 16 f7 8f b0 |.......b........| -00000020 f2 00 09 e5 55 d7 10 a0 76 d8 58 20 23 7d ff 5f |....U...v.X #}._| -00000030 b4 b5 5b de b9 7a f9 d1 bc 90 ff 2c 1d d7 fe ed |..[..z.....,....| -00000040 2f 6e 29 d8 08 61 0b 9d cc 7d 64 6a 00 9c 00 00 |/n)..a...}dj....| +00000000 16 03 03 00 55 02 00 00 51 03 03 c5 da f3 88 41 |....U...Q......A| +00000010 ed 43 a7 4e 49 ad db 74 04 c6 fb c2 13 49 86 14 |.C.NI..t.....I..| +00000020 fd d0 e1 7a ab d3 df 65 62 c6 1f 20 29 1a 03 bf |...z...eb.. )...| +00000030 10 35 3c 58 36 fd 4d 7a 7d dc f1 fd be d0 c6 b5 |.5D..l.C.:...S.| -000000b0 a6 d3 5c f0 5b ca e8 6a c7 13 88 65 50 71 |..\.[..j...ePq| +00000090 01 16 03 03 00 28 00 00 00 00 00 00 00 00 2c 46 |.....(........,F| +000000a0 31 d0 81 b9 6e 55 b0 5b 7b 15 a0 27 da e2 d7 71 |1...nU.[{..'...q| +000000b0 f4 d0 83 6c 98 d9 75 e2 f4 4c 61 0b fe 3c |...l..u..La..<| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 28 3f 30 36 77 c6 |..........(?06w.| -00000010 6d 4f 37 2c ac f1 c2 24 9d e1 3f 0c 51 64 12 67 |mO7,...$..?.Qd.g| -00000020 83 47 ec f1 b8 02 6d 11 11 b7 ec ab 09 26 41 ff |.G....m......&A.| -00000030 e8 32 05 |.2.| +00000000 14 03 03 00 01 01 16 03 03 00 28 e5 b5 71 5d e0 |..........(..q].| +00000010 c8 9a 75 4c 6e 72 4e a2 5f f9 b4 9f f4 40 a0 de |..uLnrN._....@..| +00000020 73 48 9c 01 f3 0b 78 91 5f 85 29 9c 51 dc 77 bc |sH....x._.).Q.w.| +00000030 c0 32 42 |.2B| >>> Flow 5 (client to server) -00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 af 3a 1e |..............:.| -00000010 98 3e 74 5f 66 64 eb 6c 88 36 33 f0 98 e8 46 e9 |.>t_fd.l.63...F.| -00000020 f1 2f 32 15 03 03 00 1a 00 00 00 00 00 00 00 02 |./2.............| -00000030 76 2b 83 08 46 7d 34 58 db e8 e8 e1 e2 cb ad 1e |v+..F}4X........| -00000040 e4 a5 |..| +00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 9e 81 42 |...............B| +00000010 90 9e ab a2 29 b3 f7 a6 31 45 5f a4 2e d5 52 f7 |....)...1E_...R.| +00000020 72 8b 3b 15 03 03 00 1a 00 00 00 00 00 00 00 02 |r.;.............| +00000030 96 5a f4 de 37 1b 2c f1 8d 90 91 17 6f 81 90 7f |.Z..7.,.....o...| +00000040 e7 9d |..| diff --git a/src/crypto/tls/testdata/Client-TLSv12-AES128-SHA256 b/src/crypto/tls/testdata/Client-TLSv12-AES128-SHA256 index 030cbc6f2b..b373f27aae 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-AES128-SHA256 +++ b/src/crypto/tls/testdata/Client-TLSv12-AES128-SHA256 @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 55 02 00 00 51 03 03 bd e7 e2 ea 28 |....U...Q......(| -00000010 09 0b 7f 30 b5 91 fd b4 91 d1 c3 b8 8f 25 38 88 |...0.........%8.| -00000020 62 28 5c 1d 14 1a 6a 50 7d 30 e8 20 c3 91 2d ea |b(\...jP}0. ..-.| -00000030 59 8d 1d 56 98 c9 02 c0 f1 98 94 a6 8c 2b f2 63 |Y..V.........+.c| -00000040 ed b9 97 36 c6 c6 32 97 9e 61 6c 3b 00 3c 00 00 |...6..2..al;.<..| +00000000 16 03 03 00 55 02 00 00 51 03 03 eb c3 6e 78 2e |....U...Q....nx.| +00000010 9f 47 ec 9d 0e bc 8d 49 d2 46 11 75 5e 50 a5 07 |.G.....I.F.u^P..| +00000020 0a 99 90 34 34 2d 81 75 1b f4 ca 20 fb 28 c1 8c |...44-.u... .(..| +00000030 55 27 36 be 4e d1 c7 ee e8 b3 2a eb 7a be f1 2a |U'6.N.....*.z..*| +00000040 fc 81 df d8 5b c2 1f 1e 7b 47 0f 06 00 3c 00 00 |....[...{G...<..| 00000050 09 ff 01 00 01 00 00 17 00 00 16 03 03 02 59 0b |..............Y.| 00000060 00 02 55 00 02 52 00 02 4f 30 82 02 4b 30 82 01 |..U..R..O0..K0..| 00000070 b4 a0 03 02 01 02 02 09 00 e8 f0 9d 3f e2 5b ea |............?.[.| @@ -73,25 +74,25 @@ 00000070 25 fa 55 c7 ae 31 02 27 00 ef 3f 98 86 20 12 89 |%.U..1.'..?.. ..| 00000080 91 59 28 b4 f7 d7 af d2 69 61 35 14 03 03 00 01 |.Y(.....ia5.....| 00000090 01 16 03 03 00 50 00 00 00 00 00 00 00 00 00 00 |.....P..........| -000000a0 00 00 00 00 00 00 f3 6e c5 65 29 75 22 fe 23 6f |.......n.e)u".#o| -000000b0 96 fa b3 8d 98 ac df bf 3a 23 ca 4f d9 52 95 3f |........:#.O.R.?| -000000c0 89 8b 61 cf d2 2d f3 14 31 9d 3a 6f a9 b5 7b 69 |..a..-..1.:o..{i| -000000d0 27 a6 2b 2d 43 6e 77 f1 cd 73 fa 80 7b bf 8a 1d |'.+-Cnw..s..{...| -000000e0 83 c5 9b 8c 0a 03 |......| +000000a0 00 00 00 00 00 00 ee 37 21 73 05 93 63 ca 4f 0e |.......7!s..c.O.| +000000b0 e2 29 7f 90 6f 3a aa 52 a0 e0 71 97 5f f9 66 cf |.)..o:.R..q._.f.| +000000c0 06 19 09 51 03 5f 2e 0c 57 26 42 15 ef 8f 4e a9 |...Q._..W&B...N.| +000000d0 c4 97 95 0a d1 ce 30 2c bf 7a 85 4b a9 d0 a9 e0 |......0,.z.K....| +000000e0 64 11 1a dc 48 1d |d...H.| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 50 f6 93 f3 85 25 |..........P....%| -00000010 06 5c 47 ea d5 6e 90 05 21 91 9a 86 06 42 f6 54 |.\G..n..!....B.T| -00000020 25 4a 61 65 7e 19 c8 1a 58 52 06 81 df dd 19 fc |%Jae~...XR......| -00000030 bd 5a 82 ff ae 80 92 b3 3b 7d 89 c0 64 b1 36 e3 |.Z......;}..d.6.| -00000040 5c bb 2a 5b e8 6d 18 02 43 27 b5 57 bc 3f ab b1 |\.*[.m..C'.W.?..| -00000050 27 59 0e 6a d5 07 6a 66 ad 51 82 |'Y.j..jf.Q.| +00000000 14 03 03 00 01 01 16 03 03 00 50 58 d1 09 93 e9 |..........PX....| +00000010 97 c1 cc c3 db 1d 65 d8 97 35 c1 b4 3f 9f a0 00 |......e..5..?...| +00000020 9f 81 2a 81 61 b5 51 9f ec 15 94 d0 86 0f a1 70 |..*.a.Q........p| +00000030 e9 90 59 dd 16 d3 e7 33 21 b7 d8 6e 4b a8 fd fb |..Y....3!..nK...| +00000040 dd 98 78 95 16 44 f8 da bd e3 e2 3f f0 e1 d9 39 |..x..D.....?...9| +00000050 c0 2e 0d c4 fe a5 ac 41 66 2d f3 |.......Af-.| >>> Flow 5 (client to server) 00000000 17 03 03 00 40 00 00 00 00 00 00 00 00 00 00 00 |....@...........| -00000010 00 00 00 00 00 2a 8b 84 55 57 20 b8 4f 11 d2 cc |.....*..UW .O...| -00000020 5e a0 ef 1a f1 62 fc 59 38 14 30 0f e0 76 04 ca |^....b.Y8.0..v..| -00000030 eb c2 45 a4 75 12 e6 1a 16 fc d8 bd d4 f7 fd 6f |..E.u..........o| -00000040 f3 99 ca d6 41 15 03 03 00 40 00 00 00 00 00 00 |....A....@......| -00000050 00 00 00 00 00 00 00 00 00 00 8c 80 a8 e9 95 4c |...............L| -00000060 c9 fa 4d 9d 06 e5 d8 70 5f fa a9 44 24 15 f4 47 |..M....p_..D$..G| -00000070 5a 0a 24 55 a7 6a 04 1c 2a 39 80 fd 08 47 d7 08 |Z.$U.j..*9...G..| -00000080 41 8b 9d 46 74 cb 61 c6 84 84 |A..Ft.a...| +00000010 00 00 00 00 00 2f d9 4b fc 22 0f 20 dd 2c 20 83 |...../.K.". ., .| +00000020 bd f0 49 5b bc 57 55 bc fb 41 13 79 a7 19 4d e3 |..I[.WU..A.y..M.| +00000030 71 66 ce b5 77 35 9c 54 86 0e fc 21 d6 9e c4 66 |qf..w5.T...!...f| +00000040 ee 95 3f 0a d5 15 03 03 00 40 00 00 00 00 00 00 |..?......@......| +00000050 00 00 00 00 00 00 00 00 00 00 54 25 cd 1a 0a d4 |..........T%....| +00000060 7b a4 ce f1 62 c8 8f 62 af 93 8e 0e e8 fd ef 55 |{...b..b.......U| +00000070 1d 47 a4 ac 1c 80 25 6f c4 a2 51 11 84 e9 63 cb |.G....%o..Q...c.| +00000080 db d8 e6 bf 2c 89 4e 1a d4 11 |....,.N...| diff --git a/src/crypto/tls/testdata/Client-TLSv12-AES256-GCM-SHA384 b/src/crypto/tls/testdata/Client-TLSv12-AES256-GCM-SHA384 index 42454d52f3..9920621be3 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-AES256-GCM-SHA384 +++ b/src/crypto/tls/testdata/Client-TLSv12-AES256-GCM-SHA384 @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 55 02 00 00 51 03 03 a3 a8 ef 9d b3 |....U...Q.......| -00000010 36 14 00 fe 5b e4 07 77 e7 78 c8 b4 d8 96 8d 72 |6...[..w.x.....r| -00000020 c5 79 99 10 8f 6e ac e3 fd 99 ee 20 53 99 57 36 |.y...n..... S.W6| -00000030 7e 9b 89 a3 79 c7 57 c6 f6 c7 2c 66 0a 6b 48 a2 |~...y.W...,f.kH.| -00000040 06 87 54 2c 20 3d 65 b9 1c 93 fd a3 00 9d 00 00 |..T, =e.........| +00000000 16 03 03 00 55 02 00 00 51 03 03 9f 42 e3 1b 5f |....U...Q...B.._| +00000010 00 d9 00 0a a5 fa 6d 63 95 11 d2 5a ff 51 b0 f8 |......mc...Z.Q..| +00000020 bc a9 7f 18 3c 8d d7 38 d5 e8 2d 20 be 5b 08 a0 |....<..8..- .[..| +00000030 2f 7b 50 d9 06 0c bf 7c 2d cc f0 39 3a 90 e4 e7 |/{P....|-..9:...| +00000040 9c 27 9b 88 ea ff c0 51 f8 79 cd b9 00 9d 00 00 |.'.....Q.y......| 00000050 09 ff 01 00 01 00 00 17 00 00 16 03 03 02 59 0b |..............Y.| 00000060 00 02 55 00 02 52 00 02 4f 30 82 02 4b 30 82 01 |..U..R..O0..K0..| 00000070 b4 a0 03 02 01 02 02 09 00 e8 f0 9d 3f e2 5b ea |............?.[.| @@ -72,17 +73,17 @@ 00000060 c5 70 0f 08 83 48 e9 48 ef 6e 50 8b 05 7e e5 84 |.p...H.H.nP..~..| 00000070 25 fa 55 c7 ae 31 02 27 00 ef 3f 98 86 20 12 89 |%.U..1.'..?.. ..| 00000080 91 59 28 b4 f7 d7 af d2 69 61 35 14 03 03 00 01 |.Y(.....ia5.....| -00000090 01 16 03 03 00 28 00 00 00 00 00 00 00 00 76 c9 |.....(........v.| -000000a0 1e 50 43 51 5e 4a b6 c8 98 33 8f 18 ac f3 fe 20 |.PCQ^J...3..... | -000000b0 09 76 7c 48 f7 e8 00 2c 3b e1 7e 2f 71 d5 |.v|H...,;.~/q.| +00000090 01 16 03 03 00 28 00 00 00 00 00 00 00 00 0e dd |.....(..........| +000000a0 10 e6 7a dd b2 02 5c 0d 0c 73 b4 f1 a1 89 85 95 |..z...\..s......| +000000b0 91 a9 e4 7a 47 49 9a 52 96 77 93 0b cc 74 |...zGI.R.w...t| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 28 55 b2 34 a3 b7 |..........(U.4..| -00000010 18 a8 36 55 c4 ef 81 82 e4 41 9f 1a 42 2c 42 7e |..6U.....A..B,B~| -00000020 9b 59 c8 9d 3a 0b 59 a6 78 d0 ab 2f c4 e1 f7 2b |.Y..:.Y.x../...+| -00000030 9b ee 9f |...| +00000000 14 03 03 00 01 01 16 03 03 00 28 72 c3 d3 ad 10 |..........(r....| +00000010 71 48 c4 32 9b 24 ac c0 a4 88 db 35 e9 be fe 34 |qH.2.$.....5...4| +00000020 ee 9a bb 5a a5 90 b6 ec 31 9a bc 4c 56 e2 e6 d5 |...Z....1..LV...| +00000030 f9 2b 93 |.+.| >>> Flow 5 (client to server) -00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 ec ad 42 |...............B| -00000010 8a cf 39 ed 82 b7 70 9b 1a 29 4c 3e b7 f6 92 35 |..9...p..)L>...5| -00000020 12 e2 df 15 03 03 00 1a 00 00 00 00 00 00 00 02 |................| -00000030 81 d4 de 3c 03 a9 01 0e e7 64 ae 18 84 dd d3 6c |...<.....d.....l| -00000040 57 6a |Wj| +00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 ed af c7 |................| +00000010 74 44 64 5d e3 1b 0c d4 bd a1 7e 7e 87 10 8d bc |tDd]......~~....| +00000020 26 db e8 15 03 03 00 1a 00 00 00 00 00 00 00 02 |&...............| +00000030 42 6b 3e 59 c5 e4 e5 5b 53 0f fe d9 3f 0c 5c f0 |Bk>Y...[S...?.\.| +00000040 67 d5 |g.| diff --git a/src/crypto/tls/testdata/Client-TLSv12-ALPN b/src/crypto/tls/testdata/Client-TLSv12-ALPN index 9f3f4dc930..6686f6e9c0 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-ALPN +++ b/src/crypto/tls/testdata/Client-TLSv12-ALPN @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 01 12 01 00 01 0e 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 2c 01 00 01 28 03 03 00 00 00 00 00 |....,...(.......| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,22 +7,24 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 93 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 ad 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 10 00 10 |................| -000000d0 00 0e 06 70 72 6f 74 6f 32 06 70 72 6f 74 6f 31 |...proto2.proto1| -000000e0 00 2b 00 09 08 03 04 03 03 03 02 03 01 00 33 00 |.+............3.| -000000f0 26 00 24 00 1d 00 20 2f e5 7d a3 47 cd 62 43 15 |&.$... /.}.G.bC.| -00000100 28 da ac 5f bb 29 07 30 ff f6 84 af c4 cf c2 ed |(.._.).0........| -00000110 90 99 5f 58 cb 3b 74 |.._X.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 10 00 10 00 0e 06 70 72 6f |.............pro| +000000f0 74 6f 32 06 70 72 6f 74 6f 31 00 2b 00 09 08 03 |to2.proto1.+....| +00000100 04 03 03 03 02 03 01 00 33 00 26 00 24 00 1d 00 |........3.&.$...| +00000110 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f bb 29 | /.}.G.bC.(.._.)| +00000120 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 cb 3b |.0.........._X.;| +00000130 74 |t| >>> Flow 2 (server to client) -00000000 16 03 03 00 6a 02 00 00 66 03 03 71 ba 32 f4 08 |....j...f..q.2..| -00000010 31 23 ea 71 46 b6 f0 24 f9 80 c2 94 b8 13 f5 cc |1#.qF..$........| -00000020 6b 77 e5 46 f1 76 df a5 0c 56 6a 20 98 53 12 a3 |kw.F.v...Vj .S..| -00000030 d2 a6 97 45 36 11 e6 b6 b6 6e 0b b9 30 2d 65 c8 |...E6....n..0-e.| -00000040 47 c7 af 4c c5 a6 51 90 2f 77 db 8c cc a8 00 00 |G..L..Q./w......| +00000000 16 03 03 00 6a 02 00 00 66 03 03 37 57 f9 cb 6a |....j...f..7W..j| +00000010 dc 6c e2 4b 1d 74 93 8e e1 1a 05 e7 fd 8d 29 57 |.l.K.t........)W| +00000020 5e b4 fc 9a ba 7d df de 56 cc e7 20 57 f3 1a b0 |^....}..V.. W...| +00000030 20 cd ac a1 e3 93 b9 79 f5 1c ce d2 d1 24 da fc | ......y.....$..| +00000040 88 97 25 fb 36 72 75 bb cc a3 2a 79 cc a8 00 00 |..%.6ru...*y....| 00000050 1e ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 10 |................| 00000060 00 09 00 07 06 70 72 6f 74 6f 31 00 17 00 00 16 |.....proto1.....| 00000070 03 03 02 59 0b 00 02 55 00 02 52 00 02 4f 30 82 |...Y...U..R..O0.| @@ -63,31 +65,31 @@ 000002a0 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 4c 72 2b |Cw.......@.a.Lr+| 000002b0 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 bd 42 d4 |...F..M...>...B.| 000002c0 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 16 03 03 |..=.`.\!.;......| -000002d0 00 ac 0c 00 00 a8 03 00 1d 20 76 16 ff 2a 83 9a |......... v..*..| -000002e0 07 b0 01 f6 1e 3e 4b c1 69 62 9b 00 38 35 c5 4f |.....>K.ib..85.O| -000002f0 d3 2c db 50 16 9d 26 b1 cc 28 08 04 00 80 56 73 |.,.P..&..(....Vs| -00000300 39 4d ab f4 68 92 14 6d d5 75 db 10 4b 0c a4 19 |9M..h..m.u..K...| -00000310 9e 67 42 d3 f8 3f 91 26 06 4d f9 34 9b ad 7c 85 |.gB..?.&.M.4..|.| -00000320 ec 11 34 43 dd 7d a8 5b 0f 59 54 ff a3 92 dc 7c |..4C.}.[.YT....|| -00000330 26 ee 07 0e cf bc e4 6a 1a da b9 d2 9a 62 bf de |&......j.....b..| -00000340 37 a6 68 e2 cd 21 8e 4e a3 66 ee e1 74 45 7d 64 |7.h..!.N.f..tE}d| -00000350 b2 d8 1d dc 6a cd 2a 86 9e 0d 76 a3 7b f2 49 11 |....j.*...v.{.I.| -00000360 ae ad a1 d4 f2 a9 e5 56 0e 2a 96 a5 f7 8b 74 d4 |.......V.*....t.| -00000370 78 e0 bc cc 95 a1 f1 76 0b 4b 37 ed 77 1b 16 03 |x......v.K7.w...| +000002d0 00 ac 0c 00 00 a8 03 00 1d 20 27 fd a6 7d 32 28 |......... '..}2(| +000002e0 d2 44 43 d5 2a 95 3b e2 7e 77 5a d2 66 87 4a 92 |.DC.*.;.~wZ.f.J.| +000002f0 12 56 ba 40 3e 09 43 b4 90 02 08 04 00 80 8b e9 |.V.@>.C.........| +00000300 93 0c 5e 72 b8 a8 49 1c c3 b7 fc 39 af 58 9c 3a |..^r..I....9.X.:| +00000310 27 b6 20 23 9a 5d 35 0e dd 21 da 1b be 34 32 23 |'. #.]5..!...42#| +00000320 76 2e c8 9e 3d c8 e5 9e cd 04 11 a9 be 97 52 53 |v...=.........RS| +00000330 81 b6 01 fc 60 5d 0d dd 0d ba 05 a6 15 3b 29 4e |....`].......;)N| +00000340 88 a0 69 b9 c2 46 d9 c2 6d 17 b2 d0 c0 ee de f9 |..i..F..m.......| +00000350 94 fe 25 31 66 df 72 7d 02 77 a6 2c a6 ad da eb |..%1f.r}.w.,....| +00000360 dc 4b ea d4 5b 0a d4 e6 c8 89 15 cf 3f 81 58 20 |.K..[.......?.X | +00000370 0f 83 2f e1 db a1 cc a7 e1 61 79 7d 14 4b 16 03 |../......ay}.K..| 00000380 03 00 04 0e 00 00 00 |.......| >>> Flow 3 (client to server) 00000000 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 03 00 01 01 |....._X.;t......| -00000030 16 03 03 00 20 aa 8c 9c ab fb ab ed 5b 2e 3e 4b |.... .......[.>K| -00000040 92 cd 18 dd ac ce af 1a b9 f2 df aa 7f a1 d2 ad |................| -00000050 0e 8a 67 03 3f |..g.?| +00000030 16 03 03 00 20 50 e7 36 59 68 f6 0f cd b0 cc ae |.... P.6Yh......| +00000040 bc 18 23 d3 c0 fb c9 41 49 91 ec 8f cd f0 69 84 |..#....AI.....i.| +00000050 49 3c 68 6e 05 |I>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 20 db cb 3a 73 0c |.......... ..:s.| -00000010 ab 16 44 41 5a 25 df f7 45 bf f0 70 c6 a8 4f bd |..DAZ%..E..p..O.| -00000020 50 99 fb 18 26 e7 cf 71 16 1a 96 |P...&..q...| +00000000 14 03 03 00 01 01 16 03 03 00 20 84 30 04 4f 3e |.......... .0.O>| +00000010 72 f6 d8 6a dc ae fb 55 82 69 8e a3 77 c2 1f 27 |r..j...U.i..w..'| +00000020 88 14 5b 8d 10 79 4c 6a 41 3e e5 |..[..yLjA>.| >>> Flow 5 (client to server) -00000000 17 03 03 00 16 34 82 27 01 99 27 08 58 c4 aa 76 |.....4.'..'.X..v| -00000010 fe 34 9c 1f 99 ea 4c f8 a0 ef 96 15 03 03 00 12 |.4....L.........| -00000020 68 b8 da ac 77 d5 f7 95 9f 68 e0 d6 26 88 cd ef |h...w....h..&...| -00000030 31 d4 |1.| +00000000 17 03 03 00 16 03 a8 d7 eb 5d 79 60 d4 65 1d c1 |.........]y`.e..| +00000010 2b 32 b5 c3 fb b2 2f 10 83 4e 39 15 03 03 00 12 |+2..../..N9.....| +00000020 90 eb 89 fc e7 4c a2 94 02 33 b3 0e 72 6e bc 4e |.....L...3..rn.N| +00000030 d4 e7 |..| diff --git a/src/crypto/tls/testdata/Client-TLSv12-ClientCert-ECDSA-ECDSA b/src/crypto/tls/testdata/Client-TLSv12-ClientCert-ECDSA-ECDSA index 55cff1d489..784e95f87e 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-ClientCert-ECDSA-ECDSA +++ b/src/crypto/tls/testdata/Client-TLSv12-ClientCert-ECDSA-ECDSA @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 58 a7 ae 6c fc |....]...Y..X..l.| -00000010 0d 53 51 d5 37 8d 1f 88 75 27 bf 34 8f 3d d3 ee |.SQ.7...u'.4.=..| -00000020 95 db 77 d9 c0 3b f1 57 4f 84 e2 20 7f 0d d1 84 |..w..;.WO.. ....| -00000030 0c 7a 4e 41 7f 74 58 6c f5 38 e6 8d 5b 04 15 e1 |.zNA.tXl.8..[...| -00000040 3d 4a ba 7e 58 f4 e8 bf f4 42 8a f5 c0 09 00 00 |=J.~X....B......| +00000000 16 03 03 00 5d 02 00 00 59 03 03 4a 0b 4d 4a 05 |....]...Y..J.MJ.| +00000010 a0 5b ca 5d 65 4f f7 7e 82 3c 54 1d a3 42 64 7c |.[.]eO.~....v.V.AD| -000002f0 2a e1 6b ae 5d f9 39 5c ec 76 ee 01 d7 04 42 ca |*.k.].9\.v....B.| -00000300 45 07 e0 59 38 75 d4 47 61 a4 5b 0f a9 7a ba 79 |E..Y8u.Ga.[..z.y| -00000310 fa 79 92 41 88 8a d3 be c2 38 3e f7 95 6c 99 3f |.y.A.....8>..l.?| -00000320 4c ff af 10 33 14 25 e0 d7 8a fd 70 17 2b 73 ee |L...3.%....p.+s.| -00000330 16 03 03 00 3a 0d 00 00 36 03 01 02 40 00 2e 04 |....:...6...@...| -00000340 03 05 03 06 03 08 07 08 08 08 09 08 0a 08 0b 08 |................| -00000350 04 08 05 08 06 04 01 05 01 06 01 03 03 02 03 03 |................| -00000360 01 02 01 03 02 02 02 04 02 05 02 06 02 00 00 16 |................| -00000370 03 03 00 04 0e 00 00 00 |........| +00000270 95 12 07 8f 2a 16 03 03 00 b7 0c 00 00 b3 03 00 |....*...........| +00000280 1d 20 b8 ef 9c cd 47 a4 e9 1e e6 02 d5 40 12 95 |. ....G......@..| +00000290 0e da 1d 8f 2a 4f a6 9f 95 f9 1a 2a 1c ce 3c 32 |....*O.....*..<2| +000002a0 2b 4e 04 03 00 8b 30 81 88 02 42 00 c2 7d 24 9c |+N....0...B..}$.| +000002b0 b8 9c b1 69 fc 53 e9 ae 2c 07 39 23 d3 56 c8 96 |...i.S..,.9#.V..| +000002c0 e1 5e a9 a6 6b 18 33 f0 f9 50 29 65 2e dd 2b df |.^..k.3..P)e..+.| +000002d0 4e 58 67 ee 85 b3 da 8d 28 a1 7a 9f 59 df ae 10 |NXg.....(.z.Y...| +000002e0 31 d2 1b 6b 59 6d b9 24 16 79 66 49 7c 02 42 00 |1..kYm.$.yfI|.B.| +000002f0 bd a3 f5 56 db 00 b1 27 63 79 cb 1b 40 b2 e9 90 |...V...'cy..@...| +00000300 26 9f 44 53 ff fb 68 59 10 42 56 f2 36 fc 96 6a |&.DS..hY.BV.6..j| +00000310 a0 37 0e a3 77 5e 4c 0d 7b b6 e3 b5 b5 5b 2e d8 |.7..w^L.{....[..| +00000320 6f 99 6b af 84 57 9c 14 35 aa 09 23 11 08 83 3a |o.k..W..5..#...:| +00000330 63 16 03 03 00 3a 0d 00 00 36 03 01 02 40 00 2e |c....:...6...@..| +00000340 04 03 05 03 06 03 08 07 08 08 08 09 08 0a 08 0b |................| +00000350 08 04 08 05 08 06 04 01 05 01 06 01 03 03 02 03 |................| +00000360 03 01 02 01 03 02 02 02 04 02 05 02 06 02 00 00 |................| +00000370 16 03 03 00 04 0e 00 00 00 |.........| >>> Flow 3 (client to server) 00000000 16 03 03 02 0a 0b 00 02 06 00 02 03 00 02 00 30 |...............0| 00000010 82 01 fc 30 82 01 5e 02 09 00 9a 30 84 6c 26 35 |...0..^....0.l&5| @@ -109,32 +110,32 @@ 00000200 e4 fa cc b1 8a ce e2 23 a0 87 f0 e1 67 51 eb 16 |.......#....gQ..| 00000210 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd 62 |...%...! /.}.G.b| 00000220 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 cf |C.(.._.).0......| -00000230 c2 ed 90 99 5f 58 cb 3b 74 16 03 03 00 92 0f 00 |...._X.;t.......| -00000240 00 8e 04 03 00 8a 30 81 87 02 41 0c 11 31 08 e0 |......0...A..1..| -00000250 7d 4e 11 1e 80 7c 50 70 ea 1b 68 16 d9 e6 93 b7 |}N...|Pp..h.....| -00000260 fb 6f 0d 6e ce 8b d2 7c 86 70 c3 e9 ed 35 3c 29 |.o.n...|.p...5<)| -00000270 c7 d8 6c 8f 43 c9 a1 7a 4a ae 19 22 6e e3 85 7e |..l.C..zJ.."n..~| -00000280 a0 5d 7f 19 a5 b7 25 ad d7 1a 5f 42 02 42 00 d8 |.]....%..._B.B..| -00000290 6a 25 47 2a 0e 1a 38 51 1c 73 aa 2d 10 9e 4b 65 |j%G*..8Q.s.-..Ke| -000002a0 56 34 72 e5 02 09 f6 30 ce a8 a0 59 75 7b 13 42 |V4r....0...Yu{.B| -000002b0 1e 31 f3 dd 08 a9 65 df 2d e6 aa 29 5d 9a 5c eb |.1....e.-..)].\.| -000002c0 d3 67 af 29 4e d2 76 e5 17 1d 7e e7 0a 50 c4 d0 |.g.)N.v...~..P..| -000002d0 14 03 03 00 01 01 16 03 03 00 40 00 00 00 00 00 |..........@.....| -000002e0 00 00 00 00 00 00 00 00 00 00 00 8b ef 24 70 ef |.............$p.| -000002f0 b9 b3 fd 59 49 62 b7 18 9c bc 7f 74 06 21 21 ab |...YIb.....t.!!.| -00000300 9c 4d cf 70 0c 6b 3b d3 d4 12 51 a7 f9 09 65 d1 |.M.p.k;...Q...e.| -00000310 ce b7 28 01 c1 e9 0b e4 41 55 b6 |..(.....AU.| +00000230 c2 ed 90 99 5f 58 cb 3b 74 16 03 03 00 93 0f 00 |...._X.;t.......| +00000240 00 8f 04 03 00 8b 30 81 88 02 42 01 dd bf fd e0 |......0...B.....| +00000250 db 99 16 0b f0 bc a9 4b 93 10 d9 59 06 d2 eb 30 |.......K...Y...0| +00000260 dc b1 44 69 1d 54 2d 9b b4 a4 c9 3a f8 d8 9d 2e |..Di.T-....:....| +00000270 36 71 3e ff aa 05 98 8a 27 00 dd 65 6a 15 b7 c9 |6q>.....'..ej...| +00000280 fe 1d 4d 45 02 58 09 4f 38 ea cd 88 3c 02 42 00 |..ME.X.O8...<.B.| +00000290 a6 27 a5 d7 e7 9e 66 7e f8 38 37 03 7b 6d df c4 |.'....f~.87.{m..| +000002a0 81 6a 59 af 5b c7 06 2e 57 e9 8f 8d 1f 9c 9d 94 |.jY.[...W.......| +000002b0 70 4c 74 ed 03 24 3d df 35 51 a1 76 a7 8f 9b 40 |pLt..$=.5Q.v...@| +000002c0 16 c6 4f 0e 49 95 34 20 22 dc 5c ce 1d c0 ed bf |..O.I.4 ".\.....| +000002d0 f4 14 03 03 00 01 01 16 03 03 00 40 00 00 00 00 |...........@....| +000002e0 00 00 00 00 00 00 00 00 00 00 00 00 b7 d5 df bf |................| +000002f0 2b 32 a9 9e e4 78 40 84 ca c9 7d 54 4e 38 89 3b |+2...x@...}TN8.;| +00000300 0f 83 23 42 75 95 6e 4d 70 d4 b6 5a 1a 26 dd bb |..#Bu.nMp..Z.&..| +00000310 37 4a 85 88 ab 60 ba 3c 19 bd 02 79 |7J...`.<...y| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 40 af 82 f6 ba d1 |..........@.....| -00000010 e8 f9 c5 58 0e ba 94 ec 98 68 b3 20 5b db 4e 8c |...X.....h. [.N.| -00000020 f5 00 29 e8 9a c1 34 35 ac 77 af e2 a0 6a 6f 45 |..)...45.w...joE| -00000030 05 56 d4 a0 5b 75 19 c6 1b 8a c8 65 04 ed 3d f3 |.V..[u.....e..=.| -00000040 84 e5 1b c0 26 31 5d 03 d5 b4 31 |....&1]...1| +00000000 14 03 03 00 01 01 16 03 03 00 40 07 8e 16 c5 c2 |..........@.....| +00000010 e1 e5 32 41 2d 8b 3c fb 2e 3e b2 84 89 56 4d b5 |..2A-.<..>...VM.| +00000020 1c bd 1e a5 11 a1 b0 18 29 ce eb 46 f8 11 ff dc |........)..F....| +00000030 c0 cc ed 5a 38 33 5a 8f 48 df bf e9 8e 09 be b0 |...Z83Z.H.......| +00000040 9d 70 85 f7 71 f5 1e 5c aa 6f 88 |.p..q..\.o.| >>> Flow 5 (client to server) 00000000 17 03 03 00 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........| -00000010 00 00 00 00 00 2e a5 7c 6f cc f7 44 1a 38 99 4a |.......|o..D.8.J| -00000020 2e a4 4b 79 bf ee b6 c9 12 57 f5 2e 98 dd 1d 2a |..Ky.....W.....*| -00000030 5b 79 d5 ef 44 15 03 03 00 30 00 00 00 00 00 00 |[y..D....0......| -00000040 00 00 00 00 00 00 00 00 00 00 3d fe 37 cb 65 03 |..........=.7.e.| -00000050 13 ce 3d 3b c2 18 c2 27 f9 a4 b7 fc e6 37 eb 2a |..=;...'.....7.*| -00000060 27 6c 52 38 2f 3a 61 d4 a9 e6 |'lR8/:a...| +00000010 00 00 00 00 00 37 b7 99 22 eb 67 a0 32 57 76 b5 |.....7..".g.2Wv.| +00000020 53 86 fc 5b 79 c5 4a 4f 3a 6b a9 0f d8 c8 30 de |S..[y.JO:k....0.| +00000030 0a 5b 9b af e2 15 03 03 00 30 00 00 00 00 00 00 |.[.......0......| +00000040 00 00 00 00 00 00 00 00 00 00 57 9c 4b ca 83 a3 |..........W.K...| +00000050 c0 3a 52 71 24 f5 b1 37 1e 4d c1 5a 2d 29 1c 90 |.:Rq$..7.M.Z-)..| +00000060 9b 96 cf 1e 07 39 f1 1b 03 2b |.....9...+| diff --git a/src/crypto/tls/testdata/Client-TLSv12-ClientCert-ECDSA-RSA b/src/crypto/tls/testdata/Client-TLSv12-ClientCert-ECDSA-RSA index de57515d38..c20bd95d7f 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-ClientCert-ECDSA-RSA +++ b/src/crypto/tls/testdata/Client-TLSv12-ClientCert-ECDSA-RSA @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 f8 3d 7c a4 a8 |....]...Y...=|..| -00000010 11 e3 56 0f 1c 7e 2e 7c 50 7e 75 5c de 1c 51 8e |..V..~.|P~u\..Q.| -00000020 de d3 8a 84 d2 90 84 f9 e9 07 d5 20 98 6a a8 c1 |........... .j..| -00000030 f4 28 bd 0f 6a 25 a5 26 3d 8d 35 b6 3e bb 77 c6 |.(..j%.&=.5.>.w.| -00000040 8e ab 36 bd 7d c8 a9 b1 5b 30 0f b2 c0 2f 00 00 |..6.}...[0.../..| +00000000 16 03 03 00 5d 02 00 00 59 03 03 48 41 85 3e fc |....]...Y..HA.>.| +00000010 9f e7 b6 84 da fe 2f a7 1d e9 ba 12 4e a1 cf cb |....../.....N...| +00000020 9e f8 df 76 7c e7 29 c1 3b 9e 23 20 07 c9 55 c7 |...v|.).;.# ..U.| +00000030 0e 45 5c 26 17 94 b4 14 6b 58 39 27 43 4e dc 9b |.E\&....kX9'CN..| +00000040 65 30 0e f2 bd 59 d9 a2 a1 f3 0a 01 c0 2f 00 00 |e0...Y......./..| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 59 0b 00 02 55 00 02 52 00 02 |......Y...U..R..| 00000070 4f 30 82 02 4b 30 82 01 b4 a0 03 02 01 02 02 09 |O0..K0..........| @@ -61,18 +62,18 @@ 00000290 73 bb b3 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 |s..Cw.......@.a.| 000002a0 4c 72 2b 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 |Lr+...F..M...>..| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 5f c1 31 |............ _.1| -000002d0 d7 64 f0 0b 72 6a 66 2c 49 d7 d1 9c dd 6f e3 3a |.d..rjf,I....o.:| -000002e0 ab 2c 78 6d ca b0 ed 16 26 65 9f ff 66 08 04 00 |.,xm....&e..f...| -000002f0 80 a6 91 d0 03 b8 d2 67 48 69 16 8e 30 dc 5b 3f |.......gHi..0.[?| -00000300 ac 4d e4 33 5f 46 e7 0c 49 a0 71 9d 8c 60 63 f2 |.M.3_F..I.q..`c.| -00000310 2d ff 9e 89 21 7d af 71 ce 41 6b d2 22 fc 1f bd |-...!}.q.Ak."...| -00000320 a9 9e 15 2c d7 c3 cb 69 6d df 23 07 7c 13 e9 2b |...,...im.#.|..+| -00000330 7d 05 f0 18 1e 86 c8 37 ad cd 9e 39 26 0c 8a 9b |}......7...9&...| -00000340 12 90 60 12 95 06 e9 bb f2 46 41 20 10 f5 64 ea |..`......FA ..d.| -00000350 66 13 cb 8e 51 7e 41 78 2a 40 fa 15 e2 0d 5b 37 |f...Q~Ax*@....[7| -00000360 a7 a8 4a f6 8e 93 82 2a a2 91 06 66 4e 49 72 68 |..J....*...fNIrh| -00000370 f9 16 03 03 00 3a 0d 00 00 36 03 01 02 40 00 2e |.....:...6...@..| +000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 73 d3 a9 |............ s..| +000002d0 7e 93 32 e3 dd ad 1c b3 c1 ff 03 c2 b9 08 da 09 |~.2.............| +000002e0 d3 1b 67 95 9c 8c d1 05 12 2e 8b dc 7a 08 04 00 |..g.........z...| +000002f0 80 85 af 3b 06 67 b0 ab 07 70 21 02 b1 3a 89 40 |...;.g...p!..:.@| +00000300 d6 90 ef a5 5b 89 49 81 18 20 74 9f 7b dd 58 65 |....[.I.. t.{.Xe| +00000310 28 6f 2a f1 aa 3f 35 91 b9 88 79 27 a0 f3 e7 41 |(o*..?5...y'...A| +00000320 9a a5 77 be 55 5e 70 89 37 b6 4a 7b 3b 8c df ad |..w.U^p.7.J{;...| +00000330 47 cc ac 45 47 43 05 05 ad c9 7b d8 1d d6 a8 fa |G..EGC....{.....| +00000340 38 45 c3 54 35 0c 28 a1 29 be 1f 73 98 a6 02 01 |8E.T5.(.)..s....| +00000350 fb 9d 12 64 1a 9c f3 82 e5 3f f6 0c 20 67 59 72 |...d.....?.. gYr| +00000360 3f a7 59 4e ef b4 58 ba 49 4e c9 b6 ea 95 b2 b3 |?.YN..X.IN......| +00000370 78 16 03 03 00 3a 0d 00 00 36 03 01 02 40 00 2e |x....:...6...@..| 00000380 04 03 05 03 06 03 08 07 08 08 08 09 08 0a 08 0b |................| 00000390 08 04 08 05 08 06 04 01 05 01 06 01 03 03 02 03 |................| 000003a0 03 01 02 01 03 02 02 02 04 02 05 02 06 02 00 00 |................| @@ -113,28 +114,28 @@ 00000200 e4 fa cc b1 8a ce e2 23 a0 87 f0 e1 67 51 eb 16 |.......#....gQ..| 00000210 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd 62 |...%...! /.}.G.b| 00000220 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 cf |C.(.._.).0......| -00000230 c2 ed 90 99 5f 58 cb 3b 74 16 03 03 00 93 0f 00 |...._X.;t.......| -00000240 00 8f 04 03 00 8b 30 81 88 02 42 01 0f 51 5e 59 |......0...B..Q^Y| -00000250 78 34 8f 99 03 da 07 66 3b 0d 48 b2 79 57 e2 d5 |x4.....f;.H.yW..| -00000260 d2 c2 f3 81 8e 25 98 81 e2 9a f7 1f 02 99 b0 7d |.....%.........}| -00000270 1c d1 1f e4 ef d7 bc a1 ad 67 c7 a9 cc 4f 67 58 |.........g...OgX| -00000280 8b 1e 8c 3f 04 73 31 53 60 aa 67 33 27 02 42 01 |...?.s1S`.g3'.B.| -00000290 f1 66 ba 8f ec 9e 3f 76 76 ac 7a e7 56 cb fb 46 |.f....?vv.z.V..F| -000002a0 f4 9b 64 03 3a 72 5a d7 cf 49 39 69 26 19 68 52 |..d.:rZ..I9i&.hR| -000002b0 8b 98 8e ea d3 8e d9 6d 93 f5 e8 23 cd 20 a8 5a |.......m...#. .Z| -000002c0 4c 24 10 70 bd a2 ae a3 b1 4f 38 17 dd b9 f5 93 |L$.p.....O8.....| -000002d0 4b 14 03 03 00 01 01 16 03 03 00 28 00 00 00 00 |K..........(....| -000002e0 00 00 00 00 e1 2b da c6 4a 5c d2 03 c0 7e f0 eb |.....+..J\...~..| -000002f0 a0 4b ed a1 7d e4 45 93 ec f9 37 a0 5b 7e bb 64 |.K..}.E...7.[~.d| -00000300 af d4 fc ac |....| +00000230 c2 ed 90 99 5f 58 cb 3b 74 16 03 03 00 91 0f 00 |...._X.;t.......| +00000240 00 8d 04 03 00 89 30 81 86 02 41 66 64 90 bc df |......0...Afd...| +00000250 a5 d0 19 89 2b ed fc a5 8f 7e 14 d0 9f a2 07 6b |....+....~.....k| +00000260 d3 09 07 46 f8 29 4d b5 6c 01 e5 2e 0d d8 a4 b9 |...F.)M.l.......| +00000270 1a 86 2f b1 10 4c 29 5b de e7 29 e6 b9 32 53 ca |../..L)[..)..2S.| +00000280 d0 fc 7b a1 82 6e 34 2f 11 7a 2b 98 02 41 74 a4 |..{..n4/.z+..At.| +00000290 51 21 0c 57 ac 99 d1 a3 8c 86 f6 f2 b8 66 b8 1f |Q!.W.........f..| +000002a0 2d db 49 1a c1 34 e6 02 fd ce 50 14 7c 9b a4 52 |-.I..4....P.|..R| +000002b0 17 bc 96 ab 11 5f 97 9a 7f be ab 26 f7 1f 2b cf |....._.....&..+.| +000002c0 30 f1 da 80 b5 82 a0 da 44 be c1 00 51 1d b4 14 |0.......D...Q...| +000002d0 03 03 00 01 01 16 03 03 00 28 00 00 00 00 00 00 |.........(......| +000002e0 00 00 39 c2 3d 4e 74 16 e2 8c 4b f9 11 38 94 12 |..9.=Nt...K..8..| +000002f0 8f d3 16 18 9b ad 41 ef c9 ed 56 7f e3 ed d7 e5 |......A...V.....| +00000300 0e 52 |.R| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 28 d3 4a 1e 2b ea |..........(.J.+.| -00000010 26 12 c9 fd b0 7b e6 bf e4 bb b6 d2 6b b4 3c 05 |&....{......k.<.| -00000020 1f 6c 46 44 5e 25 e6 f9 80 c8 b9 16 19 59 68 90 |.lFD^%.......Yh.| -00000030 5a 90 16 |Z..| +00000000 14 03 03 00 01 01 16 03 03 00 28 c0 9a 2a 35 ef |..........(..*5.| +00000010 fa 87 1f 74 0a e9 b7 ea 3c 1c ab 1c ce 6e bb 95 |...t....<....n..| +00000020 ef 92 f3 cb 07 c0 e6 af b1 2a 60 fb 09 2a d7 68 |.........*`..*.h| +00000030 27 b0 f1 |'..| >>> Flow 5 (client to server) -00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 35 25 df |.............5%.| -00000010 1f 16 81 00 e3 c4 9e 45 e2 a1 ef 54 72 66 99 3d |.......E...Trf.=| -00000020 30 13 25 15 03 03 00 1a 00 00 00 00 00 00 00 02 |0.%.............| -00000030 16 a5 e9 36 c1 fb 02 d7 c8 7a aa bc aa 77 7b 5c |...6.....z...w{\| -00000040 4f a1 |O.| +00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 b1 98 56 |...............V| +00000010 38 68 a7 d0 da c6 83 4b 00 31 40 d7 1e 81 35 1a |8h.....K.1@...5.| +00000020 2f e3 42 15 03 03 00 1a 00 00 00 00 00 00 00 02 |/.B.............| +00000030 1d 8f a1 cf 12 2f 53 37 4d 60 46 90 e2 db 97 ce |...../S7M`F.....| +00000040 3e 99 |>.| diff --git a/src/crypto/tls/testdata/Client-TLSv12-ClientCert-Ed25519 b/src/crypto/tls/testdata/Client-TLSv12-ClientCert-Ed25519 index edb433fefc..9eb522b86b 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-ClientCert-Ed25519 +++ b/src/crypto/tls/testdata/Client-TLSv12-ClientCert-Ed25519 @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 68 ad d5 4c 88 |....]...Y..h..L.| -00000010 60 b8 3b b4 ea e4 f2 55 7d 0f 90 d8 bd 55 b5 53 |`.;....U}....U.S| -00000020 49 6e f7 50 e4 05 70 a2 6d 9e a5 20 d1 0a e5 58 |In.P..p.m.. ...X| -00000030 38 f1 82 94 a7 c3 bf 77 60 d8 51 c2 c7 e9 8e d6 |8......w`.Q.....| -00000040 94 ee 4f 23 51 d3 2c 52 06 12 4b 4a cc a8 00 00 |..O#Q.,R..KJ....| +00000000 16 03 03 00 5d 02 00 00 59 03 03 7f e3 92 d1 05 |....]...Y.......| +00000010 fd a2 f7 b4 24 f8 e6 e2 2f 15 51 f2 4b 72 12 59 |....$.../.Q.Kr.Y| +00000020 e6 af fe c9 0b 86 8b 53 a3 ce ff 20 68 97 1d e3 |.......S... h...| +00000030 6d 6c fb 67 78 05 ba fc 10 5b 83 87 8c 04 e9 57 |ml.gx....[.....W| +00000040 19 32 3f ee 88 a0 30 61 de 1c d2 2d cc a8 00 00 |.2?...0a...-....| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 59 0b 00 02 55 00 02 52 00 02 |......Y...U..R..| 00000070 4f 30 82 02 4b 30 82 01 b4 a0 03 02 01 02 02 09 |O0..K0..........| @@ -61,18 +62,18 @@ 00000290 73 bb b3 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 |s..Cw.......@.a.| 000002a0 4c 72 2b 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 |Lr+...F..M...>..| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 4e 55 f3 |............ NU.| -000002d0 5f 83 c8 88 d4 f2 5c 75 6a ab 0e 25 df 12 ef f0 |_.....\uj..%....| -000002e0 ea e9 3e b4 4f 2c cd bb 43 5b 64 21 12 08 04 00 |..>.O,..C[d!....| -000002f0 80 84 5e ca 36 b2 fa d0 29 47 1c c2 de 4e 1d 81 |..^.6...)G...N..| -00000300 14 66 0a 26 6f 21 5f d5 b5 54 2e 37 f1 7e b1 90 |.f.&o!_..T.7.~..| -00000310 a0 57 ab 40 81 cf e5 77 29 23 54 fa 12 76 1a 4a |.W.@...w)#T..v.J| -00000320 66 c0 52 08 07 3c 3c 56 06 08 02 df 9f 75 75 5e |f.R..<| +000002d0 dd fc 30 52 61 80 f3 e8 7e e2 fb f8 03 ab e4 86 |..0Ra...~.......| +000002e0 bc 8b 69 5b f5 8c fd 4b fc 12 2e 99 1a 08 04 00 |..i[...K........| +000002f0 80 43 60 48 4c 88 e9 fc 78 36 5f a9 6a 61 54 7e |.C`HL...x6_.jaT~| +00000300 a8 a3 67 91 df ff 78 66 d6 b6 ce 95 26 af 8e ac |..g...xf....&...| +00000310 42 fa 95 e1 a3 c6 9b 73 bb 7b dc e6 aa ca 6f a0 |B......s.{....o.| +00000320 17 6b ee 50 ff d9 20 ed 11 c4 e5 81 23 1d 6b 02 |.k.P.. .....#.k.| +00000330 a8 e6 f6 ef fc 1f 69 9e c1 28 d9 bd 36 98 ad f6 |......i..(..6...| +00000340 f3 40 5a e8 a4 e9 3c 62 b2 8d 53 a1 88 06 e6 81 |.@Z...>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 20 10 cb 1b e5 55 |.......... ....U| -00000010 64 49 55 0a bf 25 e4 b0 d0 45 e1 47 b0 05 d0 f2 |dIU..%...E.G....| -00000020 41 b7 f4 6a 84 4e 6a 66 8d 0e 43 |A..j.Njf..C| +00000000 14 03 03 00 01 01 16 03 03 00 20 91 2c 24 55 e8 |.......... .,$U.| +00000010 70 9e 88 07 53 e1 60 9e 86 af 53 d4 21 d9 99 ad |p...S.`...S.!...| +00000020 3a 2b 83 b0 bc f7 93 5e 63 04 50 |:+.....^c.P| >>> Flow 5 (client to server) -00000000 17 03 03 00 16 4a f3 ed 07 22 0d 7d 9b a6 a8 3c |.....J...".}...<| -00000010 88 58 f3 48 c2 f1 aa ea c7 cd 14 15 03 03 00 12 |.X.H............| -00000020 0b 1d 53 98 b3 69 99 e1 cd 4f 37 3c dc 63 17 9f |..S..i...O7<.c..| -00000030 00 7f |..| +00000000 17 03 03 00 16 e0 69 be 8e c5 4d 63 0e 77 88 42 |......i...Mc.w.B| +00000010 4e a8 e9 8f f4 c5 05 56 99 92 70 15 03 03 00 12 |N......V..p.....| +00000020 64 5c 05 8f 23 af e8 aa f6 76 1b b6 90 36 d9 d5 |d\..#....v...6..| +00000030 59 e6 |Y.| diff --git a/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-AES256-GCM-SHA384 b/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-AES256-GCM-SHA384 index c6673f6dc0..e9f6604b2f 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-AES256-GCM-SHA384 +++ b/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-AES256-GCM-SHA384 @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 60 13 bb 4b ce |....]...Y..`..K.| -00000010 d6 49 3b b2 3a 0c d4 5a e8 25 26 67 41 fd dd 0f |.I;.:..Z.%&gA...| -00000020 62 ec c1 ab bc 58 92 67 9d 71 fd 20 20 4c ab 4d |b....X.g.q. L.M| -00000030 85 ce 87 49 68 8c cf 9c 2f 7b f9 2b 96 62 8a 75 |...Ih.../{.+.b.u| -00000040 c3 21 05 c6 ab b6 98 5e e7 e5 d8 4a c0 30 00 00 |.!.....^...J.0..| +00000000 16 03 03 00 5d 02 00 00 59 03 03 bc b7 27 59 a9 |....]...Y....'Y.| +00000010 a7 ac ce 8b f5 5b 13 56 60 19 70 2a a7 f0 a2 ea |.....[.V`.p*....| +00000020 1a ce 27 2a 67 53 e0 5c 7e 5e 80 20 d5 c6 de 6d |..'*gS.\~^. ...m| +00000030 d1 3c 6d cb c9 49 77 00 cc 31 87 0a 86 45 06 70 |...| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 85 c8 0e |............ ...| -000002d0 fb 1e b3 4a ec c1 b2 3a b8 4e bb a1 ca 80 8e 13 |...J...:.N......| -000002e0 f5 08 b5 9a b8 3e c4 6c 23 cf 17 a0 31 08 04 00 |.....>.l#...1...| -000002f0 80 28 db ec 9d f9 f4 9a 06 12 8a 32 89 11 4a e5 |.(.........2..J.| -00000300 b6 68 98 21 ec f1 75 9c f9 28 bc b1 99 5b ec 77 |.h.!..u..(...[.w| -00000310 37 8b 6b 05 ad b3 10 de 24 05 84 a4 16 fe 1d 84 |7.k.....$.......| -00000320 af 5d 28 7d d7 bc de 2f 81 da a3 79 fb c0 a5 43 |.](}.../...y...C| -00000330 b6 3b 8d 90 30 00 80 98 16 83 ac 50 43 c7 3e 76 |.;..0......PC.>v| -00000340 c5 dc 85 c2 19 75 a6 90 f8 2f 71 40 d9 a0 73 7e |.....u.../q@..s~| -00000350 fe 3b 1c d7 66 73 0f f0 42 c5 00 b1 2b be 41 2b |.;..fs..B...+.A+| -00000360 40 da 8f b0 f1 9e b0 0a 83 23 04 80 fb 4c fe 7e |@........#...L.~| -00000370 b4 16 03 03 00 3a 0d 00 00 36 03 01 02 40 00 2e |.....:...6...@..| +000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 8b ea d3 |............ ...| +000002d0 e4 1f c2 21 cb 32 99 00 d2 a9 a4 f3 e4 9a d7 6e |...!.2.........n| +000002e0 f0 6e 7c 45 ca 41 51 60 a3 31 61 f0 34 08 04 00 |.n|E.AQ`.1a.4...| +000002f0 80 96 62 58 0c b4 72 a7 49 1c b8 73 72 5a c7 ba |..bX..r.I..srZ..| +00000300 e2 fe dc a6 a4 54 3d 21 83 70 ab ef de d8 d8 db |.....T=!.p......| +00000310 82 56 22 4f 9d f6 04 c2 b6 f7 9d a0 41 88 53 c9 |.V"O........A.S.| +00000320 2b 57 80 71 a2 bd d7 84 b6 4b cd 65 3d c3 10 cb |+W.q.....K.e=...| +00000330 5d 89 03 af 46 d5 b0 39 b8 c8 2d 74 1b 46 8d 0d |]...F..9..-t.F..| +00000340 ca 13 30 34 54 10 ea ec 77 ca 84 a6 2c 88 68 d6 |..04T...w...,.h.| +00000350 69 e6 f3 95 aa 65 af 05 7d e0 c2 84 48 f5 fa ae |i....e..}...H...| +00000360 d5 90 2a 79 0c 45 c6 7d d3 b7 de 85 e8 b5 2b 68 |..*y.E.}......+h| +00000370 bf 16 03 03 00 3a 0d 00 00 36 03 01 02 40 00 2e |.....:...6...@..| 00000380 04 03 05 03 06 03 08 07 08 08 08 09 08 0a 08 0b |................| 00000390 08 04 08 05 08 06 04 01 05 01 06 01 03 03 02 03 |................| 000003a0 03 01 02 01 03 02 02 02 04 02 05 02 06 02 00 00 |................| @@ -113,26 +114,26 @@ 00000200 e5 35 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 |.5....%...! /.}.| 00000210 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 |G.bC.(.._.).0...| 00000220 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 16 03 03 00 |......._X.;t....| -00000230 88 0f 00 00 84 08 04 00 80 41 83 55 9b 3c 8d 29 |.........A.U.<.)| -00000240 ed 6c 58 91 85 cb 9b 19 df 61 09 d0 d3 73 fb 2b |.lX......a...s.+| -00000250 3b 4b 4b bd 64 7e e6 53 87 cb 6d 2f 78 1c 67 cf |;KK.d~.S..m/x.g.| -00000260 13 21 e0 ec 1b d7 d8 aa 06 a0 0e d5 86 6f ba 1e |.!...........o..| -00000270 97 e2 8c 9b 86 e2 8a 4d 62 1a bd 35 0e 2d 63 18 |.......Mb..5.-c.| -00000280 a1 1f 7c ed fc 3b 89 c2 00 6d da 01 42 0a 47 95 |..|..;...m..B.G.| -00000290 12 8e 01 82 62 58 f9 96 eb a9 aa c3 f8 96 ec 20 |....bX......... | -000002a0 e1 65 a9 46 a8 af 4b 7c aa 29 ee 9c 48 18 b3 4a |.e.F..K|.)..H..J| -000002b0 00 7f 79 97 87 27 92 ca 45 14 03 03 00 01 01 16 |..y..'..E.......| -000002c0 03 03 00 28 00 00 00 00 00 00 00 00 da f3 01 f2 |...(............| -000002d0 76 e2 df 95 82 0d cc 0c 7e b0 cc 15 69 ba 8c 64 |v.......~...i..d| -000002e0 ac dc f3 45 58 a3 8f ed f0 2a 43 ce |...EX....*C.| +00000230 88 0f 00 00 84 08 04 00 80 48 ae 01 b6 4e e2 f0 |.........H...N..| +00000240 6b d9 58 e9 95 fb 93 56 10 8f 15 dc e8 3e c7 49 |k.X....V.....>.I| +00000250 b3 26 c2 06 91 4a 02 27 36 6b 21 cd aa 4a 62 6a |.&...J.'6k!..Jbj| +00000260 9d 44 6a b7 6c 16 d4 52 23 12 20 9d e5 5c 83 04 |.Dj.l..R#. ..\..| +00000270 d8 38 45 61 8b 30 5b 7b 6b 77 be 47 5a f8 fe 4d |.8Ea.0[{kw.GZ..M| +00000280 c8 e7 83 97 44 b4 fb 71 89 30 f2 cf d2 49 82 e8 |....D..q.0...I..| +00000290 d4 a8 73 86 44 29 30 17 7b b6 0e 4f 5f 6b 0c 33 |..s.D)0.{..O_k.3| +000002a0 43 7f 9b 84 a4 9b c6 30 18 ff 1b 85 a7 a9 17 23 |C......0.......#| +000002b0 2e 08 d3 57 10 af 49 95 2a 14 03 03 00 01 01 16 |...W..I.*.......| +000002c0 03 03 00 28 00 00 00 00 00 00 00 00 43 b8 4c 8a |...(........C.L.| +000002d0 84 1e 6c 41 02 fb b6 74 1e 4d 69 0d c0 f8 fc 8b |..lA...t.Mi.....| +000002e0 ce 64 53 95 40 c8 e8 52 31 5f a3 65 |.dS.@..R1_.e| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 28 e4 27 5e 80 00 |..........(.'^..| -00000010 ee db 03 4c 17 d1 9c bf f5 68 5f eb a6 fb 0c 3f |...L.....h_....?| -00000020 4f c4 38 84 3e c2 e9 f4 9b 06 39 5f 89 06 3a bd |O.8.>.....9_..:.| -00000030 77 db 25 |w.%| +00000000 14 03 03 00 01 01 16 03 03 00 28 04 f3 da a1 b9 |..........(.....| +00000010 b9 1a cf f3 a8 19 aa 23 12 65 8d 68 dc 37 09 9a |.......#.e.h.7..| +00000020 e4 0c cd e5 d4 3d cb 42 89 e4 ad 9e 49 34 de 05 |.....=.B....I4..| +00000030 74 f0 33 |t.3| >>> Flow 5 (client to server) -00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 2b 98 2b |.............+.+| -00000010 d6 dc d2 69 03 c9 0e 44 46 d1 5e d2 5a 14 89 7b |...i...DF.^.Z..{| -00000020 60 ab 62 15 03 03 00 1a 00 00 00 00 00 00 00 02 |`.b.............| -00000030 b9 7a 17 4b 10 5f 25 90 14 75 bb aa 42 de 7b 63 |.z.K._%..u..B.{c| -00000040 69 e8 |i.| +00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 00 33 c0 |..............3.| +00000010 3f 9c 56 3e 9b ed bb 5e 81 0c 4a 01 65 91 f5 da |?.V>...^..J.e...| +00000020 f6 4b 62 15 03 03 00 1a 00 00 00 00 00 00 00 02 |.Kb.............| +00000030 55 6f 8d 18 50 1f aa 00 94 9b 79 26 f0 3e 0a c6 |Uo..P.....y&.>..| +00000040 45 b0 |E.| diff --git a/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-ECDSA b/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-ECDSA index 7b2a363176..25120914e8 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-ECDSA +++ b/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-ECDSA @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 6d b7 f7 cf 1d |....]...Y..m....| -00000010 f9 c0 02 cb ee 90 23 93 41 8e 26 24 3e 74 31 ce |......#.A.&$>t1.| -00000020 4f 53 f8 9d 0f 94 02 b2 66 c9 87 20 d6 5c 35 52 |OS......f.. .\5R| -00000030 4b b1 f2 bb 2e 1d 95 ff 7d 83 f0 58 a8 0a ed b1 |K.......}..X....| -00000040 54 25 03 ca ea 7b 8d 1a 8f 9f 43 51 c0 09 00 00 |T%...{....CQ....| +00000000 16 03 03 00 5d 02 00 00 59 03 03 80 e4 9b 9d a9 |....]...Y.......| +00000010 59 27 7f 44 b9 4b 90 31 c7 66 03 90 d6 9b ef 17 |Y'.D.K.1.f......| +00000020 f8 fb e5 63 04 68 f6 ce a1 a6 f4 20 cb 84 55 fa |...c.h..... ..U.| +00000030 41 77 48 0f 0a 5a 24 92 e3 59 b2 d9 91 0c 18 4a |AwH..Z$..Y.....J| +00000040 bf af ad db 64 db cb 57 d8 0b de 46 c0 09 00 00 |....d..W...F....| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 0e 0b 00 02 0a 00 02 07 00 02 |................| 00000070 04 30 82 02 00 30 82 01 62 02 09 00 b8 bf 2d 47 |.0...0..b.....-G| @@ -57,17 +58,17 @@ 00000250 c9 86 2e dd d7 11 69 7f 85 7c 56 de fb 31 78 2b |......i..|V..1x+| 00000260 e4 c7 78 0d ae cb be 9e 4e 36 24 31 7b 6a 0f 39 |..x.....N6$1{j.9| 00000270 95 12 07 8f 2a 16 03 03 00 b6 0c 00 00 b2 03 00 |....*...........| -00000280 1d 20 04 b4 79 b4 2c 1d 0f b3 4b ff 67 e7 24 88 |. ..y.,...K.g.$.| -00000290 d6 db 4f 1e 66 da 0e f2 89 5a 53 ed 4e ba ad 4c |..O.f....ZS.N..L| -000002a0 81 0a 04 03 00 8a 30 81 87 02 42 01 fb 16 53 43 |......0...B...SC| -000002b0 2b 86 61 0a 58 a0 68 c1 cd 2c ff ec 79 7f 83 fa |+.a.X.h..,..y...| -000002c0 cc 0b 24 9d 98 54 d0 dc 90 55 e1 b3 e6 48 69 1a |..$..T...U...Hi.| -000002d0 55 62 f4 da 8f 60 db f7 76 80 d5 4d 37 f6 43 49 |Ub...`..v..M7.CI| -000002e0 95 3d 96 f6 e2 fd a4 07 ae 24 8c fa bd 02 41 20 |.=.......$....A | -000002f0 a1 50 78 a3 dd 99 c0 cf 74 f1 c0 79 b1 13 9d bc |.Px.....t..y....| -00000300 0b 37 cf 7c 09 11 b8 a4 71 65 e8 be ff 3a b9 85 |.7.|....qe...:..| -00000310 cd b4 30 f8 1f d6 2e 83 96 6c 01 3e d2 00 a7 5b |..0......l.>...[| -00000320 23 c6 d0 69 eb 90 49 e3 46 ed 45 96 3b 07 d4 a8 |#..i..I.F.E.;...| +00000280 1d 20 2f 6b 4c 95 75 59 25 2f f7 fd b1 1f d2 9e |. /kL.uY%/......| +00000290 2f 38 5e 57 1a 7c 36 99 1e 11 4a 3f f7 13 5b 0b |/8^W.|6...J?..[.| +000002a0 90 33 04 03 00 8a 30 81 87 02 42 01 b4 34 3f d0 |.3....0...B..4?.| +000002b0 41 09 00 12 f4 79 20 f4 b7 80 5c d1 35 9d 8b d2 |A....y ...\.5...| +000002c0 fa c9 4a a9 44 6b 05 95 c5 a7 50 08 0d 73 66 3e |..J.Dk....P..sf>| +000002d0 dd 49 e4 a4 c6 c0 12 ca 0b 4a df bc c1 3e ec 88 |.I.......J...>..| +000002e0 ec 9a 0e 71 15 4d 45 98 04 3a 51 7a 67 02 41 15 |...q.ME..:Qzg.A.| +000002f0 17 de b0 5c 03 a5 74 0e 0f 2b 53 6e 55 17 73 b8 |...\..t..+SnU.s.| +00000300 ac 16 70 1a 95 f9 25 b1 fc 4b 9d c7 b1 f4 71 f6 |..p...%..K....q.| +00000310 86 2d 5b 74 9e d3 4e 1b 40 67 f4 a6 62 2e c8 4d |.-[t..N.@g..b..M| +00000320 66 f7 32 e9 05 df d5 b0 e8 1a b7 b1 48 c4 1c 91 |f.2.........H...| 00000330 16 03 03 00 3a 0d 00 00 36 03 01 02 40 00 2e 04 |....:...6...@...| 00000340 03 05 03 06 03 08 07 08 08 08 09 08 0a 08 0b 08 |................| 00000350 04 08 05 08 06 04 01 05 01 06 01 03 03 02 03 03 |................| @@ -109,31 +110,31 @@ 00000200 e5 35 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 |.5....%...! /.}.| 00000210 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 |G.bC.(.._.).0...| 00000220 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 16 03 03 00 |......._X.;t....| -00000230 88 0f 00 00 84 08 04 00 80 3f 4a c2 4f 36 85 f0 |.........?J.O6..| -00000240 d0 c6 b6 8f f1 cc 45 c1 2f f2 c7 24 1e 0f 04 dc |......E./..$....| -00000250 f5 af 6e 38 eb aa a6 6f 36 f4 80 dd 78 78 a7 d4 |..n8...o6...xx..| -00000260 50 3a df e1 23 c4 3f 58 df 1a c0 1d 57 a5 46 3b |P:..#.?X....W.F;| -00000270 5d 09 ac 62 63 28 8a a2 b5 d4 9b 88 7c b9 4d b4 |]..bc(......|.M.| -00000280 66 b2 9d 53 6e 15 9c f2 9b c7 14 ca 19 7f 00 38 |f..Sn..........8| -00000290 81 a3 7b 44 e8 3d 6d 54 0f b3 81 fd 82 07 4d a1 |..{D.=mT......M.| -000002a0 3e 8c 30 34 cd 6e 55 96 58 bf 86 8b 9c f6 be 94 |>.04.nU.X.......| -000002b0 f4 a8 7e 4d 7f 03 07 7e 98 14 03 03 00 01 01 16 |..~M...~........| +00000230 88 0f 00 00 84 08 04 00 80 70 66 f2 ac fb f7 29 |.........pf....)| +00000240 15 31 a2 12 de 37 3f cc 97 74 5c 5b 7e 6d e4 f8 |.1...7?..t\[~m..| +00000250 b0 b3 3d 9c ee 32 bf d7 64 90 d7 af ad 8f 61 77 |..=..2..d.....aw| +00000260 f2 c0 7e 6f 91 1d 4e 95 92 3e ab 23 f0 ac d8 de |..~o..N..>.#....| +00000270 32 69 cd bc 04 4c d1 a3 77 7a af ac f0 64 41 aa |2i...L..wz...dA.| +00000280 a0 53 f0 89 89 a4 6f 1f 67 21 16 55 4e dc cb a8 |.S....o.g!.UN...| +00000290 12 7d cb a0 5c a9 48 48 d9 af 03 f0 75 ed 32 72 |.}..\.HH....u.2r| +000002a0 d5 da 34 a3 ea 82 08 8f 00 fc 7d 1d b8 11 ff f7 |..4.......}.....| +000002b0 09 52 a8 cc a8 66 b0 06 1e 14 03 03 00 01 01 16 |.R...f..........| 000002c0 03 03 00 40 00 00 00 00 00 00 00 00 00 00 00 00 |...@............| -000002d0 00 00 00 00 c7 88 1e 15 dd 36 31 22 0f 30 d1 4d |.........61".0.M| -000002e0 40 2e 3a dd 05 cc fd a8 d2 ea f8 d9 79 1d 07 46 |@.:.........y..F| -000002f0 2c 80 ab ab 54 3c 10 5a a7 79 d2 1c 16 18 94 eb |,...T<.Z.y......| -00000300 46 69 cc 03 |Fi..| +000002d0 00 00 00 00 9c 7d d4 9e 59 53 e7 66 64 63 9c cb |.....}..YS.fdc..| +000002e0 58 03 03 26 fe d9 15 eb 03 1c 8f a7 9c 5a 86 4a |X..&.........Z.J| +000002f0 6c 4e 06 4a 80 91 94 00 6f 7d 38 6a ea a3 68 df |lN.J....o}8j..h.| +00000300 17 08 14 ed |....| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 40 9e 65 27 5b 92 |..........@.e'[.| -00000010 1e 2b 1a bc 81 ab 85 29 51 c1 38 04 b6 97 e5 4b |.+.....)Q.8....K| -00000020 b1 7d a5 e2 6d e7 b1 1a 33 6c f1 3d a4 9c de 2d |.}..m...3l.=...-| -00000030 b3 8a 01 da cc f1 d7 83 b1 1e 84 cb b7 e7 fe e6 |................| -00000040 26 83 b0 2d 6f a9 77 46 55 44 7a |&..-o.wFUDz| +00000000 14 03 03 00 01 01 16 03 03 00 40 7e 6d 15 90 c5 |..........@~m...| +00000010 99 96 ca bb 16 b5 5a 55 3e b0 ef 3f ab e5 b6 8c |......ZU>..?....| +00000020 51 1d 18 c7 c2 25 86 e0 db c1 d0 38 85 51 4e 8d |Q....%.....8.QN.| +00000030 37 51 92 cc d0 64 37 b7 67 7b 2c fc e7 1e 16 f6 |7Q...d7.g{,.....| +00000040 76 3a 94 48 68 eb dc cc cf 2a 4d |v:.Hh....*M| >>> Flow 5 (client to server) 00000000 17 03 03 00 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........| -00000010 00 00 00 00 00 e2 55 06 b8 6f 63 c4 63 78 76 4b |......U..oc.cxvK| -00000020 c8 63 8b 4b c6 11 2c ff dc fc 20 f7 52 fe fa 5f |.c.K..,... .R.._| -00000030 e3 45 3a f2 a1 15 03 03 00 30 00 00 00 00 00 00 |.E:......0......| -00000040 00 00 00 00 00 00 00 00 00 00 0e cb 88 2f 1f be |............./..| -00000050 9c 76 4d db 75 7f eb 01 ae bd 76 28 07 41 49 6c |.vM.u.....v(.AIl| -00000060 4c 82 84 d5 fc d3 75 f4 4b 81 |L.....u.K.| +00000010 00 00 00 00 00 db 14 ae 78 62 50 37 42 b8 fc c6 |........xbP7B...| +00000020 f1 84 40 75 7c e4 3f 8a 57 b8 1c 12 4a 6f 11 f2 |..@u|.?.W...Jo..| +00000030 ba 1a a6 9b 20 15 03 03 00 30 00 00 00 00 00 00 |.... ....0......| +00000040 00 00 00 00 00 00 00 00 00 00 09 93 aa 80 fd b2 |................| +00000050 66 e2 83 0e f8 83 45 3d e1 39 06 5d a3 12 9e 12 |f.....E=.9.]....| +00000060 fd f5 cb 32 c4 3b ce 20 e4 10 |...2.;. ..| diff --git a/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-RSA b/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-RSA index 25fc245b65..3bfb4aaabd 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-RSA +++ b/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-RSA @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 5f da ab 10 86 |....]...Y.._....| -00000010 4c 91 60 4c ec 28 20 d4 37 84 c4 d0 87 bb 9d a9 |L.`L.( .7.......| -00000020 5a c0 86 81 d9 91 38 5a ef 3f ae 20 ec 14 b6 de |Z.....8Z.?. ....| -00000030 b7 cf 59 09 43 dc 59 3f 74 89 10 f2 82 ea 60 46 |..Y.C.Y?t.....`F| -00000040 8f a3 6a 0f 61 0f 2d 66 24 c3 fb 7f c0 2f 00 00 |..j.a.-f$..../..| +00000000 16 03 03 00 5d 02 00 00 59 03 03 c0 dd 18 ad 41 |....]...Y......A| +00000010 2b ee fd 45 1f c0 c1 10 75 a7 1d 80 74 3e 8e 66 |+..E....u...t>.f| +00000020 18 c8 64 c2 b4 89 4f 19 ff e0 0c 20 be c6 2a 8e |..d...O.... ..*.| +00000030 73 0a 1e 7a 2a d2 81 71 11 ba e9 de 02 0a aa 52 |s..z*..q.......R| +00000040 76 b7 43 a3 49 a0 81 24 9c 57 4c 26 c0 2f 00 00 |v.C.I..$.WL&./..| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 59 0b 00 02 55 00 02 52 00 02 |......Y...U..R..| 00000070 4f 30 82 02 4b 30 82 01 b4 a0 03 02 01 02 02 09 |O0..K0..........| @@ -61,18 +62,18 @@ 00000290 73 bb b3 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 |s..Cw.......@.a.| 000002a0 4c 72 2b 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 |Lr+...F..M...>..| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 2c c4 b9 |............ ,..| -000002d0 13 19 85 99 cb 09 f3 5c 3a a1 b2 16 ee 77 6a cd |.......\:....wj.| -000002e0 23 6c 08 00 7e 6b c0 67 a8 cd 8b 62 64 08 04 00 |#l..~k.g...bd...| -000002f0 80 90 74 bf ce f7 94 f1 94 b1 95 04 4a ab d6 08 |..t.........J...| -00000300 23 11 8d ce 4e 7b 36 ee 67 d2 26 af 11 0e 33 58 |#...N{6.g.&...3X| -00000310 12 cb e5 3b 5b 5c f3 d1 82 19 2e 55 6b 98 05 6e |...;[\.....Uk..n| -00000320 3c 5e 04 f5 3e df 76 c3 e5 46 e7 a6 bb f7 d4 d5 |<^..>.v..F......| -00000330 e8 fd 20 d3 ce 3e 9d a0 90 9a 10 52 a7 04 c9 e9 |.. ..>.....R....| -00000340 28 6f 3f ff e1 0a 10 d0 25 04 ea e4 84 4c b7 80 |(o?.....%....L..| -00000350 e4 fe a7 a6 da db cc b0 e0 62 80 10 fc 03 16 94 |.........b......| -00000360 f2 dd 0d 3f aa 11 45 af e3 e4 7b e6 bc d6 75 91 |...?..E...{...u.| -00000370 99 16 03 03 00 3a 0d 00 00 36 03 01 02 40 00 2e |.....:...6...@..| +000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 5a f3 c3 |............ Z..| +000002d0 1b 34 9a 1a 01 68 65 fd 25 e5 e4 62 f4 17 d6 00 |.4...he.%..b....| +000002e0 88 ae 5e fa 6b ef 60 96 e9 96 1e 33 0f 08 04 00 |..^.k.`....3....| +000002f0 80 74 91 43 7a 3e 02 93 c6 6c 6d 36 86 2f 74 51 |.t.Cz>...lm6./tQ| +00000300 50 84 a2 0b 1c b4 90 71 72 2b f9 7d 35 2a a6 fc |P......qr+.}5*..| +00000310 56 b1 fa 36 e0 cb ea 5a 4e 89 71 3f 28 d3 fc 90 |V..6...ZN.q?(...| +00000320 de 21 0c 03 84 d9 23 78 b6 58 f2 03 02 27 48 f9 |.!....#x.X...'H.| +00000330 6d 6c 2b eb 62 36 47 66 55 fc d9 77 42 1e 9b 93 |ml+.b6GfU..wB...| +00000340 00 0f 5a 71 76 af 2c d9 b7 c3 6e e8 7a 64 34 0f |..Zqv.,...n.zd4.| +00000350 78 36 d7 cf a1 bb 3d 0a 23 64 c4 70 f0 78 8e 42 |x6....=.#d.p.x.B| +00000360 80 42 1f 0f 1d 7f c9 b6 7b 9c 2a 30 6c 7a ef 0c |.B......{.*0lz..| +00000370 2f 16 03 03 00 3a 0d 00 00 36 03 01 02 40 00 2e |/....:...6...@..| 00000380 04 03 05 03 06 03 08 07 08 08 08 09 08 0a 08 0b |................| 00000390 08 04 08 05 08 06 04 01 05 01 06 01 03 03 02 03 |................| 000003a0 03 01 02 01 03 02 02 02 04 02 05 02 06 02 00 00 |................| @@ -113,26 +114,26 @@ 00000200 e5 35 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 |.5....%...! /.}.| 00000210 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 |G.bC.(.._.).0...| 00000220 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 16 03 03 00 |......._X.;t....| -00000230 88 0f 00 00 84 08 04 00 80 4d c1 8a 3d 2b 1f a0 |.........M..=+..| -00000240 ad 6f 1c b6 44 7c cc 0d 21 6f e8 31 51 58 51 fe |.o..D|..!o.1QXQ.| -00000250 84 f3 41 40 12 48 29 0d 20 16 d1 6a 4b 38 0b c8 |..A@.H). ..jK8..| -00000260 b3 70 3f 4a ca 17 da 05 30 ec 6c 4f 55 e2 ee e5 |.p?J....0.lOU...| -00000270 9a 8c a7 9f c1 96 79 cf 53 b6 67 c8 cb 67 d3 23 |......y.S.g..g.#| -00000280 07 8a 3f ef df e5 e6 84 f6 5f 5e 23 57 89 cc 77 |..?......_^#W..w| -00000290 99 ed 3d 58 8a ec eb bb 64 62 d1 44 7f b6 45 85 |..=X....db.D..E.| -000002a0 89 06 90 56 48 98 8a 43 93 64 53 df 3a 8c b3 93 |...VH..C.dS.:...| -000002b0 91 81 7b 60 95 8f 99 99 eb 14 03 03 00 01 01 16 |..{`............| -000002c0 03 03 00 28 00 00 00 00 00 00 00 00 dd 93 96 02 |...(............| -000002d0 47 0e 1d 2f 6a 76 12 e5 56 53 8f 7f c1 cd f3 5e |G../jv..VS.....^| -000002e0 3c 94 35 1b fe d5 33 97 b2 5b a3 29 |<.5...3..[.)| +00000230 88 0f 00 00 84 08 04 00 80 56 a2 bb f3 05 94 90 |.........V......| +00000240 46 bc ef 79 ea 74 f9 a4 5c 27 59 dd 93 53 c3 9f |F..y.t..\'Y..S..| +00000250 07 b0 bf c1 e2 dc 39 b9 0d 63 62 d1 d0 88 65 e4 |......9..cb...e.| +00000260 2b 28 d3 ad b1 78 60 4c 0d a6 1f 2e a1 bc 36 81 |+(...x`L......6.| +00000270 31 f0 aa 0b 52 e6 04 69 ba 8a 9d c1 fd 25 d3 50 |1...R..i.....%.P| +00000280 43 5b ed fc 78 21 2b cc 13 f8 db f1 8b e7 57 d8 |C[..x!+.......W.| +00000290 59 f3 cf 54 ab d0 ea d6 8c 61 32 79 b8 be a6 c7 |Y..T.....a2y....| +000002a0 87 0a 35 88 70 f7 3f 2d bd 1b 7c 57 35 32 1b 81 |..5.p.?-..|W52..| +000002b0 87 08 e3 b0 1f a1 2b 13 fb 14 03 03 00 01 01 16 |......+.........| +000002c0 03 03 00 28 00 00 00 00 00 00 00 00 49 94 ed a1 |...(........I...| +000002d0 a3 13 e0 f4 20 2a 63 4d ef 24 d3 6c 8d 6c de b3 |.... *cM.$.l.l..| +000002e0 92 16 21 0d b0 6c 64 df 1b 32 ca dc |..!..ld..2..| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 28 de 60 8a ea b5 |..........(.`...| -00000010 74 66 35 35 39 bb 62 ab 17 7d 91 c3 1a 5a e5 6c |tf559.b..}...Z.l| -00000020 49 14 c8 bc bd d6 b6 7e 2f 8e d4 40 5a ae ee 89 |I......~/..@Z...| -00000030 89 ae af |...| +00000000 14 03 03 00 01 01 16 03 03 00 28 b9 2c 96 43 03 |..........(.,.C.| +00000010 f9 8c 28 34 4e 8b 58 ba d7 1a c4 87 d8 67 5c 0f |..(4N.X......g\.| +00000020 36 36 67 54 4e f4 6c 9c 0c 0e 1f df ca a3 8d ab |66gTN.l.........| +00000030 31 f2 84 |1..| >>> Flow 5 (client to server) -00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 3c 92 2d |.............<.-| -00000010 44 23 5b eb 34 dc 9a 4d c2 fe a7 88 cb 6f 8d 62 |D#[.4..M.....o.b| -00000020 4b 2a bf 15 03 03 00 1a 00 00 00 00 00 00 00 02 |K*..............| -00000030 90 82 82 54 5d 63 6e 8b 50 71 6e e8 fd 75 96 9e |...T]cn.Pqn..u..| -00000040 d0 0d |..| +00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 de 90 16 |................| +00000010 8e ec 2c 60 b8 a7 4f b6 26 8a c9 78 ff e0 73 19 |..,`..O.&..x..s.| +00000020 b3 01 c1 15 03 03 00 1a 00 00 00 00 00 00 00 02 |................| +00000030 8a 4b 2c 4b 99 51 81 27 34 28 63 00 15 24 e1 47 |.K,K.Q.'4(c..$.G| +00000040 4a 2f |J/| diff --git a/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-RSAPKCS1v15 b/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-RSAPKCS1v15 index 6500aec8b0..b933f592be 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-RSAPKCS1v15 +++ b/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-RSAPKCS1v15 @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 7b 21 bd ee 4b |....]...Y..{!..K| -00000010 af e3 88 cb 18 15 e5 f3 ef a5 a7 b3 a1 66 06 b2 |.............f..| -00000020 f1 cc d7 36 7e 18 d1 f6 2e 3e cd 20 34 09 01 9f |...6~....>. 4...| -00000030 c6 80 10 43 c1 ed e6 c1 29 1c ed ac 61 36 37 4f |...C....)...a67O| -00000040 8e 00 44 9d b9 cb 51 0b a2 9c 64 be c0 2f 00 00 |..D...Q...d../..| +00000000 16 03 03 00 5d 02 00 00 59 03 03 0e 33 06 1f 9d |....]...Y...3...| +00000010 3d 0e 59 21 38 7d 4c ea a2 2a 2a c7 99 7b e9 bf |=.Y!8}L..**..{..| +00000020 61 e2 44 a1 10 5e 5d a1 e4 fd 90 20 c1 f0 1c 8e |a.D..^].... ....| +00000030 00 2f d9 a0 45 23 76 35 e0 01 2e 49 b8 4d b4 76 |./..E#v5...I.M.v| +00000040 08 65 3f cd 8b dc 80 ea fd 31 9f 47 c0 2f 00 00 |.e?......1.G./..| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 59 0b 00 02 55 00 02 52 00 02 |......Y...U..R..| 00000070 4f 30 82 02 4b 30 82 01 b4 a0 03 02 01 02 02 09 |O0..K0..........| @@ -61,18 +62,18 @@ 00000290 73 bb b3 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 |s..Cw.......@.a.| 000002a0 4c 72 2b 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 |Lr+...F..M...>..| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 d3 22 bb |............ .".| -000002d0 c4 42 90 54 0a 43 f6 26 06 c1 ad 71 c8 82 ba 03 |.B.T.C.&...q....| -000002e0 9b cd be a4 a8 04 5a 30 69 ec b5 c9 79 04 01 00 |......Z0i...y...| -000002f0 80 ab c7 ca 24 9b db 7d 8c 81 c4 c4 46 49 2a 45 |....$..}....FI*E| -00000300 69 31 1b dc ef 01 ce 9f e4 da cf 6c 04 4c e3 4e |i1.........l.L.N| -00000310 16 84 05 fe 48 f4 21 60 fc d4 e1 6c 48 8c 87 2d |....H.!`...lH..-| -00000320 1f 56 2c ad 88 2b 5c 8d 4f 36 93 d6 a3 b1 32 4a |.V,..+\.O6....2J| -00000330 ef 0f e6 db 82 1c f2 ea 38 08 2a 62 8b a3 bd 4e |........8.*b...N| -00000340 8b 2a ae eb 0e e5 f1 88 ff 3c de f8 ed d7 c3 07 |.*.......<......| -00000350 05 92 bb e5 6d 15 23 c8 54 19 a6 cf d1 4f e2 b1 |....m.#.T....O..| -00000360 a3 4d ff 6f 22 32 5b 58 f7 58 c1 9f 58 59 b5 e2 |.M.o"2[X.X..XY..| -00000370 7b 16 03 03 00 0c 0d 00 00 08 01 01 00 02 04 01 |{...............| +000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 09 ce 63 |............ ..c| +000002d0 9c 52 37 83 ef 21 78 60 eb 8b dd 22 91 fb 34 4f |.R7..!x`..."..4O| +000002e0 ee 04 ef 48 75 2f 49 7e 3f 0b 00 62 15 04 01 00 |...Hu/I~?..b....| +000002f0 80 a0 11 99 d2 bc a9 fd 59 ad 38 20 bb 44 85 8e |........Y.8 .D..| +00000300 89 35 2e 42 ff a2 87 81 86 f5 e3 6c 9d 84 2a cf |.5.B.......l..*.| +00000310 0d cc 6a c0 ce 31 01 91 48 78 75 23 24 3e 3d 93 |..j..1..Hxu#$>=.| +00000320 bf ad c9 49 9d 63 66 cd 4b cc 92 0f 6d 64 2c 80 |...I.cf.K...md,.| +00000330 71 22 bf 6d 62 8e 8a f7 19 6f 50 2a 86 46 e4 46 |q".mb....oP*.F.F| +00000340 71 73 df 8c 25 84 6f 28 a7 8c bd 78 01 22 a2 91 |qs..%.o(...x."..| +00000350 f4 17 ef 88 55 9d d5 ac 42 5a 8a c8 7a 1b bf d1 |....U...BZ..z...| +00000360 d9 6d 15 42 b9 37 16 7b 2b 3c c7 58 99 da ab 98 |.m.B.7.{+<.X....| +00000370 f3 16 03 03 00 0c 0d 00 00 08 01 01 00 02 04 01 |................| 00000380 00 00 16 03 03 00 04 0e 00 00 00 |...........| >>> Flow 3 (client to server) 00000000 16 03 03 01 fd 0b 00 01 f9 00 01 f6 00 01 f3 30 |...............0| @@ -110,26 +111,26 @@ 00000200 e5 35 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 |.5....%...! /.}.| 00000210 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 |G.bC.(.._.).0...| 00000220 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 16 03 03 00 |......._X.;t....| -00000230 88 0f 00 00 84 04 01 00 80 8f 22 b5 46 ab 82 02 |..........".F...| -00000240 f8 a8 f8 63 d9 0f eb d4 2b 8d 02 de ce 79 d5 a1 |...c....+....y..| -00000250 20 bb 70 7a b2 36 6a b5 52 81 f5 ea f7 23 b5 41 | .pz.6j.R....#.A| -00000260 86 35 90 cc 64 4a 68 7e e3 ae c1 97 32 3b c2 a9 |.5..dJh~....2;..| -00000270 e0 f0 07 14 63 d5 08 15 59 46 f5 ea a6 39 5c 98 |....c...YF...9\.| -00000280 39 7e 17 d8 74 ae 05 a3 f5 3a 71 74 e8 b4 c9 a4 |9~..t....:qt....| -00000290 1c 82 04 ca fe 5f 97 23 8a c1 f9 ce d1 5d 0e 81 |....._.#.....]..| -000002a0 da 5f e1 b6 76 80 3c cf 9f 19 79 cf 33 d0 0a fe |._..v.<...y.3...| -000002b0 19 fc 2d 9a bb 24 cd d4 79 14 03 03 00 01 01 16 |..-..$..y.......| -000002c0 03 03 00 28 00 00 00 00 00 00 00 00 28 78 b8 0b |...(........(x..| -000002d0 59 d8 a8 11 21 ed 45 74 02 00 50 33 42 b9 0a d2 |Y...!.Et..P3B...| -000002e0 8c 9c a3 45 6e b5 9d 3e 5b 30 a9 2e |...En..>[0..| +00000230 88 0f 00 00 84 04 01 00 80 01 83 0b 8b bf a3 50 |...............P| +00000240 03 89 e8 24 9b 9e 2e f5 7b 72 58 b1 b1 ba b2 64 |...$....{rX....d| +00000250 9f a9 e2 b4 00 78 79 50 ec 55 18 43 e5 c4 a4 76 |.....xyP.U.C...v| +00000260 c8 21 bc 7e e0 c4 2d 78 85 d7 33 ca d7 4d e0 f1 |.!.~..-x..3..M..| +00000270 cd 6d bd 17 2f a0 b9 39 93 29 ba d7 09 4f bb 08 |.m../..9.)...O..| +00000280 b0 b0 05 f1 83 de d0 db 39 f9 b4 34 a3 ca d3 76 |........9..4...v| +00000290 97 35 f6 ea cd 53 fe bb 94 99 30 e3 a2 0a 29 1a |.5...S....0...).| +000002a0 5f f4 28 0e 8c 80 fc 75 84 a4 e2 3a 29 a9 50 be |_.(....u...:).P.| +000002b0 11 99 bb a5 12 64 5c af 5f 14 03 03 00 01 01 16 |.....d\._.......| +000002c0 03 03 00 28 00 00 00 00 00 00 00 00 8e 51 58 0e |...(.........QX.| +000002d0 1a fd 8e 01 f1 6b 59 94 54 ab 00 be 45 8b 4c ae |.....kY.T...E.L.| +000002e0 70 c3 db 53 de 82 12 6c cb df 32 72 |p..S...l..2r| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 28 f8 f5 85 19 36 |..........(....6| -00000010 be 6e 58 45 66 04 c4 f9 e7 fd 50 55 3b 07 6c 50 |.nXEf.....PU;.lP| -00000020 16 8c 2e 72 cf be 78 0a 8a 82 91 ed c1 72 10 d3 |...r..x......r..| -00000030 cf 42 b5 |.B.| +00000000 14 03 03 00 01 01 16 03 03 00 28 7b 7f 81 c9 d7 |..........({....| +00000010 1d 3a 32 48 da 92 d6 9f 78 6e 2f d3 e9 7e 9f 12 |.:2H....xn/..~..| +00000020 9b 0b e1 00 e8 2f 4b 63 2c 3d 94 e4 f8 1e 06 7d |...../Kc,=.....}| +00000030 a7 7e 6a |.~j| >>> Flow 5 (client to server) -00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 53 4b a2 |.............SK.| -00000010 e4 5f 51 70 46 3d e3 41 28 8b 82 02 e2 27 8d eb |._QpF=.A(....'..| -00000020 42 65 7f 15 03 03 00 1a 00 00 00 00 00 00 00 02 |Be..............| -00000030 f3 31 ed 2c ca e5 13 e8 93 cd d7 51 4b c5 16 88 |.1.,.......QK...| -00000040 c0 a4 |..| +00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 ee 21 1b |..............!.| +00000010 45 15 6a 0c 79 12 4d 79 d2 26 db fc e4 da 0f e4 |E.j.y.My.&......| +00000020 20 7e c7 15 03 03 00 1a 00 00 00 00 00 00 00 02 | ~..............| +00000030 2a 46 62 6b 5e c3 14 56 e1 fb d0 61 f5 e8 7b 2f |*Fbk^..V...a..{/| +00000040 cc fd |..| diff --git a/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-RSAPSS b/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-RSAPSS index b4c5102535..646026793f 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-RSAPSS +++ b/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-RSAPSS @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 0d 73 c5 43 a1 |....]...Y...s.C.| -00000010 71 b6 21 da 7a f6 76 44 60 8a 84 ec 6b 1d 70 01 |q.!.z.vD`...k.p.| -00000020 d8 b2 29 48 db 5d ea da ea 79 bb 20 3f b9 66 fe |..)H.]...y. ?.f.| -00000030 73 db fc 90 18 3f ac e5 1f 5d 86 24 80 75 ec a3 |s....?...].$.u..| -00000040 c6 aa e9 05 c1 47 21 bd 30 f6 41 43 c0 2f 00 00 |.....G!.0.AC./..| +00000000 16 03 03 00 5d 02 00 00 59 03 03 cd 47 5d a7 66 |....]...Y...G].f| +00000010 aa b1 e1 bd ed 83 bd 3d 4a b7 b2 08 b8 79 08 c5 |.......=J....y..| +00000020 22 7b 8d be fe 55 4c 2d b5 4c b9 20 13 26 2a e6 |"{...UL-.L. .&*.| +00000030 ab 60 4c 53 8c b7 27 c4 d5 12 ff 38 64 b1 a2 1d |.`LS..'....8d...| +00000040 4f a4 c7 28 53 95 01 8f 7e 4a 7b 02 c0 2f 00 00 |O..(S...~J{../..| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 66 0b 00 02 62 00 02 5f 00 02 |......f...b.._..| 00000070 5c 30 82 02 58 30 82 01 8d a0 03 02 01 02 02 11 |\0..X0..........| @@ -62,17 +63,17 @@ 000002a0 fa b1 3f 14 11 89 66 79 d1 8e 88 0e 0b a0 9e 30 |..?...fy.......0| 000002b0 2a c0 67 ef ca 46 02 88 e9 53 81 22 69 22 97 ad |*.g..F...S."i"..| 000002c0 80 93 d4 f7 dd 70 14 24 d7 70 0a 46 a1 16 03 03 |.....p.$.p.F....| -000002d0 00 ac 0c 00 00 a8 03 00 1d 20 03 05 56 dd 40 c0 |......... ..V.@.| -000002e0 b6 4d 5a df 26 e7 4a f1 a8 47 ef af 12 6e 5f 01 |.MZ.&.J..G...n_.| -000002f0 2a 7a 19 1a 45 52 8c 47 d2 53 08 04 00 80 8a 6a |*z..ER.G.S.....j| -00000300 9d 8b 38 73 da 92 bc f6 05 79 90 af 7a 43 59 62 |..8s.....y..zCYb| -00000310 bc 97 b6 af ef ce 5f 59 07 81 93 bc c5 3c 5f f9 |......_Y.....<_.| -00000320 4e 04 45 74 5e cc 7a 6f 82 7a cf 86 0d 68 c9 35 |N.Et^.zo.z...h.5| -00000330 1d 62 f0 3c ee 77 b5 4c 3a 40 ec 89 fc 97 ff a6 |.b.<.w.L:@......| -00000340 34 13 8b bc 6b 83 92 e8 52 c5 c6 42 c9 25 ad 37 |4...k...R..B.%.7| -00000350 41 e7 5a 52 d8 0f 7d fd a8 9e 86 c6 1b b2 8b 50 |A.ZR..}........P| -00000360 2a 1c 15 56 00 d8 a8 85 86 05 28 7f a1 3e ba f2 |*..V......(..>..| -00000370 fe 92 07 c8 a4 4a 2a 5f d1 53 82 09 9c 65 16 03 |.....J*_.S...e..| +000002d0 00 ac 0c 00 00 a8 03 00 1d 20 a8 94 95 94 cc 16 |......... ......| +000002e0 f1 dc 11 b6 c5 52 b3 fe 95 4d 28 34 1f 2d 87 ec |.....R...M(4.-..| +000002f0 8d 56 51 0e 5b 92 03 f9 60 0d 08 04 00 80 09 3a |.VQ.[...`......:| +00000300 99 39 d8 3f 63 b4 86 12 ba ce e6 6d d6 22 aa d8 |.9.?c......m."..| +00000310 31 60 86 eb 48 cc c0 87 97 a5 0d c7 42 86 cc f8 |1`..H.......B...| +00000320 f7 f9 d5 1a 34 86 ec 41 02 08 99 c2 93 9b d1 b5 |....4..A........| +00000330 57 a4 84 3c a8 93 0a c9 f7 1e a1 33 07 ca 60 c4 |W..<.......3..`.| +00000340 4b 40 32 20 a6 22 3f 6d 4e 28 22 3b 52 70 9a 4d |K@2 ."?mN(";Rp.M| +00000350 fa 84 67 88 ba b5 0d 92 eb 23 94 90 00 e2 68 74 |..g......#....ht| +00000360 5f 13 a3 d4 2d fb 24 f2 32 09 b1 e3 63 15 39 b1 |_...-.$.2...c.9.| +00000370 9e 1e a6 61 fd 8d c6 cf 1f f7 f7 43 0c 64 16 03 |...a.......C.d..| 00000380 03 00 0c 0d 00 00 08 01 01 00 02 08 04 00 00 16 |................| 00000390 03 03 00 04 0e 00 00 00 |........| >>> Flow 3 (client to server) @@ -118,26 +119,26 @@ 00000270 10 00 00 21 20 2f e5 7d a3 47 cd 62 43 15 28 da |...! /.}.G.bC.(.| 00000280 ac 5f bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 |._.).0..........| 00000290 5f 58 cb 3b 74 16 03 03 00 88 0f 00 00 84 08 04 |_X.;t...........| -000002a0 00 80 2e 4c af b1 f2 9c de 14 92 81 c4 7d d1 2f |...L.........}./| -000002b0 a3 ba ba df 6f 26 da 2d 86 b4 1f 60 cd fe e7 c1 |....o&.-...`....| -000002c0 77 02 a5 58 3f 6a fc 1d ef 93 23 0a 9c c9 70 93 |w..X?j....#...p.| -000002d0 f8 0c 67 fd 58 83 96 85 62 da 31 e7 a6 78 9f 1c |..g.X...b.1..x..| -000002e0 dc 02 b3 b8 bc 05 26 92 e8 6a e7 3c db 5f 80 ee |......&..j.<._..| -000002f0 12 75 ff e6 36 36 e6 75 c2 77 d9 63 ef 60 89 db |.u..66.u.w.c.`..| -00000300 21 aa 27 85 11 9b 8c eb be a3 e3 34 0e 01 93 ca |!.'........4....| -00000310 a6 65 e3 cd 0f b8 b5 c6 f0 d7 15 69 db 4b 57 d2 |.e.........i.KW.| -00000320 05 0d 14 03 03 00 01 01 16 03 03 00 28 00 00 00 |............(...| -00000330 00 00 00 00 00 b5 09 a0 c4 55 89 df 8a 60 83 f3 |.........U...`..| -00000340 82 12 55 1d d5 50 11 81 74 0f cd b5 ed 9a 00 e7 |..U..P..t.......| -00000350 58 f7 65 0e 8d |X.e..| +000002a0 00 80 86 14 3f 28 40 db 2b 02 d6 56 d3 58 d0 77 |....?(@.+..V.X.w| +000002b0 58 f8 a3 25 1f 18 d1 9c 0a d2 56 09 32 59 34 db |X..%......V.2Y4.| +000002c0 d9 2e 0a bf b4 c2 0a 86 ee 6e 29 56 53 aa 82 11 |.........n)VS...| +000002d0 96 6d 86 29 7c 85 a4 71 56 04 71 5f e6 68 3f 3f |.m.)|..qV.q_.h??| +000002e0 71 54 13 a2 22 b4 3e 38 fa c2 96 a4 c4 ab 83 c6 |qT..".>8........| +000002f0 f5 ca 7a ea 2c 8d 62 4d 76 d6 db 9c f0 0e 8c 2a |..z.,.bMv......*| +00000300 38 2f 9d 24 34 f4 33 73 54 a2 44 9a e3 4c 1f a7 |8/.$4.3sT.D..L..| +00000310 ca 49 16 e8 35 29 29 d1 48 95 0a 38 19 64 4c e7 |.I..5)).H..8.dL.| +00000320 0d a5 14 03 03 00 01 01 16 03 03 00 28 00 00 00 |............(...| +00000330 00 00 00 00 00 09 7f fa f5 c5 e5 b1 46 7e 3d e2 |............F~=.| +00000340 d4 51 a7 b8 ae 0a 56 a3 8c 45 40 97 d4 c5 81 4e |.Q....V..E@....N| +00000350 6f 12 50 b3 f6 |o.P..| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 28 3f eb 87 50 b0 |..........(?..P.| -00000010 ae c2 fd 68 30 95 94 61 1c 78 1e 60 3e 38 17 ef |...h0..a.x.`>8..| -00000020 ed 9b f1 10 26 5e 53 a3 8c 46 2e 6c 24 b2 ab a7 |....&^S..F.l$...| -00000030 6c f0 ea |l..| +00000000 14 03 03 00 01 01 16 03 03 00 28 0b 0d 27 bb 5f |..........(..'._| +00000010 c5 fa 62 08 8f 7a 24 65 90 bc de be 28 ae a4 e2 |..b..z$e....(...| +00000020 1f ac 18 7a 83 3e 90 bb 76 2f 73 ec 35 ca d3 e7 |...z.>..v/s.5...| +00000030 d8 25 7f |.%.| >>> Flow 5 (client to server) -00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 fe de 40 |...............@| -00000010 52 50 79 da 5f 31 52 52 d8 96 04 35 86 92 03 0b |RPy._1RR...5....| -00000020 6f 5f 04 15 03 03 00 1a 00 00 00 00 00 00 00 02 |o_..............| -00000030 9c 85 24 b0 a9 17 24 cf 18 f6 ef f5 0d c6 77 6d |..$...$.......wm| -00000040 e0 b2 |..| +00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 a7 07 a5 |................| +00000010 b5 4c 26 d0 d1 6b 52 10 8f 7c 3a 4c 31 ce 74 fa |.L&..kR..|:L1.t.| +00000020 4a c7 9b 15 03 03 00 1a 00 00 00 00 00 00 00 02 |J...............| +00000030 22 22 5a b9 ef 4f 05 9f 2e 1e 9c 11 e1 6c 0b 1e |""Z..O.......l..| +00000040 bd 10 |..| diff --git a/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES b/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES index 774cb40e3d..6268dbcc7a 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES +++ b/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 15 ed ca 52 59 |....]...Y.....RY| -00000010 e2 56 80 e2 f3 20 5b 7d 52 f3 67 1f 01 0d ad 30 |.V... [}R.g....0| -00000020 36 a6 43 c2 ed 5e 34 c5 24 89 e1 20 c7 4c 5d 06 |6.C..^4.$.. .L].| -00000030 01 7a 80 aa 84 0c 46 48 63 36 49 4a 9b 3f 8d ba |.z....FHc6IJ.?..| -00000040 78 1b cd f9 ef 03 df cd ee 2c b1 79 c0 09 00 00 |x........,.y....| +00000000 16 03 03 00 5d 02 00 00 59 03 03 61 e9 cc eb 72 |....]...Y..a...r| +00000010 7c 11 18 0e 9d 6b 72 e9 be 84 f3 92 8d 5f e6 4c ||....kr......_.L| +00000020 ec 9e f0 00 ca 00 6f af 90 5b de 20 29 97 82 6d |......o..[. )..m| +00000030 57 ac 60 59 41 1d bb 29 b1 12 a4 ac 60 18 3b 51 |W.`YA..)....`.;Q| +00000040 af 5c e7 80 1a dc 9d 72 ed 3a 74 96 c0 09 00 00 |.\.....r.:t.....| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 0e 0b 00 02 0a 00 02 07 00 02 |................| 00000070 04 30 82 02 00 30 82 01 62 02 09 00 b8 bf 2d 47 |.0...0..b.....-G| @@ -56,39 +57,39 @@ 00000240 8c 25 c1 33 13 83 0d 94 06 bb d4 37 7a f6 ec 7a |.%.3.......7z..z| 00000250 c9 86 2e dd d7 11 69 7f 85 7c 56 de fb 31 78 2b |......i..|V..1x+| 00000260 e4 c7 78 0d ae cb be 9e 4e 36 24 31 7b 6a 0f 39 |..x.....N6$1{j.9| -00000270 95 12 07 8f 2a 16 03 03 00 b6 0c 00 00 b2 03 00 |....*...........| -00000280 1d 20 b7 f5 92 bc 9b 4a f9 62 3f 46 b8 b0 33 56 |. .....J.b?F..3V| -00000290 1e 8d fc e9 68 af bf 67 9b a5 d0 9e a9 cc d9 65 |....h..g.......e| -000002a0 7e 41 04 03 00 8a 30 81 87 02 41 08 b2 fe 6e 40 |~A....0...A...n@| -000002b0 b7 5f 04 db eb 39 18 d5 e0 46 81 07 33 3a 29 fb |._...9...F..3:).| -000002c0 0b 19 76 ac 95 0d cd 4d a4 f0 99 df 6d d6 73 79 |..v....M....m.sy| -000002d0 ed 48 52 78 ea 7a 1d 4b b1 67 d6 fd 21 3b c9 9d |.HRx.z.K.g..!;..| -000002e0 89 67 b7 b9 8e cf 35 28 62 28 3f 0b 02 42 01 7e |.g....5(b(?..B.~| -000002f0 4c a5 af 5b ba 3b d6 38 3b 34 b7 0c 69 27 92 ce |L..[.;.8;4..i'..| -00000300 34 ba bb 0d f6 32 65 fe 3c c0 9c 9d 92 88 b4 11 |4....2e.<.......| -00000310 04 88 f5 b3 21 79 6c ed 6e f6 51 f5 e7 b1 3d 0d |....!yl.n.Q...=.| -00000320 bd d6 92 67 c8 90 71 7a db cc cc 21 64 44 22 d4 |...g..qz...!dD".| -00000330 16 03 03 00 04 0e 00 00 00 |.........| +00000270 95 12 07 8f 2a 16 03 03 00 b7 0c 00 00 b3 03 00 |....*...........| +00000280 1d 20 88 7d 69 d3 1b 2d b5 dd 4e 0a f4 98 f3 8c |. .}i..-..N.....| +00000290 42 d7 ee e2 7c 28 dc f2 75 ec b0 9e ca ad cb 21 |B...|(..u......!| +000002a0 59 34 04 03 00 8b 30 81 88 02 42 01 32 2c 84 f3 |Y4....0...B.2,..| +000002b0 d8 7c 05 58 ac d0 25 46 42 11 b4 7c 0a cb ee 83 |.|.X..%FB..|....| +000002c0 7f 68 36 b6 be f8 d2 0a 8d d7 bc 8a 95 d8 2d b3 |.h6...........-.| +000002d0 fa 87 56 ae 4c 01 3f bf 29 d1 81 c1 5d e9 f0 93 |..V.L.?.)...]...| +000002e0 f6 32 91 e7 da 18 84 dd 8d a4 94 3f 81 02 42 01 |.2.........?..B.| +000002f0 70 96 e1 3c c9 aa b8 72 8d 8e 13 68 00 50 65 9c |p..<...r...h.Pe.| +00000300 cf c6 1e 5f 5a d0 80 e8 8b ff 24 df a9 55 42 d9 |..._Z.....$..UB.| +00000310 75 83 67 d7 20 69 f1 29 2d 15 f4 83 f9 ff 3d c8 |u.g. i.)-.....=.| +00000320 0e 79 a9 3e 86 38 4a c5 a2 93 f1 47 a2 43 41 a5 |.y.>.8J....G.CA.| +00000330 bb 16 03 03 00 04 0e 00 00 00 |..........| >>> Flow 3 (client to server) 00000000 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 03 00 01 01 |....._X.;t......| 00000030 16 03 03 00 40 00 00 00 00 00 00 00 00 00 00 00 |....@...........| -00000040 00 00 00 00 00 07 03 9e fa a4 84 27 17 b8 dd 53 |...........'...S| -00000050 12 4b 89 a1 47 98 22 e3 7b c8 d4 5c 18 bb 89 09 |.K..G.".{..\....| -00000060 29 3a b9 af d3 38 4a 40 76 d6 15 37 80 19 9c ce |):...8J@v..7....| -00000070 32 5b 94 89 2e |2[...| +00000040 00 00 00 00 00 84 08 13 72 05 4e a7 cb ac c1 40 |........r.N....@| +00000050 9e 31 9c a4 8f 7f f1 41 c6 63 19 39 3d d4 27 74 |.1.....A.c.9=.'t| +00000060 f9 5c 59 88 15 c3 e2 a7 6a 6f 6d fb 52 6f 94 36 |.\Y.....jom.Ro.6| +00000070 1e 8d 47 50 db |..GP.| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 40 2d 53 b0 b0 c1 |..........@-S...| -00000010 05 78 e3 3c 5d 57 a5 04 9a 4b b9 f7 56 ce 5a 76 |.x.<]W...K..V.Zv| -00000020 84 4d f2 46 2e fc c2 9c ec 37 2b 4d 99 88 ab 30 |.M.F.....7+M...0| -00000030 1b 83 7d d8 72 bf e7 c7 f7 cf b8 13 54 d5 a2 a2 |..}.r.......T...| -00000040 dc 76 b3 01 a4 d0 a5 cc eb 66 29 |.v.......f)| +00000000 14 03 03 00 01 01 16 03 03 00 40 9f 65 82 54 e1 |..........@.e.T.| +00000010 50 68 92 33 d1 f2 a1 1d 95 81 e1 df c3 b2 4c 9b |Ph.3..........L.| +00000020 f4 8d ee b2 4b 43 2f e9 e3 af 60 ae d4 4c 7a 4b |....KC/...`..LzK| +00000030 f5 03 22 f0 11 58 de 4d ac 46 5a bf 98 da 01 1d |.."..X.M.FZ.....| +00000040 fa 19 ad a6 48 66 fa c1 25 4b a0 |....Hf..%K.| >>> Flow 5 (client to server) 00000000 17 03 03 00 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........| -00000010 00 00 00 00 00 11 31 80 89 b8 32 e7 66 a6 eb c5 |......1...2.f...| -00000020 ca 4b f7 2b 47 73 e9 cd 9f 4e 9a 5e 3f 99 5a 29 |.K.+Gs...N.^?.Z)| -00000030 00 0d 4f 4e 93 15 03 03 00 30 00 00 00 00 00 00 |..ON.....0......| -00000040 00 00 00 00 00 00 00 00 00 00 d9 18 f4 dd 64 64 |..............dd| -00000050 38 27 a7 96 d5 14 d1 b2 26 9c 14 96 54 2a cf d7 |8'......&...T*..| -00000060 4c d0 b6 c3 20 fe 33 73 78 e5 |L... .3sx.| +00000010 00 00 00 00 00 b3 26 24 39 5d 7c fc 25 23 ee fc |......&$9]|.%#..| +00000020 3a 6a 38 08 f5 bf 5e cc dc 34 83 1f 5e af b0 b4 |:j8...^..4..^...| +00000030 ee 34 fc f5 e1 15 03 03 00 30 00 00 00 00 00 00 |.4.......0......| +00000040 00 00 00 00 00 00 00 00 00 00 84 b2 cc 06 95 78 |...............x| +00000050 de 1d a0 cc d3 15 32 b7 89 74 8d 99 70 13 37 c3 |......2..t..p.7.| +00000060 e2 99 6e fe 8c 2d 69 77 cc 93 |..n..-iw..| diff --git a/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES-GCM b/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES-GCM index 86095340d4..e235f27b75 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES-GCM +++ b/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES-GCM @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 e1 ed 2c 5d 15 |....]...Y....,].| -00000010 15 24 d2 e3 a0 58 fb 2f 89 a3 26 b1 c8 06 0f dc |.$...X./..&.....| -00000020 ef e1 a7 a4 81 4a 71 2c 1d a2 35 20 be ff 22 db |.....Jq,..5 ..".| -00000030 2d 33 1b 11 24 55 96 96 54 5f 62 c7 7f b5 ba 32 |-3..$U..T_b....2| -00000040 e7 e6 7c 11 68 f8 97 d1 17 f7 8f 4f c0 2b 00 00 |..|.h......O.+..| +00000000 16 03 03 00 5d 02 00 00 59 03 03 ac 28 cc 34 03 |....]...Y...(.4.| +00000010 c8 91 48 22 79 a2 98 74 e4 55 df 72 6b 41 cb 40 |..H"y..t.U.rkA.@| +00000020 58 ba 04 93 e7 f3 1c 8e 0a 19 d1 20 98 93 cb 7c |X.......... ...|| +00000030 a3 57 a1 c7 ca 19 13 5c e1 ac c4 44 17 30 cb a3 |.W.....\...D.0..| +00000040 b2 83 81 90 82 1d 37 c3 71 ae b8 45 c0 2b 00 00 |......7.q..E.+..| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 0e 0b 00 02 0a 00 02 07 00 02 |................| 00000070 04 30 82 02 00 30 82 01 62 02 09 00 b8 bf 2d 47 |.0...0..b.....-G| @@ -57,33 +58,33 @@ 00000250 c9 86 2e dd d7 11 69 7f 85 7c 56 de fb 31 78 2b |......i..|V..1x+| 00000260 e4 c7 78 0d ae cb be 9e 4e 36 24 31 7b 6a 0f 39 |..x.....N6$1{j.9| 00000270 95 12 07 8f 2a 16 03 03 00 b6 0c 00 00 b2 03 00 |....*...........| -00000280 1d 20 74 55 23 1a ff ed d3 e7 95 30 ee ed 6d 77 |. tU#......0..mw| -00000290 57 83 fb 09 fc 81 70 69 d8 ae 38 1b e7 da 7f c6 |W.....pi..8.....| -000002a0 e4 01 04 03 00 8a 30 81 87 02 41 36 52 ca 91 b7 |......0...A6R...| -000002b0 a2 b2 31 91 98 96 65 92 67 a6 9c f2 75 8a 00 91 |..1...e.g...u...| -000002c0 8e 17 bd 22 d2 6c cb 16 0a fb 6b 27 08 3b f9 e4 |...".l....k'.;..| -000002d0 7c b5 21 45 60 4c c0 71 0b 28 46 d2 a8 a2 ad ad ||.!E`L.q.(F.....| -000002e0 51 fd bc 2e 40 7d 06 89 e7 b8 07 df 02 42 00 86 |Q...@}.......B..| -000002f0 83 4f 1d c1 c0 6d 3c f3 ed 24 47 70 65 e9 7c 5e |.O...m<..$Gpe.|^| -00000300 27 43 f0 05 b8 cd a4 34 ba 69 bc 81 7c fb b1 c3 |'C.....4.i..|...| -00000310 f8 bc 99 d6 90 15 8f db 21 fe 9f 18 10 23 75 6d |........!....#um| -00000320 22 b2 c6 f4 a5 60 80 31 06 a3 ad 33 88 c4 52 5d |"....`.1...3..R]| +00000280 1d 20 40 9c d1 ec 0a 11 08 c3 fa a0 33 80 00 62 |. @.........3..b| +00000290 5b 65 59 c6 4f 4e 32 8a 79 fc df 63 2f ee f6 59 |[eY.ON2.y..c/..Y| +000002a0 40 4a 04 03 00 8a 30 81 87 02 41 39 af 63 7a fa |@J....0...A9.cz.| +000002b0 dc e3 40 85 19 9d 1b 8f ca 55 26 e4 00 a1 f5 01 |..@......U&.....| +000002c0 73 e6 b5 6f ab bb c3 f3 b4 e0 c2 a1 33 37 ae ec |s..o........37..| +000002d0 e7 90 f6 dd b4 a4 c8 f1 3c 51 67 94 c1 ee d7 f3 |........>> Flow 3 (client to server) 00000000 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 03 00 01 01 |....._X.;t......| -00000030 16 03 03 00 28 00 00 00 00 00 00 00 00 6b 3d 83 |....(........k=.| -00000040 88 db aa b0 62 30 8d 4a 6c b2 f1 14 d3 99 43 65 |....b0.Jl.....Ce| -00000050 4c ef 26 a4 ba 46 2f 75 9a 05 0c f2 91 |L.&..F/u.....| +00000030 16 03 03 00 28 00 00 00 00 00 00 00 00 50 16 81 |....(........P..| +00000040 fe 51 5b ac de d7 31 1b 9a 09 4f 1e d4 de a4 af |.Q[...1...O.....| +00000050 c9 62 5d 38 85 23 84 8c ae 4f 55 5d 0d |.b]8.#...OU].| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 28 d5 c2 de 26 c1 |..........(...&.| -00000010 ed 28 f1 d8 81 b3 9a 4f 3d 82 ad 22 d0 2c 41 61 |.(.....O=..".,Aa| -00000020 8b 15 a3 72 01 94 44 ff 8f 01 c1 05 e6 84 56 0a |...r..D.......V.| -00000030 8b 1d c4 |...| +00000000 14 03 03 00 01 01 16 03 03 00 28 d3 0d f6 53 0f |..........(...S.| +00000010 c8 3e f0 e6 c0 2c ed ec bc 8f cc 19 5e 33 30 69 |.>...,......^30i| +00000020 3c d9 55 8b e4 14 e2 0e 3a f9 89 39 fc a7 89 70 |<.U.....:..9...p| +00000030 58 16 44 |X.D| >>> Flow 5 (client to server) -00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 c7 7d a7 |..............}.| -00000010 c4 a5 a1 21 94 7a 23 bc 05 44 7d 4a 2f 16 dc 95 |...!.z#..D}J/...| -00000020 25 6e 17 15 03 03 00 1a 00 00 00 00 00 00 00 02 |%n..............| -00000030 77 fa b6 34 7e 60 77 f9 a5 09 d1 39 b0 1e 66 86 |w..4~`w....9..f.| -00000040 50 41 |PA| +00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 0b 26 61 |..............&a| +00000010 e6 d8 6a 6d db c6 2d 8a c3 8e f4 17 1a f7 8e f3 |..jm..-.........| +00000020 ce 04 ce 15 03 03 00 1a 00 00 00 00 00 00 00 02 |................| +00000030 fa f7 0a 81 bb 8d 83 f3 82 05 ee 26 69 22 90 b2 |...........&i"..| +00000040 bb b1 |..| diff --git a/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES128-SHA256 b/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES128-SHA256 index ac5d07e69d..f81845ab3d 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES128-SHA256 +++ b/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES128-SHA256 @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 36 c3 50 72 b9 |....]...Y..6.Pr.| -00000010 0d e9 d9 76 1d 31 72 e6 61 ec 3e 13 93 d7 f1 52 |...v.1r.a.>....R| -00000020 a7 36 5c 16 9a cc c5 c0 da 7e f3 20 31 79 7a ec |.6\......~. 1yz.| -00000030 1d db f7 cd 0a fe b3 86 6f 43 12 f4 9d 19 16 51 |........oC.....Q| -00000040 e2 42 1b 94 43 13 71 67 2d 52 7a 86 c0 23 00 00 |.B..C.qg-Rz..#..| +00000000 16 03 03 00 5d 02 00 00 59 03 03 be 62 2f ca 91 |....]...Y...b/..| +00000010 8b 79 1d ce e3 3f 2e 37 bc 74 da c8 7d de a5 85 |.y...?.7.t..}...| +00000020 58 c8 04 55 4e c6 51 f2 18 60 33 20 2f 33 8b c1 |X..UN.Q..`3 /3..| +00000030 b6 be 54 3e 3f 78 12 1b d9 d0 db 71 fa 0c ee f9 |..T>?x.....q....| +00000040 60 fb 49 08 a1 83 a4 f6 22 e8 dc 2c c0 23 00 00 |`.I....."..,.#..| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 0e 0b 00 02 0a 00 02 07 00 02 |................| 00000070 04 30 82 02 00 30 82 01 62 02 09 00 b8 bf 2d 47 |.0...0..b.....-G| @@ -56,43 +57,43 @@ 00000240 8c 25 c1 33 13 83 0d 94 06 bb d4 37 7a f6 ec 7a |.%.3.......7z..z| 00000250 c9 86 2e dd d7 11 69 7f 85 7c 56 de fb 31 78 2b |......i..|V..1x+| 00000260 e4 c7 78 0d ae cb be 9e 4e 36 24 31 7b 6a 0f 39 |..x.....N6$1{j.9| -00000270 95 12 07 8f 2a 16 03 03 00 b7 0c 00 00 b3 03 00 |....*...........| -00000280 1d 20 d2 2d 0f 11 29 eb b4 23 67 1c 40 84 7f 7e |. .-..)..#g.@..~| -00000290 cd 8c 3d c2 62 ed 9b 0f 08 01 5b a5 fd 86 31 c5 |..=.b.....[...1.| -000002a0 d2 76 04 03 00 8b 30 81 88 02 42 01 a4 ea c8 67 |.v....0...B....g| -000002b0 c0 0a 93 23 7c d9 41 17 ba 91 02 78 c7 16 28 85 |...#|.A....x..(.| -000002c0 b8 d6 5c ed ed 20 1e 8b 90 e0 19 db 67 72 7e d3 |..\.. ......gr~.| -000002d0 2c 2e 84 6a d7 bc b7 53 74 8b 1b ef a8 bc 39 d8 |,..j...St.....9.| -000002e0 e0 75 29 6b 1d 89 c3 12 c2 3c 51 25 84 02 42 01 |.u)k.....+| +000002b0 e8 b6 0b c9 76 80 60 6f 9a c5 4c 6e 7c d8 53 00 |....v.`o..Ln|.S.| +000002c0 56 c7 f9 37 36 32 2d dc 82 d8 0c 67 7a 96 5c 34 |V..762-....gz.\4| +000002d0 db 10 71 4e f4 29 e0 20 84 01 09 9a dc 74 76 39 |..qN.). .....tv9| +000002e0 63 e3 b2 c5 b4 7b cc 20 92 77 f1 3b a0 02 41 5d |c....{. .w.;..A]| +000002f0 36 ae 86 8c 27 7f 9e 0d 17 8e 16 48 20 2a 43 ac |6...'......H *C.| +00000300 d4 ce c6 9b 6a 95 47 5a 47 5c 13 b6 eb db 0b a6 |....j.GZG\......| +00000310 fa 23 fe 0c 76 e0 a9 b2 97 76 02 ff 68 3d 68 c5 |.#..v....v..h=h.| +00000320 17 08 54 25 1a 22 c0 a3 06 bd a3 f6 7c 68 07 9e |..T%."......|h..| +00000330 16 03 03 00 04 0e 00 00 00 |.........| >>> Flow 3 (client to server) 00000000 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 03 00 01 01 |....._X.;t......| 00000030 16 03 03 00 50 00 00 00 00 00 00 00 00 00 00 00 |....P...........| -00000040 00 00 00 00 00 98 8d 15 68 8c 12 3e 4a 88 64 7c |........h..>J.d|| -00000050 69 46 25 16 66 20 d7 f5 7e 08 d8 9d c4 89 c1 cf |iF%.f ..~.......| -00000060 ac 86 b7 ce 3a 9c 95 0c 5d d1 a2 c2 bf fd 7c e1 |....:...].....|.| -00000070 b5 f4 04 7e 71 ae 3c fc d2 c1 2a ec 81 e4 62 a6 |...~q.<...*...b.| -00000080 e6 05 72 d8 9e |..r..| +00000040 00 00 00 00 00 27 1a a1 cf 9d f5 8f 91 e4 7f dc |.....'..........| +00000050 2f 81 3f 1e 3a c3 40 21 c2 6d dd dd 8f f6 9c 4b |/.?.:.@!.m.....K| +00000060 0b da 8d 10 f6 83 da 35 bb b9 a4 bf 2f 29 27 a5 |.......5..../)'.| +00000070 12 52 6a 74 6e 15 8d 82 cf 86 df f0 52 26 32 ca |.Rjtn.......R&2.| +00000080 02 91 8c 03 f7 |.....| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 50 27 94 9b d3 f1 |..........P'....| -00000010 6c 59 bb fa b7 73 8b d6 fa b2 ca c1 0c d3 60 cf |lY...s........`.| -00000020 50 18 a6 6f 3d b3 46 a1 06 a2 b1 62 4c ea 88 2f |P..o=.F....bL../| -00000030 95 bc 35 6f 55 a6 8a 52 69 6c 5b a5 fc 94 2a b6 |..5oU..Ril[...*.| -00000040 27 7c d7 95 27 72 d4 c1 f2 f9 9c a5 b3 2a 85 52 |'|..'r.......*.R| -00000050 ae bf 14 52 54 51 6a fe a1 99 05 |...RTQj....| +00000000 14 03 03 00 01 01 16 03 03 00 50 1f 1c 35 9b 6c |..........P..5.l| +00000010 a8 9f 58 0d bf 0f db b5 91 c6 74 de b1 b7 68 b6 |..X.......t...h.| +00000020 05 0d 39 68 87 7d b3 b0 8b 86 15 67 ba 7e 54 0c |..9h.}.....g.~T.| +00000030 0d 4f 6e f3 ad d8 27 e8 1d fa 43 31 be 30 67 d2 |.On...'...C1.0g.| +00000040 bc 0a 30 37 78 3e 30 62 bf 81 2e 53 da b3 88 73 |..07x>0b...S...s| +00000050 17 42 79 ee ef 0e d3 3c 87 c8 85 |.By....<...| >>> Flow 5 (client to server) 00000000 17 03 03 00 40 00 00 00 00 00 00 00 00 00 00 00 |....@...........| -00000010 00 00 00 00 00 9b b4 f6 7e 49 48 09 cd 4f ed 22 |........~IH..O."| -00000020 68 db 19 94 ad af de d1 9b b6 bc f5 d6 7f c6 b2 |h...............| -00000030 ff b1 0e b4 0e dd 77 19 e8 9e ff 68 1a 04 fc e5 |......w....h....| -00000040 f2 3b 5b 34 aa 15 03 03 00 40 00 00 00 00 00 00 |.;[4.....@......| -00000050 00 00 00 00 00 00 00 00 00 00 f7 95 04 54 94 ff |.............T..| -00000060 f7 86 df 0a 2e 5b e9 54 fe 13 30 2a 97 f9 21 8e |.....[.T..0*..!.| -00000070 83 8b ba 86 77 67 92 33 5e a8 ea b7 64 65 63 59 |....wg.3^...decY| -00000080 44 2e 65 60 9a 0a 7c 78 97 a4 |D.e`..|x..| +00000010 00 00 00 00 00 2c 39 43 06 0a c3 81 10 24 e8 bb |.....,9C.....$..| +00000020 de b8 74 00 a9 a3 ab 9a 2a a7 8a 0e 62 b8 2a 23 |..t.....*...b.*#| +00000030 10 46 1b 76 dc a7 81 2d 37 2e e8 5f b5 75 5e 65 |.F.v...-7.._.u^e| +00000040 73 11 ef 71 16 15 03 03 00 40 00 00 00 00 00 00 |s..q.....@......| +00000050 00 00 00 00 00 00 00 00 00 00 a5 24 00 67 c6 ae |...........$.g..| +00000060 7f 05 91 ab 17 c9 ea eb 5a f8 8f 07 f3 e5 9b 9c |........Z.......| +00000070 20 41 63 21 69 3e f1 bb 66 7e 0b 3d c0 0a 14 b1 | Ac!i>..f~.=....| +00000080 a3 de 2e d9 10 23 37 84 4d 88 |.....#7.M.| diff --git a/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES256-GCM-SHA384 b/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES256-GCM-SHA384 index ad5fa50146..bf3f019260 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES256-GCM-SHA384 +++ b/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES256-GCM-SHA384 @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 54 28 b4 3e d3 |....]...Y..T(.>.| -00000010 f8 21 2a 34 c9 6b 54 76 aa d2 cf 5e 07 7a aa e2 |.!*4.kTv...^.z..| -00000020 10 cb 3e ed 87 f4 3e 70 44 d0 35 20 6e b4 f0 71 |..>...>pD.5 n..q| -00000030 76 96 1e 2a 57 74 4b db 9a 11 0a af 06 ea 3b 20 |v..*WtK.......; | -00000040 a8 81 51 9d 41 ef f1 f9 23 87 18 cb c0 2c 00 00 |..Q.A...#....,..| +00000000 16 03 03 00 5d 02 00 00 59 03 03 45 43 2c 7b 07 |....]...Y..EC,{.| +00000010 6e 76 10 6b f3 9c 7c 2e b8 c9 6b 8d a0 b6 7b be |nv.k..|...k...{.| +00000020 79 7a 52 ab 8d f8 c6 cb 00 f6 48 20 a3 a7 3c ca |yzR.......H ..<.| +00000030 d7 57 be c7 6e 45 d6 75 c1 70 e0 86 1e 58 14 a3 |.W..nE.u.p...X..| +00000040 b4 7d 78 2c ca 82 2f 38 b8 96 ef c4 c0 2c 00 00 |.}x,../8.....,..| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 0e 0b 00 02 0a 00 02 07 00 02 |................| 00000070 04 30 82 02 00 30 82 01 62 02 09 00 b8 bf 2d 47 |.0...0..b.....-G| @@ -56,34 +57,34 @@ 00000240 8c 25 c1 33 13 83 0d 94 06 bb d4 37 7a f6 ec 7a |.%.3.......7z..z| 00000250 c9 86 2e dd d7 11 69 7f 85 7c 56 de fb 31 78 2b |......i..|V..1x+| 00000260 e4 c7 78 0d ae cb be 9e 4e 36 24 31 7b 6a 0f 39 |..x.....N6$1{j.9| -00000270 95 12 07 8f 2a 16 03 03 00 b7 0c 00 00 b3 03 00 |....*...........| -00000280 1d 20 de df 32 23 35 b3 79 a9 49 c2 b3 ad 0c d6 |. ..2#5.y.I.....| -00000290 23 a6 6a 9b 0f e3 52 51 7b bc f2 79 00 c9 a4 a0 |#.j...RQ{..y....| -000002a0 94 02 04 03 00 8b 30 81 88 02 42 01 8c 12 91 28 |......0...B....(| -000002b0 d4 6d cd 39 62 75 9a e0 e5 dd ea 31 45 f5 cd 8b |.m.9bu.....1E...| -000002c0 28 82 14 f5 e9 61 0e 9d af 42 06 17 42 e9 24 1c |(....a...B..B.$.| -000002d0 2b 1a c8 77 e4 7a 82 2b b0 dd 28 3f 76 5d dd fd |+..w.z.+..(?v]..| -000002e0 20 53 87 e6 77 26 be 45 e4 6d 31 e3 bf 02 42 01 | S..w&.E.m1...B.| -000002f0 70 c5 97 3a e4 7b 80 2b 1b eb c9 b2 0a 79 92 2e |p..:.{.+.....y..| -00000300 3d b1 4d 13 69 d2 60 a9 fd e9 66 56 83 e4 f5 6a |=.M.i.`...fV...j| -00000310 ae cd 8b 94 9f 0b 70 81 b1 ed c6 0d 5f 33 42 04 |......p....._3B.| -00000320 3d f7 b6 d3 e9 09 b8 bf 43 8c 19 d5 7d 60 d6 a9 |=.......C...}`..| -00000330 f7 16 03 03 00 04 0e 00 00 00 |..........| +00000270 95 12 07 8f 2a 16 03 03 00 b5 0c 00 00 b1 03 00 |....*...........| +00000280 1d 20 2c 21 c0 1d 0f 62 0d 25 60 02 a2 5f 10 5b |. ,!...b.%`.._.[| +00000290 68 fb b8 74 a5 2f 33 d6 1e 3f 05 43 19 6d 1c 74 |h..t./3..?.C.m.t| +000002a0 ce 5b 04 03 00 89 30 81 86 02 41 4c 6b 04 c2 3f |.[....0...ALk..?| +000002b0 98 87 0d 54 5a d5 1f 4c 77 1b b6 e5 f8 1f 35 29 |...TZ..Lw.....5)| +000002c0 e9 72 13 34 ba f8 f9 b3 0f 49 ed b5 69 bd 03 3e |.r.4.....I..i..>| +000002d0 10 7d a5 0f 7a aa a6 c5 e0 48 24 2a 61 85 17 5d |.}..z....H$*a..]| +000002e0 ac 93 35 47 41 60 f6 3b d6 41 32 20 02 41 02 4b |..5GA`.;.A2 .A.K| +000002f0 b7 28 37 9d 5d f3 fe 87 7b 13 9a 71 b0 59 7b f0 |.(7.]...{..q.Y{.| +00000300 50 e2 87 aa 9a ef 0e e8 47 bd 85 60 d5 41 32 00 |P.......G..`.A2.| +00000310 aa 26 e4 f3 c9 4c 9d df 6c dc 6a de 2b fc 76 b2 |.&...L..l.j.+.v.| +00000320 99 28 41 1c d3 04 a2 e0 71 92 41 97 0a b3 4b 16 |.(A.....q.A...K.| +00000330 03 03 00 04 0e 00 00 00 |........| >>> Flow 3 (client to server) 00000000 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 03 00 01 01 |....._X.;t......| -00000030 16 03 03 00 28 00 00 00 00 00 00 00 00 a7 5d c9 |....(.........].| -00000040 e7 6b 78 13 ae 11 64 d0 e7 77 48 03 d4 cf b9 65 |.kx...d..wH....e| -00000050 7f 07 75 78 7f 3d ae a1 9a 0f fb cb 74 |..ux.=......t| +00000030 16 03 03 00 28 00 00 00 00 00 00 00 00 5a b1 f1 |....(........Z..| +00000040 5a c2 32 50 dd 2b 6c 8a 0b de b7 04 cd 69 de 3a |Z.2P.+l......i.:| +00000050 45 3c 72 94 80 e2 f6 6c 66 98 c3 2d 4d |E>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 28 07 4e 69 71 66 |..........(.Niqf| -00000010 75 a0 bb b4 fd 86 8d 74 40 7e 0d e9 a5 95 d0 2d |u......t@~.....-| -00000020 ca eb 12 2f 7b 09 22 7c 8e bf da 97 18 d9 bd 74 |.../{."|.......t| -00000030 cd 08 6b |..k| +00000000 14 03 03 00 01 01 16 03 03 00 28 be d2 0b b0 a2 |..........(.....| +00000010 ac 18 1e dc 59 4f b4 85 be 3a 81 bd 73 51 47 35 |....YO...:..sQG5| +00000020 b3 2b b2 84 45 3a 08 11 a3 40 13 0e 5d ef 4b 26 |.+..E:...@..].K&| +00000030 9d e6 83 |...| >>> Flow 5 (client to server) -00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 44 26 54 |.............D&T| -00000010 a3 37 94 7a 3d 93 6a 06 35 fe 9a d4 7b 54 ab d4 |.7.z=.j.5...{T..| -00000020 33 fd 93 15 03 03 00 1a 00 00 00 00 00 00 00 02 |3...............| -00000030 bf ff c7 9e 4b db ee a4 a2 b9 a5 91 cd 09 97 a2 |....K...........| -00000040 55 a5 |U.| +00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 0f 8d 3a |...............:| +00000010 5b dd b2 49 18 84 73 e7 a5 c0 46 c0 ad fa cc 44 |[..I..s...F....D| +00000020 60 0d 8c 15 03 03 00 1a 00 00 00 00 00 00 00 02 |`...............| +00000030 f6 4c c6 95 ff e5 01 3a 3b a9 46 23 f3 bc 24 29 |.L.....:;.F#..$)| +00000040 6d 52 |mR| diff --git a/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-CHACHA20-POLY1305 b/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-CHACHA20-POLY1305 index 9982121ef8..db53e96a01 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-CHACHA20-POLY1305 +++ b/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-CHACHA20-POLY1305 @@ -1,24 +1,26 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 d4 01 00 00 d0 03 03 00 00 00 00 00 |................| +00000000 16 03 01 00 ee 01 00 00 ea 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 08 cc a9 |................| -00000050 13 03 13 01 13 02 01 00 00 7f 00 0b 00 02 01 00 |................| +00000050 13 03 13 01 13 02 01 00 00 99 00 0b 00 02 01 00 |................| 00000060 ff 01 00 01 00 00 17 00 00 00 12 00 00 00 05 00 |................| 00000070 05 01 00 00 00 00 00 0a 00 0a 00 08 00 1d 00 17 |................| -00000080 00 18 00 19 00 0d 00 1a 00 18 08 04 04 03 08 07 |................| -00000090 08 05 08 06 04 01 05 01 06 01 05 03 06 03 02 01 |................| -000000a0 02 03 00 2b 00 09 08 03 04 03 03 03 02 03 01 00 |...+............| -000000b0 33 00 26 00 24 00 1d 00 20 2f e5 7d a3 47 cd 62 |3.&.$... /.}.G.b| -000000c0 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 cf |C.(.._.).0......| -000000d0 c2 ed 90 99 5f 58 cb 3b 74 |...._X.;t| +00000080 00 18 00 19 00 0d 00 16 00 14 08 04 04 03 08 07 |................| +00000090 08 05 08 06 04 01 05 01 06 01 05 03 06 03 00 32 |...............2| +000000a0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000b0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| +000000c0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| +000000d0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| +000000e0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| +000000f0 cb 3b 74 |.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 4f ed 35 28 41 |....]...Y..O.5(A| -00000010 4a 0f a2 da 57 ef 60 69 32 00 a5 82 22 3d d9 ea |J...W.`i2..."=..| -00000020 36 28 20 31 e3 4a b6 d1 b6 b4 49 20 97 f3 45 59 |6( 1.J....I ..EY| -00000030 e7 9c f5 40 57 51 b8 f8 5a 8d f2 eb ce 83 18 2d |...@WQ..Z......-| -00000040 e3 28 55 6f 17 08 23 88 57 b1 a0 e4 cc a9 00 00 |.(Uo..#.W.......| +00000000 16 03 03 00 5d 02 00 00 59 03 03 74 9e c0 76 74 |....]...Y..t..vt| +00000010 c1 54 da a1 cf ad 75 4c fe 91 3b e2 06 e9 fb 1a |.T....uL..;.....| +00000020 9c 69 ee bf 30 1f 5c 0c 92 ca 58 20 a9 bb 64 3d |.i..0.\...X ..d=| +00000030 1e 8a 19 db 31 25 15 f2 65 5a 78 ad 7e d2 98 90 |....1%..eZx.~...| +00000040 8a 8b 0f 0e 77 53 db a2 93 b4 76 6d cc a9 00 00 |....wS....vm....| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 0e 0b 00 02 0a 00 02 07 00 02 |................| 00000070 04 30 82 02 00 30 82 01 62 02 09 00 b8 bf 2d 47 |.0...0..b.....-G| @@ -53,32 +55,32 @@ 00000240 8c 25 c1 33 13 83 0d 94 06 bb d4 37 7a f6 ec 7a |.%.3.......7z..z| 00000250 c9 86 2e dd d7 11 69 7f 85 7c 56 de fb 31 78 2b |......i..|V..1x+| 00000260 e4 c7 78 0d ae cb be 9e 4e 36 24 31 7b 6a 0f 39 |..x.....N6$1{j.9| -00000270 95 12 07 8f 2a 16 03 03 00 b7 0c 00 00 b3 03 00 |....*...........| -00000280 1d 20 64 49 59 eb a9 80 c3 0a 9e 13 f4 09 04 6b |. dIY..........k| -00000290 1f e5 3b 0b 77 84 fe 2e 1f ea 7e d4 64 2a 7f 3f |..;.w.....~.d*.?| -000002a0 dc 0f 04 03 00 8b 30 81 88 02 42 00 a4 62 9b d1 |......0...B..b..| -000002b0 ed 60 b7 2d 05 48 64 b6 94 3b a1 75 cb 41 78 e5 |.`.-.Hd..;.u.Ax.| -000002c0 e0 12 70 d9 90 4d c0 34 39 f3 52 13 75 4b fa 10 |..p..M.49.R.uK..| -000002d0 19 6f a6 2d b4 c3 8f 45 0c 7f 34 fb 82 01 e6 a1 |.o.-...E..4.....| -000002e0 be 73 72 3b e5 04 80 70 7d bd 4a f9 e5 02 42 01 |.sr;...p}.J...B.| -000002f0 69 3d 53 e9 8d 70 6d 07 84 7e 56 3f ce 53 b9 6c |i=S..pm..~V?.S.l| -00000300 43 0f 70 74 f1 52 ce d4 95 55 13 8c 07 e7 20 d7 |C.pt.R...U.... .| -00000310 61 2e b7 f4 5b 34 6e 5d 9c d8 73 66 89 a1 f6 7e |a...[4n]..sf...~| -00000320 01 bb 9a 5e 52 59 3f fc 3e 24 fc e7 49 10 83 9d |...^RY?.>$..I...| -00000330 fb 16 03 03 00 04 0e 00 00 00 |..........| +00000270 95 12 07 8f 2a 16 03 03 00 b6 0c 00 00 b2 03 00 |....*...........| +00000280 1d 20 6b 7f 5e 5e cd 37 8e 2a cf 07 bf 99 89 93 |. k.^^.7.*......| +00000290 05 be e6 3c 1d a8 67 07 b4 0d 28 22 be 3f 57 88 |...<..g...(".?W.| +000002a0 e4 41 04 03 00 8a 30 81 87 02 42 00 ce 0f 5f f7 |.A....0...B..._.| +000002b0 52 8c 44 e3 58 4c ed 4a 4f bf 2d 14 77 0f 3c a7 |R.D.XL.JO.-.w.<.| +000002c0 8a 7b fc 2d 0f 94 6e 51 01 51 e0 8c 58 b0 72 e4 |.{.-..nQ.Q..X.r.| +000002d0 57 cd ab ad fd a9 8c c2 e7 92 f3 0e e0 a0 22 64 |W............."d| +000002e0 a0 36 f9 e1 a3 f5 19 c8 8a b8 25 f6 0b 02 41 5d |.6........%...A]| +000002f0 d3 7c a0 42 5b f9 5d b8 f9 c2 a3 d4 8f 0e 4c c7 |.|.B[.].......L.| +00000300 d4 61 11 73 f0 35 7e b1 73 29 0f 97 52 75 8a 1f |.a.s.5~.s)..Ru..| +00000310 00 e9 6e 59 25 bb ca 72 bd 1e 4f 34 fc 55 ef 66 |..nY%..r..O4.U.f| +00000320 33 3d 5f fc e2 8d ac 09 7f 20 85 ca b3 a4 b3 ca |3=_...... ......| +00000330 16 03 03 00 04 0e 00 00 00 |.........| >>> Flow 3 (client to server) 00000000 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 03 00 01 01 |....._X.;t......| -00000030 16 03 03 00 20 cf f9 90 26 e8 2c 00 99 ae 0e e6 |.... ...&.,.....| -00000040 a8 d9 66 6b 23 e7 c9 73 1c f7 e9 af e1 71 1d f3 |..fk#..s.....q..| -00000050 34 60 ee 16 9d |4`...| +00000030 16 03 03 00 20 1a fc 19 6c ef eb a5 d1 28 d9 aa |.... ...l....(..| +00000040 56 3f b7 12 a0 18 eb 76 16 be 6d 1e d9 3b 6f 14 |V?.....v..m..;o.| +00000050 51 68 9c 63 b3 |Qh.c.| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 20 39 9f 39 3a 22 |.......... 9.9:"| -00000010 0b 27 cb 75 0d 43 98 11 06 dd 7e 73 17 e0 8a 19 |.'.u.C....~s....| -00000020 6d eb a8 33 c6 42 b4 e9 cb dd b1 |m..3.B.....| +00000000 14 03 03 00 01 01 16 03 03 00 20 38 c9 5f c3 6f |.......... 8._.o| +00000010 1b 84 54 77 40 98 70 cb f1 d1 5f 9e 11 16 24 c6 |..Tw@.p..._...$.| +00000020 c4 7e f0 44 32 2c ce 29 dd 8e 20 |.~.D2,.).. | >>> Flow 5 (client to server) -00000000 17 03 03 00 16 24 1f 08 49 ef 32 16 8d 76 c7 34 |.....$..I.2..v.4| -00000010 e0 08 cb d9 e7 72 aa 0f fb c4 94 15 03 03 00 12 |.....r..........| -00000020 38 0b 8c e0 0b 61 20 e8 a6 7c 77 69 fb 00 96 39 |8....a ..|wi...9| -00000030 b9 a7 |..| +00000000 17 03 03 00 16 86 12 a2 e2 ae df 03 ed e4 a4 74 |...............t| +00000010 d0 8b 8c 17 92 20 4d bd c2 29 ac 15 03 03 00 12 |..... M..)......| +00000020 e1 66 4e 21 16 24 34 9f 0f 95 63 80 d6 22 52 c4 |.fN!.$4...c.."R.| +00000030 67 ac |g.| diff --git a/src/crypto/tls/testdata/Client-TLSv12-ECDHE-RSA-AES b/src/crypto/tls/testdata/Client-TLSv12-ECDHE-RSA-AES index e2e935cc2e..70b43803f1 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-ECDHE-RSA-AES +++ b/src/crypto/tls/testdata/Client-TLSv12-ECDHE-RSA-AES @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 8d 69 e3 6e 69 |....]...Y...i.ni| -00000010 45 96 8b 0d c8 7d 9c dc b6 75 24 ee 61 44 95 99 |E....}...u$.aD..| -00000020 cb a8 da df 35 ac c3 36 02 3f b9 20 2d c2 47 c9 |....5..6.?. -.G.| -00000030 f0 47 80 9a c6 bd e4 1b ca d6 62 17 59 ec c9 83 |.G........b.Y...| -00000040 d5 ed 3f 2c 13 b0 30 0a 5e 1f 0e db c0 13 00 00 |..?,..0.^.......| +00000000 16 03 03 00 5d 02 00 00 59 03 03 c7 61 5d 9b a7 |....]...Y...a]..| +00000010 9f 27 4f de 56 2b 83 b8 dc 21 7d 27 e5 23 c0 b4 |.'O.V+...!}'.#..| +00000020 a7 b1 61 3c 7c b7 af 1a b0 c6 ed 20 82 8c 08 27 |..a<|...... ...'| +00000030 79 99 c6 a7 dd 7e 33 bb 6c d0 4b 4a 02 e7 2e 87 |y....~3.l.KJ....| +00000040 69 24 05 ac 32 6f 40 4f dc 2e 11 3f c0 13 00 00 |i$..2o@O...?....| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 59 0b 00 02 55 00 02 52 00 02 |......Y...U..R..| 00000070 4f 30 82 02 4b 30 82 01 b4 a0 03 02 01 02 02 09 |O0..K0..........| @@ -61,38 +62,38 @@ 00000290 73 bb b3 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 |s..Cw.......@.a.| 000002a0 4c 72 2b 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 |Lr+...F..M...>..| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 0f 4e 12 |............ .N.| -000002d0 ab ce 7e 62 68 64 e0 1d 7e 33 a2 ee 5d e7 2d d5 |..~bhd..~3..].-.| -000002e0 d2 dc d0 ce b2 7e 9b be 33 8d 9c 56 7a 08 04 00 |.....~..3..Vz...| -000002f0 80 44 b8 9b 87 5f 84 f6 8a 99 af e9 f7 f8 88 fd |.D..._..........| -00000300 f7 12 02 48 a1 fa 66 9c 89 a2 dc bf fd 41 08 fa |...H..f......A..| -00000310 6f e4 44 09 8e c1 45 bb 2a e9 e3 45 19 a3 81 50 |o.D...E.*..E...P| -00000320 99 46 5f 86 5b 6b c0 29 d1 e5 21 4b 56 af f4 d0 |.F_.[k.)..!KV...| -00000330 63 c4 75 ac f6 75 61 ca fe 1a b9 70 4d 14 50 b1 |c.u..ua....pM.P.| -00000340 12 7f 29 2d c5 d7 78 da 06 3e 4c 47 75 8a a6 01 |..)-..x..>LGu...| -00000350 37 17 1c e8 ef 94 85 d0 e2 ee d5 25 ae 8d f8 e6 |7..........%....| -00000360 90 10 12 37 b4 0f f5 c7 a2 85 1a 83 8a 38 e6 32 |...7.........8.2| -00000370 98 16 03 03 00 04 0e 00 00 00 |..........| +000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 5c ce 07 |............ \..| +000002d0 a8 0b 8f ff 08 19 e7 d7 38 62 98 bf c1 f7 92 27 |........8b.....'| +000002e0 cb 7b 5e 50 36 51 83 61 8d b4 d6 29 1c 08 04 00 |.{^P6Q.a...)....| +000002f0 80 98 88 66 48 81 8b 9d 9b e0 6e 6e c4 c4 99 fb |...fH.....nn....| +00000300 63 46 fd 8c 7e e1 d0 dd 01 e6 bb 23 97 b8 21 2e |cF..~......#..!.| +00000310 53 06 e0 5d 58 c8 79 c3 01 a5 01 e2 81 7b c7 a9 |S..]X.y......{..| +00000320 04 15 98 9b 53 98 42 0b 3d 4e 97 93 b9 88 80 2c |....S.B.=N.....,| +00000330 78 fd 9b 99 12 7f a8 de a0 c0 c4 1d 15 59 d4 d8 |x............Y..| +00000340 ef 0d bd 0b 46 c3 6e e6 4b 04 69 91 c0 db 74 ca |....F.n.K.i...t.| +00000350 99 2e 6f 47 8b 9b 22 3f b3 4a e3 10 47 2d dd 47 |..oG.."?.J..G-.G| +00000360 d5 e1 9b 66 8f d9 b2 fb b7 52 ae 6a 14 74 32 2d |...f.....R.j.t2-| +00000370 6e 16 03 03 00 04 0e 00 00 00 |n.........| >>> Flow 3 (client to server) 00000000 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 03 00 01 01 |....._X.;t......| 00000030 16 03 03 00 40 00 00 00 00 00 00 00 00 00 00 00 |....@...........| -00000040 00 00 00 00 00 6c 72 1c 47 f9 89 fa 2b 0e cf 69 |.....lr.G...+..i| -00000050 bf 95 e4 ea b8 74 e7 99 d4 c4 53 f5 97 f5 08 f9 |.....t....S.....| -00000060 ef 03 e7 76 b8 2c 31 f6 9b 2c cd 27 c8 42 6a a8 |...v.,1..,.'.Bj.| -00000070 c0 e0 b9 5e cd |...^.| +00000040 00 00 00 00 00 99 c9 2d 35 8b 96 18 36 f4 db a4 |.......-5...6...| +00000050 9a 56 67 6a 6b 9d ee b1 cb 95 54 43 93 7c 0e ff |.Vgjk.....TC.|..| +00000060 c0 54 84 83 14 bf d5 95 85 a1 b5 c5 2c fe c3 29 |.T..........,..)| +00000070 81 7b 1e 16 2e |.{...| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 40 89 35 48 2e 99 |..........@.5H..| -00000010 7c 13 76 5e 7f 07 a6 44 d9 95 1c 9f 25 59 3d f5 ||.v^...D....%Y=.| -00000020 df d6 5e cb 85 3e 0c f7 48 69 95 77 29 95 88 1c |..^..>..Hi.w)...| -00000030 1e 76 8a c3 ea 69 07 75 46 68 09 50 fa 30 0a 57 |.v...i.uFh.P.0.W| -00000040 84 e3 c7 d9 34 c4 40 32 7b f4 95 |....4.@2{..| +00000000 14 03 03 00 01 01 16 03 03 00 40 8b 6e b0 cb bf |..........@.n...| +00000010 35 8d c3 7e 48 27 92 77 20 8a 38 c6 81 94 17 d4 |5..~H'.w .8.....| +00000020 b8 18 4e 23 e7 8b 0a 89 7b d1 72 58 aa b9 9b bb |..N#....{.rX....| +00000030 c9 40 c7 c4 8e 74 77 f3 3e 90 9c b0 19 04 6c ea |.@...tw.>.....l.| +00000040 87 85 f1 fd d9 fd 2d 57 57 f1 c9 |......-WW..| >>> Flow 5 (client to server) 00000000 17 03 03 00 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........| -00000010 00 00 00 00 00 24 6d d9 23 68 ad 8d 64 2e 3a d5 |.....$m.#h..d.:.| -00000020 ed eb 4c e9 cb 9d 13 49 4c 44 b9 00 af af 2c e7 |..L....ILD....,.| -00000030 22 c0 bb 31 4e 15 03 03 00 30 00 00 00 00 00 00 |"..1N....0......| -00000040 00 00 00 00 00 00 00 00 00 00 c8 60 b8 c1 66 9b |...........`..f.| -00000050 52 44 3c 26 7f ff 96 a6 21 c7 eb 33 71 f8 40 23 |RD<&....!..3q.@#| -00000060 7c 5b ef b2 e1 b4 3f 84 82 48 ||[....?..H| +00000010 00 00 00 00 00 b9 8c 86 6d 84 db d0 60 f7 11 22 |........m...`.."| +00000020 97 52 b3 fe bb 1c 0c bd 26 9c a1 84 51 3d a2 2b |.R......&...Q=.+| +00000030 c0 79 e5 a5 96 15 03 03 00 30 00 00 00 00 00 00 |.y.......0......| +00000040 00 00 00 00 00 00 00 00 00 00 7a 42 27 d5 ae 30 |..........zB'..0| +00000050 81 b5 94 05 55 c9 93 e0 11 98 6d f8 aa 18 92 f4 |....U.....m.....| +00000060 32 8f d1 aa a6 86 cd df 11 c2 |2.........| diff --git a/src/crypto/tls/testdata/Client-TLSv12-ECDHE-RSA-AES128-SHA256 b/src/crypto/tls/testdata/Client-TLSv12-ECDHE-RSA-AES128-SHA256 index f8f04ac13b..9081031e73 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-ECDHE-RSA-AES128-SHA256 +++ b/src/crypto/tls/testdata/Client-TLSv12-ECDHE-RSA-AES128-SHA256 @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 8f cc 68 50 60 |....]...Y....hP`| -00000010 11 c8 c3 ce e7 e9 e1 3c fb 29 d7 4f df 44 16 65 |.......<.).O.D.e| -00000020 1d 3b 25 5b 32 59 f1 8e be d8 49 20 c2 89 a7 d5 |.;%[2Y....I ....| -00000030 cb 2c a2 05 19 6b 65 64 9b 71 2b d3 d2 19 cb 66 |.,...ked.q+....f| -00000040 61 c1 6f 19 b4 7a 15 41 76 14 85 fc c0 27 00 00 |a.o..z.Av....'..| +00000000 16 03 03 00 5d 02 00 00 59 03 03 7b 18 cc 97 f2 |....]...Y..{....| +00000010 59 62 62 18 bc ee e1 09 0c 7b 8c 3e f0 36 3d 8b |Ybb......{.>.6=.| +00000020 96 54 26 93 c8 ac bb 7c 19 63 6a 20 96 8e 51 d2 |.T&....|.cj ..Q.| +00000030 18 6d 8a 72 6b 5d d2 5e 2b 53 4e a5 43 cf 75 4f |.m.rk].^+SN.C.uO| +00000040 e6 9c 3a 30 f5 23 3f bf 66 bc fe a2 c0 27 00 00 |..:0.#?.f....'..| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 59 0b 00 02 55 00 02 52 00 02 |......Y...U..R..| 00000070 4f 30 82 02 4b 30 82 01 b4 a0 03 02 01 02 02 09 |O0..K0..........| @@ -61,42 +62,42 @@ 00000290 73 bb b3 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 |s..Cw.......@.a.| 000002a0 4c 72 2b 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 |Lr+...F..M...>..| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 88 db 33 |............ ..3| -000002d0 96 fb ae 63 de f8 2b 4b 94 fa da c2 8e 75 fa 63 |...c..+K.....u.c| -000002e0 0a 54 2b 68 01 76 2a 76 4f e7 91 e9 2a 08 04 00 |.T+h.v*vO...*...| -000002f0 80 d9 47 dd dd b9 94 b8 1c 1b dc 1f 79 bd f1 26 |..G.........y..&| -00000300 66 19 52 0b 0a 2e ea 0d 69 bf 93 a0 29 0f 6a 30 |f.R.....i...).j0| -00000310 2c 1b 44 25 13 e3 b7 03 db b3 fc 37 9c 3f bb e7 |,.D%.......7.?..| -00000320 c7 4d 65 8f af bb 39 fa 6e 77 09 bb 08 09 7e d1 |.Me...9.nw....~.| -00000330 0f ad 57 78 a6 cb a8 3f 2e 70 fc 38 75 2f a0 23 |..Wx...?.p.8u/.#| -00000340 0b 0c 6c 28 0a 71 51 dc 10 8f 85 fd 97 0f c4 84 |..l(.qQ.........| -00000350 80 cf 70 0a a9 56 9a af 2f ab 12 c7 8b d1 82 1c |..p..V../.......| -00000360 f0 6c 08 00 73 18 dd 6e 5a 66 ed a5 f7 7a 3d 73 |.l..s..nZf...z=s| -00000370 88 16 03 03 00 04 0e 00 00 00 |..........| +000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 e4 05 36 |............ ..6| +000002d0 05 47 cf b0 62 f8 f6 d6 e0 ce a5 f9 45 f6 28 f9 |.G..b.......E.(.| +000002e0 d2 58 47 6c 0a 58 9d 85 74 52 d3 0d 17 08 04 00 |.XGl.X..tR......| +000002f0 80 d0 8b 12 95 dd 2a 7f b2 55 33 e0 13 28 41 47 |......*..U3..(AG| +00000300 06 38 fe fb 11 b3 3f 66 c4 62 db 1c f9 29 9e ea |.8....?f.b...)..| +00000310 2f e4 62 22 4f 99 36 05 fb 89 8f d5 29 bf a6 e0 |/.b"O.6.....)...| +00000320 fc 12 88 d8 60 9a 4d 82 eb 64 ba 99 1c 1c 82 ff |....`.M..d......| +00000330 df 57 a9 b9 14 d5 a7 ad 57 45 1d e0 91 db 61 90 |.W......WE....a.| +00000340 ca 15 9b 0c 49 f8 a9 40 5f 34 6b d2 fe 00 48 e5 |....I..@_4k...H.| +00000350 ea 1e 3b ae 1f 81 a9 d7 91 ff 46 e9 af 48 04 b3 |..;.......F..H..| +00000360 83 0c 95 91 ea 5f 1f 5b 48 98 2a 9c f6 80 2a db |....._.[H.*...*.| +00000370 d2 16 03 03 00 04 0e 00 00 00 |..........| >>> Flow 3 (client to server) 00000000 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 03 00 01 01 |....._X.;t......| 00000030 16 03 03 00 50 00 00 00 00 00 00 00 00 00 00 00 |....P...........| -00000040 00 00 00 00 00 93 01 19 de 19 e6 58 a9 b2 bb e6 |...........X....| -00000050 83 08 03 78 72 d8 25 fc 31 70 55 fa cd ec e4 0a |...xr.%.1pU.....| -00000060 a2 7b 00 5c fe 7f 08 26 a5 ca 9f d6 28 95 69 f5 |.{.\...&....(.i.| -00000070 b9 17 23 34 83 fe 36 24 60 17 4c 90 18 30 f9 44 |..#4..6$`.L..0.D| -00000080 af 74 ea 65 4b |.t.eK| +00000040 00 00 00 00 00 c0 4e 63 30 1d 23 c8 dc ef 03 e9 |......Nc0.#.....| +00000050 29 7c 61 b8 7a a4 52 c3 09 f4 aa 97 30 3c 5a 7c |)|a.z.R.....0>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 50 b6 cf 83 c7 0d |..........P.....| -00000010 dc 8f 9a 96 0d 0b 4f 58 ed c9 46 fa 95 0b f1 ab |......OX..F.....| -00000020 9a 50 2a cc af 26 73 03 0b 93 e7 4e 96 a0 e2 44 |.P*..&s....N...D| -00000030 01 99 9e 06 a3 81 3f 0b e4 7c 03 53 e4 65 36 69 |......?..|.S.e6i| -00000040 65 96 79 a2 4e 79 e8 fc b1 6a 50 3e dd 22 1f e3 |e.y.Ny...jP>."..| -00000050 fe e3 77 9f 8c 05 f8 cc 08 4b 6b |..w......Kk| +00000000 14 03 03 00 01 01 16 03 03 00 50 bd 21 3f c1 94 |..........P.!?..| +00000010 2f 3e 00 3c 43 00 17 39 90 74 b2 4f 40 5d 0c 2b |/>.>> Flow 5 (client to server) 00000000 17 03 03 00 40 00 00 00 00 00 00 00 00 00 00 00 |....@...........| -00000010 00 00 00 00 00 f8 39 8e 57 60 18 1c ef 19 c8 da |......9.W`......| -00000020 f4 3b dc 42 85 44 e3 59 28 ea 29 11 60 ba 2b 2b |.;.B.D.Y(.).`.++| -00000030 dc 6a 5d 3a ed ce f2 10 34 17 6e 10 67 00 f0 43 |.j]:....4.n.g..C| -00000040 3e 0f e1 a1 c8 15 03 03 00 40 00 00 00 00 00 00 |>........@......| -00000050 00 00 00 00 00 00 00 00 00 00 13 0d fa 71 e4 df |.............q..| -00000060 76 f3 c9 01 d5 60 b4 34 d4 6f 68 f5 cd af d6 0b |v....`.4.oh.....| -00000070 e6 af ab ec 64 75 38 d6 17 d4 27 81 96 e5 71 74 |....du8...'...qt| -00000080 d5 cd 39 30 35 4a ef 92 56 6e |..905J..Vn| +00000010 00 00 00 00 00 ad 41 d8 27 7d f4 06 b7 6c 89 f4 |......A.'}...l..| +00000020 e3 c5 de 6d 06 80 0c 2e f8 42 5a 2c da f1 e2 b6 |...m.....BZ,....| +00000030 e6 e8 6f 5c ee e0 aa 4b d6 8a 7a 04 6a 5e 8c 99 |..o\...K..z.j^..| +00000040 1b 36 be f9 d0 15 03 03 00 40 00 00 00 00 00 00 |.6.......@......| +00000050 00 00 00 00 00 00 00 00 00 00 f1 cf 76 91 15 bd |............v...| +00000060 33 f3 96 25 c7 d9 77 30 a6 84 1a 06 c1 96 96 27 |3..%..w0.......'| +00000070 70 ff d2 ce 82 1e 39 8f 19 75 c7 f2 0f cb de bc |p.....9..u......| +00000080 9a ef 4c 93 e3 3c 0c 2f 97 ad |..L..<./..| diff --git a/src/crypto/tls/testdata/Client-TLSv12-ECDHE-RSA-CHACHA20-POLY1305 b/src/crypto/tls/testdata/Client-TLSv12-ECDHE-RSA-CHACHA20-POLY1305 index 2ea5debf2d..30ea8ec568 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-ECDHE-RSA-CHACHA20-POLY1305 +++ b/src/crypto/tls/testdata/Client-TLSv12-ECDHE-RSA-CHACHA20-POLY1305 @@ -1,24 +1,26 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 d4 01 00 00 d0 03 03 00 00 00 00 00 |................| +00000000 16 03 01 00 ee 01 00 00 ea 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 08 cc a8 |................| -00000050 13 03 13 01 13 02 01 00 00 7f 00 0b 00 02 01 00 |................| +00000050 13 03 13 01 13 02 01 00 00 99 00 0b 00 02 01 00 |................| 00000060 ff 01 00 01 00 00 17 00 00 00 12 00 00 00 05 00 |................| 00000070 05 01 00 00 00 00 00 0a 00 0a 00 08 00 1d 00 17 |................| -00000080 00 18 00 19 00 0d 00 1a 00 18 08 04 04 03 08 07 |................| -00000090 08 05 08 06 04 01 05 01 06 01 05 03 06 03 02 01 |................| -000000a0 02 03 00 2b 00 09 08 03 04 03 03 03 02 03 01 00 |...+............| -000000b0 33 00 26 00 24 00 1d 00 20 2f e5 7d a3 47 cd 62 |3.&.$... /.}.G.b| -000000c0 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 cf |C.(.._.).0......| -000000d0 c2 ed 90 99 5f 58 cb 3b 74 |...._X.;t| +00000080 00 18 00 19 00 0d 00 16 00 14 08 04 04 03 08 07 |................| +00000090 08 05 08 06 04 01 05 01 06 01 05 03 06 03 00 32 |...............2| +000000a0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000b0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| +000000c0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| +000000d0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| +000000e0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| +000000f0 cb 3b 74 |.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 01 ce 8f f1 84 |....]...Y.......| -00000010 65 dc 47 4e 43 f2 cd 85 6c 98 40 a7 5c 7f ed 53 |e.GNC...l.@.\..S| -00000020 78 63 03 dd 50 3e a4 27 20 21 bf 20 d9 93 9d f6 |xc..P>.' !. ....| -00000030 1f e8 0e 72 fc 64 e0 dd 8e ef b3 ea ff 5b ad 60 |...r.d.......[.`| -00000040 a5 f0 68 ff 7e 35 46 a4 28 71 31 fd cc a8 00 00 |..h.~5F.(q1.....| +00000000 16 03 03 00 5d 02 00 00 59 03 03 1b 61 37 54 ad |....]...Y...a7T.| +00000010 7e 92 6a 93 df 5e f8 16 be e7 06 12 3f e7 23 84 |~.j..^......?.#.| +00000020 be 2a 30 78 98 cf 60 8a 8a 2d 26 20 44 fb 40 31 |.*0x..`..-& D.@1| +00000030 88 38 6e fc ce 1d af 07 e3 c0 49 05 ff bc 92 ae |.8n.......I.....| +00000040 58 79 51 ec a7 24 82 75 9a 16 45 fa cc a8 00 00 |XyQ..$.u..E.....| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 59 0b 00 02 55 00 02 52 00 02 |......Y...U..R..| 00000070 4f 30 82 02 4b 30 82 01 b4 a0 03 02 01 02 02 09 |O0..K0..........| @@ -58,31 +60,31 @@ 00000290 73 bb b3 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 |s..Cw.......@.a.| 000002a0 4c 72 2b 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 |Lr+...F..M...>..| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 ea 03 c7 |............ ...| -000002d0 b0 eb 76 ba 86 25 18 e5 0d b3 70 2a 41 72 4d 88 |..v..%....p*ArM.| -000002e0 55 6d 91 2b 65 fe e0 64 12 69 42 eb 27 08 04 00 |Um.+e..d.iB.'...| -000002f0 80 0f 00 0a b0 35 db 39 fa ba a1 27 44 e0 9b d4 |.....5.9...'D...| -00000300 b8 aa b3 4f 93 46 ed 09 f8 3e 1b c8 47 6e 52 8a |...O.F...>..GnR.| -00000310 8f fd b1 67 f6 05 87 68 de 7b 25 1b 40 df 1e f2 |...g...h.{%.@...| -00000320 04 2b 4f 39 3d 6f a8 f7 25 37 26 34 87 84 06 c4 |.+O9=o..%7&4....| -00000330 0e 31 bc 46 8a d2 99 14 6d 5d 14 32 a2 32 fc 10 |.1.F....m].2.2..| -00000340 5e fb d9 f8 06 d4 05 17 5d 59 f4 38 c5 13 1c 91 |^.......]Y.8....| -00000350 5a 5f cb dd 3e 27 78 10 2c 0c 9b 7f 1a ec 4c da |Z_..>'x.,.....L.| -00000360 fb d7 52 eb 76 83 75 87 d2 a3 7f e9 25 a5 8a 22 |..R.v.u.....%.."| -00000370 dd 16 03 03 00 04 0e 00 00 00 |..........| +000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 8b cc 79 |............ ..y| +000002d0 1e 8e 20 61 5d 00 97 27 cb 24 5c 7c 5f 3f df db |.. a]..'.$\|_?..| +000002e0 2d ba 3b f4 a1 1d 3e 3c 08 da 98 22 68 08 04 00 |-.;...><..."h...| +000002f0 80 10 fc 5b 90 af a6 8e d4 1b 5e 63 13 55 88 55 |...[......^c.U.U| +00000300 f3 bb ad 7a 5b 14 95 55 6b 2f 01 eb 22 88 fb 21 |...z[..Uk/.."..!| +00000310 40 88 d1 7f 52 b2 a2 ff 51 f9 05 8c c8 28 70 77 |@...R...Q....(pw| +00000320 3c 7a b0 48 28 f0 34 19 cc 8e c8 c9 43 93 aa fa |..a...4..r}..| +00000360 98 f2 bb c0 ae 5f b8 8e 00 6a 47 9c 8d cf 91 eb |....._...jG.....| +00000370 e7 16 03 03 00 04 0e 00 00 00 |..........| >>> Flow 3 (client to server) 00000000 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 03 00 01 01 |....._X.;t......| -00000030 16 03 03 00 20 28 48 18 85 9d 35 c7 5a 46 2c a7 |.... (H...5.ZF,.| -00000040 5b 8b c0 71 73 66 d0 a7 53 a0 e3 ed c8 57 f3 70 |[..qsf..S....W.p| -00000050 9a 01 58 61 84 |..Xa.| +00000030 16 03 03 00 20 af 23 75 51 f1 3c 68 f8 87 2e 2b |.... .#uQ.>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 20 b9 72 f6 07 40 |.......... .r..@| -00000010 0b 2f 67 8a 97 fa 17 24 81 e5 6f 5b 09 90 72 8d |./g....$..o[..r.| -00000020 48 59 14 00 34 e8 3c 82 b8 2f 87 |HY..4.<../.| +00000000 14 03 03 00 01 01 16 03 03 00 20 c0 52 cb d5 de |.......... .R...| +00000010 b1 43 8a 0b 75 a6 a4 d4 8f af 85 63 71 1d 3b 4f |.C..u......cq.;O| +00000020 7a ad 9b 77 85 1a 1d 7e 4b 42 13 |z..w...~KB.| >>> Flow 5 (client to server) -00000000 17 03 03 00 16 f6 cf b1 93 64 54 56 f3 35 3d 8f |.........dTV.5=.| -00000010 31 5e 66 62 56 aa e9 81 47 4c 8b 15 03 03 00 12 |1^fbV...GL......| -00000020 de 0b 32 2b 58 2c b5 4e 80 2a 66 e7 a0 a9 28 d9 |..2+X,.N.*f...(.| -00000030 db 11 |..| +00000000 17 03 03 00 16 30 b8 0e dd 42 64 a4 17 ee f5 70 |.....0...Bd....p| +00000010 1e 00 e8 da a7 f6 8e 73 c7 70 32 15 03 03 00 12 |.......s.p2.....| +00000020 57 be 7b cf bb 7b fe cb 7e b2 bb 38 9f 31 65 07 |W.{..{..~..8.1e.| +00000030 ba 61 |.a| diff --git a/src/crypto/tls/testdata/Client-TLSv12-Ed25519 b/src/crypto/tls/testdata/Client-TLSv12-Ed25519 index d43ee07eea..40b2f35137 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-Ed25519 +++ b/src/crypto/tls/testdata/Client-TLSv12-Ed25519 @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 93 8a a3 77 84 |....]...Y.....w.| -00000010 fd 41 3d a5 ad b5 eb 91 63 a6 b5 3a 5f 21 08 df |.A=.....c..:_!..| -00000020 72 07 be 1f df d7 4e 6f f3 f8 cb 20 ae d3 e5 fe |r.....No... ....| -00000030 53 a3 c7 84 6c 3e c6 1d d5 65 5d a6 a5 7d f7 5c |S...l>...e]..}.\| -00000040 34 65 a7 df 1e 28 3f 7d 20 08 81 2c cc a9 00 00 |4e...(?} ..,....| +00000000 16 03 03 00 5d 02 00 00 59 03 03 cc 3c fc d0 c6 |....]...Y...<...| +00000010 b8 3e 6b cb 59 8d 68 04 0b 94 10 28 ad 71 06 14 |.>k.Y.h....(.q..| +00000020 08 6c 10 12 aa 8d e4 f9 aa 7d 9b 20 a0 b8 96 40 |.l.......}. ...@| +00000030 1a ce 65 ae a6 a2 4d 4d 92 41 8e 2c 8d 94 d1 02 |..e...MM.A.,....| +00000040 c1 cb bd 6d 8b ee 36 ae c5 ec 6a 40 cc a9 00 00 |...m..6...j@....| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 01 3c 0b 00 01 38 00 01 35 00 01 |......<...8..5..| 00000070 32 30 82 01 2e 30 81 e1 a0 03 02 01 02 02 10 0f |20...0..........| @@ -44,26 +45,26 @@ 00000180 fc ab 7d 4d d4 e0 93 13 d0 a9 42 e0 b6 6b fe 5d |..}M......B..k.]| 00000190 67 48 d7 9f 50 bc 6c cd 4b 03 83 7c f2 08 58 cd |gH..P.l.K..|..X.| 000001a0 ac cf 0c 16 03 03 00 6c 0c 00 00 68 03 00 1d 20 |.......l...h... | -000001b0 e9 e7 75 b4 4c 42 14 7a e0 50 0a 95 f1 d7 35 aa |..u.LB.z.P....5.| -000001c0 39 05 9e 59 73 5e cd d2 ec 56 18 f0 ee 1f 81 3c |9..Ys^...V.....<| -000001d0 08 07 00 40 44 e9 19 b6 00 49 f7 c8 06 62 cb c1 |...@D....I...b..| -000001e0 b5 7c b6 cd 32 47 c9 05 82 3b f0 af d1 cd 75 8b |.|..2G...;....u.| -000001f0 82 8b 47 dd 85 13 78 69 5d 40 7e 9b 91 24 2e ce |..G...xi]@~..$..| -00000200 3e be e0 12 1e ec 56 0b ff 25 21 92 6f 24 12 10 |>.....V..%!.o$..| -00000210 30 33 cf 04 16 03 03 00 04 0e 00 00 00 |03...........| +000001b0 fd f1 12 74 21 62 15 da 36 af d5 6c f3 0a cd 1e |...t!b..6..l....| +000001c0 09 37 aa 55 32 1a 27 a7 5b 37 34 32 35 36 f5 14 |.7.U2.'.[74256..| +000001d0 08 07 00 40 3d 7c 51 33 98 02 91 19 da 47 1a 1a |...@=|Q3.....G..| +000001e0 fe 03 4e 1b e8 5c 5e a7 12 9c e6 8a c2 74 18 dd |..N..\^......t..| +000001f0 18 9a 9d d6 60 f3 c8 63 00 33 d8 81 3e 2e 40 0f |....`..c.3..>.@.| +00000200 c5 98 fc a8 1c 6b 0c 19 70 f5 16 a5 25 ce 7b b8 |.....k..p...%.{.| +00000210 f2 f5 87 04 16 03 03 00 04 0e 00 00 00 |.............| >>> Flow 3 (client to server) 00000000 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 03 00 01 01 |....._X.;t......| -00000030 16 03 03 00 20 69 ac be cf f1 3d 8a 4e f3 3a 54 |.... i....=.N.:T| -00000040 05 d8 20 3a f0 67 40 3f 5b 94 cf a4 3e ec 8e 4e |.. :.g@?[...>..N| -00000050 75 c9 92 2c af |u..,.| +00000030 16 03 03 00 20 91 a7 c4 90 65 85 ce 63 66 fa 8b |.... ....e..cf..| +00000040 5c 22 e1 1d fb 14 c2 6c 86 7c 52 7c d1 96 3b 41 |\".....l.|R|..;A| +00000050 20 0d bf 09 e8 | ....| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 20 70 c5 f8 c7 7c |.......... p...|| -00000010 4a 34 6f b0 eb 1b 13 c7 e0 21 32 cf ce 89 aa 53 |J4o......!2....S| -00000020 5f 67 b8 a7 3e 10 bb a3 5f fa 2f |_g..>..._./| +00000000 14 03 03 00 01 01 16 03 03 00 20 d0 3e 15 0e 08 |.......... .>...| +00000010 5b fd a8 b7 5f 01 7f ca 6d af 78 6e 33 7a 93 42 |[..._...m.xn3z.B| +00000020 aa 6e e4 f4 a1 bb 9a 2d bb 17 6f |.n.....-..o| >>> Flow 5 (client to server) -00000000 17 03 03 00 16 54 ae 8d 1c 04 40 47 8a 7e ac c3 |.....T....@G.~..| -00000010 21 a2 8a f0 5d 3d 12 9d b0 b5 8d 15 03 03 00 12 |!...]=..........| -00000020 71 3b 30 89 d4 c3 ef 34 66 92 29 1b e1 af d4 d2 |q;0....4f.).....| -00000030 7e cd |~.| +00000000 17 03 03 00 16 7b f9 2f ce ac bc 43 3c 6b 10 3b |.....{./...C>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 18 47 80 ab 8d |....]...Y...G...| -00000010 42 c7 73 06 75 ef 28 ff 87 46 49 af 3a 3b cb bb |B.s.u.(..FI.:;..| -00000020 ff 6e e3 60 11 40 2c b8 40 87 5c 20 86 3d de c2 |.n.`.@,.@.\ .=..| -00000030 18 41 ff 1a dc 00 77 4e 17 0b 36 f3 69 92 d7 04 |.A....wN..6.i...| -00000040 c4 c6 39 ad ed f7 06 23 8c 52 50 da cc a8 00 00 |..9....#.RP.....| +00000000 16 03 03 00 5d 02 00 00 59 03 03 ad 2d c6 4e 13 |....]...Y...-.N.| +00000010 72 ea 19 e0 65 33 ec cb aa 5c 70 bd f5 70 e0 b4 |r...e3...\p..p..| +00000020 ca 7e 64 da 5e 5f cb a6 69 d4 8c 20 79 45 e2 0a |.~d.^_..i.. yE..| +00000030 c7 b2 be 37 28 b5 c6 35 f9 0c c9 34 39 4d 38 3b |...7(..5...49M8;| +00000040 c0 47 31 44 e2 47 f7 6f 70 0f 8b 2d cc a8 00 00 |.G1D.G.op..-....| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 59 0b 00 02 55 00 02 52 00 02 |......Y...U..R..| 00000070 4f 30 82 02 4b 30 82 01 b4 a0 03 02 01 02 02 09 |O0..K0..........| @@ -61,31 +62,31 @@ 00000290 73 bb b3 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 |s..Cw.......@.a.| 000002a0 4c 72 2b 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 |Lr+...F..M...>..| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 c5 28 44 |............ .(D| -000002d0 4a 31 d9 b6 53 90 8e 41 3c 67 2c 6f 9d b0 a6 d3 |J1..S..A>> Flow 3 (client to server) 00000000 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 03 00 01 01 |....._X.;t......| -00000030 16 03 03 00 20 9f 16 49 2a d8 cc 0a 45 92 8d c2 |.... ..I*...E...| -00000040 25 3c b1 5c a8 f2 c4 9b c4 2a 66 fe 7f 87 df 35 |%<.\.....*f....5| -00000050 77 a4 b0 05 f5 |w....| +00000030 16 03 03 00 20 e1 88 c9 ef 40 26 52 ca d2 d9 31 |.... ....@&R...1| +00000040 9c 51 a6 fa b3 40 6b 62 7e ad 00 ea da 8f 54 bf |.Q...@kb~.....T.| +00000050 f5 89 4b c9 a9 |..K..| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 20 37 55 d5 05 71 |.......... 7U..q| -00000010 a0 00 44 56 32 c3 c8 e6 68 5e de d4 e7 65 56 d3 |..DV2...h^...eV.| -00000020 2d 93 07 e6 72 17 e9 49 74 4d c0 |-...r..ItM.| +00000000 14 03 03 00 01 01 16 03 03 00 20 6f e3 54 91 aa |.......... o.T..| +00000010 00 b4 8e f3 b2 51 1e 76 48 91 49 b9 ba dc 5f e4 |.....Q.vH.I..._.| +00000020 9f 0e 49 b5 54 f5 e3 9d 25 75 38 |..I.T...%u8| >>> Flow 5 (client to server) -00000000 17 03 03 00 16 27 a6 31 16 5c 7e bd 05 0a 2c 05 |.....'.1.\~...,.| -00000010 ba 37 06 00 d7 8d 66 a7 8e 16 7b 15 03 03 00 12 |.7....f...{.....| -00000020 70 38 bc 7e 6b 83 83 e1 61 3b bb a5 d9 dc f7 e7 |p8.~k...a;......| -00000030 5e 12 |^.| +00000000 17 03 03 00 16 7b 2a af 79 d3 1c 0d cf 0f 83 04 |.....{*.y.......| +00000010 9e 96 63 69 0c ec f7 98 02 33 12 15 03 03 00 12 |..ci.....3......| +00000020 58 d3 1a 60 74 2c 92 91 61 2c 13 23 6d e9 5f de |X..`t,..a,.#m._.| +00000030 65 42 |eB| diff --git a/src/crypto/tls/testdata/Client-TLSv12-P256-ECDHE b/src/crypto/tls/testdata/Client-TLSv12-P256-ECDHE index 7a0a53c03a..0cac7e7545 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-P256-ECDHE +++ b/src/crypto/tls/testdata/Client-TLSv12-P256-ECDHE @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 01 19 01 00 01 15 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 33 01 00 01 2f 03 03 00 00 00 00 00 |....3.../.......| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,22 +7,24 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 9a 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 b4 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| -000000a0 00 0a 00 04 00 02 00 17 00 0d 00 1a 00 18 08 04 |................| +000000a0 00 0a 00 04 00 02 00 17 00 0d 00 16 00 14 08 04 |................| 000000b0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| -000000c0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| -000000d0 02 03 01 00 33 00 47 00 45 00 17 00 41 04 1e 18 |....3.G.E...A...| -000000e0 37 ef 0d 19 51 88 35 75 71 b5 e5 54 5b 12 2e 8f |7...Q.5uq..T[...| -000000f0 09 67 fd a7 24 20 3e b2 56 1c ce 97 28 5e f8 2b |.g..$ >.V...(^.+| -00000100 2d 4f 9e f1 07 9f 6c 4b 5b 83 56 e2 32 42 e9 58 |-O....lK[.V.2B.X| -00000110 b6 d7 49 a6 b5 68 1a 41 03 56 6b dc 5a 89 |..I..h.A.Vk.Z.| +000000c0 06 03 00 32 00 1a 00 18 08 04 04 03 08 07 08 05 |...2............| +000000d0 08 06 04 01 05 01 06 01 05 03 06 03 02 01 02 03 |................| +000000e0 00 2b 00 09 08 03 04 03 03 03 02 03 01 00 33 00 |.+............3.| +000000f0 47 00 45 00 17 00 41 04 1e 18 37 ef 0d 19 51 88 |G.E...A...7...Q.| +00000100 35 75 71 b5 e5 54 5b 12 2e 8f 09 67 fd a7 24 20 |5uq..T[....g..$ | +00000110 3e b2 56 1c ce 97 28 5e f8 2b 2d 4f 9e f1 07 9f |>.V...(^.+-O....| +00000120 6c 4b 5b 83 56 e2 32 42 e9 58 b6 d7 49 a6 b5 68 |lK[.V.2B.X..I..h| +00000130 1a 41 03 56 6b dc 5a 89 |.A.Vk.Z.| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 1c ad ae e9 64 |....]...Y......d| -00000010 35 80 c6 04 f5 69 05 bb 5c 38 78 d3 99 2f ad e6 |5....i..\8x../..| -00000020 56 20 d4 79 89 1a 51 54 14 ac 6d 20 06 6d 1a bd |V .y..QT..m .m..| -00000030 04 cf 4f 42 3d aa 31 3b fb dc c1 85 42 c3 6d 12 |..OB=.1;....B.m.| -00000040 27 98 be 4b 88 93 45 0e 78 ba d8 13 c0 2f 00 00 |'..K..E.x..../..| +00000000 16 03 03 00 5d 02 00 00 59 03 03 d9 70 61 62 c5 |....]...Y...pab.| +00000010 f4 b4 22 c6 ea f6 e9 8c fc 29 e8 8c 24 2d 4b c4 |.."......)..$-K.| +00000020 04 57 01 ae e5 41 7e 7f 6f ec c3 20 86 6b 38 a9 |.W...A~.o.. .k8.| +00000030 ea cd 51 3b 0f 05 5c a3 98 0c 4d ba 46 d6 99 f3 |..Q;..\...M.F...| +00000040 67 da f2 62 56 29 f7 e6 8c 14 8a 7a c0 2f 00 00 |g..bV).....z./..| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 59 0b 00 02 55 00 02 52 00 02 |......Y...U..R..| 00000070 4f 30 82 02 4b 30 82 01 b4 a0 03 02 01 02 02 09 |O0..K0..........| @@ -62,37 +64,37 @@ 00000290 73 bb b3 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 |s..Cw.......@.a.| 000002a0 4c 72 2b 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 |Lr+...F..M...>..| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 03 00 cd 0c 00 00 c9 03 00 17 41 04 3a 1c |............A.:.| -000002d0 84 6b e6 cb 7d 3f bd ea d7 7a c3 63 43 77 f7 14 |.k..}?...z.cCw..| -000002e0 a7 98 52 86 49 4d 05 b2 70 e2 d3 44 c9 05 eb 83 |..R.IM..p..D....| -000002f0 b4 11 c5 3e 9d 3b 3b cd de d0 df 78 83 0f 0c d8 |...>.;;....x....| -00000300 76 e7 19 9d 1f 5a 3d 2a 54 19 16 a0 c2 55 08 04 |v....Z=*T....U..| -00000310 00 80 09 ee 97 8a d1 82 fc 4a fc f2 89 d2 a3 c7 |.........J......| -00000320 8c 25 74 98 cf b5 67 c6 fd f6 0d 3b 62 ba 31 ca |.%t...g....;b.1.| -00000330 d1 67 aa c3 32 89 ee 83 22 d2 b7 3c f8 98 af 16 |.g..2..."..<....| -00000340 dd 05 06 2c c4 57 dd fc 22 3a 2e 80 f9 84 6a ee |...,.W..":....j.| -00000350 f2 a1 21 d1 0f db 17 50 a1 35 94 b3 0a b7 62 ca |..!....P.5....b.| -00000360 2c b3 0b 68 0c 58 d7 24 83 82 d8 34 64 3f a4 61 |,..h.X.$...4d?.a| -00000370 0e b1 ca 93 67 b3 51 11 dc 49 f2 df 26 89 8b ea |....g.Q..I..&...| -00000380 22 09 1a be 62 27 61 c8 93 4b dd 95 31 6a ba e2 |"...b'a..K..1j..| -00000390 c3 2b 16 03 03 00 04 0e 00 00 00 |.+.........| +000002c0 16 03 03 00 cd 0c 00 00 c9 03 00 17 41 04 a0 b7 |............A...| +000002d0 0f 94 44 46 c4 72 5a 3c b8 5c cd f1 9e b0 49 17 |..DF.rZ<.\....I.| +000002e0 ea a0 ca 1d 17 d8 85 5f 0a e3 4a 85 5d f4 bb 52 |......._..J.]..R| +000002f0 23 79 24 a9 50 81 9f 8a 5e e4 2f 5d cc 7d e2 10 |#y$.P...^./].}..| +00000300 db 42 f0 26 98 61 b7 f5 39 16 46 d6 04 f7 08 04 |.B.&.a..9.F.....| +00000310 00 80 05 70 60 b3 39 e0 61 6e 72 b3 13 2c 8c 2d |...p`.9.anr..,.-| +00000320 e1 d9 37 8e cd 13 64 2f 4b 65 4f 7c a0 2a 7e 91 |..7...d/KeO|.*~.| +00000330 e1 fd 7d 3b e3 35 dd 5a c8 ab 56 13 c3 c6 07 90 |..};.5.Z..V.....| +00000340 fb d3 cf 22 dd 78 4c 33 c7 d3 6e 64 7e 65 ba 02 |...".xL3..nd~e..| +00000350 ca 04 50 77 08 65 d5 80 c9 4f c3 b3 5b 97 b2 80 |..Pw.e...O..[...| +00000360 3d 48 37 20 ab 28 15 0c f2 86 dd b6 19 66 46 e3 |=H7 .(.......fF.| +00000370 23 69 e2 5d fb 70 65 fb c6 ae fc a4 02 42 9f fe |#i.].pe......B..| +00000380 b4 5c f0 4b 23 92 2a 4f a4 1a f4 86 3b 5c 25 9d |.\.K#.*O....;\%.| +00000390 86 e2 16 03 03 00 04 0e 00 00 00 |...........| >>> Flow 3 (client to server) 00000000 16 03 03 00 46 10 00 00 42 41 04 1e 18 37 ef 0d |....F...BA...7..| 00000010 19 51 88 35 75 71 b5 e5 54 5b 12 2e 8f 09 67 fd |.Q.5uq..T[....g.| 00000020 a7 24 20 3e b2 56 1c ce 97 28 5e f8 2b 2d 4f 9e |.$ >.V...(^.+-O.| 00000030 f1 07 9f 6c 4b 5b 83 56 e2 32 42 e9 58 b6 d7 49 |...lK[.V.2B.X..I| 00000040 a6 b5 68 1a 41 03 56 6b dc 5a 89 14 03 03 00 01 |..h.A.Vk.Z......| -00000050 01 16 03 03 00 28 00 00 00 00 00 00 00 00 fa c4 |.....(..........| -00000060 4e 47 d1 de 6d 60 fc af 59 43 7f 2f 4c b3 6e aa |NG..m`..YC./L.n.| -00000070 6f c3 bc 8a 40 5e e9 9c d9 b0 87 c5 92 41 |o...@^.......A| +00000050 01 16 03 03 00 28 00 00 00 00 00 00 00 00 3f 54 |.....(........?T| +00000060 35 c8 33 70 66 0f 9d 3d 57 d7 a8 7f 57 45 63 a4 |5.3pf..=W...WEc.| +00000070 67 a2 83 c4 17 5b 22 8f 1c 89 78 1c 43 8d |g....["...x.C.| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 28 eb 92 83 02 be |..........(.....| -00000010 89 55 4e 77 b2 45 1d 15 fd e0 6a 36 ab 0c 7b 4a |.UNw.E....j6..{J| -00000020 5d 50 e2 5a f3 c6 10 e2 ac ac a4 d3 4c 2e d8 31 |]P.Z........L..1| -00000030 84 31 17 |.1.| +00000000 14 03 03 00 01 01 16 03 03 00 28 25 5d 63 2d f3 |..........(%]c-.| +00000010 a5 91 45 d0 7d 68 39 f6 0e 04 6f 4b c9 dd 4a 54 |..E.}h9...oK..JT| +00000020 f5 a2 04 54 d2 57 4b 40 75 4d 2f b3 5d 00 5b 11 |...T.WK@uM/.].[.| +00000030 89 0e 92 |...| >>> Flow 5 (client to server) -00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 90 44 33 |..............D3| -00000010 cf be 4e 29 fc 6f 2f 30 c1 ef aa 8e cb 10 0e f9 |..N).o/0........| -00000020 8f 60 fc 15 03 03 00 1a 00 00 00 00 00 00 00 02 |.`..............| -00000030 80 cb 52 6b e7 c9 45 af 69 6b e8 ee 88 23 61 20 |..Rk..E.ik...#a | -00000040 74 33 |t3| +00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 0c 9c ab |................| +00000010 24 e8 b2 cf a2 6f f9 8e 54 ed 35 43 07 4d 8f 89 |$....o..T.5C.M..| +00000020 5c 08 15 15 03 03 00 1a 00 00 00 00 00 00 00 02 |\...............| +00000030 f8 65 48 1e a4 03 c0 3b 2f 23 c7 9e 92 59 f6 be |.eH....;/#...Y..| +00000040 b4 a2 |..| diff --git a/src/crypto/tls/testdata/Client-TLSv12-RSA-RC4 b/src/crypto/tls/testdata/Client-TLSv12-RSA-RC4 index 24a9b8e415..faa48c7843 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-RSA-RC4 +++ b/src/crypto/tls/testdata/Client-TLSv12-RSA-RC4 @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 55 02 00 00 51 03 03 7c f1 44 f1 2a |....U...Q..|.D.*| -00000010 6f 7f 62 66 08 15 dd c8 bd 4a 30 b5 a3 73 53 82 |o.bf.....J0..sS.| -00000020 93 78 6b f2 c6 70 70 1e 4d 8f 48 20 24 b3 17 46 |.xk..pp.M.H $..F| -00000030 37 c0 0f 79 af f4 48 43 17 6b ea df 6b 73 07 cf |7..y..HC.k..ks..| -00000040 5f 95 c5 5c 8d b2 99 5c fd 30 e5 1b 00 05 00 00 |_..\...\.0......| +00000000 16 03 03 00 55 02 00 00 51 03 03 c4 5b d6 0f d4 |....U...Q...[...| +00000010 64 3a 37 34 a3 84 9d 3d 1b 33 c3 d4 4f 42 f7 3a |d:74...=.3..OB.:| +00000020 e8 da 8c 8b 97 1a e5 f4 56 a4 bd 20 03 30 25 fd |........V.. .0%.| +00000030 d9 01 7a 7c b8 9d 63 f0 a3 7a 1c 00 6b 75 16 d8 |..z|..c..z..ku..| +00000040 68 5c 7a 8d 4a ae ed 52 fc 92 e5 03 00 05 00 00 |h\z.J..R........| 00000050 09 ff 01 00 01 00 00 17 00 00 16 03 03 02 59 0b |..............Y.| 00000060 00 02 55 00 02 52 00 02 4f 30 82 02 4b 30 82 01 |..U..R..O0..K0..| 00000070 b4 a0 03 02 01 02 02 09 00 e8 f0 9d 3f e2 5b ea |............?.[.| @@ -72,15 +73,15 @@ 00000060 c5 70 0f 08 83 48 e9 48 ef 6e 50 8b 05 7e e5 84 |.p...H.H.nP..~..| 00000070 25 fa 55 c7 ae 31 02 27 00 ef 3f 98 86 20 12 89 |%.U..1.'..?.. ..| 00000080 91 59 28 b4 f7 d7 af d2 69 61 35 14 03 03 00 01 |.Y(.....ia5.....| -00000090 01 16 03 03 00 24 fd 67 40 11 7e 4d 8f bb 87 e8 |.....$.g@.~M....| -000000a0 c3 1f e8 b0 15 17 3a f4 6f 5f 87 b2 50 c5 92 e4 |......:.o_..P...| -000000b0 ac c0 c0 98 aa 6f be bc fc 77 |.....o...w| +00000090 01 16 03 03 00 24 83 66 73 cf 08 6f c7 29 1b ea |.....$.fs..o.)..| +000000a0 86 aa 02 66 2d d9 d4 7b 19 0d cc e5 9e dc e9 20 |...f-..{....... | +000000b0 d9 62 82 59 bd e9 91 6b 90 62 |.b.Y...k.b| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 24 e8 ea 6f 8a 0c |..........$..o..| -00000010 79 70 73 a9 7b 2c a8 0a e5 f8 26 f3 eb 05 20 65 |yps.{,....&... e| -00000020 58 9b 0c 8e 28 3d c7 ee cf 57 85 06 a5 d7 46 |X...(=...W....F| +00000000 14 03 03 00 01 01 16 03 03 00 24 ef bb 0c 3b fb |..........$...;.| +00000010 4e 36 53 b9 fa d4 c3 d0 37 5e 2b 22 a2 12 b6 9e |N6S.....7^+"....| +00000020 1c a3 f7 93 74 60 38 18 f1 cc 72 e4 ba 1a 3d |....t`8...r...=| >>> Flow 5 (client to server) -00000000 17 03 03 00 1a 2d 7a c5 d0 12 79 e8 a2 05 d3 a4 |.....-z...y.....| -00000010 51 80 8f 28 37 b9 75 64 f3 11 4c 78 de 0c f3 15 |Q..(7.ud..Lx....| -00000020 03 03 00 16 43 89 2c 8b 9e dc c5 5d 4c ca 7b 4e |....C.,....]L.{N| -00000030 15 e4 e5 62 01 02 b4 d4 6f 1c |...b....o.| +00000000 17 03 03 00 1a 62 a3 b3 3a 89 25 05 89 bc 5a 21 |.....b..:.%...Z!| +00000010 30 61 84 b0 97 52 26 a2 18 87 25 43 17 1a 52 15 |0a...R&...%C..R.| +00000020 03 03 00 16 97 d6 18 0c 30 b3 9b 8f 2b f1 f9 3f |........0...+..?| +00000030 c7 8d a2 e1 ff 36 0c d6 c2 f1 |.....6....| diff --git a/src/crypto/tls/testdata/Client-TLSv12-RenegotiateOnce b/src/crypto/tls/testdata/Client-TLSv12-RenegotiateOnce index 0510d5e2d3..868b527396 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-RenegotiateOnce +++ b/src/crypto/tls/testdata/Client-TLSv12-RenegotiateOnce @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 55 71 df 37 76 |....]...Y..Uq.7v| -00000010 48 bb 86 62 66 f1 58 0d 92 f4 c8 bd 17 6c 00 43 |H..bf.X......l.C| -00000020 a9 da f1 6f 19 2c 76 81 6d aa eb 20 4f c7 eb 3f |...o.,v.m.. O..?| -00000030 b8 48 89 7f d8 61 bc e8 3c e6 a0 3d 6c 29 fd 60 |.H...a..<..=l).`| -00000040 7c 0a 09 1c 71 41 07 04 24 dc e7 27 cc a8 00 00 ||...qA..$..'....| +00000000 16 03 03 00 5d 02 00 00 59 03 03 9e b0 dd 2b 97 |....]...Y.....+.| +00000010 86 13 76 2e 65 fc 27 bc fd 01 c0 05 86 b9 e3 bd |..v.e.'.........| +00000020 b9 46 3b 09 37 2a fe 3a eb ee e0 20 65 ad 7c 0b |.F;.7*.:... e.|.| +00000030 1a 0b 9b da b0 8d 56 86 b6 e1 04 1b dd 5d 93 8e |......V......]..| +00000040 a9 ea b6 b7 17 c9 75 26 58 5a c5 37 cc a8 00 00 |......u&XZ.7....| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 59 0b 00 02 55 00 02 52 00 02 |......Y...U..R..| 00000070 4f 30 82 02 4b 30 82 01 b4 a0 03 02 01 02 02 09 |O0..K0..........| @@ -61,186 +62,188 @@ 00000290 73 bb b3 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 |s..Cw.......@.a.| 000002a0 4c 72 2b 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 |Lr+...F..M...>..| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 7a 15 23 |............ z.#| -000002d0 f5 78 c2 16 21 72 bb e5 d3 2e c9 67 55 a8 2c 1f |.x..!r.....gU.,.| -000002e0 00 50 a2 04 4f 71 9a 94 4a 90 55 69 33 08 04 00 |.P..Oq..J.Ui3...| -000002f0 80 53 b3 16 f5 08 3a 5a 84 3c 02 5d c3 b6 0e c2 |.S....:Z.<.]....| -00000300 93 f6 27 74 24 b4 e2 3d 22 04 30 a0 d6 5b c8 da |..'t$..=".0..[..| -00000310 6e 56 30 d4 fb 86 fd 76 8f 1b 47 c0 55 95 cd 15 |nV0....v..G.U...| -00000320 bf a7 27 ce 2d c3 43 6b ed 2d 09 bb eb 55 73 c9 |..'.-.Ck.-...Us.| -00000330 2c ee cd 23 af d9 1c 51 1d 0c 00 14 01 61 8a fd |,..#...Q.....a..| -00000340 8f 95 d1 ce 32 57 ae 2b 09 15 b4 86 41 1e 74 f5 |....2W.+....A.t.| -00000350 d5 96 d7 e1 03 03 09 f4 3c 53 fe 6b 9a c1 52 ab |........>> Flow 3 (client to server) 00000000 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 03 00 01 01 |....._X.;t......| -00000030 16 03 03 00 20 bf 35 ae 8c b4 63 82 40 e8 5d d4 |.... .5...c.@.].| -00000040 bb 3d 0a 0f 07 28 3a 74 2c 5b a8 d0 a6 ab 88 ba |.=...(:t,[......| -00000050 7d 5c 1c 42 c7 |}\.B.| +00000030 16 03 03 00 20 5b d2 2a ad 40 50 6f a8 b8 70 d0 |.... [.*.@Po..p.| +00000040 b9 aa ab d5 d7 2a f1 2b f7 d7 9b cd 10 a5 80 e9 |.....*.+........| +00000050 d3 15 3f 4f 00 |..?O.| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 20 e7 86 48 6c 00 |.......... ..Hl.| -00000010 0a 1e f5 5f b8 ff ad 1c 9d 74 24 c5 6e d4 c6 6e |..._.....t$.n..n| -00000020 25 27 7d 6e 18 44 96 29 eb db b0 |%'}n.D.)...| +00000000 14 03 03 00 01 01 16 03 03 00 20 dd 90 d8 8a 0a |.......... .....| +00000010 11 a6 30 9b b0 29 50 c8 b1 70 36 bc fb 84 6e 6d |..0..)P..p6...nm| +00000020 a9 5e 67 3c e2 2e 0b 09 b2 44 38 |.^g<.....D8| >>> Flow 5 (client to server) -00000000 17 03 03 00 16 64 9d 31 09 a1 ce 5a 6d ec 6f c4 |.....d.1...Zm.o.| -00000010 e5 09 df 92 5f d2 1c 7d 62 c4 e7 |...._..}b..| +00000000 17 03 03 00 16 9f e0 6a fc e9 a2 bf cf b4 df 07 |.......j........| +00000010 ba b4 8b 8b 08 ca bd a7 d5 02 2a |..........*| >>> Flow 6 (server to client) -00000000 16 03 03 00 14 9b cb 75 61 99 76 30 9c 14 a5 12 |.......ua.v0....| -00000010 92 de b7 95 cc 8f fe ad f1 |.........| +00000000 16 03 03 00 14 ed 9b 22 44 dd b2 e2 c3 7e ab 0c |......."D....~..| +00000010 69 98 d0 7b 40 9e da e2 67 |i..{@...g| >>> Flow 7 (client to server) -00000000 16 03 03 01 1a c7 9a be e1 2a 62 9f 01 59 e9 6a |.........*b..Y.j| -00000010 5f d6 32 88 bd 39 76 1b 34 fd 39 8d c7 31 cb 97 |_.2..9v.4.9..1..| -00000020 c6 09 8b 00 c9 f3 f9 00 c5 b6 48 e1 28 ae b8 8b |..........H.(...| -00000030 b2 f0 eb 8b cb e8 68 30 50 b5 23 ba cf f3 8d f3 |......h0P.#.....| -00000040 47 5f 94 ac fb 5e 56 9e 5a f8 e7 12 60 13 83 9c |G_...^V.Z...`...| -00000050 34 ca 45 a7 63 5f 2c 6e 46 c8 5a a0 d3 5b 9a a6 |4.E.c_,nF.Z..[..| -00000060 70 be da df 9e 79 21 98 bd fb 94 01 6d 14 f4 5c |p....y!.....m..\| -00000070 2a 13 56 26 47 33 7d 4f ab 5a fc 9c 9e 8d f4 75 |*.V&G3}O.Z.....u| -00000080 d0 64 16 ba f2 0d 04 ca 5d 94 6b da a8 09 b1 29 |.d......].k....)| -00000090 70 a9 37 1e ac 94 e3 81 60 c3 19 f3 a9 99 6a 11 |p.7.....`.....j.| -000000a0 b1 e7 23 45 8a f5 42 f5 50 76 9f 1e 9e a8 e7 75 |..#E..B.Pv.....u| -000000b0 4a 18 84 80 da 10 ed 83 9a 14 a9 a1 90 54 8e 8b |J............T..| -000000c0 d1 32 83 6d e7 7e be 59 f4 66 59 53 75 37 c6 82 |.2.m.~.Y.fYSu7..| -000000d0 15 aa 56 0a 01 e1 11 ba 64 0c 8e 44 93 60 29 a4 |..V.....d..D.`).| -000000e0 cc 9f b0 b9 d5 df 9c aa 64 2c ef 0c 9a 18 2a 97 |........d,....*.| -000000f0 e1 20 07 37 35 28 97 9d 00 53 61 11 81 22 45 9e |. .75(...Sa.."E.| -00000100 c3 d7 b2 b3 4c f2 05 5b e6 a4 de 11 7f a7 a2 82 |....L..[........| -00000110 88 1c cb d9 24 80 3d 34 0c fc 22 58 32 28 1b |....$.=4.."X2(.| +00000000 16 03 03 01 34 0d de 90 41 3c 76 1d 54 9d c2 7e |....4...A?J..}......| +00000070 4c 1c fb 2c 88 4c 13 8d c8 d0 e3 7f f6 cb 2e ca |L..,.L..........| +00000080 cb 92 ae 30 fe ea 3c 3e ae 57 51 6a d6 98 5c d6 |...0..<>.WQj..\.| +00000090 19 85 72 bd 62 56 fa c2 ea 08 eb b4 d9 75 ac de |..r.bV.......u..| +000000a0 a5 40 8d 8b 1f c4 8f f6 6d b2 5f d1 6d fb 14 fa |.@......m._.m...| +000000b0 e2 92 9e 04 37 d3 60 83 28 4a f9 92 8c b3 4a d2 |....7.`.(J....J.| +000000c0 ce 6d 95 e4 40 79 7c 3d 98 11 e7 da 5c 56 0a 95 |.m..@y|=....\V..| +000000d0 e0 6f 36 80 07 da 29 ef 88 44 db cd 2b 5a a5 27 |.o6...)..D..+Z.'| +000000e0 56 5a 94 49 aa 51 ae 48 f9 12 8d df e0 2a a7 67 |VZ.I.Q.H.....*.g| +000000f0 7f 55 3e 7a b6 bb 28 e3 a8 d9 44 67 e9 03 8f e5 |.U>z..(...Dg....| +00000100 2b 40 a3 37 fb e4 51 0a 18 8f bb 14 2e 5b 62 93 |+@.7..Q......[b.| +00000110 ab a4 40 d7 5f 15 12 cf 93 74 37 d0 ec 14 d3 a3 |..@._....t7.....| +00000120 eb 6f 61 35 4a c4 b5 d7 d1 bb ae fe 11 6d 04 ac |.oa5J........m..| +00000130 58 72 a6 72 b6 06 9d 93 a5 |Xr.r.....| >>> Flow 8 (server to client) -00000000 16 03 03 00 85 ba 55 5d 15 b8 6d 8a b6 82 a8 e1 |......U]..m.....| -00000010 88 ea fe c0 a6 a8 fe 78 ed 8b ae 44 eb 7b 6c cc |.......x...D.{l.| -00000020 0f ad a1 da da 86 fb 60 07 4a 0e 5c ba 36 09 8b |.......`.J.\.6..| -00000030 95 3f f0 87 26 0f 7a e7 7c 1f af c7 67 42 c9 39 |.?..&.z.|...gB.9| -00000040 39 6a 4d 8d 87 00 3b 14 76 4a 86 87 46 1e d4 04 |9jM...;.vJ..F...| -00000050 2d ea c1 44 1f e8 87 71 da 1e 26 72 a2 e9 40 0c |-..D...q..&r..@.| -00000060 33 6e 6f 06 43 ed 7f fc 8f 4c d4 f4 0f 83 19 cb |3no.C....L......| -00000070 52 a9 94 f3 6a 64 db dd 20 d1 a7 d4 c7 6e 86 ed |R...jd.. ....n..| -00000080 6e ea 5c 66 d1 34 a6 92 7e b1 16 03 03 02 69 48 |n.\f.4..~.....iH| -00000090 13 97 82 60 46 e1 c9 02 d2 e1 f3 62 da d6 3a c1 |...`F......b..:.| -000000a0 2a a7 47 bd c2 ee 09 d5 2d 7e 5e 35 09 79 88 35 |*.G.....-~^5.y.5| -000000b0 96 50 09 68 79 e9 de e1 71 97 11 60 c5 4e 84 54 |.P.hy...q..`.N.T| -000000c0 03 78 69 84 e3 7f 02 1a 58 04 ed 53 47 01 b6 9e |.xi.....X..SG...| -000000d0 bd 5f 77 34 e7 52 3b 73 45 e1 10 3f c8 6e 4c 09 |._w4.R;sE..?.nL.| -000000e0 d0 4b 79 f8 de 0f 15 e7 2d 42 5d 7a 89 80 1f fb |.Ky.....-B]z....| -000000f0 f9 02 6f a1 72 d4 8d 65 8e d0 a8 43 41 4c 48 57 |..o.r..e...CALHW| -00000100 71 21 b3 14 45 e5 b1 f5 55 7a dd 89 c3 0f af 27 |q!..E...Uz.....'| -00000110 03 d6 5c 2d bc 24 5b 51 fa ae 34 7b f9 56 e8 41 |..\-.$[Q..4{.V.A| -00000120 cd 77 1c 3d c8 45 f5 a5 4a 97 92 ff bb cd 5b ff |.w.=.E..J.....[.| -00000130 d5 33 d6 02 9b 2a 5a 3a e4 1b fb 48 34 b3 0b ce |.3...*Z:...H4...| -00000140 d7 34 5c 4a b4 4b bd 87 b6 72 40 ab 29 b0 65 25 |.4\J.K...r@.).e%| -00000150 c7 1d 71 b6 e2 d7 b1 23 b1 96 a6 bd 74 eb ad 69 |..q....#....t..i| -00000160 59 0c 0f af 8a 64 be e4 a7 27 c2 95 11 05 55 a1 |Y....d...'....U.| -00000170 d6 44 df ad 1d 9c 3a 88 24 52 52 9d 42 f2 74 98 |.D....:.$RR.B.t.| -00000180 08 9f 55 1b 2f 79 ca b4 63 38 e4 f2 fa 99 ce 66 |..U./y..c8.....f| -00000190 77 ac 8d 31 91 05 1c bc 51 0a 31 df 5d 3e f8 69 |w..1....Q.1.]>.i| -000001a0 b7 fa f2 35 af 57 6d 7b c3 bf 1d 98 21 40 dd 02 |...5.Wm{....!@..| -000001b0 1c de ac 02 40 c8 d6 04 23 30 71 16 d0 0a 26 29 |....@...#0q...&)| -000001c0 66 e9 f1 a8 76 f8 52 18 3e 3f c5 66 c9 11 04 6c |f...v.R.>?.f...l| -000001d0 32 1b 35 cc 9a 34 70 07 da db 12 51 78 77 dc bc |2.5..4p....Qxw..| -000001e0 7a bb b8 b9 06 79 bb 04 dd d4 46 8e b5 69 d5 39 |z....y....F..i.9| -000001f0 5e 34 8e 37 dd a2 3e 31 be 28 19 45 21 76 5b dc |^4.7..>1.(.E!v[.| -00000200 7d 25 a2 41 98 16 1b 5b 69 f0 90 f9 28 a8 e9 b5 |}%.A...[i...(...| -00000210 6f 00 e3 3e eb f6 f3 e4 c9 0f bb 74 ce 40 23 df |o..>.......t.@#.| -00000220 12 c6 78 b0 2e bb 68 96 04 a3 e3 43 6b 4b c3 37 |..x...h....CkK.7| -00000230 6d 97 c6 79 1a ff 4f 00 c7 76 64 5c b8 b3 17 20 |m..y..O..vd\... | -00000240 3c 3e 6b d5 2b 72 88 11 73 1e 63 a7 6f 1e ae 83 |<>k.+r..s.c.o...| -00000250 10 77 6f d1 96 86 84 63 fd 27 8e b9 54 da 4b b5 |.wo....c.'..T.K.| -00000260 56 f0 50 8a aa c7 e1 b3 cb 9c 36 9e ec 38 31 39 |V.P.......6..819| -00000270 78 ec ea 34 8a 87 cf 6b 34 fd 5e 81 92 81 61 f1 |x..4...k4.^...a.| -00000280 88 e7 50 62 2e 58 0b d9 b9 ca f3 ed 79 a9 9a 01 |..Pb.X......y...| -00000290 80 9d 7f 84 ae de fb 51 ac 0f 6b b9 76 fd 68 d4 |.......Q..k.v.h.| -000002a0 f4 8d c3 92 6b 5e 9e 99 ff 7a f4 b7 0e ec 0d e7 |....k^...z......| -000002b0 6b 24 75 fb 21 49 6f 5b 31 12 f2 88 8e 3b b4 34 |k$u.!Io[1....;.4| -000002c0 f2 f7 c6 e7 48 0e d6 1d 81 11 32 16 01 cb b7 7f |....H.....2.....| -000002d0 a6 bd 9c 87 8c 0f 12 b2 dc 73 5d a0 46 fd f3 e8 |.........s].F...| -000002e0 b8 6f e4 38 ab 94 96 a8 bd ed 90 0e 31 1f fc 2f |.o.8........1../| -000002f0 8f 50 e2 97 6a f5 5c b4 16 03 03 00 bc 65 bb 7c |.P..j.\......e.|| -00000300 42 03 0d 42 46 e3 ac 9f 8a 96 b6 a3 f4 cf a5 30 |B..BF..........0| -00000310 5b 02 17 dc 20 7d 18 19 21 a4 70 f4 4b 99 bf b5 |[... }..!.p.K...| -00000320 cd d7 07 59 a5 82 ed 85 03 06 5c 34 3f c8 c3 4d |...Y......\4?..M| -00000330 c3 fb 96 05 bf b5 bd bf e2 28 07 7e 51 a6 84 90 |.........(.~Q...| -00000340 bf 9e 2e f6 b5 04 8e 06 7a 63 c8 00 84 a1 a3 2c |........zc.....,| -00000350 f3 6f 52 52 c4 ce 4a 59 31 1f d4 ab 2e f4 75 90 |.oRR..JY1.....u.| -00000360 a5 3b ff ab 20 be 51 92 c5 f4 4d 8b f2 2a a7 ff |.;.. .Q...M..*..| -00000370 90 07 40 3e d6 9c cf 23 54 d1 65 d3 74 79 af 51 |..@>...#T.e.ty.Q| -00000380 31 35 40 aa 29 42 32 7e 42 2d af 79 e8 59 6a 10 |15@.)B2~B-.y.Yj.| -00000390 c5 55 6b 70 53 53 ab 02 48 ba 1f df 07 59 f8 34 |.UkpSS..H....Y.4| -000003a0 ee 1d d3 e9 12 86 8b 37 2b cc 27 78 fe e1 65 2b |.......7+.'x..e+| -000003b0 c3 1e f2 25 a4 6d 3c b1 d4 16 03 03 00 4a 50 98 |...%.m<......JP.| -000003c0 cd ee ab 2c 94 95 d6 46 06 ef 63 65 5c aa 6d 6e |...,...F..ce\.mn| -000003d0 fb a0 99 62 23 af 7a 7d 17 dc a3 c6 2b 9a 56 2e |...b#.z}....+.V.| -000003e0 b8 60 87 1e 88 5d 58 27 3f 02 b4 f5 2f 3b 17 8c |.`...]X'?.../;..| -000003f0 f9 93 0c a9 58 af 11 ed 27 9d af a5 0a 2b d6 55 |....X...'....+.U| -00000400 7e c4 54 4a 36 51 b7 7b 16 03 03 00 14 c1 c4 d7 |~.TJ6Q.{........| -00000410 ea 2d f0 8c 54 0e 19 33 e1 7e a8 ae 49 7c 5e 05 |.-..T..3.~..I|^.| -00000420 23 |#| +00000000 16 03 03 00 85 8b 8d 61 42 37 50 ee 69 d8 fb e9 |.......aB7P.i...| +00000010 89 a4 04 63 5d 87 a4 31 cc 22 26 c0 2c 22 1a 73 |...c]..1."&.,".s| +00000020 cc f0 9f be 65 c4 e0 ad 6d b0 b5 d3 86 2c 0b 59 |....e...m....,.Y| +00000030 e6 ae 58 38 b5 5f 4f 6e 7c ec e9 27 23 5f 4a 92 |..X8._On|..'#_J.| +00000040 78 5f cc 9f 7f 2b bb 2c dd 04 17 ea d4 87 b9 6d |x_...+.,.......m| +00000050 d0 1e 35 01 b4 4d 5d 73 6a 9f de 1d 71 47 78 d6 |..5..M]sj...qGx.| +00000060 89 dc c2 d6 5c 69 0c dc bb 7b 59 60 56 47 e9 5c |....\i...{Y`VG.\| +00000070 04 3e 3c 93 18 9b 40 4b 95 1f 20 e3 17 c6 ab 35 |.><...@K.. ....5| +00000080 db 3f 88 d7 4b 89 5a 53 b7 a9 16 03 03 02 69 85 |.?..K.ZS......i.| +00000090 49 cc 00 5a 45 40 9d be 80 06 97 16 a0 c0 dc bb |I..ZE@..........| +000000a0 32 62 18 88 31 3b 14 ec 9d f2 3f ed c0 36 ad bb |2b..1;....?..6..| +000000b0 69 fa 32 f5 13 54 2b 77 f3 db 6e 20 0a 2b 5c a5 |i.2..T+w..n .+\.| +000000c0 d8 aa 5a 63 8d c1 51 50 41 f6 6c f7 ef 2f 15 81 |..Zc..QPA.l../..| +000000d0 85 af 6e e5 01 95 9a 5e 70 26 cb c1 c8 89 3f b8 |..n....^p&....?.| +000000e0 3d 5a 1b 68 a6 25 08 48 ad dd 29 db bf ce 75 44 |=Z.h.%.H..)...uD| +000000f0 ca cd 92 79 47 d8 25 f1 23 9a 63 62 15 05 d8 2c |...yG.%.#.cb...,| +00000100 c0 30 a4 65 a7 f9 89 a4 fe 87 32 21 07 24 d9 16 |.0.e......2!.$..| +00000110 64 26 48 75 ab a7 00 e1 9b 48 5c 77 3d 66 18 69 |d&Hu.....H\w=f.i| +00000120 35 a9 4c 03 f5 9f 42 ff 50 98 73 b1 82 16 fd ff |5.L...B.P.s.....| +00000130 94 fd aa 3c 46 1f b5 99 fd de ab 2e 6a 24 00 5a |.........."| +00000300 3d 8d 48 5d 28 cd ae 94 db 95 2e a6 44 77 da d5 |=.H](.......Dw..| +00000310 a1 09 7c a3 4c 3f a6 18 80 92 cf 5c 77 9d 18 5d |..|.L?.....\w..]| +00000320 43 78 05 bb cb 8e 27 7c cc 2e 9c 54 95 ff 1c 74 |Cx....'|...T...t| +00000330 48 fb df 47 e8 e1 24 94 94 5d cc 2c b2 df 48 6c |H..G..$..].,..Hl| +00000340 22 1e 61 f1 e3 c6 56 fb 79 70 b0 ab c5 70 ca 7f |".a...V.yp...p..| +00000350 c0 32 8d 6d a5 55 6d 94 8c 7b 9d da 0b 35 d1 da |.2.m.Um..{...5..| +00000360 77 85 01 66 15 be 10 c3 3c 9b 80 61 b3 c0 1a 29 |w..f....<..a...)| +00000370 22 d1 d1 ba 4a ea 01 58 72 94 79 f0 6e 5f 36 23 |"...J..Xr.y.n_6#| +00000380 8a cf 16 fa 2c 5f 6d dd 54 61 df bc 6f 91 d4 df |....,_m.Ta..o...| +00000390 e7 6f 50 8f 9c 27 04 04 19 80 10 a2 8d a5 61 81 |.oP..'........a.| +000003a0 06 1f b0 79 87 c0 95 87 f7 d8 87 22 75 a5 87 30 |...y......."u..0| +000003b0 f4 33 6d cb 59 f7 18 75 0f 16 03 03 00 4a d3 e9 |.3m.Y..u.....J..| +000003c0 2e 47 65 f2 29 70 4c 74 3f e9 13 88 e7 66 c6 73 |.Ge.)pLt?....f.s| +000003d0 0f e4 7a 8f 0e 49 49 39 90 e7 ff d4 1f 8a d6 c6 |..z..II9........| +000003e0 91 16 f6 a6 fe 60 d8 ba 26 a6 5e 44 f5 76 88 63 |.....`..&.^D.v.c| +000003f0 10 d0 89 2f 6b ae 55 64 13 0c 63 76 69 df 6a 4a |.../k.Ud..cvi.jJ| +00000400 74 15 51 0b 4d 74 db 49 16 03 03 00 14 f2 0f e7 |t.Q.Mt.I........| +00000410 38 90 33 ff 5e 20 60 42 32 40 72 2c c8 70 d7 ba |8.3.^ `B2@r,.p..| +00000420 a1 |.| >>> Flow 9 (client to server) -00000000 16 03 03 02 69 83 ef 87 6b aa f1 2a cc c1 b8 5d |....i...k..*...]| -00000010 47 e4 2d da c5 91 62 e4 7d 49 da 54 a3 79 fb 1d |G.-...b.}I.T.y..| -00000020 59 49 e8 a6 ab 79 c0 9f 51 f9 d2 63 0d 8c 6b 7f |YI...y..Q..c..k.| -00000030 b6 77 2d f3 b3 3e 78 86 3a 14 1a ab 3b 5e 23 b2 |.w-..>x.:...;^#.| -00000040 d3 5c b1 2b 5c f4 f0 9d e2 87 08 d0 2f 24 30 d3 |.\.+\......./$0.| -00000050 05 eb f8 a6 b2 d1 52 00 c3 9e 0b 82 34 3e fd 5a |......R.....4>.Z| -00000060 46 d5 b6 b2 f0 a0 96 11 e1 35 c2 32 57 d6 dd b2 |F........5.2W...| -00000070 a8 ad b2 71 a2 6f 83 05 d6 f1 83 38 a0 3c 13 ff |...q.o.....8.<..| -00000080 c1 c1 b0 1e b5 40 5b b5 05 31 65 0b 81 a6 b0 37 |.....@[..1e....7| -00000090 7d 16 3b 7b cb e7 58 7f 81 25 e3 39 37 98 87 b0 |}.;{..X..%.97...| -000000a0 e1 8f c0 d5 de 33 fe de 15 37 41 25 d8 97 5d 84 |.....3...7A%..].| -000000b0 28 12 b4 a5 b0 15 f1 f4 cf 41 28 e9 26 5d ba 36 |(........A(.&].6| -000000c0 da b6 a6 cb 21 92 21 30 4b 21 4d 44 28 4d 76 d1 |....!.!0K!MD(Mv.| -000000d0 61 65 fa 02 05 67 50 ec 7d 98 78 21 46 5d fe 75 |ae...gP.}.x!F].u| -000000e0 78 8e 9d 41 6a 0a d7 0e 27 22 d0 a1 21 57 3d 23 |x..Aj...'"..!W=#| -000000f0 d1 7d 08 f4 0b 1b 90 ec 63 74 4c e7 df c8 8f 8b |.}......ctL.....| -00000100 b8 cd 2b 06 a5 35 f5 c1 62 d5 46 f3 d5 19 5b ce |..+..5..b.F...[.| -00000110 c8 d2 f4 c1 51 5f cd b2 51 23 61 bf 93 7f 5d bd |....Q_..Q#a...].| -00000120 61 f2 b2 e0 ad be ab d7 c9 77 26 c2 61 fb 25 8d |a........w&.a.%.| -00000130 46 38 7a 30 48 9f b5 5c 47 6b ce 10 1d 03 d0 68 |F8z0H..\Gk.....h| -00000140 7f 00 c0 94 f4 35 eb 41 e8 91 f6 d9 5c 44 d6 79 |.....5.A....\D.y| -00000150 72 9f 22 a4 08 fd 74 1b 42 dc 49 06 34 8f b6 f5 |r."...t.B.I.4...| -00000160 12 1c 09 f0 d4 eb e4 6e d5 9a 31 f9 1a 88 c1 bf |.......n..1.....| -00000170 37 42 90 5f c8 e1 38 2b 8b 4b c1 cd 66 72 e6 49 |7B._..8+.K..fr.I| -00000180 d3 19 0e 01 19 60 f7 7d d3 66 b2 bf bd 94 30 c9 |.....`.}.f....0.| -00000190 3a 01 aa b6 dc 2a d6 1a 68 cf a6 31 5e 9a 1d 5b |:....*..h..1^..[| -000001a0 90 bb 77 33 31 f2 28 5a 70 a5 c5 ef 91 91 27 22 |..w31.(Zp.....'"| -000001b0 59 33 d5 22 78 8e 8f 07 91 3c 69 ec b9 81 be e8 |Y3."x.........G...NWQ.Y| -00000250 05 84 dc 4d fd fb d1 11 33 b6 e5 5e df 65 d4 ed |...M....3..^.e..| -00000260 04 af 89 b3 f0 90 9b 7c 5e 83 b1 66 71 b1 16 03 |.......|^..fq...| -00000270 03 00 35 5b 37 fa e1 97 11 25 7c fd da 7e e8 2a |..5[7....%|..~.*| -00000280 9b 28 fa 20 a6 9b 9b ca 99 ed a2 eb 5b 84 df a0 |.(. ........[...| -00000290 b9 14 c2 fe 38 a8 54 06 e4 54 38 87 2a 24 8b 1e |....8.T..T8.*$..| -000002a0 3e ba 0a bb c2 1d a4 74 16 03 03 00 98 8b 39 c7 |>......t......9.| -000002b0 ac e5 80 bf 49 95 ad f4 c0 cf c9 7c 86 bf 11 65 |....I......|...e| -000002c0 53 40 f3 64 3e 04 ad c9 8d 33 8a 10 4a f5 2e c5 |S@.d>....3..J...| -000002d0 22 18 59 1c 81 65 8a 51 47 b4 8d b1 94 57 3c f8 |".Y..e.QG....W<.| -000002e0 d0 06 60 ce 04 f9 50 8f 6c 43 d8 6e b0 9e d9 da |..`...P.lC.n....| -000002f0 4b e5 b5 05 b7 1b 4b 46 59 d6 ad 20 bb 4c fc aa |K.....KFY.. .L..| -00000300 9a 9b ef fd 59 4b 2a 63 01 b0 1b 2d ed b1 f4 5b |....YK*c...-...[| -00000310 bb ca cd fa 13 06 06 7e 1d a5 cd c3 ca 4e bf 7b |.......~.....N.{| -00000320 7e 92 92 09 61 35 68 a2 38 f9 13 41 f4 a9 a5 0f |~...a5h.8..A....| -00000330 42 63 e4 15 e8 86 00 48 90 2b 43 30 da 05 b6 fc |Bc.....H.+C0....| -00000340 8e 7f 52 d3 b8 14 03 03 00 11 82 73 be a9 08 9d |..R........s....| -00000350 5b 2f fe bd 1f 2c fb e2 f3 94 f3 16 03 03 00 20 |[/...,......... | -00000360 d0 47 0f 2d 7e ce 8f 01 e2 7d 01 3c 32 79 a0 26 |.G.-~....}.<2y.&| -00000370 fe 00 ce d3 37 46 20 b4 f8 af 21 81 0f 1e ba 2d |....7F ...!....-| +00000000 16 03 03 02 69 78 39 27 1a 64 94 f7 9c 64 ac 37 |....ix9'.d...d.7| +00000010 28 be d0 a4 74 98 34 51 8e 3b c7 14 02 83 ee a5 |(...t.4Q.;......| +00000020 05 55 59 f8 04 43 59 cd 33 e6 c4 44 57 30 68 db |.UY..CY.3..DW0h.| +00000030 b2 cb 50 db c1 e6 c4 04 a3 79 22 40 15 f9 89 57 |..P......y"@...W| +00000040 7b 7a 68 d6 d1 15 c9 7f 6b d8 3a 6c dc 32 4f 72 |{zh.....k.:l.2Or| +00000050 97 57 32 25 f9 78 e6 07 91 f4 45 67 b1 41 dd f9 |.W2%.x....Eg.A..| +00000060 5b fd 76 53 d5 7d 0f 74 6e 2e ea d9 9c 2d 00 39 |[.vS.}.tn....-.9| +00000070 2f 7f 49 97 24 bf e4 f2 c7 7e 21 f9 dd 30 3a 78 |/.I.$....~!..0:x| +00000080 3c 53 41 58 5c 97 3a ff 6f 60 f4 b6 d6 23 a9 ad |.c....| +000000e0 6c b5 0d 0c d3 c6 6d 47 2e a8 3a d8 ec fd d3 42 |l.....mG..:....B| +000000f0 ef 8b e8 75 a6 04 06 3b 5e 57 ae a3 10 2e 6d 01 |...u...;^W....m.| +00000100 0e ea 94 e6 78 1b 91 f0 a0 1e 55 d3 25 13 15 ac |....x.....U.%...| +00000110 eb a4 7c c3 66 83 62 00 a3 d2 f5 7c 64 c6 39 fb |..|.f.b....|d.9.| +00000120 6d ee 01 50 d4 13 5d 10 5f 31 30 09 90 91 64 ad |m..P..]._10...d.| +00000130 f1 c5 4b ed 9d ef 2a 71 e5 7a b2 5d a8 57 bc b8 |..K...*q.z.].W..| +00000140 1f 32 c6 f0 61 f0 08 9e 07 9b d3 99 5b 5e a5 32 |.2..a.......[^.2| +00000150 1f 8a f7 30 1f e9 e6 39 b1 5a c6 a5 22 c8 98 49 |...0...9.Z.."..I| +00000160 04 f2 58 4d e2 15 e6 cd d1 2b 05 54 81 cc b8 33 |..XM.....+.T...3| +00000170 5d 26 52 65 95 32 84 01 f6 05 fa 19 58 c6 57 53 |]&Re.2......X.WS| +00000180 c8 d7 3d ef 56 4e 6e e4 17 45 1c bc 40 ee 06 32 |..=.VNn..E..@..2| +00000190 60 74 9e 62 02 47 52 a8 92 57 26 1f ba 2d 93 67 |`t.b.GR..W&..-.g| +000001a0 94 46 0f c4 0d f5 df 75 b0 d9 27 02 56 f3 82 e1 |.F.....u..'.V...| +000001b0 da 1c 3b 3e 97 93 c8 2d 12 bd b4 5b 36 7a 5c bf |..;>...-...[6z\.| +000001c0 27 9a 75 11 f9 4d 9b c0 ae 6b be 71 5f 37 33 b5 |'.u..M...k.q_73.| +000001d0 4e d4 5a fb 98 71 c5 77 8c fc e2 f3 91 73 35 f4 |N.Z..q.w.....s5.| +000001e0 e7 13 b1 ea bd c2 a9 46 b9 ea 88 06 58 a2 49 a2 |.......F....X.I.| +000001f0 97 2b cf 1b 25 a3 71 a0 22 95 4c 54 81 eb 41 7f |.+..%.q.".LT..A.| +00000200 80 15 82 ec 19 0c f8 a3 21 fe 37 2e e1 ca 34 02 |........!.7...4.| +00000210 5d ec 78 d9 eb 99 93 5d 96 26 cd 4c 56 3a 35 6a |].x....].&.LV:5j| +00000220 7f d0 0c c7 b7 c3 80 c6 fe d0 04 54 00 8c 4c 8b |...........T..L.| +00000230 43 f4 36 b8 ea 51 35 3c 5e b5 b9 45 dc d2 19 bd |C.6..Q5<^..E....| +00000240 d2 2a 95 bc 7f 22 43 4f 84 be bd 7b ab a8 5c 4d |.*..."CO...{..\M| +00000250 28 99 e6 e5 05 33 05 38 be 17 55 80 2d e1 de cf |(....3.8..U.-...| +00000260 39 4e 5b 7d 89 b4 a6 d3 0a e3 fd 47 e1 2c 16 03 |9N[}.......G.,..| +00000270 03 00 35 f3 2d 2c 7b fa 06 39 06 40 27 5b ea 9e |..5.-,{..9.@'[..| +00000280 2f 4a 6c 32 df 62 c3 bc af ed 21 6a 1a 34 82 cf |/Jl2.b....!j.4..| +00000290 73 e5 b9 1d 8d 42 3d 8e b7 e6 1c 0a e0 81 3e cd |s....B=.......>.| +000002a0 88 23 f3 56 55 09 e2 6e 16 03 03 00 98 73 0f 59 |.#.VU..n.....s.Y| +000002b0 0e 1b 1b d1 db db 6d 47 d9 05 f8 e1 29 32 e5 16 |......mG....)2..| +000002c0 f9 f6 24 2b 0f 2d bb 74 da fd 75 9b ec 6a 3f 02 |..$+.-.t..u..j?.| +000002d0 c8 3a ab 23 ec cb 77 c6 d7 7b ba ce 29 85 66 54 |.:.#..w..{..).fT| +000002e0 ab df c9 74 2a 50 b5 cd 45 03 e2 ce 6f d3 d0 f1 |...t*P..E...o...| +000002f0 1a 3e e4 c0 34 72 e1 53 1e 69 9a d7 41 4f d4 3a |.>..4r.S.i..AO.:| +00000300 31 af 1a 0b 83 82 e7 6c 4f f6 9a d5 84 bb 9a 14 |1......lO.......| +00000310 e3 ec 04 12 c8 83 9c c8 d9 81 c1 c9 16 db 35 6e |..............5n| +00000320 0f af a0 b3 e6 a9 2b ad a5 1f cd a0 fb 45 01 84 |......+......E..| +00000330 ae b5 42 49 21 d8 29 06 0a 0e e8 26 8e f4 f1 56 |..BI!.)....&...V| +00000340 c2 7c 8f d6 4a 14 03 03 00 11 c6 06 37 68 e0 2b |.|..J.......7h.+| +00000350 dd 32 2a b5 c7 b6 ad e2 c8 7c d8 16 03 03 00 20 |.2*......|..... | +00000360 1d 80 95 df 2d d3 38 50 a2 2d bc 09 50 e4 e8 47 |....-.8P.-..P..G| +00000370 5f 3e 26 03 5e d3 9b 5a ee ed d4 bb cb da 05 5b |_>&.^..Z.......[| >>> Flow 10 (server to client) -00000000 14 03 03 00 11 53 7f 72 ce 10 f4 0e a3 ed ed 8d |.....S.r........| -00000010 3a ad 2d 57 c8 e1 16 03 03 00 20 11 e9 69 5e ff |:.-W...... ..i^.| -00000020 22 0d f6 a3 e1 e5 3f 14 34 a0 33 d7 d5 0a 7f bc |".....?.4.3.....| -00000030 7c 69 9b 9a d2 aa 41 87 fe da de 17 03 03 00 19 ||i....A.........| -00000040 bd a1 83 5d 27 9f cc 0b 40 02 23 6e 6f 18 4c bc |...]'...@.#no.L.| -00000050 48 c4 02 7d 45 08 71 ac d7 |H..}E.q..| +00000000 14 03 03 00 11 13 75 b3 44 ec 4c 6b 24 d3 52 90 |......u.D.Lk$.R.| +00000010 28 c1 47 92 5c 0d 16 03 03 00 20 c2 61 ed 34 d2 |(.G.\..... .a.4.| +00000020 c5 cf fd b3 31 3d 1d 5f 30 87 18 65 01 47 da 0f |....1=._0..e.G..| +00000030 d9 eb 4f 0f 50 2e 02 86 fe eb 13 17 03 03 00 19 |..O.P...........| +00000040 3f ac 26 1c 16 0e 16 bf b1 d3 80 86 dd c6 e2 b6 |?.&.............| +00000050 3f 5a 0b 0c 3e 7d 3b a8 d5 |?Z..>};..| >>> Flow 11 (client to server) -00000000 15 03 03 00 12 80 ae fb 45 cb a1 2d 1f c8 b6 02 |........E..-....| -00000010 3a 28 62 d6 13 48 2c |:(b..H,| +00000000 15 03 03 00 12 ea 81 9d df ec c1 0c 3d 21 8b fe |............=!..| +00000010 b5 24 d8 92 43 1d 3d |.$..C.=| diff --git a/src/crypto/tls/testdata/Client-TLSv12-RenegotiateTwice b/src/crypto/tls/testdata/Client-TLSv12-RenegotiateTwice index 7ff58763c5..e83ad4b285 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-RenegotiateTwice +++ b/src/crypto/tls/testdata/Client-TLSv12-RenegotiateTwice @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 25 9f b0 d0 c5 |....]...Y..%....| -00000010 56 c8 79 6a 1a ff 0e e9 8b 41 b6 be c7 36 0b 58 |V.yj.....A...6.X| -00000020 c0 9e 9d 6c 4c b4 39 1f 95 ff 8f 20 32 27 d2 39 |...lL.9.... 2'.9| -00000030 ac f6 33 f9 48 a4 0b 0f e1 f9 5f 0a 83 7b 75 95 |..3.H....._..{u.| -00000040 23 55 14 ba 55 2f 47 42 e8 df 09 39 cc a8 00 00 |#U..U/GB...9....| +00000000 16 03 03 00 5d 02 00 00 59 03 03 36 29 60 e0 b5 |....]...Y..6)`..| +00000010 ee 59 a6 3b 1a de 96 8a 51 0c c1 15 30 ce 6a 70 |.Y.;....Q...0.jp| +00000020 ca 5b fa a5 86 f4 59 79 44 cd 73 20 ad b7 a9 d5 |.[....YyD.s ....| +00000030 c1 aa a6 49 6d a8 36 a9 bf 40 1e 3a d4 2c 21 4a |...Im.6..@.:.,!J| +00000040 5d aa fa 75 80 d4 cb fc be 2b 41 36 cc a8 00 00 |]..u.....+A6....| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 59 0b 00 02 55 00 02 52 00 02 |......Y...U..R..| 00000070 4f 30 82 02 4b 30 82 01 b4 a0 03 02 01 02 02 09 |O0..K0..........| @@ -61,286 +62,290 @@ 00000290 73 bb b3 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 |s..Cw.......@.a.| 000002a0 4c 72 2b 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 |Lr+...F..M...>..| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 2b 66 1d |............ +f.| -000002d0 80 f2 60 32 0f af 6f d3 03 db 28 c1 33 18 1c 5d |..`2..o...(.3..]| -000002e0 71 fd 2a 24 f9 3c 4d 76 ca e3 93 8d 25 08 04 00 |q.*$.{W...*| +00000350 85 0d b0 5f bf a5 8e 74 55 72 dc 2c 5c 60 52 93 |..._...tUr.,\`R.| +00000360 1e 28 9d 36 9f fd da a5 3b 51 96 4e 12 d6 d4 ca |.(.6....;Q.N....| +00000370 d3 16 03 03 00 04 0e 00 00 00 |..........| >>> Flow 3 (client to server) 00000000 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 03 00 01 01 |....._X.;t......| -00000030 16 03 03 00 20 7b de 6f c8 b7 f1 69 89 0b 29 af |.... {.o...i..).| -00000040 62 1b 92 47 e9 44 f7 26 91 93 9c 3b e2 77 0e d0 |b..G.D.&...;.w..| -00000050 c5 af fd e5 59 |....Y| +00000030 16 03 03 00 20 e4 80 79 12 42 80 88 c3 66 6b 9b |.... ..y.B...fk.| +00000040 a2 03 59 f9 a3 54 2f 7f 03 de 90 97 1d cb 48 08 |..Y..T/.......H.| +00000050 19 a4 bb 13 64 |....d| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 20 94 da e2 2e f3 |.......... .....| -00000010 65 59 31 4f 58 42 57 b5 1f e6 c1 5a c6 07 97 12 |eY1OXBW....Z....| -00000020 f6 6c 20 cc 91 50 76 42 70 dd 2c |.l ..PvBp.,| +00000000 14 03 03 00 01 01 16 03 03 00 20 9e 59 22 68 f2 |.......... .Y"h.| +00000010 3c 38 7d cf 43 eb 77 73 94 6c 35 e5 3f 3e 7e 03 |<8}.C.ws.l5.?>~.| +00000020 29 96 e8 c6 f7 5c b4 39 c3 77 61 |)....\.9.wa| >>> Flow 5 (client to server) -00000000 17 03 03 00 16 fe 0d 78 61 f9 fe 65 3c 42 c0 98 |.......xa..e>> Flow 6 (server to client) -00000000 16 03 03 00 14 e0 bb 6e cc 69 fc a7 02 46 c4 5e |.......n.i...F.^| -00000010 a5 b1 1e ce e9 c7 7a d9 76 |......z.v| +00000000 16 03 03 00 14 a8 ab 9e 3c 00 e4 6f b3 26 dd 3a |........<..o.&.:| +00000010 67 ab ee 28 a0 a1 65 83 91 |g..(..e..| >>> Flow 7 (client to server) -00000000 16 03 03 01 1a a7 03 1c ef 27 0a 04 9b 31 b0 c6 |.........'...1..| -00000010 17 00 1f 6c d5 91 ae 7c 77 87 98 05 67 9a ea ea |...l...|w...g...| -00000020 6c 79 28 da 2c 91 6d a0 c6 9a e9 f3 85 a0 7f 7d |ly(.,.m........}| -00000030 ae 89 ac 0d 01 7f d8 34 dd fb ba c3 d8 ba ff 9b |.......4........| -00000040 75 dc d6 5e 8a fa ad 9c ea fa 15 63 55 85 98 26 |u..^.......cU..&| -00000050 65 7a 19 17 c4 99 98 85 83 c4 06 39 30 d5 63 51 |ez.........90.cQ| -00000060 ff 22 e8 cd 55 6e fc 88 5e d5 54 24 79 52 7e b0 |."..Un..^.T$yR~.| -00000070 71 e4 e6 cb a6 06 24 14 1a c2 a8 52 85 e9 fc e4 |q.....$....R....| -00000080 66 47 9c 9c d1 f3 56 11 47 16 4b 7c a5 f1 81 1e |fG....V.G.K|....| -00000090 00 78 98 8f 70 ae 47 6d 45 3b c4 af fc 88 bd 88 |.x..p.GmE;......| -000000a0 7b cc 8a 78 86 ff 86 25 2d 21 28 f2 c5 d7 4b 61 |{..x...%-!(...Ka| -000000b0 c0 ea 67 38 4c d0 d6 6f fc a0 69 62 98 6f ac 29 |..g8L..o..ib.o.)| -000000c0 29 13 34 7a f0 2d 1b 7e 52 42 6f f1 64 ed 7f 47 |).4z.-.~RBo.d..G| -000000d0 69 82 9b 9d 19 7b 3a c5 54 51 c8 8f 4c 9e 42 a7 |i....{:.TQ..L.B.| -000000e0 0f 9e 05 1d 4f 85 11 05 97 42 fa 24 37 1c 4e ec |....O....B.$7.N.| -000000f0 55 dc e1 4e f6 e2 dd c6 63 b0 dd 60 11 93 23 8a |U..N....c..`..#.| -00000100 eb 68 76 21 ec 19 cf 59 c8 78 80 f0 fa 39 6a 09 |.hv!...Y.x...9j.| -00000110 f8 7f 9d c0 e7 51 3d 75 17 e3 cf a5 bf 1c 10 |.....Q=u.......| +00000000 16 03 03 01 34 d8 7e 6c f6 7b d5 eb 3f 49 63 78 |....4.~l.{..?Icx| +00000010 28 92 1c 8b 67 f2 70 a7 ff e2 91 42 43 d8 90 4e |(...g.p....BC..N| +00000020 01 47 0a 12 bb 9d a2 9a e1 a2 d6 ee 5e 91 8c 4d |.G..........^..M| +00000030 86 8e 29 d4 e0 b3 67 0f c4 5e a9 02 c9 e3 8f f0 |..)...g..^......| +00000040 e6 ea 24 50 da 57 70 35 58 98 81 3e ff b8 8d ea |..$P.Wp5X..>....| +00000050 b3 e0 f0 a1 91 39 69 33 40 bc 0f 67 21 10 67 f4 |.....9i3@..g!.g.| +00000060 93 66 0c f2 66 aa fd a5 2c 8d 2b 38 31 30 b3 50 |.f..f...,.+810.P| +00000070 71 09 de ce 22 59 c3 96 5a 07 84 c0 1f 96 5c e3 |q..."Y..Z.....\.| +00000080 7e 6b c8 7e 3f a5 32 77 20 3c 7b 92 df bc 11 57 |~k.~?.2w <{....W| +00000090 86 e5 a1 03 78 9c 08 ea 49 bc a7 1b 6b fb 47 6d |....x...I...k.Gm| +000000a0 9a 86 14 fa cc 98 e6 9a f8 39 18 57 36 fb 1b ff |.........9.W6...| +000000b0 ae ce 1e 96 20 9d 16 be c6 00 45 51 2a 5a 7b 46 |.... .....EQ*Z{F| +000000c0 9c c9 c1 eb fb fc 37 52 8d b2 22 e3 58 6a d1 fe |......7R..".Xj..| +000000d0 71 55 18 4b ff 92 e1 16 62 29 cb fb d0 0d 94 22 |qU.K....b)....."| +000000e0 13 ee 8e bb 75 2e 1c ae 11 61 3d 37 69 0d 51 b0 |....u....a=7i.Q.| +000000f0 61 e3 7f 94 08 54 3a 49 68 94 b5 64 da ac a9 a4 |a....T:Ih..d....| +00000100 e2 3f 65 ad d7 42 8e 0b 70 5f 4f 6d 6e 0c 27 51 |.?e..B..p_Omn.'Q| +00000110 5a 48 57 71 6e 9b 58 e0 6e 05 40 48 a8 20 36 98 |ZHWqn.X.n.@H. 6.| +00000120 f8 71 a3 ef 2d db 8c ae fa a5 14 d8 1f ff ad 7b |.q..-..........{| +00000130 2a 15 0d fb 3d e8 1b fe 48 |*...=...H| >>> Flow 8 (server to client) -00000000 16 03 03 00 85 14 4e 8e de d0 5b 59 2d f6 a3 b0 |......N...[Y-...| -00000010 c0 ff 4a ff 8b cf af 2f 09 f1 ee 03 0f b9 70 5e |..J..../......p^| -00000020 1b e4 ef b4 3e e7 c1 43 fb ea a8 68 4c 66 0a 55 |....>..C...hLf.U| -00000030 e8 51 a6 30 bb e3 f5 0e df 11 f2 e0 51 94 14 f6 |.Q.0........Q...| -00000040 1e c6 e8 9d 10 a2 20 9f f2 f6 1e f0 3c f3 ba ff |...... .....<...| -00000050 65 d1 f4 df 9e e6 18 9f a1 a5 9c 5f 4b 4f 20 98 |e.........._KO .| -00000060 4a f6 0b 95 da 01 1f ea c0 c4 39 39 8b fd 19 40 |J.........99...@| -00000070 8d 14 da 45 fd 51 3d a7 36 23 a0 b2 bb cb 81 6b |...E.Q=.6#.....k| -00000080 79 0a 02 71 50 84 ac d6 7b ad 16 03 03 02 69 b8 |y..qP...{.....i.| -00000090 a9 6c 87 d7 23 6b c6 1a 4c 08 dd fa 58 e8 e8 d5 |.l..#k..L...X...| -000000a0 44 16 3b de 77 60 33 2a 47 a5 3c e0 cb c3 1a 38 |D.;.w`3*G.<....8| -000000b0 1d 1f 69 8e 33 a3 ba ac 55 b5 77 9b e1 fc a4 21 |..i.3...U.w....!| -000000c0 99 90 01 5e 99 36 a3 cf 74 b4 1f 96 b7 96 1e 4b |...^.6..t......K| -000000d0 cf 0b 92 5f 6b 1f 1c b0 70 80 2e 87 57 ef 52 b0 |..._k...p...W.R.| -000000e0 2b 7d 66 06 cb a1 78 a7 5a e2 af 4c fc a4 8b 99 |+}f...x.Z..L....| -000000f0 af 6c 6d 0e 07 7e da 11 5a b7 89 af 3c ce 1e 22 |.lm..~..Z...<.."| -00000100 1f 7d 97 d5 d4 78 09 c4 e7 fb 33 bf 36 ee 6e 5a |.}...x....3.6.nZ| -00000110 af f0 5b 0f 00 eb cc 3d 76 35 41 98 4c 65 81 34 |..[....=v5A.Le.4| -00000120 74 d9 d7 ba 04 fc c8 c6 c9 ca 4b b0 8e b1 7e 87 |t.........K...~.| -00000130 9d 69 2e d5 68 54 96 48 37 42 ae ff 18 d0 08 b2 |.i..hT.H7B......| -00000140 dc 26 1c c1 99 f1 c3 02 3f 48 51 a8 92 10 18 01 |.&......?HQ.....| -00000150 f3 3b 96 4b de 80 29 27 87 da f4 89 23 1b 49 b8 |.;.K..)'....#.I.| -00000160 5b f5 50 ec 99 b0 c3 48 e2 d3 fe fb a0 95 c3 c6 |[.P....H........| -00000170 83 fe d9 87 ef 0c cf 67 8f e7 52 3d 17 7d c0 ab |.......g..R=.}..| -00000180 02 1a 33 78 c8 d6 13 8b 8e 82 be 0d 5e d4 22 e8 |..3x........^.".| -00000190 63 c3 84 a9 05 12 d3 b7 e2 36 96 a2 22 0a 77 df |c........6..".w.| -000001a0 20 06 5c 0d 8b c1 d6 ac 73 b0 b2 a0 be db 59 17 | .\.....s.....Y.| -000001b0 05 60 68 b9 18 85 d5 73 9b c9 41 b9 c1 f2 02 47 |.`h....s..A....G| -000001c0 ca 95 c8 47 e2 de 04 75 08 d4 b7 a2 41 d7 e2 6b |...G...u....A..k| -000001d0 ad 8c ba c5 fc f8 b1 fe d3 23 c0 22 ec d0 2f a7 |.........#."../.| -000001e0 d9 ed 0e da 71 18 c0 d0 1f 40 8d eb 79 ea 5f aa |....q....@..y._.| -000001f0 07 4f 65 81 c1 9e ea 36 7f 0d 8b 07 8b 71 81 5a |.Oe....6.....q.Z| -00000200 0e cb d4 0f 98 c8 5c 69 d0 61 6e b5 ef 2a dd 5f |......\i.an..*._| -00000210 63 92 b4 3e 6e f4 b8 fc 45 bf 58 79 08 a4 95 6f |c..>n...E.Xy...o| -00000220 34 01 9b 8a 19 a5 e4 11 3f d4 97 47 66 e8 42 ef |4.......?..Gf.B.| -00000230 92 72 01 f4 6f 07 a4 35 81 83 ee 26 d0 96 cc de |.r..o..5...&....| -00000240 42 2a 65 64 cc a9 0c 39 31 d5 7c 2f 42 e5 ce 36 |B*ed...91.|/B..6| -00000250 0b bf b5 22 2a 4f 3c 56 27 29 cd fb 8e 9f 8f ab |..."*O...d...V*.h| +000001e0 45 68 13 da c6 eb 5d f2 7b 51 bd b4 8e 25 0d b7 |Eh....].{Q...%..| +000001f0 f0 03 dd 2b cd 93 7f 00 96 ca 75 c1 1b c7 d0 95 |...+......u.....| +00000200 0f 08 52 e0 d6 c9 2c b2 42 b3 0b 0c ed e1 01 e3 |..R...,.B.......| +00000210 7d ef b1 fb 80 76 c8 08 ec 9f c2 13 a5 04 05 fe |}....v..........| +00000220 33 c2 b7 2e 1a 2b 4a 74 f5 f5 92 ad e8 cf f7 76 |3....+Jt.......v| +00000230 3e 7c 69 4b 2d be 9b 08 3b 80 97 66 63 e5 df db |>|iK-...;..fc...| +00000240 1a a4 aa 8a bd 43 2a 65 44 6d f1 e6 60 92 cd 98 |.....C*eDm..`...| +00000250 a9 ac 81 de fb 22 06 f4 ca 90 4a 67 64 3f 25 ab |....."....Jgd?%.| +00000260 3c db 77 cb bc 32 55 bc 2d 48 4e 32 c7 48 d1 2f |<.w..2U.-HN2.H./| +00000270 bf 80 03 7e 27 92 8b 6a 90 35 ab 8e 93 dd 27 c7 |...~'..j.5....'.| +00000280 7d d6 a7 ea d8 1f 6a 43 57 34 d2 a9 7c c3 23 55 |}.....jCW4..|.#U| +00000290 62 5b 98 80 a1 ec 61 53 63 b9 a7 89 85 7e a8 0e |b[....aSc....~..| +000002a0 31 e9 9f 82 e9 1a b3 25 b8 d3 bf 4b f7 da 40 ce |1......%...K..@.| +000002b0 30 95 8f 41 75 9e 99 f5 3f fd 90 57 77 ee ad b7 |0..Au...?..Ww...| +000002c0 56 1e fd a6 d6 98 ae d3 a0 36 8a e0 19 a5 64 63 |V........6....dc| +000002d0 8f 08 d3 e6 2b c3 8a 29 90 8d e0 d7 1d 8b 84 6d |....+..).......m| +000002e0 a8 7a 0d 8b 6d 0e d5 fa bd c1 31 13 c7 39 61 f6 |.z..m.....1..9a.| +000002f0 e8 b3 fd 4d fe 49 a0 2c 16 03 03 00 bc 6d 99 1c |...M.I.,.....m..| +00000300 76 24 e6 f4 79 ac da e5 71 78 32 8d df a7 74 a4 |v$..y...qx2...t.| +00000310 e1 22 43 86 62 7a 99 34 9e c1 c7 82 82 f2 ad c0 |."C.bz.4........| +00000320 cb e5 54 c7 2d 3f bd 00 ba 4f 9f 6b 90 c2 2c bf |..T.-?...O.k..,.| +00000330 d5 d1 20 48 28 f0 bc 21 d4 1f 8d a9 89 82 ce 3d |.. H(..!.......=| +00000340 b2 52 bd 91 57 65 da 07 74 d9 56 b3 54 a7 2c 20 |.R..We..t.V.T., | +00000350 93 5e 79 59 d0 d3 33 95 a9 de f6 a4 48 37 11 10 |.^yY..3.....H7..| +00000360 a7 34 2a 2b 30 a5 24 03 5b d5 63 78 1f ad ca 70 |.4*+0.$.[.cx...p| +00000370 ff f9 22 ca bc 23 ac 4d eb 5a d7 de af 31 72 25 |.."..#.M.Z...1r%| +00000380 84 24 72 b7 b8 c0 a5 7a b6 7e a9 95 42 bb 5e 52 |.$r....z.~..B.^R| +00000390 6c 13 87 c2 b5 17 04 a8 0a 43 d0 b4 96 12 12 4b |l........C.....K| +000003a0 1e d1 0b ab a1 5d 1a bc 48 15 ec 88 e6 7b 57 aa |.....]..H....{W.| +000003b0 da 3b 7f 0b cc 11 93 8f ee 16 03 03 00 4a 35 4e |.;...........J5N| +000003c0 5f 82 88 e9 d5 24 cc 81 3c 0a cc 49 63 13 ea 0c |_....$..<..Ic...| +000003d0 e6 d7 a9 f2 7b 4f 7f d4 c1 d8 71 4e 1d e6 68 e6 |....{O....qN..h.| +000003e0 7e ba 73 f8 23 a5 af 1a 05 35 4c bf 88 8d 8a 90 |~.s.#....5L.....| +000003f0 09 26 34 1d b6 88 92 2d 60 92 52 2c cb 45 02 a4 |.&4....-`.R,.E..| +00000400 78 54 3d a3 44 d3 f9 46 16 03 03 00 14 58 29 f7 |xT=.D..F.....X).| +00000410 44 f4 a0 9f 65 d8 47 1a 01 7e 1b 95 3b 5f 1f 4a |D...e.G..~..;_.J| +00000420 12 |.| >>> Flow 9 (client to server) -00000000 16 03 03 02 69 8a dc ce d1 c0 85 30 95 6c da 57 |....i......0.l.W| -00000010 23 05 39 c1 4c 20 08 25 a2 96 f1 55 a1 77 3b 42 |#.9.L .%...U.w;B| -00000020 9f 3d 69 9b 56 49 b4 94 8a 3c d5 85 43 f1 b4 4b |.=i.VI...<..C..K| -00000030 cd e0 67 95 83 34 90 89 81 f0 18 87 28 c0 42 88 |..g..4......(.B.| -00000040 b0 1c d1 cc 0a f0 bb 67 91 55 0b e4 ed 22 52 09 |.......g.U..."R.| -00000050 92 0b 56 ac d0 3f c9 41 05 8a 19 7d e7 9a d7 ff |..V..?.A...}....| -00000060 fa 85 f5 23 b0 98 a0 79 b1 8e 0f 90 0e c8 32 92 |...#...y......2.| -00000070 4b 6a 37 47 45 31 70 be 8b cd 7a 26 3a 3c 0b 63 |Kj7GE1p...z&:<.c| -00000080 a7 8c 00 2c 1d be eb 5c 1f 16 90 76 2b d7 82 5e |...,...\...v+..^| -00000090 31 93 40 7a e0 9a e0 4c 7d 2e e3 84 0f cb 06 7d |1.@z...L}......}| -000000a0 8d 76 41 ea 27 52 4a 77 e5 91 02 ab 11 cc 8c f0 |.vA.'RJw........| -000000b0 fe 8e ee b2 f1 ba 1e ab 0d 5c e2 2d da d5 8d f9 |.........\.-....| -000000c0 7c 22 32 e9 50 1d 88 db af c0 82 51 e0 31 14 71 ||"2.P......Q.1.q| -000000d0 ad c9 05 5d 8e 2b 75 4b 9e 74 b0 3a a9 e4 7c 82 |...].+uK.t.:..|.| -000000e0 ac 75 39 31 0a dc dc 0a 5c f4 ee 55 f2 09 c2 d2 |.u91....\..U....| -000000f0 81 c8 70 2e 8f 37 6b 90 79 5c 18 6e 38 21 c6 00 |..p..7k.y\.n8!..| -00000100 08 be ad 21 e9 40 b6 54 06 f0 61 f9 2c 71 25 0e |...!.@.T..a.,q%.| -00000110 13 6c 66 ef b6 a9 61 d0 d0 42 56 58 32 3c 9c 5a |.lf...a..BVX2<.Z| -00000120 ee 13 1d 42 8b 94 41 9c d1 2e c9 ac d4 ed 0f 04 |...B..A.........| -00000130 1c 6f 5c 30 80 12 37 c6 43 07 7e 03 50 86 24 84 |.o\0..7.C.~.P.$.| -00000140 34 2a 70 82 65 67 35 cd 5e 7c 0e 49 30 35 d4 ee |4*p.eg5.^|.I05..| -00000150 43 b7 7a c3 88 30 e5 ba 98 7f 8d 9e 08 a2 8c bb |C.z..0..........| -00000160 48 44 c2 1a 8d 7b 41 de b6 68 ae d2 8a 64 9b 6b |HD...{A..h...d.k| -00000170 8a 47 88 04 49 05 8a 94 66 da d3 90 78 6d 81 64 |.G..I...f...xm.d| -00000180 4e 6b a5 6f d2 9d 1d 36 6f a2 a3 83 0c f5 69 10 |Nk.o...6o.....i.| -00000190 37 c8 b8 59 c7 b1 5b 91 fc e3 26 37 da 14 80 8f |7..Y..[...&7....| -000001a0 d4 1e 63 51 1d 77 85 67 af 7a 7d e4 5a 27 f9 3f |..cQ.w.g.z}.Z'.?| -000001b0 75 b0 9e 2a 1d 42 29 ac d4 29 c6 0d 2f ee 35 38 |u..*.B)..)../.58| -000001c0 38 91 a4 f1 60 1b d6 49 b2 eb c4 df b6 01 99 69 |8...`..I.......i| -000001d0 06 7c ca 2d aa 15 e8 c5 4f 48 5f 77 87 4b fd 41 |.|.-....OH_w.K.A| -000001e0 cf aa 7d 96 b9 12 ee b7 b3 a2 86 5e 4f 79 08 a1 |..}........^Oy..| -000001f0 00 43 12 93 92 99 07 44 23 48 78 46 c8 fc 4a 96 |.C.....D#HxF..J.| -00000200 88 72 45 2a f4 ff 92 41 7b e5 a0 74 93 ff b8 f6 |.rE*...A{..t....| -00000210 3e e0 6a 3b 3b 12 68 50 89 d1 d3 22 e0 a1 3f ef |>.j;;.hP..."..?.| -00000220 da 18 15 5b c2 48 0e 78 d0 af ae d7 81 af 23 16 |...[.H.x......#.| -00000230 ab 71 07 9d 26 b2 8b 34 7e b2 1a 1e f4 fb 02 9a |.q..&..4~.......| -00000240 f4 15 78 a9 d2 19 94 bb 9f b0 ba 2a 21 20 dd 87 |..x........*! ..| -00000250 57 73 e7 01 08 bc 38 ce 2d 9e dc 3f f7 c4 75 aa |Ws....8.-..?..u.| -00000260 00 9d 28 43 e5 de aa 82 fb e5 ca 87 4e 6c 16 03 |..(C........Nl..| -00000270 03 00 35 e0 37 f9 95 cd 96 f9 ba 36 12 6b 35 c5 |..5.7......6.k5.| -00000280 02 9d 71 8a e5 07 d6 1c 77 6a 86 17 d0 01 9b 79 |..q.....wj.....y| -00000290 74 6b 14 27 33 2f 6d c2 af cb dd 47 71 b3 73 4d |tk.'3/m....Gq.sM| -000002a0 7f 42 3e 7f 86 6e 63 ed 16 03 03 00 98 7f ba 78 |.B>..nc........x| -000002b0 bf a3 d4 02 cb 19 0d 1f 48 bf 4d 9f d0 37 3a c9 |........H.M..7:.| -000002c0 c1 76 6e fb 9a 69 63 0a a1 76 13 2d ea 52 38 18 |.vn..ic..v.-.R8.| -000002d0 71 89 9a f5 02 2e 44 94 72 6d 08 e1 89 9a e1 4c |q.....D.rm.....L| -000002e0 ee 2f 15 9c 0d b6 67 1e 0c 17 b0 e9 03 7d 66 1c |./....g......}f.| -000002f0 28 6b 57 6d c8 49 5d ef ca 4c 51 59 ae 17 55 97 |(kWm.I]..LQY..U.| -00000300 54 f1 f5 64 19 ec 36 27 96 33 0e fd 65 42 ac 50 |T..d..6'.3..eB.P| -00000310 bb cf f9 da fe 98 3d 83 79 a0 24 0d 9f 91 5c b0 |......=.y.$...\.| -00000320 5c c5 04 b4 90 53 c3 8b b5 29 c5 73 7f 04 c6 55 |\....S...).s...U| -00000330 93 4a 08 67 8f f7 a8 ba a8 e2 62 09 85 d3 47 b9 |.J.g......b...G.| -00000340 27 bd 6c 81 95 14 03 03 00 11 88 9b 21 1e 06 0a |'.l.........!...| -00000350 fa 8a 9e 4e d9 7a b3 a5 45 7a 96 16 03 03 00 20 |...N.z..Ez..... | -00000360 6f a0 f0 cf 0b 2b c2 d1 36 d8 64 2b 72 86 7b ab |o....+..6.d+r.{.| -00000370 c7 86 5d c3 67 ec d6 c0 32 4d b8 1f fa d9 3a af |..].g...2M....:.| +00000000 16 03 03 02 69 ef e7 da 35 77 b6 d6 09 a1 71 43 |....i...5w....qC| +00000010 1c 2b 72 d6 65 ea b4 38 e4 13 c1 85 c3 36 bb f4 |.+r.e..8.....6..| +00000020 ef 1a b8 94 de 11 22 6e b8 28 14 05 88 2a 5d 7a |......"n.(...*]z| +00000030 7c 0a 00 ac 74 ce 4f f8 b3 94 5d 5c a1 aa 3e 20 ||...t.O...]\..> | +00000040 ee 0b e3 50 3d e7 4f 4d ad 5c 9e 6e 8e 75 26 b4 |...P=.OM.\.n.u&.| +00000050 80 e1 85 3f ae 76 6f 95 6e f0 79 98 3d 86 17 9c |...?.vo.n.y.=...| +00000060 e9 d6 35 1d f5 15 ea c5 29 67 15 9d 03 4b 41 9d |..5.....)g...KA.| +00000070 25 b3 ab 3a b0 12 d1 ff fc 9e 25 af ff 8a c8 1c |%..:......%.....| +00000080 4b 4e f0 10 9d d3 98 6e 66 0a 13 82 b9 04 d7 39 |KN.....nf......9| +00000090 b2 2c c5 f9 cf be 4b 8b 8a 28 e9 24 db c8 fe d6 |.,....K..(.$....| +000000a0 a1 b1 3c 9e 19 92 0b 5d 2e c8 5f 56 35 dc 16 46 |..<....].._V5..F| +000000b0 7b a1 d2 43 d9 ee 3f a7 74 c1 4c ed 2a 84 4a ad |{..C..?.t.L.*.J.| +000000c0 76 a2 bc 90 8d 19 06 11 1a 6d b8 e0 3a 8e 0d 33 |v........m..:..3| +000000d0 f2 ad 06 d7 e5 a3 16 8c 14 07 4c 84 8a 47 13 c1 |..........L..G..| +000000e0 b1 cb 81 8b d7 5b fb 04 2b da 3c 7f d1 0f 2b 8b |.....[..+.<...+.| +000000f0 23 ad f5 f1 09 82 24 80 5c bc f7 68 69 c0 90 5f |#.....$.\..hi.._| +00000100 fa 96 b4 9d 51 0e 96 1e 06 2a d1 98 5d 96 95 68 |....Q....*..]..h| +00000110 de df 40 f9 f6 b1 f2 ef a7 c4 0c 05 ee b3 63 8d |..@...........c.| +00000120 3a 1e a2 d8 34 2a b2 99 c3 17 03 60 18 4f 43 21 |:...4*.....`.OC!| +00000130 99 4f 81 c1 11 8e a4 45 79 d8 fa fc b2 9a f8 d0 |.O.....Ey.......| +00000140 95 10 79 38 45 1b 82 42 f0 bb 75 27 6b a2 53 d3 |..y8E..B..u'k.S.| +00000150 e6 dd 2d 43 f5 80 fd 9a 59 ec 07 42 ee b0 9d bd |..-C....Y..B....| +00000160 33 dd 58 c8 57 e8 16 de a4 21 c9 92 51 d2 e5 8b |3.X.W....!..Q...| +00000170 48 f5 cb a8 3a d8 f6 a3 b2 00 90 9e f0 e0 ca c7 |H...:...........| +00000180 fe 79 70 f7 8e 5c 4b 3c 86 c8 cc ca b1 b6 05 e2 |.yp..\K<........| +00000190 90 66 db 85 fc 7c 87 6f e0 44 ed 2a c9 66 b7 de |.f...|.o.D.*.f..| +000001a0 c5 f0 d2 80 dd f2 c2 26 5b 84 cf b0 c4 78 7e 65 |.......&[....x~e| +000001b0 66 d9 d8 c5 fe 97 b9 27 6e 55 11 c0 0b 3e e2 c9 |f......'nU...>..| +000001c0 ce 4d dd 27 28 6f 62 45 70 b3 e4 0c 18 31 f1 b2 |.M.'(obEp....1..| +000001d0 33 8f 7d 34 7c f6 f3 50 d9 a9 6b ec a7 cf c2 7b |3.}4|..P..k....{| +000001e0 36 21 d7 76 68 c1 0e 90 8d af 2e c5 d5 26 c7 c1 |6!.vh........&..| +000001f0 0b 1c 43 85 a6 43 3e 96 67 46 2d 1e 0a c8 90 99 |..C..C>.gF-.....| +00000200 0f 71 cc 60 49 68 2c df 17 68 e4 fa 79 05 50 ac |.q.`Ih,..h..y.P.| +00000210 16 d0 26 1f 7e 58 a2 dc 73 e9 05 8d 92 f6 8c 56 |..&.~X..s......V| +00000220 db 08 0a b7 99 64 f7 5b d0 5f f3 88 f5 02 f5 d0 |.....d.[._......| +00000230 66 55 e3 db f4 d1 c9 d3 c1 f4 ab 8c 5c 39 fd 64 |fU..........\9.d| +00000240 ec cd ab 63 da 7b 3e 64 1a b4 c3 d9 79 bd 92 e3 |...c.{>d....y...| +00000250 97 68 a4 83 b5 f1 fa f5 05 04 84 39 e9 82 a6 84 |.h.........9....| +00000260 e5 a0 6f a2 6d ea 6b ab 4c f8 a5 87 9c 9c 16 03 |..o.m.k.L.......| +00000270 03 00 35 08 0b 50 f9 90 d3 e9 58 e5 5b df a1 99 |..5..P....X.[...| +00000280 89 ea 0b 1a f1 4d e3 fd a6 79 2c 61 ac 6f da 7c |.....M...y,a.o.|| +00000290 2a 78 e1 38 05 35 2e 8b db eb 25 fd eb 2f d7 a3 |*x.8.5....%../..| +000002a0 27 9d 27 f2 b3 ff 20 8a 16 03 03 00 98 95 42 7e |'.'... .......B~| +000002b0 d5 86 40 42 dc 93 fe 80 ef 70 cc fb 2f b1 51 bd |..@B.....p../.Q.| +000002c0 ca 5f 1e 0d a0 3f c6 e0 c9 69 0e d4 dc 18 25 52 |._...?...i....%R| +000002d0 5c c2 8c 37 f6 a8 e6 4d 48 27 81 4d 7a f3 49 5c |\..7...MH'.Mz.I\| +000002e0 92 92 68 a9 e0 dc d6 c5 b5 ea 99 5c 51 df 93 a1 |..h........\Q...| +000002f0 36 2d 65 a8 cb ca 72 76 53 92 7d c7 81 5f 19 2c |6-e...rvS.}.._.,| +00000300 3e 83 29 16 41 65 4f 81 d7 3f 5c 15 f0 36 d9 75 |>.).AeO..?\..6.u| +00000310 a7 c8 52 6f 5b b6 98 46 5e 39 31 83 1c 99 3f f9 |..Ro[..F^91...?.| +00000320 9e 28 d7 94 ae a7 b4 f7 c9 ce 5b 74 2f 88 9e fd |.(........[t/...| +00000330 3c 1c 1e eb f4 b3 39 65 39 07 14 8e 3e 95 87 b2 |<.....9e9...>...| +00000340 b8 4c e8 7d 3b 14 03 03 00 11 cc eb 21 2a 7c 9a |.L.};.......!*|.| +00000350 5c 35 9f 35 e3 09 dd f8 7a 4f 43 16 03 03 00 20 |\5.5....zOC.... | +00000360 0b ff 00 c0 96 43 18 d9 9d ad 51 55 44 40 11 2f |.....C....QUD@./| +00000370 cd 1c bd ae ea 0a c9 eb de 57 95 c2 81 63 79 4c |.........W...cyL| >>> Flow 10 (server to client) -00000000 14 03 03 00 11 b4 79 7e 62 ea ea f7 37 1d a4 65 |......y~b...7..e| -00000010 9d 02 95 b8 4a 6c 16 03 03 00 20 6a 45 d1 d0 ff |....Jl.... jE...| -00000020 fa 9f 6a ea d5 0d 27 b6 e7 15 8b e8 5b f9 3c d0 |..j...'.....[.<.| -00000030 32 ff 81 24 9a de 1c 31 6a 48 f8 17 03 03 00 19 |2..$...1jH......| -00000040 a9 07 ab fb 37 2f 88 0c 93 4a 0c 34 08 26 39 8c |....7/...J.4.&9.| -00000050 22 00 1b 36 3c 6d 0c 49 61 16 03 03 00 14 bb 63 |"..6>> Flow 11 (client to server) -00000000 16 03 03 01 1a a4 4c dc 47 09 04 ab bb ca 49 f2 |......L.G.....I.| -00000010 63 36 35 fb e3 3f ad ae 82 2a 9b 87 cc 0c 2e ea |c65..?...*......| -00000020 18 af ad e9 ea 7a c8 45 de c6 9b 0e e0 32 26 95 |.....z.E.....2&.| -00000030 ba e3 57 9e 27 ce ff 36 43 a3 bd 79 47 6c 02 86 |..W.'..6C..yGl..| -00000040 81 44 ac b3 c6 21 d8 fa 8c 69 43 b7 66 70 ea 24 |.D...!...iC.fp.$| -00000050 12 1b ac 44 d2 49 e3 5a d1 0e 50 76 46 4f 58 51 |...D.I.Z..PvFOXQ| -00000060 21 4c f8 20 63 60 c0 20 3a 12 e5 0b 86 e3 03 2c |!L. c`. :......,| -00000070 e1 fc 63 e4 44 d4 67 95 aa af 22 3d 40 7b 4e 12 |..c.D.g..."=@{N.| -00000080 98 7d 05 00 57 50 d5 3a d7 af dd 96 0f ac 77 63 |.}..WP.:......wc| -00000090 f8 1c b0 9c d0 96 9f 20 a1 48 55 aa dc 69 fb b7 |....... .HU..i..| -000000a0 67 58 ff 27 de 22 ea 66 48 32 56 1f ef 12 3f 44 |gX.'.".fH2V...?D| -000000b0 38 af ae 4b c2 16 bb c8 f1 fe 13 d7 05 66 de 08 |8..K.........f..| -000000c0 f3 4d 5c a6 e1 2d 0d c3 ce 50 7b 01 40 49 0f 83 |.M\..-...P{.@I..| -000000d0 97 c0 37 a2 6c 2b 64 a9 40 0e e1 7b f4 6e e1 cc |..7.l+d.@..{.n..| -000000e0 1a 5f 0b c5 69 dc dc db 0e a2 22 7b cf ca 73 81 |._..i....."{..s.| -000000f0 fc 47 47 c7 76 18 8e ae 55 6c fe 5e 5e 33 84 9c |.GG.v...Ul.^^3..| -00000100 4c 1b f8 21 29 3c 47 1b c8 01 38 7d c2 50 45 1c |L..!).1....#..tE{..| +00000120 d8 c8 c0 8b 00 72 ee d8 a9 64 b8 1b 48 77 98 b9 |.....r...d..Hw..| +00000130 20 61 b8 23 17 b5 65 7c fb | a.#..e|.| >>> Flow 12 (server to client) -00000000 16 03 03 00 85 bb 34 66 c0 a3 8c 2b 2c fe fe 82 |......4f...+,...| -00000010 53 a1 07 1f 06 db 41 94 ac 21 f2 c4 23 0e b6 48 |S.....A..!..#..H| -00000020 4d 16 97 2a 79 dd 95 4c 93 7f e4 8c 94 90 d4 02 |M..*y..L........| -00000030 3c 44 b4 80 80 7b 45 84 53 3f 6b 9f f6 b6 d3 0c |.c....>TP..alX | -00000200 da a8 5a f7 46 9d a3 57 a1 60 72 59 82 dd f7 08 |..Z.F..W.`rY....| -00000210 9e 48 16 8d b1 c0 f4 d2 e0 4e 5d 3c bf 23 88 0f |.H.......N]<.#..| -00000220 99 90 b0 a9 7e df 0b f5 1a 31 9e 59 e1 05 43 4e |....~....1.Y..CN| -00000230 4f d9 a5 b1 00 2e f2 c8 10 2c 73 ec c4 62 b8 c3 |O........,s..b..| -00000240 59 53 ce 38 37 9d c3 f6 77 36 34 f2 07 a6 21 1f |YS.87...w64...!.| -00000250 62 56 08 d3 ed ae 51 05 4d ed ef 7e 77 c5 7d ae |bV....Q.M..~w.}.| -00000260 b6 aa 74 e9 9a df 5d 89 c2 9f 07 75 a0 c2 35 2d |..t...]....u..5-| -00000270 cc 13 c5 a9 17 85 79 b6 45 0c 82 56 0d 19 9e bc |......y.E..V....| -00000280 e7 1a a6 cc 20 6f f9 7c 29 54 2f 5a 92 1f c0 8b |.... o.|)T/Z....| -00000290 9c a7 a3 85 43 f2 4c e7 c5 e3 af 6e 40 f4 14 d4 |....C.L....n@...| -000002a0 b8 26 5f ac d7 44 16 6d 40 d5 80 c5 49 df 8d fe |.&_..D.m@...I...| -000002b0 06 1c 7c 19 49 94 50 6f e8 8c e0 59 80 9a a0 0e |..|.I.Po...Y....| -000002c0 50 3f 03 de c9 30 88 15 91 83 4e a8 df c3 65 75 |P?...0....N...eu| -000002d0 cd 30 3e 7d 32 4a d9 ff 72 1e 1d 90 50 f3 67 8a |.0>}2J..r...P.g.| -000002e0 6a 94 c3 92 9a d4 0b 20 7e 61 98 6e db d0 71 4a |j...... ~a.n..qJ| -000002f0 8b 43 82 7e 76 e6 93 f7 16 03 03 00 bc e6 e6 85 |.C.~v...........| -00000300 a8 2c 74 47 10 a3 27 26 f7 46 fb da fa 6a 93 2c |.,tG..'&.F...j.,| -00000310 b1 14 b2 90 d3 4e 94 42 c4 37 6d 4d 43 73 b4 a7 |.....N.B.7mMCs..| -00000320 17 c1 3c 62 5d e4 c4 04 7c f7 13 39 9f a8 3f 05 |....d....| -00000390 e5 f8 f3 75 54 65 f4 6f e9 c8 eb a2 6c 06 98 fd |...uTe.o....l...| -000003a0 e9 bb a2 93 ab ee 0b fa c7 b4 fa e1 91 34 a9 a7 |.............4..| -000003b0 b9 14 16 25 32 88 09 3e b1 16 03 03 00 14 d0 c0 |...%2..>........| -000003c0 54 b2 37 35 9b cf 51 71 28 b2 d6 86 05 16 ad a0 |T.75..Qq(.......| -000003d0 18 e7 |..| +00000000 16 03 03 00 85 93 93 97 db ec 52 74 ce 78 ca e6 |..........Rt.x..| +00000010 95 19 ac 68 2c 81 ad 6b c3 6d d5 f7 84 a1 00 d0 |...h,..k.m......| +00000020 15 4c ae 2d 10 6a 07 d3 82 af af f8 d9 5d 9d 65 |.L.-.j.......].e| +00000030 8d c9 1e 8c 61 3e b3 67 71 89 41 7e 94 1e 4a 27 |....a>.gq.A~..J'| +00000040 73 53 83 d4 70 44 9a 4f 8d e7 62 af 9b 71 9e 83 |sS..pD.O..b..q..| +00000050 72 9a a1 e2 03 47 5f c3 11 4f 56 b9 6f 02 b5 b8 |r....G_..OV.o...| +00000060 8b 4a cb 99 ed 62 58 45 2d 0f f1 25 ce e9 de 7d |.J...bXE-..%...}| +00000070 3f 17 a8 35 d5 73 06 6e d6 bc 77 2a 82 27 d7 92 |?..5.s.n..w*.'..| +00000080 91 67 68 07 52 4b ed a0 3c 95 16 03 03 02 69 11 |.gh.RK..<.....i.| +00000090 73 93 d5 ad 00 17 11 3b 83 81 68 6d 3a 8a 02 1b |s......;..hm:...| +000000a0 90 df 84 f6 2b 4a b8 98 cf 50 0d dd 29 22 9d 58 |....+J...P..)".X| +000000b0 ea 7b 2c 30 2d e7 e2 d1 ae ad 00 9e 01 f6 ef 96 |.{,0-...........| +000000c0 ae a4 48 58 29 63 1d 2c 19 f3 c2 49 6f cf c9 7b |..HX)c.,...Io..{| +000000d0 e3 ca 5c e7 30 a0 b5 72 a9 3d 61 a2 0f 96 e4 d6 |..\.0..r.=a.....| +000000e0 8f 93 66 f1 de 24 88 14 9f 8b 14 9a b5 94 f7 70 |..f..$.........p| +000000f0 79 e4 94 68 b7 e0 f1 8e d0 1b 56 da d0 ce 90 b2 |y..h......V.....| +00000100 13 b3 4b b5 20 99 77 4a a4 83 47 4e 1b 1f db 35 |..K. .wJ..GN...5| +00000110 96 16 f0 d8 2b 7e 18 bf 0c b7 a3 da 44 fe 4c 96 |....+~......D.L.| +00000120 86 06 52 81 f9 a1 f4 ab 43 6d a3 fd 50 f6 83 08 |..R.....Cm..P...| +00000130 ba b5 d5 15 55 16 aa 84 95 77 1d 9e cd d6 53 d0 |....U....w....S.| +00000140 d3 c7 1c 9a 12 4d 8d 7a b5 0b 02 34 3f cf b5 0f |.....M.z...4?...| +00000150 98 56 cc 6e 15 ef 60 88 e0 71 2e 47 46 ce 19 11 |.V.n..`..q.GF...| +00000160 81 21 fe c6 80 86 d7 be d9 a7 6f a1 8c 8d ff ba |.!........o.....| +00000170 fb 8b 8b 8f 35 95 03 cb 10 e6 f5 71 18 d5 3c e0 |....5......q..<.| +00000180 60 e7 a2 47 36 41 a0 a3 c4 a3 c1 23 6c da 55 6a |`..G6A.....#l.Uj| +00000190 5f ef cd 58 e7 5d d3 cf 50 7b 3d b5 c6 7c 73 d9 |_..X.]..P{=..|s.| +000001a0 ce c3 ae 6a 46 4a 9a e6 10 57 53 b3 6c e5 ec 9d |...jFJ...WS.l...| +000001b0 f0 25 3c a4 a6 f0 42 1a 1e 8c 2b 40 79 e5 51 84 |.%<...B...+@y.Q.| +000001c0 79 6b c5 8a 3d 25 11 38 97 ca 15 11 e7 51 74 29 |yk..=%.8.....Qt)| +000001d0 66 9e 4d 4d 50 6a ec 1d 94 6b 4d c9 e9 a7 f8 4e |f.MMPj...kM....N| +000001e0 5b c3 06 74 ba 1d a1 79 3c 24 94 c9 3b b0 b1 16 |[..t...y<$..;...| +000001f0 fe 42 31 fe d0 4b e4 51 e6 06 63 89 2d 3b 56 6a |.B1..K.Q..c.-;Vj| +00000200 cf 89 4c 45 49 fd 10 58 9b 6b 4b 35 eb d8 c9 9d |..LEI..X.kK5....| +00000210 c0 31 b6 3e 33 da 7e 87 39 e3 c0 6a f8 7f bd 9a |.1.>3.~.9..j....| +00000220 26 4f 42 51 86 40 fb f7 fb cc 50 80 b6 0a 63 f4 |&OBQ.@....P...c.| +00000230 41 62 68 c0 b8 99 7d 8e ab e1 8a 15 92 f2 35 a4 |Abh...}.......5.| +00000240 cc 0e e7 9e 74 2d c1 b4 44 be 25 10 92 02 4f e3 |....t-..D.%...O.| +00000250 e7 ea c4 77 83 18 62 36 ba 9c 77 a6 d4 c1 6f 66 |...w..b6..w...of| +00000260 fc 07 4b 1a 00 98 a4 10 5e bc d5 93 07 e7 0c e3 |..K.....^.......| +00000270 34 05 32 23 c7 60 22 a8 52 fa 6e de 3f f9 c6 cc |4.2#.`".R.n.?...| +00000280 c2 54 08 d4 2a 98 39 20 09 f4 1d 8e d5 18 77 5a |.T..*.9 ......wZ| +00000290 f0 f4 08 a4 66 a7 8e fe f5 25 50 16 ca 4a 8d f0 |....f....%P..J..| +000002a0 b4 9f f1 37 e6 9b db 24 25 d0 a0 57 06 74 e2 14 |...7...$%..W.t..| +000002b0 46 51 e9 9c 03 f0 e0 16 17 d0 c9 54 54 29 e6 04 |FQ.........TT)..| +000002c0 9a c3 47 93 69 78 1a de ca f1 d4 b1 52 ff c0 5c |..G.ix......R..\| +000002d0 9f 5f 16 a9 35 01 f9 18 47 7b ee 06 f4 f3 3a 1d |._..5...G{....:.| +000002e0 94 b9 d5 2c 29 a0 80 85 b0 31 55 37 63 bc a6 e6 |...,)....1U7c...| +000002f0 67 66 21 5f eb 1c 17 15 16 03 03 00 bc 93 4b d6 |gf!_..........K.| +00000300 07 b0 12 ca 98 9f 52 b8 14 c3 6e d4 3b f2 74 e4 |......R...n.;.t.| +00000310 f5 6f 51 40 04 cd 1a 5f 69 fb 3d 68 2b 4e 09 df |.oQ@..._i.=h+N..| +00000320 c8 c9 6f c2 87 ae b6 f9 14 6a 41 fa 59 08 0b b0 |..o......jA.Y...| +00000330 d9 0b d0 61 fd 64 c6 52 3e 40 f2 96 75 b0 82 7a |...a.d.R>@..u..z| +00000340 8e 68 11 d2 bc 22 a0 bc 30 d8 a6 1a 88 26 00 d5 |.h..."..0....&..| +00000350 b5 26 49 c2 5d f3 19 c5 c0 9d 75 c3 f4 3e 95 85 |.&I.].....u..>..| +00000360 d0 8b de 31 79 b5 5c 27 6e 99 ab 50 fe ef 3a 07 |...1y.\'n..P..:.| +00000370 a0 a9 ce b7 4b 29 6b 93 42 6d db 34 6b 14 03 a9 |....K)k.Bm.4k...| +00000380 a8 1f c2 57 65 64 c3 95 ff 2a f8 39 de c3 36 f4 |...Wed...*.9..6.| +00000390 dd 77 b0 cf 86 be c4 9c 1d d5 ea 88 3c 8c ed 81 |.w..........<...| +000003a0 51 fc a9 80 78 bc 59 7d d1 e4 48 d5 d6 07 88 e1 |Q...x.Y}..H.....| +000003b0 d7 85 80 81 3a 35 9c 57 21 16 03 03 00 14 d9 b1 |....:5.W!.......| +000003c0 fb 95 82 67 c4 35 92 cd 47 cb 7b 0f 63 1a e0 32 |...g.5..G.{.c..2| +000003d0 43 75 |Cu| >>> Flow 13 (client to server) -00000000 16 03 03 00 35 e8 18 a5 be 6e 3b 37 5b d3 81 d3 |....5....n;7[...| -00000010 ad 0b 90 2e e0 df 2b 7f c4 ec 54 58 ef 85 e3 13 |......+...TX....| -00000020 41 07 50 d1 06 9b 3e a3 71 30 bf 7d 0c 7a bd 1e |A.P...>.q0.}.z..| -00000030 b6 e9 1e 10 0d 18 e3 b3 1c 38 14 03 03 00 11 bf |.........8......| -00000040 b3 65 ae 3b e6 c2 ad 30 83 75 65 c0 2b 0d 4b 11 |.e.;...0.ue.+.K.| -00000050 16 03 03 00 20 c6 cb f8 69 c3 bc 36 74 ff 8a 1f |.... ...i..6t...| -00000060 02 ef 32 37 fe 4f 14 51 d2 11 6a 98 05 4c 8c f6 |..27.O.Q..j..L..| -00000070 75 05 f9 39 2c |u..9,| +00000000 16 03 03 00 35 36 32 d0 64 c8 ba 33 1d 4f 31 73 |....562.d..3.O1s| +00000010 68 35 f2 76 0c b1 52 12 f5 4b 8a ea 74 0a 7f c2 |h5.v..R..K..t...| +00000020 a4 90 75 1f 24 0a 76 77 1f 01 15 9d 59 fa 16 56 |..u.$.vw....Y..V| +00000030 cc fd f9 08 74 76 31 cc f4 4c 14 03 03 00 11 c0 |....tv1..L......| +00000040 12 9b 35 78 94 a3 4e c3 b2 30 aa c7 fa 44 20 e6 |..5x..N..0...D .| +00000050 16 03 03 00 20 c6 a5 79 48 7b c3 2b 2d 6a 73 0a |.... ..yH{.+-js.| +00000060 83 a9 2b a7 ba 90 ea 6f b5 c2 c1 13 d7 7a 86 37 |..+....o.....z.7| +00000070 5a 24 8e f9 b3 |Z$...| >>> Flow 14 (server to client) -00000000 14 03 03 00 11 a0 fa 14 67 3f 54 1b 61 89 ed db |........g?T.a...| -00000010 9c 66 9f 49 77 2d 16 03 03 00 20 ca 47 f0 57 8c |.f.Iw-.... .G.W.| -00000020 3e 52 e6 e2 6c 01 cb 16 05 68 5e 19 12 ca 80 48 |>R..l....h^....H| -00000030 dc e9 ed 41 33 08 01 ef 6e b0 a3 17 03 03 00 19 |...A3...n.......| -00000040 d9 c8 68 e8 27 3d cf c0 33 71 55 a9 6a b4 6d a5 |..h.'=..3qU.j.m.| -00000050 da 8d bb 34 94 4f b1 c6 22 |...4.O.."| +00000000 14 03 03 00 11 c4 0e 59 d8 5e f6 5b 1d e6 20 7b |.......Y.^.[.. {| +00000010 45 4f 89 cd 2b a9 16 03 03 00 20 58 ff 80 6c f2 |EO..+..... X..l.| +00000020 fd 94 e7 66 b3 6d e3 37 57 8a 8c 35 98 4e bb c3 |...f.m.7W..5.N..| +00000030 42 87 32 b7 3b 6f ee 0f f1 7d 08 17 03 03 00 19 |B.2.;o...}......| +00000040 8a f6 02 17 4e 8a 1e 2b db 44 24 d4 aa c6 d4 af |....N..+.D$.....| +00000050 ef 5a a3 17 ba 77 f4 54 6e |.Z...w.Tn| >>> Flow 15 (client to server) -00000000 15 03 03 00 12 15 66 43 1e 60 21 d1 f6 94 34 3e |......fC.`!...4>| -00000010 ee 90 fc 87 45 2a f5 |....E*.| +00000000 15 03 03 00 12 84 3f 11 0b 00 bd 12 5e be 74 4d |......?.....^.tM| +00000010 04 e4 44 b2 01 73 66 |..D..sf| diff --git a/src/crypto/tls/testdata/Client-TLSv12-RenegotiateTwiceRejected b/src/crypto/tls/testdata/Client-TLSv12-RenegotiateTwiceRejected index 7698b6791d..62b6831a47 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-RenegotiateTwiceRejected +++ b/src/crypto/tls/testdata/Client-TLSv12-RenegotiateTwiceRejected @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 e3 fe 9a 75 3b |....]...Y.....u;| -00000010 82 ac ff 66 ee c2 e9 75 d9 29 cc 89 6d e0 27 19 |...f...u.)..m.'.| -00000020 62 07 0b 0b c0 49 df 17 26 af 63 20 2a 95 69 54 |b....I..&.c *.iT| -00000030 3c 5d d9 67 05 4c 45 77 d0 d9 46 29 ed 25 fd 7d |<].g.LEw..F).%.}| -00000040 b4 ef 39 d2 ee 3b a3 88 85 c5 78 9a cc a8 00 00 |..9..;....x.....| +00000000 16 03 03 00 5d 02 00 00 59 03 03 a1 1a ae 12 c9 |....]...Y.......| +00000010 55 34 c9 23 81 cb 4f b0 d8 35 97 8e d5 b7 ac 67 |U4.#..O..5.....g| +00000020 e1 9c fd ec 35 61 48 7b d5 c8 8b 20 e1 e9 61 af |....5aH{... ..a.| +00000030 0b 5c 69 7b cb f9 7a ee 73 31 20 07 c3 b9 27 47 |.\i{..z.s1 ...'G| +00000040 07 e1 c0 34 7c c5 8f 31 ac 9d cd 8c cc a8 00 00 |...4|..1........| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 59 0b 00 02 55 00 02 52 00 02 |......Y...U..R..| 00000070 4f 30 82 02 4b 30 82 01 b4 a0 03 02 01 02 02 09 |O0..K0..........| @@ -61,189 +62,191 @@ 00000290 73 bb b3 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 |s..Cw.......@.a.| 000002a0 4c 72 2b 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 |Lr+...F..M...>..| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 ca 74 42 |............ .tB| -000002d0 03 67 f2 31 ac 68 dd 2c db 23 7d 2c 84 df e9 50 |.g.1.h.,.#},...P| -000002e0 ff ef d4 a1 fa a4 5b 0b 0b 73 20 b7 0e 08 04 00 |......[..s .....| -000002f0 80 41 60 3d b1 1c 1d 14 8a 0a 3e 5c ea ca ce 07 |.A`=......>\....| -00000300 d4 45 18 6c 16 52 40 6f b0 f4 33 38 d7 cf 11 75 |.E.l.R@o..38...u| -00000310 08 4e 7d 8b cc 64 8c 79 dd 42 fa 43 2c 9e 84 91 |.N}..d.y.B.C,...| -00000320 e9 d5 bc 9f 84 2d 10 4b db 4e a6 be 37 e9 2e 34 |.....-.K.N..7..4| -00000330 d7 3e a7 17 80 b5 cd 37 04 2a 6c 2a cc 5f 0c a1 |.>.....7.*l*._..| -00000340 ff c2 31 86 17 50 3a 47 4d 99 49 94 9c 11 12 e2 |..1..P:GM.I.....| -00000350 70 fa d1 f4 7e 3a f2 3a df 16 34 45 0a b2 7b 73 |p...~:.:..4E..{s| -00000360 fa 59 23 85 88 74 2b e6 1e cb c7 00 f5 96 c8 8a |.Y#..t+.........| -00000370 02 16 03 03 00 04 0e 00 00 00 |..........| +000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 95 6f d7 |............ .o.| +000002d0 37 b9 49 ff 98 39 6f 25 c5 c0 e0 89 61 23 2d 22 |7.I..9o%....a#-"| +000002e0 5b 86 d6 7f a1 19 07 f7 12 4d 01 e6 1b 08 04 00 |[........M......| +000002f0 80 ca fd 6e 23 09 33 a7 0c 9b 4b 2b 38 37 a0 32 |...n#.3...K+87.2| +00000300 21 a4 e4 fe 56 b6 4e c6 d1 e6 86 fa d9 13 b4 f3 |!...V.N.........| +00000310 72 bf 31 ef c3 33 e9 99 a1 bf a4 e5 10 46 44 7d |r.1..3.......FD}| +00000320 cb ea 38 99 d0 bc 1f 16 81 fb ad 09 7e 9e 54 99 |..8.........~.T.| +00000330 40 c2 44 65 94 53 88 c3 28 db 7f 1b fa 52 f1 63 |@.De.S..(....R.c| +00000340 9a e9 f2 43 7f 19 2b 3e 02 3d 53 ed a1 f9 9a ff |...C..+>.=S.....| +00000350 aa af 8d 4c ab bf d2 7a b4 ea 1e f9 22 fe ee 7e |...L...z...."..~| +00000360 a1 3e dc d4 f1 76 d1 4e 7b 1b 84 f6 b3 a7 f7 a9 |.>...v.N{.......| +00000370 37 16 03 03 00 04 0e 00 00 00 |7.........| >>> Flow 3 (client to server) 00000000 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 03 00 01 01 |....._X.;t......| -00000030 16 03 03 00 20 0a a7 0c 5f 47 d1 7c 5e ea 63 82 |.... ..._G.|^.c.| -00000040 83 27 6c bc 29 20 25 ec 3d 15 2d 59 94 e7 9d 2c |.'l.) %.=.-Y...,| -00000050 8b 4e 95 85 fc |.N...| +00000030 16 03 03 00 20 d0 64 37 7c 81 1c cd 86 e7 ab 97 |.... .d7|.......| +00000040 25 1d c5 ee bd 5a 49 44 69 c8 3e db 37 6a dc 9a |%....ZIDi.>.7j..| +00000050 fd e2 5e 82 16 |..^..| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 20 03 84 99 6b f7 |.......... ...k.| -00000010 3e 44 b1 96 6a 09 75 bf 26 4b 67 30 c4 e9 86 74 |>D..j.u.&Kg0...t| -00000020 4d e1 e3 9b fa 15 8e 1e 72 f9 5a |M.......r.Z| +00000000 14 03 03 00 01 01 16 03 03 00 20 18 71 b3 67 a3 |.......... .q.g.| +00000010 98 36 20 8f e4 17 30 e4 73 de 91 88 ef f7 f3 8a |.6 ...0.s.......| +00000020 c6 0e 5e b2 1f e2 e6 5a 52 f6 72 |..^....ZR.r| >>> Flow 5 (client to server) -00000000 17 03 03 00 16 68 29 2f 1b 1c 9d 28 6e b6 e5 09 |.....h)/...(n...| -00000010 4a 77 96 23 20 da 67 9e 14 ec 6b |Jw.# .g...k| +00000000 17 03 03 00 16 20 c3 2a be 39 d2 7c 1c 83 30 cc |..... .*.9.|..0.| +00000010 7b cd 44 ae 2b e8 d4 19 50 69 81 |{.D.+...Pi.| >>> Flow 6 (server to client) -00000000 16 03 03 00 14 66 e8 13 d1 b5 13 cf 5c 71 7b d9 |.....f......\q{.| -00000010 63 29 3d be 68 9f f4 ad 7b |c)=.h...{| +00000000 16 03 03 00 14 96 2f 3a b5 b5 56 c9 d5 38 c0 1a |....../:..V..8..| +00000010 eb 35 c5 b9 dd 1c 5b e6 50 |.5....[.P| >>> Flow 7 (client to server) -00000000 16 03 03 01 1a cb 21 91 08 de 08 87 fc 63 10 93 |......!......c..| -00000010 24 a3 83 e8 99 07 d5 03 19 61 4e 8e df dd d0 f6 |$........aN.....| -00000020 50 3c fd 14 23 67 cd 74 ad 87 9b b7 8f ee a2 23 |P<..#g.t.......#| -00000030 6c 2f 90 18 f4 01 6b 31 fe ca f7 65 f9 64 5a bc |l/....k1...e.dZ.| -00000040 49 3b 25 4c 35 59 50 f2 bc 70 cb 24 2f ec 47 12 |I;%L5YP..p.$/.G.| -00000050 b6 16 22 9e ce 3b fb 17 f9 59 4e 2f 5c 03 90 47 |.."..;...YN/\..G| -00000060 d5 e8 e9 eb d9 55 bf 8f 28 e8 72 e5 15 21 42 ba |.....U..(.r..!B.| -00000070 86 65 ac b4 f5 53 7e 98 38 39 b5 7d 2a 14 d6 7b |.e...S~.89.}*..{| -00000080 3e 69 9d dc 43 33 ed 0b 8a 77 14 54 9d b0 da 88 |>i..C3...w.T....| -00000090 3b 75 50 01 07 02 99 36 39 4f 01 ee 02 cf 05 a5 |;uP....69O......| -000000a0 71 75 03 3a a5 5c c4 ce 0e 1d ba dd 9d 79 c1 84 |qu.:.\.......y..| -000000b0 81 69 7c cd 63 a4 20 a3 a2 13 8e 6e d7 01 29 8d |.i|.c. ....n..).| -000000c0 35 e2 fa 3d 74 ea 40 06 7e 0b 2d ab 3c 54 73 ef |5..=t.@.~.-....&.FU........| -00000110 43 bd e5 9f 5c 35 02 25 54 17 89 c0 be ab bc |C...\5.%T......| +00000000 16 03 03 01 34 ae 4f 4c 78 20 df 3b 9e f3 c1 82 |....4.OLx .;....| +00000010 37 6b ca fc 48 2a 2c 9a 71 7e c3 20 a0 e8 f7 d5 |7k..H*,.q~. ....| +00000020 76 af 11 81 dd 69 e9 93 58 df 58 8c fb f1 82 ad |v....i..X.X.....| +00000030 35 0e fb 6c a9 58 7a 5d 79 38 cb d7 77 1f 93 34 |5..l.Xz]y8..w..4| +00000040 7e bb 88 61 9e 19 1a 98 bb 6f ad 78 2c a6 73 ab |~..a.....o.x,.s.| +00000050 a4 7e 4b d7 75 69 7b 92 47 68 3d 7b 40 03 60 59 |.~K.ui{.Gh={@.`Y| +00000060 2e 04 bc cd fc ca 45 2c 2c f7 e5 0a 66 49 0b 86 |......E,,...fI..| +00000070 c5 ec 86 e6 ae c9 39 4b 05 1f 21 db 78 8d 51 e6 |......9K..!.x.Q.| +00000080 5d fe be 6a 1d 85 e1 15 23 56 86 4c ba 09 bf 7b |]..j....#V.L...{| +00000090 9e 36 e9 7a 8f 06 af 10 7b 4a 4b af 58 db f9 4e |.6.z....{JK.X..N| +000000a0 13 36 61 f4 e3 a9 c6 37 11 d4 ed 9e 6a c7 bf 16 |.6a....7....j...| +000000b0 ea a4 ae 01 99 4a b5 3e 9c ca 6c ce e8 a2 3d b8 |.....J.>..l...=.| +000000c0 81 ef 60 7b 51 79 81 22 87 49 ad ab fb c6 f6 48 |..`{Qy.".I.....H| +000000d0 c0 ba e0 2b d7 90 42 f7 a8 0d f0 cf 2c 7a 55 7d |...+..B.....,zU}| +000000e0 be 65 a6 67 bd 96 7f 01 6f ce db f6 50 2f 45 b6 |.e.g....o...P/E.| +000000f0 6f cc 74 ba 6f 57 3b e3 a4 08 34 92 e6 ac e4 99 |o.t.oW;...4.....| +00000100 2e b6 9b 29 4d 26 dd 7f 5c f5 1b 7e 5e 5c fd f7 |...)M&..\..~^\..| +00000110 d4 da 81 47 51 8c 3f 94 e1 95 5b de b9 6e 4a 76 |...GQ.?...[..nJv| +00000120 bc 59 6a bb 1f 1c 79 02 93 2e 21 b3 6d be ae b4 |.Yj...y...!.m...| +00000130 95 6b 8a 48 cb 84 fb ab b3 |.k.H.....| >>> Flow 8 (server to client) -00000000 16 03 03 00 85 10 dc 85 7d 1e 66 b2 a4 86 68 a7 |........}.f...h.| -00000010 31 f3 b1 d8 c7 c9 26 6d 74 0a c0 c0 c0 39 ad b5 |1.....&mt....9..| -00000020 1b b1 dc d3 15 9f a4 96 27 dd 65 85 ad 83 2f 97 |........'.e.../.| -00000030 42 6f 8a 9b 58 fc f8 1b 54 89 cd 9c 11 10 b9 1d |Bo..X...T.......| -00000040 c3 e1 8e 89 20 a5 2d 0b 31 b5 e0 16 54 ce 93 9b |.... .-.1...T...| -00000050 de cc b1 af 48 48 33 96 4d a6 00 78 7b 60 3f 7c |....HH3.M..x{`?|| -00000060 cd 86 64 5e 38 e8 fd 60 d4 b1 89 cd e4 fb 42 b5 |..d^8..`......B.| -00000070 82 8f e5 23 91 87 6d 54 9e 85 37 34 df ae 70 a5 |...#..mT..74..p.| -00000080 cd 4c de 95 f7 9f a9 b4 87 0b 16 03 03 02 69 d1 |.L............i.| -00000090 c2 87 4e c8 26 b3 89 88 da c0 b9 24 84 88 c0 76 |..N.&......$...v| -000000a0 94 08 eb 56 5d fc 96 81 18 f3 5b 90 f1 38 e5 ae |...V].....[..8..| -000000b0 b5 4e 9a c1 19 19 1a b3 40 55 08 cb 0e 3b 93 b3 |.N......@U...;..| -000000c0 d7 74 80 3a 7c 0d eb be 70 0e a9 50 88 d2 52 11 |.t.:|...p..P..R.| -000000d0 2d 55 cf d9 9d aa 92 bd 15 ab 1a 62 b3 26 09 3f |-U.........b.&.?| -000000e0 50 2b b8 f2 00 a2 5a 2b 98 e3 bb e2 c7 0b 07 0e |P+....Z+........| -000000f0 5a e5 2e 08 27 87 f3 0b 1b f7 f7 82 49 cf 08 d6 |Z...'.......I...| -00000100 7c 78 39 0e 92 e7 28 f4 8f 12 ac 6a c2 72 46 e8 ||x9...(....j.rF.| -00000110 92 bf 36 c7 52 46 7a 01 92 6d a9 08 19 2a 07 70 |..6.RFz..m...*.p| -00000120 8c b2 40 7d 7f 00 27 ea fb e6 24 5c d2 d8 ae 99 |..@}..'...$\....| -00000130 0b cc 2a 4b 35 12 de 85 e9 b5 e2 2d 80 39 6d 17 |..*K5......-.9m.| -00000140 7a ca ef ca bb 58 1e 13 86 10 bc 4d 8a df 32 ba |z....X.....M..2.| -00000150 3b 7e f5 40 ec af 2e 63 be f3 38 02 a9 9d 30 1f |;~.@...c..8...0.| -00000160 c4 d2 04 93 df e1 8a bb 5d f0 6a a8 d9 b9 ad bf |........].j.....| -00000170 da d6 5e bd a1 a8 b8 20 91 26 ab 50 fd 2b bf e1 |..^.... .&.P.+..| -00000180 56 33 e3 e4 4f 3f 21 ea 86 10 e9 35 84 03 70 0b |V3..O?!....5..p.| -00000190 bd dc 44 fc 58 1d bc 9e 3a 0d 3b 61 13 d6 33 1b |..D.X...:.;a..3.| -000001a0 97 a8 67 bf e6 d9 1d 34 69 70 93 4a 6c 28 88 01 |..g....4ip.Jl(..| -000001b0 01 9d 78 59 c0 58 66 c3 70 e4 ba 74 e6 0f f7 27 |..xY.Xf.p..t...'| -000001c0 8b dd 05 ac 0d 99 dc e9 c8 2f 16 ee 59 53 91 d7 |........./..YS..| -000001d0 28 27 db ad 85 e6 d0 72 28 81 31 e1 e7 bf dd 95 |('.....r(.1.....| -000001e0 75 ff d6 a9 dc 4f 30 37 52 07 87 cb 8d a7 4a 00 |u....O07R.....J.| -000001f0 22 53 3c 6d 91 94 11 5d 0a a8 21 ea 1f 18 4e 42 |"S...A...| -00000390 37 c3 62 b5 30 89 4d b6 6c 5c f2 8c ff 3c 2e 48 |7.b.0.M.l\...<.H| -000003a0 bf 0f 5f 3e e0 b2 d7 64 2b dc 42 ad 2f 83 b5 6b |.._>...d+.B./..k| -000003b0 5a 04 51 f8 c4 07 c2 61 e4 16 03 03 00 4a a9 18 |Z.Q....a.....J..| -000003c0 58 79 d8 ad 86 d7 b6 77 39 76 99 b4 0a 29 72 b1 |Xy.....w9v...)r.| -000003d0 eb c3 ec 95 4d 30 4c 21 1a 7f 52 da 56 21 78 b7 |....M0L!..R.V!x.| -000003e0 fe dd d3 0e fc a9 89 40 99 97 12 68 7e 28 6e 32 |.......@...h~(n2| -000003f0 5b c0 e8 b4 42 eb ee 83 c2 ae 0d 28 99 48 46 a9 |[...B......(.HF.| -00000400 64 38 60 59 c2 dc 5c 7b 16 03 03 00 14 78 72 cf |d8`Y..\{.....xr.| -00000410 ac 5d 53 7e 73 b1 6e e2 0a 8e 12 33 be 03 86 6a |.]S~s.n....3...j| -00000420 ce |.| +00000000 16 03 03 00 85 60 c6 c2 9b 61 f1 1f 81 6f f1 0b |.....`...a...o..| +00000010 87 2d f2 93 a6 4e 7e 74 c2 61 cf 1d a1 00 32 8f |.-...N~t.a....2.| +00000020 f7 3d 93 da 91 cc 5b d5 21 c6 ba 4c 1b eb 81 a9 |.=....[.!..L....| +00000030 a1 2a fe 88 6d 3e 1d 1f 57 22 9c ff fe 6c 85 ca |.*..m>..W"...l..| +00000040 0b 13 f3 9f 63 55 b9 49 61 2b dd 5e 2b e1 fd ec |....cU.Ia+.^+...| +00000050 1d 0d 94 06 42 dc 2c 6f 88 22 cb 30 4f 66 6f 16 |....B.,o.".0Ofo.| +00000060 3a a0 c0 23 12 82 46 38 70 68 e5 12 b9 16 12 e7 |:..#..F8ph......| +00000070 38 6b 50 64 55 f0 47 a9 e0 cd 19 01 8e d5 12 96 |8kPdU.G.........| +00000080 09 db 5c 52 4b db 9b 26 43 37 16 03 03 02 69 41 |..\RK..&C7....iA| +00000090 52 a8 ca e5 8f e0 33 4b 52 93 74 ef bb 42 20 d1 |R.....3KR.t..B .| +000000a0 cc 24 79 ce df 51 90 e0 19 b1 11 fb e9 ef b5 e4 |.$y..Q..........| +000000b0 ae da 72 e1 35 a8 41 88 a8 4b 68 d2 50 58 ba ef |..r.5.A..Kh.PX..| +000000c0 b0 1e 20 26 a3 c2 86 a7 68 60 84 2d 23 14 38 21 |.. &....h`.-#.8!| +000000d0 12 60 05 2f 79 9e c0 08 4c 87 a7 41 b3 d3 84 9a |.`./y...L..A....| +000000e0 f1 45 bd 2d ff 7c b5 bd c4 3a b1 48 10 9a d8 cf |.E.-.|...:.H....| +000000f0 ce 58 47 75 e1 6d 01 b6 18 bd 78 6b 86 a1 f2 1b |.XGu.m....xk....| +00000100 c8 03 4d 0a ce ce d4 68 8f 9a 54 1e 83 83 89 2c |..M....h..T....,| +00000110 36 a2 3a b5 95 09 de c5 8e 8c d0 a4 95 59 7e d6 |6.:..........Y~.| +00000120 f8 5f 96 e9 c5 cb 9b 6c c0 b7 55 15 b3 b4 d0 ea |._.....l..U.....| +00000130 bf 11 1c 89 1a 5c f2 09 74 9a 43 73 4f 6f 00 33 |.....\..t.CsOo.3| +00000140 b9 e0 6a 99 b9 e0 02 86 dd cd 07 68 72 63 0d 8b |..j........hrc..| +00000150 e0 e8 12 68 4d f6 3b dc 0a 93 82 48 ce f7 96 ba |...hM.;....H....| +00000160 7f c5 90 07 45 66 3d 47 b8 8d 5f 0d 41 8d 88 76 |....Ef=G.._.A..v| +00000170 bf ce 9c 2a 2e 25 7c 47 f6 96 73 0b 43 42 73 2c |...*.%|G..s.CBs,| +00000180 d5 b3 bc 82 c5 19 2f 5d c4 69 21 7d c8 7b 1b b8 |....../].i!}.{..| +00000190 b6 d1 37 89 92 a6 b7 44 cd e6 23 1f a1 03 08 05 |..7....D..#.....| +000001a0 1e cf 54 78 e9 af 04 bc e3 94 aa 12 ce 67 62 ce |..Tx.........gb.| +000001b0 f4 2f ef f7 2b 8d 65 06 08 07 2f c6 fa b2 d2 c8 |./..+.e.../.....| +000001c0 f1 d7 c4 1f cc 8b 0e b8 f2 b2 1d fb 09 19 5a b0 |..............Z.| +000001d0 a3 23 6e 05 20 9a 28 39 16 05 0e c4 7d d0 59 f5 |.#n. .(9....}.Y.| +000001e0 9a de 88 da a2 c0 fb 7b 84 19 05 7d 80 6f 9a 03 |.......{...}.o..| +000001f0 0a f8 5f 97 a2 b4 c0 d9 6d 79 f5 c0 51 d3 63 d2 |.._.....my..Q.c.| +00000200 b8 ee a6 b0 76 59 7f 92 6d ad 3c bb 96 34 ac 0c |....vY..m.<..4..| +00000210 81 61 c5 07 7e 65 f1 c3 dd 3e 69 ad ee 7f 56 8d |.a..~e...>i...V.| +00000220 d7 92 48 5c 23 be 94 44 2e 8a 13 76 ce a3 cb d2 |..H\#..D...v....| +00000230 86 d5 eb 2c 48 55 fd 31 c1 94 08 55 69 8c 20 cd |...,HU.1...Ui. .| +00000240 65 fa 47 5e 8e 7f 04 a4 a0 54 c3 cf 4e b5 a0 61 |e.G^.....T..N..a| +00000250 3a 66 fd 21 5d 42 ab b3 46 d8 2a 64 69 1a d3 da |:f.!]B..F.*di...| +00000260 41 65 2c 36 50 f1 79 c3 83 01 d2 87 41 d9 10 1d |Ae,6P.y.....A...| +00000270 75 a2 74 de 48 e3 9c 9e c8 96 58 45 43 82 dd d6 |u.t.H.....XEC...| +00000280 e1 46 66 2f 13 e4 1d fe 81 8f ea 3d 6d 83 d7 97 |.Ff/.......=m...| +00000290 4d ed c6 67 0e 4b e5 a1 ca 2b 24 c5 b1 24 af df |M..g.K...+$..$..| +000002a0 7a 0e 44 b9 c1 5f 07 43 c1 6f 94 d3 22 fb 14 df |z.D.._.C.o.."...| +000002b0 a3 23 38 c9 91 ff 12 41 fa 47 f7 83 fb b6 ca ea |.#8....A.G......| +000002c0 19 01 22 8a ba d7 86 c5 d2 82 2f ac f5 4c a4 e9 |.."......./..L..| +000002d0 90 f5 52 c7 88 96 ae f3 0a 91 53 1c db bf 4b a9 |..R.......S...K.| +000002e0 42 43 0d 2d cc f2 6a 79 1e 9a 3a bd 55 da 5d 6c |BC.-..jy..:.U.]l| +000002f0 a3 84 79 76 7d 96 62 5e 16 03 03 00 bc 51 62 b9 |..yv}.b^.....Qb.| +00000300 26 c9 f7 dd 55 83 aa cd 90 5d e9 9a 29 92 8c 6f |&...U....]..)..o| +00000310 b1 df 4c b7 be 75 89 2b dc b1 ad ae 01 38 27 0f |..L..u.+.....8'.| +00000320 36 43 0b 04 69 6b a4 3a 52 b5 4f df 50 1d 04 ee |6C..ik.:R.O.P...| +00000330 4a f1 a0 6c 06 6f 24 2a f3 dc 7c a4 96 12 e2 83 |J..l.o$*..|.....| +00000340 9c d8 2d 63 2e 3b 1c 73 e6 32 ce 15 76 01 9a a9 |..-c.;.s.2..v...| +00000350 3b a7 dc aa 40 82 4d 5a 68 24 78 4e fe 64 db a4 |;...@.MZh$xN.d..| +00000360 ff 87 6d 90 bc d9 ec 0d ed 8b 54 12 bd 74 16 1d |..m.......T..t..| +00000370 2c 30 57 8f 67 56 7c 09 e6 b1 12 f8 4a 9f e3 79 |,0W.gV|.....J..y| +00000380 c1 8b fa 91 f7 1a 29 bd a3 1f 59 59 16 26 04 10 |......)...YY.&..| +00000390 e4 19 c9 91 a6 b3 c5 b5 df a3 b0 11 a5 87 29 4e |..............)N| +000003a0 5b 9f 96 cf 88 19 9e ae b4 e6 63 19 6d c5 ee 7a |[.........c.m..z| +000003b0 c9 38 2d 0a fd f6 3b f8 f5 16 03 03 00 4a f5 3f |.8-...;......J.?| +000003c0 ef a3 f8 86 1b f5 ce 8e 48 f2 d0 cb 75 d6 80 b2 |........H...u...| +000003d0 78 ef bc 77 a6 aa 91 cd 88 39 62 f8 42 78 7c f3 |x..w.....9b.Bx|.| +000003e0 8b c7 86 71 9c a5 9f 1c 5f 40 25 e9 c6 69 82 a1 |...q...._@%..i..| +000003f0 45 ee d1 9d f7 9c a0 b9 34 b8 82 72 f9 f8 1d fb |E.......4..r....| +00000400 a5 74 b5 a5 68 04 82 c4 16 03 03 00 14 07 9c 37 |.t..h..........7| +00000410 77 ad 83 27 66 2c 3a ba 26 22 2f 72 b4 d1 c8 c1 |w..'f,:.&"/r....| +00000420 06 |.| >>> Flow 9 (client to server) -00000000 16 03 03 02 69 33 a1 bb 7d ff 23 ba ad dc a0 1e |....i3..}.#.....| -00000010 3c 7c 1f 53 59 81 13 04 49 f7 6e bf 8f ef 11 92 |<|.SY...I.n.....| -00000020 51 bf 8a e7 fe ef 76 e4 f8 88 27 95 f4 12 f2 ed |Q.....v...'.....| -00000030 cc ec a6 2d 10 87 19 5e c9 fe cd 12 ae 1a 38 f9 |...-...^......8.| -00000040 78 f1 42 f8 47 26 1b c2 5f 82 a5 aa 65 17 eb 06 |x.B.G&.._...e...| -00000050 03 c8 22 9c 9f 8b 87 26 4a 64 18 93 9c f4 16 82 |.."....&Jd......| -00000060 28 eb 8d 2d f8 51 60 3a f4 bb a3 77 f5 97 2b 6a |(..-.Q`:...w..+j| -00000070 19 db 2e 46 8b d8 08 d8 28 88 bb bd d8 3b c2 bb |...F....(....;..| -00000080 8c 87 1b 17 a0 34 a8 c6 e8 a5 a0 e5 cb d6 9c 9d |.....4..........| -00000090 a6 a4 6c 06 6a 85 0c 5e ef 0c 97 6f b6 11 e7 4d |..l.j..^...o...M| -000000a0 60 91 95 74 48 af 1b 0b 47 03 ed 47 e9 b9 28 36 |`..tH...G..G..(6| -000000b0 74 0d 8a b8 1e 5d 1c cb ea 7b b7 8f 18 e3 b9 b9 |t....]...{......| -000000c0 43 ed 53 f2 bf 7e 8c 8f e6 c0 2a f4 31 25 f5 e8 |C.S..~....*.1%..| -000000d0 44 48 2d 36 4f a7 11 f6 ea 7c 3f d6 2d 5d 3e 39 |DH-6O....|?.-]>9| -000000e0 fb 50 f1 c9 eb 25 be 7a c5 af 54 f5 12 07 04 22 |.P...%.z..T...."| -000000f0 ec 68 45 f1 fd d1 91 0a cf 64 0f f3 58 4e e8 ce |.hE......d..XN..| -00000100 f6 9e c0 57 ea 3a bd a0 5d 26 d4 ab ed 1a 34 12 |...W.:..]&....4.| -00000110 9f fa ec 73 d6 38 06 78 85 3c f9 cd aa fb fd 32 |...s.8.x.<.....2| -00000120 cb e0 a7 d0 bb 71 b0 a3 d2 b9 89 5e a9 57 18 7e |.....q.....^.W.~| -00000130 c0 c9 2e e3 e5 07 65 6f 4c ad 22 78 50 f2 87 0f |......eoL."xP...| -00000140 cd 93 b3 19 a9 73 e2 1d bf 38 a0 20 8d 3a 3a 4e |.....s...8. .::N| -00000150 b3 02 b7 11 1f df 12 60 dd 10 1c f8 75 4a 52 86 |.......`....uJR.| -00000160 71 61 88 37 b3 bf f7 2d 45 6d 10 4a 9f 80 b3 fc |qa.7...-Em.J....| -00000170 36 d4 d3 9f 08 f2 bb ce 9c 3a 9a 59 f6 0a 0a aa |6........:.Y....| -00000180 7f 61 29 0b df 29 92 09 55 ec 1c 84 d6 1f 7c 68 |.a)..)..U.....|h| -00000190 72 00 88 5e e3 6a ee 35 45 7a 0b 49 35 0e 2d 7c |r..^.j.5Ez.I5.-|| -000001a0 ac 8b 9f 9c 94 48 2d 1e 74 24 68 14 8e 16 b4 06 |.....H-.t$h.....| -000001b0 24 66 a3 18 f4 ff 21 31 4b 9b bb 09 8a 9d 57 e4 |$f....!1K.....W.| -000001c0 a1 5c ae f1 e1 4b 5c 2a be 64 3c 7a 61 10 3d 73 |.\...K\*.d....^O| -000002f0 f7 4b 38 70 d0 82 42 f2 5a c9 34 d2 76 7b 8d e4 |.K8p..B.Z.4.v{..| -00000300 0b c7 3d be 86 7d 21 8c f8 9f 1a 4a dc 48 07 12 |..=..}!....J.H..| -00000310 ab 4c 98 f7 8b 3e 02 49 c2 d1 b5 e9 9a e0 5a 74 |.L...>.I......Zt| -00000320 58 ce a3 33 be 0f ca 12 54 a2 0e a9 e5 22 8f 82 |X..3....T...."..| -00000330 df 1a 3e 21 bf 66 c6 13 39 77 83 95 b1 4b 1d d3 |..>!.f..9w...K..| -00000340 32 69 24 c2 89 14 03 03 00 11 1c eb 63 31 c9 c9 |2i$.........c1..| -00000350 8a e3 8b 25 7e e9 b7 7d 19 03 3c 16 03 03 00 20 |...%~..}..<.... | -00000360 c6 41 57 04 ab e8 6c 55 0b dc cd 06 f5 b3 4b 95 |.AW...lU......K.| -00000370 40 b5 04 47 da 71 d7 70 ce d6 2e 0b c7 66 16 3c |@..G.q.p.....f.<| +00000000 16 03 03 02 69 70 78 66 7a 28 3b 50 a6 21 b2 cc |....ipxfz(;P.!..| +00000010 52 a6 74 f7 29 8a dc fd c0 1c 79 d0 20 23 d0 74 |R.t.).....y. #.t| +00000020 d3 16 a6 4c 6d df 6e 32 2e 69 46 dd 8d 22 9e 8e |...Lm.n2.iF.."..| +00000030 cb 75 44 75 7e 24 69 ed ce cf 5c 4b a9 a2 b5 d0 |.uDu~$i...\K....| +00000040 48 bf 08 d8 1d 16 d9 9f 6d b4 24 ee f1 f3 58 79 |H.......m.$...Xy| +00000050 4c 19 4c 99 7f 01 a8 80 b1 3c 4e 55 d1 64 75 89 |L.L......?.Pjad*Q...| +00000120 01 2e 5a 1c 8b 12 58 c5 32 e1 3f ea 0b ac 4c 3b |..Z...X.2.?...L;| +00000130 1d 97 11 e9 92 6d 52 f0 1e f7 5a f8 71 5f f5 a6 |.....mR...Z.q_..| +00000140 6b aa 30 4f 85 41 c6 49 83 37 3a 72 86 1a be 7a |k.0O.A.I.7:r...z| +00000150 1d bc d6 ad 67 6c 95 42 5d 74 10 8e ac 4b 8d b3 |....gl.B]t...K..| +00000160 6e 3d 9c 8f 08 71 be ce ce aa 64 26 62 2a 58 8c |n=...q....d&b*X.| +00000170 e4 7b 75 e9 61 90 38 b2 c2 a0 8d c7 a9 11 cf 5b |.{u.a.8........[| +00000180 30 a7 33 3b 2b c2 fd 2a 6b db 3d cf 35 6c 23 28 |0.3;+..*k.=.5l#(| +00000190 14 e4 7b 10 50 e8 00 9f af 60 69 cf a9 d9 93 f3 |..{.P....`i.....| +000001a0 8f 7d 39 49 97 5b 92 4a 35 2a 6c 68 3b 48 25 77 |.}9I.[.J5*lh;H%w| +000001b0 6e d0 57 76 c4 94 83 10 e3 3d 00 e8 b9 fe da d9 |n.Wv.....=......| +000001c0 a5 56 22 61 e0 f4 33 dd c8 dd 4d 2f 39 51 35 12 |.V"a..3...M/9Q5.| +000001d0 9a cb dd e1 03 d3 27 9f 41 71 83 5c c7 6c a3 38 |......'.Aq.\.l.8| +000001e0 9f db 39 1c 2a f6 4b e0 48 44 61 1b 34 3c bc ed |..9.*.K.HDa.4<..| +000001f0 7a 31 c9 9f 8e 82 2d fb b6 bd 6e 4c 57 76 23 f5 |z1....-...nLWv#.| +00000200 7d 68 ff 02 75 42 10 e7 2d 24 83 4a 04 7a 78 d7 |}h..uB..-$.J.zx.| +00000210 60 b2 70 07 3f e4 bc 54 42 65 22 c3 2e aa 35 85 |`.p.?..TBe"...5.| +00000220 df fa e5 c9 c9 f5 ee 6a 50 82 7a bf 92 96 78 5e |.......jP.z...x^| +00000230 a8 ac 2a d1 5e e2 f0 20 6b 51 97 3d 74 71 eb d8 |..*.^.. kQ.=tq..| +00000240 40 5f 06 72 b6 8c 1c 2a 71 dd 53 38 fb de b6 31 |@_.r...*q.S8...1| +00000250 53 8d 8f 4e 0f c1 a5 ea bf 27 fa ed ff 0c 56 34 |S..N.....'....V4| +00000260 55 88 e1 d2 65 a7 e5 10 02 4d ba 8e ad fa 16 03 |U...e....M......| +00000270 03 00 35 94 36 93 c6 5e c8 ec 8e 63 86 7b 13 d6 |..5.6..^...c.{..| +00000280 78 b2 5d 2f 54 55 5a 41 1c 65 5e b2 69 ab c2 bd |x.]/TUZA.e^.i...| +00000290 d9 a3 55 42 d1 96 29 51 c4 38 c4 ec 1f d4 19 6c |..UB..)Q.8.....l| +000002a0 2b 82 75 81 37 07 79 35 16 03 03 00 98 d9 a2 ba |+.u.7.y5........| +000002b0 86 ca f4 24 e1 e0 72 0e 21 81 f6 c5 d7 0a 1c 17 |...$..r.!.......| +000002c0 05 1f ce b8 4d d3 d8 e6 13 c8 a6 4d f3 da 0f 4d |....M......M...M| +000002d0 e3 21 29 84 78 90 fa 11 a5 06 19 3a cd ca f2 1f |.!).x......:....| +000002e0 a2 39 4d b3 03 8d 22 27 eb bc f4 8b b8 61 c0 f3 |.9M..."'.....a..| +000002f0 70 34 56 80 28 a2 85 1e 21 7c 11 b8 c6 0c 0d bd |p4V.(...!|......| +00000300 02 56 8a b5 d5 7b 22 97 3e 70 20 31 00 a0 16 2d |.V...{".>p 1...-| +00000310 87 b5 c7 b0 5e 40 2d 08 82 97 38 64 c4 14 e3 16 |....^@-...8d....| +00000320 0d 6f d1 b1 6b 5f 7c 14 18 66 67 aa 8a b6 6b 66 |.o..k_|..fg...kf| +00000330 7d e3 68 ca 97 13 ad ca 0a 46 06 6b 4a a9 c0 ee |}.h......F.kJ...| +00000340 8b 61 6d 2d cc 14 03 03 00 11 93 6d 0b 63 c5 e2 |.am-.......m.c..| +00000350 3f 0f da dd f4 7c ae 95 2a e8 65 16 03 03 00 20 |?....|..*.e.... | +00000360 62 97 ee b8 34 aa be 0a 2c 24 30 6c 89 f2 80 08 |b...4...,$0l....| +00000370 05 69 bb ad a8 5c 90 21 04 77 96 44 ae 5f d4 d5 |.i...\.!.w.D._..| >>> Flow 10 (server to client) -00000000 14 03 03 00 11 c0 4e fd fa 3a 1c 4a 19 ce 08 f6 |......N..:.J....| -00000010 da 70 56 fa 39 42 16 03 03 00 20 0c bc c4 5e 24 |.pV.9B.... ...^$| -00000020 e3 0e c9 23 8c cd f6 a2 45 07 e6 93 40 7c c8 02 |...#....E...@|..| -00000030 6e 24 f7 4e 06 9a ad ba de cd 10 17 03 03 00 19 |n$.N............| -00000040 52 e0 85 b3 46 25 7d fd 8f d0 4c ca df fe 2f a6 |R...F%}...L.../.| -00000050 14 d6 08 82 70 0f 93 78 bf 16 03 03 00 14 ff 68 |....p..x.......h| -00000060 f1 6d 8d b4 5f 74 19 6b e3 1e 6e ee 9d ee c2 34 |.m.._t.k..n....4| -00000070 0f 44 |.D| +00000000 14 03 03 00 11 03 06 35 7b 36 e4 b2 df 80 68 80 |.......5{6....h.| +00000010 df e3 d6 3c bb b7 16 03 03 00 20 08 9b ed a0 ae |...<...... .....| +00000020 e7 f9 42 9a f5 10 21 7a 38 dc a2 6d 27 a8 bc 00 |..B...!z8..m'...| +00000030 58 85 6a 85 04 b9 3b 3f ca 26 68 17 03 03 00 19 |X.j...;?.&h.....| +00000040 d5 24 ff 37 e7 a2 5d eb f2 45 ca 73 60 3b c3 8c |.$.7..]..E.s`;..| +00000050 87 10 d8 31 c3 a2 e5 3d 0f 16 03 03 00 14 31 8a |...1...=......1.| +00000060 c9 a6 3a 3e 36 e0 4f d6 f1 f5 67 70 34 8a ab dc |..:>6.O...gp4...| +00000070 82 e2 |..| >>> Flow 11 (client to server) -00000000 15 03 03 00 12 81 0d 63 a5 11 7a 03 ab 66 f6 c8 |.......c..z..f..| -00000010 15 f3 d9 23 fa 67 6b 15 03 03 00 12 71 0e 3b 52 |...#.gk.....q.;R| -00000020 1a 05 39 4c 8c 76 c3 a9 00 35 bd 66 80 a1 |..9L.v...5.f..| +00000000 15 03 03 00 12 be b2 bb cf 44 91 f3 b9 71 00 af |.........D...q..| +00000010 9e b6 f5 07 64 36 7b 15 03 03 00 12 ae b2 33 16 |....d6{.......3.| +00000020 de f1 45 31 a5 fd 07 97 6e 57 f8 22 cc b2 |..E1....nW."..| diff --git a/src/crypto/tls/testdata/Client-TLSv12-RenegotiationRejected b/src/crypto/tls/testdata/Client-TLSv12-RenegotiationRejected index 0be2e72bf3..c907c7cb2e 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-RenegotiationRejected +++ b/src/crypto/tls/testdata/Client-TLSv12-RenegotiationRejected @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 21 15 e1 02 00 |....]...Y..!....| -00000010 c6 0c e5 3f c9 6f a5 59 38 7e 13 81 1b 26 50 46 |...?.o.Y8~...&PF| -00000020 bf 2b 95 0c eb a8 bc 72 97 bc 26 20 ad 6b 84 ac |.+.....r..& .k..| -00000030 8f 62 26 0b 4b d8 bf 1b 7d a5 27 3b 3e 45 a5 8f |.b&.K...}.';>E..| -00000040 37 fb b2 25 2c d3 82 69 ed d7 c9 f0 cc a8 00 00 |7..%,..i........| +00000000 16 03 03 00 5d 02 00 00 59 03 03 ea a3 8e 85 79 |....]...Y......y| +00000010 9f 41 1f 7e 05 76 70 3d bd f4 bb f4 dd 49 a6 fd |.A.~.vp=.....I..| +00000020 11 83 a9 70 89 86 87 36 2f 09 b9 20 1a 00 de fc |...p...6/.. ....| +00000030 6b e5 93 4e da 98 0b e1 a8 93 8d fc 4b c3 48 6b |k..N........K.Hk| +00000040 15 6d de fd e3 0f 36 67 61 1c 91 8e cc a8 00 00 |.m....6ga.......| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 59 0b 00 02 55 00 02 52 00 02 |......Y...U..R..| 00000070 4f 30 82 02 4b 30 82 01 b4 a0 03 02 01 02 02 09 |O0..K0..........| @@ -61,36 +62,36 @@ 00000290 73 bb b3 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 |s..Cw.......@.a.| 000002a0 4c 72 2b 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 |Lr+...F..M...>..| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 b2 3a 28 |............ .:(| -000002d0 2e 2c 66 f1 9b 44 58 9a 92 03 42 81 f6 1c f4 67 |.,f..DX...B....g| -000002e0 50 b5 92 f3 06 1b 1b 23 93 99 12 c5 6b 08 04 00 |P......#....k...| -000002f0 80 44 05 ae 8d ed c6 82 3a 2a 19 05 9d 70 f9 ba |.D......:*...p..| -00000300 45 66 cb 45 75 9c da 92 cc bb 4a a5 ae 41 8c f8 |Ef.Eu.....J..A..| -00000310 9b e7 06 73 88 9f f9 7d 95 ce 74 a6 05 e9 38 a5 |...s...}..t...8.| -00000320 26 4b b2 26 31 5c e9 f9 a8 f8 6e 6b 05 e4 39 b5 |&K.&1\....nk..9.| -00000330 fe b1 b1 cd 40 23 e9 68 f3 9c ed 91 71 d3 0b c5 |....@#.h....q...| -00000340 91 c5 b2 91 69 a9 4b 2c a7 0c 24 d6 a9 e7 74 89 |....i.K,..$...t.| -00000350 9e ce 8b 00 72 9a c9 86 8b ca 8d 39 01 a0 71 3e |....r......9..q>| -00000360 46 ff a6 7d c6 da 0a af f2 84 c4 01 1c 94 47 22 |F..}..........G"| -00000370 71 16 03 03 00 04 0e 00 00 00 |q.........| +000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 6a e1 91 |............ j..| +000002d0 5d 5d fe 77 50 be a5 52 f1 12 43 30 34 aa 46 87 |]].wP..R..C04.F.| +000002e0 f9 6a 80 37 eb 46 fb 92 d6 ce 18 c4 0b 08 04 00 |.j.7.F..........| +000002f0 80 46 10 ab ff 45 fe c5 88 5a da d0 07 b5 a1 30 |.F...E...Z.....0| +00000300 03 d8 b0 5f 88 37 45 75 ef b7 96 5c c9 1f 47 14 |..._.7Eu...\..G.| +00000310 24 28 de cf 1f c9 c6 a4 0c 41 1b 51 70 7a e6 e8 |$(.......A.Qpz..| +00000320 88 1b 35 ce 63 e7 4f 2b 02 c9 35 0a 56 b2 2a 59 |..5.c.O+..5.V.*Y| +00000330 e9 02 53 11 82 f2 f6 18 06 3a 3e 2e 8e 21 78 9d |..S......:>..!x.| +00000340 41 43 e2 ed 49 ce 87 cd 93 b7 13 6c 35 6e 4e 95 |AC..I......l5nN.| +00000350 68 1b 4b 75 de fa ed 48 53 56 54 40 5f 3f 36 cb |h.Ku...HSVT@_?6.| +00000360 6b 57 de 3c fc 51 f4 fb 9d 8d 55 2e e9 ce fc 79 |kW.<.Q....U....y| +00000370 08 16 03 03 00 04 0e 00 00 00 |..........| >>> Flow 3 (client to server) 00000000 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 03 00 01 01 |....._X.;t......| -00000030 16 03 03 00 20 80 26 44 1c a7 83 b7 12 29 9a 44 |.... .&D.....).D| -00000040 7b c1 0b 96 53 c8 0e 9b dd 8d 29 4b 4b b8 75 d7 |{...S.....)KK.u.| -00000050 0a c7 86 c7 d9 |.....| +00000030 16 03 03 00 20 be b4 f9 49 91 3c c8 f8 7c da ef |.... ...I.<..|..| +00000040 06 bd d5 9e d3 b4 74 f6 22 2e b8 5c b6 e2 2d 01 |......t."..\..-.| +00000050 cb d5 3f 94 7f |..?..| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 20 2e d7 9e b0 66 |.......... ....f| -00000010 f1 39 84 a9 d9 93 17 bd 94 5a 31 49 bb eb f0 a0 |.9.......Z1I....| -00000020 7b af d0 3b ae 1a 5d f6 46 31 36 |{..;..].F16| +00000000 14 03 03 00 01 01 16 03 03 00 20 21 a2 e6 72 21 |.......... !..r!| +00000010 6d 45 36 87 6d 3f c9 70 89 1f b3 0a cc c2 5b 18 |mE6.m?.p......[.| +00000020 27 37 d8 1f 4e 55 f9 9d 07 96 2f |'7..NU..../| >>> Flow 5 (client to server) -00000000 17 03 03 00 16 cd 39 a7 64 3b 6a de 14 e0 26 ea |......9.d;j...&.| -00000010 66 b2 73 b1 8e b0 e3 a9 94 62 4f |f.s......bO| +00000000 17 03 03 00 16 81 33 71 a4 ec a6 67 b2 17 ba 80 |......3q...g....| +00000010 27 80 a1 62 fb 1e ab 3f cd b9 fe |'..b...?...| >>> Flow 6 (server to client) -00000000 16 03 03 00 14 c5 d7 88 58 81 44 1f 8d e4 c2 19 |........X.D.....| -00000010 15 3b 5c 43 76 82 fe 03 e1 |.;\Cv....| +00000000 16 03 03 00 14 b3 2b 93 6f bc d1 11 45 fa 9a d3 |......+.o...E...| +00000010 f3 82 75 6c ce 40 38 21 5e |..ul.@8!^| >>> Flow 7 (client to server) -00000000 15 03 03 00 12 d4 b1 0d fa 41 25 ab d4 e1 b7 74 |.........A%....t| -00000010 27 5c 8b c6 0d 49 8e 15 03 03 00 12 65 3d 4e 30 |'\...I......e=N0| -00000020 48 43 8f f6 8b 89 45 af f4 7a e4 eb ad a1 |HC....E..z....| +00000000 15 03 03 00 12 48 45 72 03 40 44 98 c6 db 40 d4 |.....HEr.@D...@.| +00000010 a6 9b 67 5d 8b c1 a9 15 03 03 00 12 21 d2 4b 7d |..g]........!.K}| +00000020 51 c7 3c 53 0b d9 67 90 aa e6 42 e2 8c 83 |Q.>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,21 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 01 ca 02 00 01 c6 03 03 da b0 57 a0 ee |.............W..| -00000010 bf 74 92 06 39 a6 9a 9b 80 71 7e 57 63 ab 31 74 |.t..9....q~Wc.1t| -00000020 d3 22 c1 e3 a6 c6 cf 6f 47 57 49 20 86 52 fb 0a |.".....oGWI .R..| -00000030 fd aa 10 47 00 9a 5d ad 4c d8 90 f1 cf 13 10 73 |...G..].L......s| -00000040 31 f1 df 22 f3 42 58 b0 10 25 43 eb cc a8 00 01 |1..".BX..%C.....| +00000000 16 03 03 01 ca 02 00 01 c6 03 03 28 44 55 f3 f5 |...........(DU..| +00000010 c1 63 ac 0b fd 1c 29 d3 90 a5 5c 96 2a d9 13 20 |.c....)...\.*.. | +00000020 fe 96 11 3f 30 0a e1 a9 8e d9 e6 20 ca 40 de 01 |...?0...... .@..| +00000030 4f 00 88 88 41 0f df af 85 0e 0e 22 9d a7 46 e8 |O...A......"..F.| +00000040 df 9c 8e 8c 47 5b 94 91 94 06 f4 14 cc a8 00 01 |....G[..........| 00000050 7e 00 12 01 69 01 67 00 75 00 a4 b9 09 90 b4 18 |~...i.g.u.......| 00000060 58 14 87 bb 13 a2 cc 67 70 0a 3c 35 98 04 f9 1b |X......gp.<5....| 00000070 df b8 e3 77 cd 0e c8 0d dc 10 00 00 01 47 97 99 |...w.........G..| @@ -84,31 +85,31 @@ 00000400 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 4c 72 2b |Cw.......@.a.Lr+| 00000410 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 bd 42 d4 |...F..M...>...B.| 00000420 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 16 03 03 |..=.`.\!.;......| -00000430 00 ac 0c 00 00 a8 03 00 1d 20 0e e6 72 88 cf d1 |......... ..r...| -00000440 05 c7 8d 03 64 b9 db d8 c3 5e 36 80 67 67 36 94 |....d....^6.gg6.| -00000450 5b b7 92 f9 77 1f 6f b2 44 7f 08 04 00 80 1d 3b |[...w.o.D......;| -00000460 70 d5 72 87 2f 58 20 da 29 e0 f8 e8 7c 8d e5 c7 |p.r./X .)...|...| -00000470 bf da 3c 10 f8 b0 3e 38 7b 06 0b 8e 8f d7 40 b6 |..<...>8{.....@.| -00000480 47 9f 1c 64 6e 80 ab 9d 51 92 8c 60 a2 88 c4 43 |G..dn...Q..`...C| -00000490 7d dc 29 64 45 83 a7 9c 2a 39 e9 bb 2a d9 f5 96 |}.)dE...*9..*...| -000004a0 4c fb fd 0d cc 0f 9b 48 f5 ee af 8f 7a 1c 39 3e |L......H....z.9>| -000004b0 cf 23 15 c6 ab c3 f2 29 fd 6c 4f 17 6b d4 be 1a |.#.....).lO.k...| -000004c0 23 6e 74 81 e5 e5 e8 c0 de 9b b0 ed d2 32 bc 2a |#nt..........2.*| -000004d0 b1 30 b2 eb ac 9e 23 f8 be ea 31 9a b4 55 16 03 |.0....#...1..U..| +00000430 00 ac 0c 00 00 a8 03 00 1d 20 26 24 4e d8 a6 cc |......... &$N...| +00000440 2f c9 0e 68 d8 20 e3 97 5b c1 08 72 1e 79 46 d9 |/..h. ..[..r.yF.| +00000450 a6 00 9c e9 f8 21 9b cd 29 17 08 04 00 80 aa 6d |.....!..)......m| +00000460 36 bb 06 e6 11 66 82 44 87 5d 81 53 e2 9a 95 11 |6....f.D.].S....| +00000470 54 a3 cc a7 c9 9c 19 f6 da 98 4f 91 a6 dd 9e 10 |T.........O.....| +00000480 14 83 04 55 2d 6c 9a af 26 7c 5d f0 aa ca 69 83 |...U-l..&|]...i.| +00000490 af fe a5 cb a4 1a d4 bd 86 91 52 11 03 4d 9a ca |..........R..M..| +000004a0 37 fd 01 48 e8 5d a8 ea ad a2 a5 08 cb ce 5f 52 |7..H.]........_R| +000004b0 92 30 83 de 77 2a 06 c2 f2 53 4d 47 40 b9 2f 61 |.0..w*...SMG@./a| +000004c0 9c 41 c4 05 45 42 5e 42 d5 5e 30 95 30 4e a1 77 |.A..EB^B.^0.0N.w| +000004d0 79 b5 50 5c df d6 e7 74 42 d8 2b 66 02 fa 16 03 |y.P\...tB.+f....| 000004e0 03 00 04 0e 00 00 00 |.......| >>> Flow 3 (client to server) 00000000 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 03 00 01 01 |....._X.;t......| -00000030 16 03 03 00 20 a1 58 d5 1a a3 9f 85 4e b6 c8 b7 |.... .X.....N...| -00000040 cb c1 b0 cc 0a 80 59 1d 81 41 cc 4d 0b d3 bd 38 |......Y..A.M...8| -00000050 48 69 01 23 96 |Hi.#.| +00000030 16 03 03 00 20 93 c8 47 ed fd 9b 41 69 97 58 97 |.... ..G...Ai.X.| +00000040 cc 31 9c 93 a6 77 41 36 7a 90 f0 73 13 4a 7d 85 |.1...wA6z..s.J}.| +00000050 12 20 7d 91 fa |. }..| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 20 83 ae fc 0d dd |.......... .....| -00000010 a1 3a 55 b0 2e 5e 21 9c 57 f3 1b 94 80 6c 0e bb |.:U..^!.W....l..| -00000020 78 ae f4 6c 20 d5 7e 23 11 1e 7d |x..l .~#..}| +00000000 14 03 03 00 01 01 16 03 03 00 20 16 00 35 d2 e0 |.......... ..5..| +00000010 ad f5 4c 10 98 fb 4f c7 81 1f 05 4b d6 7d 9c ac |..L...O....K.}..| +00000020 50 94 84 c8 35 80 ec 54 fc f3 ee |P...5..T...| >>> Flow 5 (client to server) -00000000 17 03 03 00 16 d3 16 a3 f0 93 49 44 d4 82 60 35 |..........ID..`5| -00000010 e3 63 08 c0 4e 66 99 37 31 90 6c 15 03 03 00 12 |.c..Nf.71.l.....| -00000020 3c ea 2c 19 34 7b cc 6c 7a a9 15 31 6f 9c 3b b0 |<.,.4{.lz..1o.;.| -00000030 b2 1f |..| +00000000 17 03 03 00 16 83 e6 0f 3a ad c2 28 6c 82 ee 4a |........:..(l..J| +00000010 38 47 cc 86 75 70 e2 94 77 e6 6e 15 03 03 00 12 |8G..up..w.n.....| +00000020 13 c0 a0 4f 02 5e 6f 33 f6 ae d3 52 7d 72 72 a0 |...O.^o3...R}rr.| +00000030 1e 8d |..| diff --git a/src/crypto/tls/testdata/Client-TLSv12-X25519-ECDHE b/src/crypto/tls/testdata/Client-TLSv12-X25519-ECDHE index c851eb1a1f..6f59dc6636 100644 --- a/src/crypto/tls/testdata/Client-TLSv12-X25519-ECDHE +++ b/src/crypto/tls/testdata/Client-TLSv12-X25519-ECDHE @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 f8 01 00 00 f4 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 12 01 00 01 0e 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,20 +7,22 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 79 00 0b 00 02 01 00 ff 01 00 01 00 00 |...y............| +00000080 01 00 00 93 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| -000000a0 00 0a 00 04 00 02 00 1d 00 0d 00 1a 00 18 08 04 |................| +000000a0 00 0a 00 04 00 02 00 1d 00 0d 00 16 00 14 08 04 |................| 000000b0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| -000000c0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| -000000d0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| -000000e0 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| -000000f0 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| +000000c0 06 03 00 32 00 1a 00 18 08 04 04 03 08 07 08 05 |...2............| +000000d0 08 06 04 01 05 01 06 01 05 03 06 03 02 01 02 03 |................| +000000e0 00 2b 00 09 08 03 04 03 03 03 02 03 01 00 33 00 |.+............3.| +000000f0 26 00 24 00 1d 00 20 2f e5 7d a3 47 cd 62 43 15 |&.$... /.}.G.bC.| +00000100 28 da ac 5f bb 29 07 30 ff f6 84 af c4 cf c2 ed |(.._.).0........| +00000110 90 99 5f 58 cb 3b 74 |.._X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 5d 02 00 00 59 03 03 e0 da ea 5e 09 |....]...Y.....^.| -00000010 bb 30 4c 10 db 85 36 44 38 9e a4 83 74 5f 2f 94 |.0L...6D8...t_/.| -00000020 a1 b4 45 61 73 2f 88 b3 ac ad e4 20 45 55 20 90 |..Eas/..... EU .| -00000030 b0 b0 d4 70 e6 10 13 5c f4 49 0e 9c 2a 52 5c 84 |...p...\.I..*R\.| -00000040 b2 55 1a ea e3 4b 5a 9f ac e9 7b 37 c0 2f 00 00 |.U...KZ...{7./..| +00000000 16 03 03 00 5d 02 00 00 59 03 03 64 5a cc e0 63 |....]...Y..dZ..c| +00000010 02 82 64 75 5e 2c b3 5f 23 c6 98 c8 95 07 40 00 |..du^,._#.....@.| +00000020 3e ef fd f6 00 af 81 0c 3a 47 a0 20 a1 fc 21 83 |>.......:G. ..!.| +00000030 cf 2b 34 5e b7 7b bd ec bb 8f 26 6a f2 26 7f 8f |.+4^.{....&j.&..| +00000040 51 13 6f ba 0d 1a f5 b7 1c 9d 6d 91 c0 2f 00 00 |Q.o.......m../..| 00000050 11 ff 01 00 01 00 00 0b 00 04 03 00 01 02 00 17 |................| 00000060 00 00 16 03 03 02 59 0b 00 02 55 00 02 52 00 02 |......Y...U..R..| 00000070 4f 30 82 02 4b 30 82 01 b4 a0 03 02 01 02 02 09 |O0..K0..........| @@ -60,33 +62,33 @@ 00000290 73 bb b3 43 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 |s..Cw.......@.a.| 000002a0 4c 72 2b 9d ae db 46 06 06 4d f4 c1 b3 3e c0 d1 |Lr+...F..M...>..| 000002b0 bd 42 d4 db fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 |.B...=.`.\!.;...| -000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 ca 07 6e |............ ..n| -000002d0 67 12 8e f7 b4 55 c0 d4 88 73 35 f0 f1 ae c4 34 |g....U...s5....4| -000002e0 59 dc 05 df 75 96 54 f1 4f 7f 79 93 25 08 04 00 |Y...u.T.O.y.%...| -000002f0 80 d2 1d 65 15 23 74 e4 57 80 58 62 b5 6d ab 06 |...e.#t.W.Xb.m..| -00000300 11 4c e0 a0 7b 7e b5 78 87 47 71 30 c3 d8 86 b2 |.L..{~.x.Gq0....| -00000310 af 34 24 95 9c 2f 74 bb 6e c8 2a 8e 81 f8 fb d7 |.4$../t.n.*.....| -00000320 06 06 dc e8 95 01 65 fe 5d cb 9e 7f 36 9b 29 40 |......e.]...6.)@| -00000330 09 81 1b df 24 66 13 94 51 2a 48 31 e3 cb 3a 06 |....$f..Q*H1..:.| -00000340 c9 9c f4 36 b8 c0 de c1 3e 5e 79 95 f8 11 4b d8 |...6....>^y...K.| -00000350 0a b1 6c ef f4 ce 89 ba df ad 24 3d 7c 48 aa 70 |..l.......$=|H.p| -00000360 d8 0e 52 a8 12 1c 6b eb 5b c9 c3 a3 fa f0 60 d4 |..R...k.[.....`.| -00000370 54 16 03 03 00 04 0e 00 00 00 |T.........| +000002c0 16 03 03 00 ac 0c 00 00 a8 03 00 1d 20 15 d1 98 |............ ...| +000002d0 53 f4 98 b6 58 a5 cd 89 bb 32 21 83 4a e5 ad ba |S...X....2!.J...| +000002e0 1f ba db d0 4c c5 a3 89 0e 96 9f 59 60 08 04 00 |....L......Y`...| +000002f0 80 4e 14 a0 a7 33 e8 47 d5 7d 01 26 19 ff 1d 3c |.N...3.G.}.&...<| +00000300 2a f9 77 58 84 c0 07 b7 dc cc 82 85 a6 18 e9 33 |*.wX...........3| +00000310 70 15 04 75 bb 59 59 9c fa c0 cd b4 b7 f8 a3 0e |p..u.YY.........| +00000320 21 cd ac 7d 18 d2 34 e5 a9 c7 a1 5d 86 f3 74 2b |!..}..4....]..t+| +00000330 9b b0 21 5f cb 91 7f a0 d8 78 f0 7c 56 e3 69 ec |..!_.....x.|V.i.| +00000340 43 55 80 3f 02 d7 e0 10 52 15 4d 1b bc 2c 7f b7 |CU.?....R.M..,..| +00000350 86 cd 07 5d b9 f1 21 7e 18 da fc f8 45 45 cf 39 |...]..!~....EE.9| +00000360 62 3e c8 f1 6c 75 f4 fb fe f8 23 89 6a 0d b5 2e |b>..lu....#.j...| +00000370 4d 16 03 03 00 04 0e 00 00 00 |M.........| >>> Flow 3 (client to server) 00000000 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 47 cd |....%...! /.}.G.| 00000010 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 |bC.(.._.).0.....| 00000020 cf c2 ed 90 99 5f 58 cb 3b 74 14 03 03 00 01 01 |....._X.;t......| -00000030 16 03 03 00 28 00 00 00 00 00 00 00 00 21 27 7f |....(........!'.| -00000040 32 c6 19 c4 a9 13 bf 5e 4b 53 5f c3 47 64 bb f8 |2......^KS_.Gd..| -00000050 21 d5 10 12 12 60 5e d8 e8 cf 1e fe 18 |!....`^......| +00000030 16 03 03 00 28 00 00 00 00 00 00 00 00 e3 a2 01 |....(...........| +00000040 72 d5 55 57 f7 1a da 10 9a 04 7d 33 f4 18 b1 9a |r.UW......}3....| +00000050 09 38 45 dd 74 13 21 70 52 9c cc c2 3f |.8E.t.!pR...?| >>> Flow 4 (server to client) -00000000 14 03 03 00 01 01 16 03 03 00 28 af e6 ee d0 75 |..........(....u| -00000010 df 97 22 b0 ff 46 8e 51 bb 23 70 8d 4a 22 01 b6 |.."..F.Q.#p.J"..| -00000020 13 34 68 fd 69 fe 0a 0f df 0e e6 41 48 49 8c e7 |.4h.i......AHI..| -00000030 d3 21 13 |.!.| +00000000 14 03 03 00 01 01 16 03 03 00 28 86 a1 0b 2b ef |..........(...+.| +00000010 13 8d 20 82 ad 17 92 64 0b 44 21 0f f0 dd 20 43 |.. ....d.D!... C| +00000020 4c db 92 3c 25 3a 12 ca 27 56 86 16 ca 9f ba 46 |L..<%:..'V.....F| +00000030 dc 96 86 |...| >>> Flow 5 (client to server) -00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 10 16 77 |...............w| -00000010 99 da 71 ef 78 16 d7 cd 2c 7b 71 ba 8a 74 c1 65 |..q.x...,{q..t.e| -00000020 f2 f6 be 15 03 03 00 1a 00 00 00 00 00 00 00 02 |................| -00000030 72 d4 4a f6 6d 63 4c ad 02 46 36 18 61 47 61 7d |r.J.mcL..F6.aGa}| -00000040 50 08 |P.| +00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 20 7c 62 |............. |b| +00000010 05 52 7a 91 a7 13 96 96 29 11 1b 1a fe fa ad 7f |.Rz.....).......| +00000020 d2 3a 26 15 03 03 00 1a 00 00 00 00 00 00 00 02 |.:&.............| +00000030 c7 2b 60 1b 9c 6b cb 22 08 f1 e3 c0 44 ab 70 21 |.+`..k."....D.p!| +00000040 68 48 |hH| diff --git a/src/crypto/tls/testdata/Client-TLSv13-AES128-SHA256 b/src/crypto/tls/testdata/Client-TLSv13-AES128-SHA256 index 6c7c3d4711..3673b8da39 100644 --- a/src/crypto/tls/testdata/Client-TLSv13-AES128-SHA256 +++ b/src/crypto/tls/testdata/Client-TLSv13-AES128-SHA256 @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,85 +7,86 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 7a 02 00 00 76 03 03 63 fa e1 78 d5 |....z...v..c..x.| -00000010 53 77 64 44 97 45 79 94 e7 79 dd da 70 81 46 66 |SwdD.Ey..y..p.Ff| -00000020 ac 7c 77 a2 f9 29 ca 48 e6 53 56 20 00 00 00 00 |.|w..).H.SV ....| +00000000 16 03 03 00 7a 02 00 00 76 03 03 07 aa 6b aa b6 |....z...v....k..| +00000010 ef a5 5c 62 d7 05 bb f8 9d ea 03 34 13 bf 00 1f |..\b.......4....| +00000020 e6 95 7b ef a5 2b ad e8 20 2f 21 20 00 00 00 00 |..{..+.. /! ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 13 01 00 00 |................| -00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 36 |..+.....3.$... 6| -00000060 e2 c3 a0 14 f4 9c 50 9c 08 03 5e c2 b8 4b 66 85 |......P...^..Kf.| -00000070 71 fb bb 20 6e 97 3a f6 74 be 02 31 29 8e 18 14 |q.. n.:.t..1)...| -00000080 03 03 00 01 01 17 03 03 00 17 00 79 2a 2d 44 f4 |...........y*-D.| -00000090 12 2d 7c d6 8c 7a 27 76 a5 3a 6b c1 2d 40 8f 20 |.-|..z'v.:k.-@. | -000000a0 8b 17 03 03 02 6d 6e 16 f8 0f d2 67 3b e8 1a 95 |.....mn....g;...| -000000b0 2a ce 16 7b 95 21 7e 03 65 bf 01 ce e9 43 83 f6 |*..{.!~.e....C..| -000000c0 0e a9 d2 f2 d1 a3 2f d4 55 d2 27 83 44 3d f9 72 |....../.U.'.D=.r| -000000d0 00 8d 41 44 eb 93 ca 68 09 d1 bd f3 1a cc a0 53 |..AD...h.......S| -000000e0 a7 18 6e b7 27 d0 f5 e1 08 d8 9f 7b 37 bc 8f b9 |..n.'......{7...| -000000f0 84 6d e0 20 cf 99 bf c1 67 c8 00 74 4c 76 3e 2d |.m. ....g..tLv>-| -00000100 63 48 11 f1 75 30 ab a5 5b a2 cb 13 e9 e0 65 36 |cH..u0..[.....e6| -00000110 86 ce 8b 64 f6 dc e1 b7 0d 16 96 d1 ec 4b 93 d5 |...d.........K..| -00000120 6c 10 0d b7 d8 a2 45 b2 f0 e0 aa ab ab 11 8d d0 |l.....E.........| -00000130 2c fc 20 35 99 1b d6 3b 72 6d 88 03 80 5c 59 d4 |,. 5...;rm...\Y.| -00000140 04 18 ee 7a ed fe fb 52 c1 3c 93 95 e2 00 23 0d |...z...R.<....#.| -00000150 cc c1 4e 0a fb 55 33 93 9f c8 31 33 29 f5 12 3e |..N..U3...13)..>| -00000160 39 62 62 27 05 cf d2 be bd 7d 42 51 97 4f 71 95 |9bb'.....}BQ.Oq.| -00000170 10 f8 eb 0f d8 d1 69 aa 22 13 a8 fe 24 f6 87 a1 |......i."...$...| -00000180 9d ca cb 8f 99 39 2b fb 99 d9 18 8a fa fa 25 20 |.....9+.......% | -00000190 df 6a b3 d1 ac ce 56 8b 76 5d a9 46 1c 0b c7 57 |.j....V.v].F...W| -000001a0 90 02 10 55 85 49 48 89 d8 d6 4b 68 29 cb 28 66 |...U.IH...Kh).(f| -000001b0 1c d1 97 e6 a0 10 90 63 83 96 33 ee 5a 5a 5b 66 |.......c..3.ZZ[f| -000001c0 ca b3 0d be 6d 70 c5 de fd 78 c8 f8 e1 c5 78 ef |....mp...x....x.| -000001d0 07 2e 60 06 28 86 ed e6 bd 7b 37 33 0e 06 5e 06 |..`.(....{73..^.| -000001e0 fb 44 2b 96 16 fe 09 30 dc 03 53 bc c9 f9 6f 1e |.D+....0..S...o.| -000001f0 4b 79 a9 ac fe 20 3f 12 58 48 0c 40 a5 2f f2 6a |Ky... ?.XH.@./.j| -00000200 ea 44 69 93 54 4f 4d 6c 98 85 b1 c5 6f 50 83 b8 |.Di.TOMl....oP..| -00000210 8a 20 e3 b9 da b7 7d e4 ec 33 28 96 29 d7 dc a3 |. ....}..3(.)...| -00000220 d0 54 76 cd a6 99 17 e8 0f 14 d2 7c 4b 68 0a 80 |.Tv........|Kh..| -00000230 4f 0b 2b b5 16 68 dc 25 42 b5 0b f7 13 6a c5 81 |O.+..h.%B....j..| -00000240 c0 18 bc fb 40 86 cc 99 2e 70 2b 9a 72 eb be 57 |....@....p+.r..W| -00000250 a0 43 92 83 3b 7e c8 02 43 ab 17 7a 73 87 1a a2 |.C..;~..C..zs...| -00000260 1c 01 db b4 31 b1 d9 44 f1 c0 d9 de 27 bd 4c 8b |....1..D....'.L.| -00000270 1c f5 3d db d6 aa 98 7d 43 fe dd 64 85 8b c1 88 |..=....}C..d....| -00000280 a9 1e f1 04 0b 5d 3b c2 fd 3f b2 27 a7 28 d1 82 |.....];..?.'.(..| -00000290 13 fb 85 46 77 78 50 45 1b 4b c0 75 f2 32 8a 6d |...FwxPE.K.u.2.m| -000002a0 52 37 2e b1 80 e9 81 3b 60 c8 88 78 11 3f 0f 96 |R7.....;`..x.?..| -000002b0 d1 4b 19 49 91 b5 70 44 2d 62 a1 04 8f 98 89 ab |.K.I..pD-b......| -000002c0 75 1f 8a 97 d5 28 dc 88 20 92 7f f2 90 16 1b de |u....(.. .......| -000002d0 54 7c 5f 05 8f c9 70 a1 f5 8c 99 09 43 ab 09 73 |T|_...p.....C..s| -000002e0 dd 5e 62 c3 9f c8 e1 fa 9e 98 65 18 b5 5e 4e f9 |.^b.......e..^N.| -000002f0 85 a4 cc dc b8 12 1b eb 0a bc bc bd 1c 2f 51 0e |............./Q.| -00000300 8f 55 f1 10 22 06 ca cb f2 97 54 63 1c 98 36 9f |.U..".....Tc..6.| -00000310 1d 66 b0 17 03 03 00 99 f0 14 4d 69 84 b3 ca d4 |.f........Mi....| -00000320 96 9c e2 3c a4 55 f4 b6 01 1f 1e 1f 77 98 c4 84 |...<.U......w...| -00000330 5e ce 4c 0b bf ba 39 6b 36 a6 15 9c d1 90 87 d1 |^.L...9k6.......| -00000340 13 39 1c dd 86 0f a0 06 f7 fc f7 c9 10 4e 46 0a |.9...........NF.| -00000350 03 12 a0 bf 3e f3 7d e6 1b b7 ce ec 16 84 52 8e |....>.}.......R.| -00000360 bc 9c 9a 4f 2f a7 d9 aa f3 d6 be 0a f8 39 2d 18 |...O/........9-.| -00000370 28 9e 35 6e 25 25 46 9b 49 61 a6 ee 6a 87 d2 5f |(.5n%%F.Ia..j.._| -00000380 54 e6 fb 96 a3 e9 8a 05 c2 fb 71 0b d7 13 2e 19 |T.........q.....| -00000390 e5 5c a2 d0 f4 b3 34 95 e1 1d 24 ef 33 a2 0a d5 |.\....4...$.3...| -000003a0 65 b2 5f 46 73 45 33 69 d6 c3 f6 49 20 e2 00 bd |e._FsE3i...I ...| -000003b0 16 17 03 03 00 35 89 2f 34 08 44 35 6a 52 1a fd |.....5./4.D5jR..| -000003c0 e4 be 2b 0e 0a dd 2d c1 e7 e3 20 7a 0a 3e 87 1d |..+...-... z.>..| -000003d0 2b 64 87 c5 11 54 46 1a 5c 89 e2 97 3f 83 b2 b4 |+d...TF.\...?...| -000003e0 04 ed d2 c4 1d 3d 37 1f e1 62 f2 |.....=7..b.| +00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 53 |..+.....3.$... S| +00000060 3c 5e 7d 61 39 39 6c f7 ea 14 d3 f0 40 23 30 8b |<^}a99l.....@#0.| +00000070 7e 1f 41 86 f8 2e 12 0a f5 67 13 28 46 6f 14 14 |~.A......g.(Fo..| +00000080 03 03 00 01 01 17 03 03 00 17 a8 64 4a 9d f1 a0 |...........dJ...| +00000090 3c 1b e3 20 a2 66 80 7f 13 b5 a9 f0 8f ee 5b 4b |<.. .f........[K| +000000a0 af 17 03 03 02 6d 26 d2 8f df b4 d5 d3 9a c8 92 |.....m&.........| +000000b0 4c 32 63 80 6b 5f 99 11 0f 4b be 14 77 55 86 d1 |L2c.k_...K..wU..| +000000c0 27 94 18 50 27 1c 84 9c 38 03 fb 11 d3 5a ea 64 |'..P'...8....Z.d| +000000d0 d1 15 47 1d fc cc 6e bf 5e 4d 45 74 f2 ca 44 77 |..G...n.^MEt..Dw| +000000e0 32 6d 02 3a 9f 44 aa 5c 5d 62 64 ee 44 0d 45 05 |2m.:.D.\]bd.D.E.| +000000f0 de 40 d0 83 c9 b3 21 39 a0 8f 5b 5a e1 96 2f 0b |.@....!9..[Z../.| +00000100 4b 12 da a7 dc 7b 2a 73 14 7f cc 93 fd a8 47 1c |K....{*s......G.| +00000110 f7 88 76 5d 30 29 af 65 ac 52 25 04 13 be 96 92 |..v]0).e.R%.....| +00000120 bb e4 86 a0 b7 c8 67 63 ef cb 1f 78 7e bf 3c 5f |......gc...x~.<_| +00000130 7a a6 89 4a 94 f3 2e 01 8b b9 81 21 57 00 5e 26 |z..J.......!W.^&| +00000140 22 9b eb e0 73 87 cd 77 46 d4 c8 1d 0a 4f d8 83 |"...s..wF....O..| +00000150 0b 0a 43 3f 37 53 e2 0a 4b bb ef e8 8d 2a dc 51 |..C?7S..K....*.Q| +00000160 b0 b9 90 7e 1a c5 31 e0 1b 0f 0c 7e 96 7b aa 49 |...~..1....~.{.I| +00000170 ad 84 b0 0a 75 d6 37 58 bd 7f f6 ac 50 c5 d7 93 |....u.7X....P...| +00000180 70 ce b1 cd 00 7c 79 1a e5 ec 04 7b 12 8f fb 80 |p....|y....{....| +00000190 54 d0 2b a0 9e 83 0d 05 a7 f5 4b e8 b4 36 1c d0 |T.+.......K..6..| +000001a0 88 34 a6 71 51 d6 cf 59 c9 ad 03 d8 38 f2 15 f0 |.4.qQ..Y....8...| +000001b0 63 9d 34 a3 f4 bc de 8f ae 26 97 c0 98 8e 59 4e |c.4......&....YN| +000001c0 1f 74 a1 d4 2c 1a 18 20 ef e8 06 58 74 dd ed 40 |.t..,.. ...Xt..@| +000001d0 50 dd 8b a4 77 15 1b 9e 63 7e c7 11 63 1a a9 d5 |P...w...c~..c...| +000001e0 16 c2 8f f5 6c ce cd 03 e6 2d cc da 75 1a ce cb |....l....-..u...| +000001f0 ea 41 de dd 59 e5 68 90 98 69 76 a3 d0 d4 ed d1 |.A..Y.h..iv.....| +00000200 e9 9a cd b8 29 73 eb 9c e6 6f ee 8d 91 84 9e 2e |....)s...o......| +00000210 b9 23 2b 04 a0 f6 5f 0b 16 07 49 ae 6f 33 b0 ee |.#+..._...I.o3..| +00000220 be ff 75 52 da 7b 06 05 6c 8f 87 1f 48 2f fb 59 |..uR.{..l...H/.Y| +00000230 79 a6 99 cb a6 0b 73 fb 4c d0 cc eb ba 51 1a 6d |y.....s.L....Q.m| +00000240 9a 33 27 e3 f4 cf 16 bc c0 82 da 21 04 4a 7b e0 |.3'........!.J{.| +00000250 12 a5 5e de 22 d2 df b4 c4 c9 fa 11 97 7b 07 ea |..^."........{..| +00000260 11 c8 2c 55 b8 6d c2 64 6d fa e0 6f b8 5c 50 ae |..,U.m.dm..o.\P.| +00000270 a6 2e aa bf 2f 2a 74 2d 1c 11 c2 44 d7 28 b8 5e |..../*t-...D.(.^| +00000280 6a 2d bc 0d 2e a7 a2 b6 b6 ae 12 2c a2 c4 ba 5c |j-.........,...\| +00000290 0b 3f 17 2e 98 30 ce 6c 8e 88 3c f9 a8 e1 68 8d |.?...0.l..<...h.| +000002a0 52 c8 a1 b3 3f 12 e1 35 f0 eb ee 9f 0d bb 3c 90 |R...?..5......<.| +000002b0 2c e2 2c 95 2e f3 e2 f6 f2 f1 be b8 03 02 84 69 |,.,............i| +000002c0 56 8f 3b 1d 68 77 f1 52 eb 48 4f e8 c8 5b 0a df |V.;.hw.R.HO..[..| +000002d0 a1 74 1e e1 47 a2 9a 9a 83 6d c2 ea f3 1b fc 8f |.t..G....m......| +000002e0 b6 aa 18 7e 85 46 ff 33 0b 6e 1f 5b f1 70 c0 45 |...~.F.3.n.[.p.E| +000002f0 f6 bb a0 da 74 e0 9a 3c a7 e2 07 ef 0b e5 9a 5b |....t..<.......[| +00000300 6e 9b aa 6c a4 97 84 5d 77 f5 33 b8 e3 45 c0 00 |n..l...]w.3..E..| +00000310 21 c7 91 17 03 03 00 99 ee bf d2 9c 82 9f 68 b4 |!.............h.| +00000320 5e 15 09 1a 7a c1 f9 72 ff ca 0e d9 f1 9f 7f 8c |^...z..r........| +00000330 dc 4a 8d d3 37 7b 81 42 ef 9b 2b 5f 9a 4b 40 8e |.J..7{.B..+_.K@.| +00000340 6b 24 53 79 32 b0 d1 24 2a 6f c9 fb a8 82 c1 01 |k$Sy2..$*o......| +00000350 1e 0b 11 7f 85 c7 ee d4 29 12 08 99 8f 00 ef af |........).......| +00000360 2c 5d c5 b1 25 a3 a9 f0 f1 a3 2b f8 7f e6 31 1b |,]..%.....+...1.| +00000370 51 20 af 3f a7 4e 5c 3d 73 21 04 0f 2c 5c cd f3 |Q .?.N\=s!..,\..| +00000380 eb d1 01 ef b0 e3 64 f7 33 d3 05 82 9f a6 71 3b |......d.3.....q;| +00000390 b2 ab 08 61 57 ad 74 d1 e2 8f 2c c9 73 c3 e0 ac |...aW.t...,.s...| +000003a0 ed 18 4b 70 0d 9a bf ae b4 db 07 7d 25 3e 7f 3d |..Kp.......}%>.=| +000003b0 14 17 03 03 00 35 db be d2 61 e1 3f a3 0b fe 39 |.....5...a.?...9| +000003c0 b2 86 42 72 a6 ee 02 90 c2 d1 d1 5c 3d 61 c8 28 |..Br.......\=a.(| +000003d0 28 7c 01 40 26 f1 e1 f1 81 50 03 4c 6c 32 6d 8b |(|.@&....P.Ll2m.| +000003e0 dd 60 cf fc a9 3c fe e1 4d d0 d2 |.`...<..M..| >>> Flow 3 (client to server) -00000000 14 03 03 00 01 01 17 03 03 00 35 07 8e f6 0b 41 |..........5....A| -00000010 be 74 45 99 5e 35 59 4f 2e 59 d4 37 77 ca 53 d4 |.tE.^5YO.Y.7w.S.| -00000020 fd 33 bf dc 65 85 ee ad c5 d6 94 7e 6e e8 02 cf |.3..e......~n...| -00000030 15 d2 04 cb e1 9f 5e 94 dd 5f 37 17 95 17 0c b7 |......^.._7.....| -00000040 17 03 03 00 17 1f aa e9 7d 34 dc 12 da 3b cb dd |........}4...;..| -00000050 1c d3 b0 f1 79 ad cc 66 06 64 69 21 17 03 03 00 |....y..f.di!....| -00000060 13 b7 c7 a2 01 48 27 3a 44 e6 c6 47 a9 19 5f d2 |.....H':D..G.._.| -00000070 f8 96 98 70 |...p| +00000000 14 03 03 00 01 01 17 03 03 00 35 bd 1e ca 07 84 |..........5.....| +00000010 c8 ba 87 6d d3 ed 53 20 79 76 34 af 30 e6 bf c5 |...m..S yv4.0...| +00000020 74 a0 d0 b3 13 17 a9 3c c7 b3 47 5b e7 b4 6d 18 |t......<..G[..m.| +00000030 e5 3f 12 5c ca c9 26 87 c4 96 c4 9b 45 23 7f f7 |.?.\..&.....E#..| +00000040 17 03 03 00 17 28 0b 72 a0 6e ac 55 ec c0 b7 21 |.....(.r.n.U...!| +00000050 3f 7a 16 98 40 76 7d 3c 95 24 98 3b 17 03 03 00 |?z..@v}<.$.;....| +00000060 13 8e 23 e0 33 31 dc 39 fb 54 a6 a2 63 36 e4 2a |..#.31.9.T..c6.*| +00000070 5a 1c bc 09 |Z...| diff --git a/src/crypto/tls/testdata/Client-TLSv13-AES256-SHA384 b/src/crypto/tls/testdata/Client-TLSv13-AES256-SHA384 index c5bac350a6..5fcaba0d4f 100644 --- a/src/crypto/tls/testdata/Client-TLSv13-AES256-SHA384 +++ b/src/crypto/tls/testdata/Client-TLSv13-AES256-SHA384 @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,87 +7,88 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 7a 02 00 00 76 03 03 3d 39 60 81 a4 |....z...v..=9`..| -00000010 cc 92 5d fd 8b 21 58 da 2e 4c e2 70 2b 12 d2 8c |..]..!X..L.p+...| -00000020 35 55 bc ba 79 c1 9e 6f 78 8c cf 20 00 00 00 00 |5U..y..ox.. ....| +00000000 16 03 03 00 7a 02 00 00 76 03 03 76 2d 81 0b a9 |....z...v..v-...| +00000010 70 b7 fe 52 ef d3 80 c4 1d bf f7 19 99 3c 4c aa |p..R.........4.3I8..| -000002a0 d1 04 b4 13 a8 5f 0b f2 41 77 d4 c8 b2 d3 0e d6 |....._..Aw......| -000002b0 8c dc 34 ad 2a d9 4b 5f 4a e2 17 0a be 2a 55 4a |..4.*.K_J....*UJ| -000002c0 44 a7 b0 0f d1 39 b0 e5 9d 77 6b d7 44 15 99 bf |D....9...wk.D...| -000002d0 c8 02 57 90 5b 73 29 fe ab 85 93 c3 dc 1c b0 b2 |..W.[s).........| -000002e0 14 78 01 99 f5 d2 db ef ae 0e 2a d9 17 1e 70 fa |.x........*...p.| -000002f0 bb 74 fe 93 a0 aa ff 79 cd 8b 6d 3d 79 66 d2 c8 |.t.....y..m=yf..| -00000300 90 c7 2c e6 54 26 de f7 4d b8 a7 73 cd 92 fc 42 |..,.T&..M..s...B| -00000310 ad 4e ff 17 03 03 00 99 c6 07 36 ce 58 9c fe 38 |.N........6.X..8| -00000320 aa b4 5c c8 8e f5 11 19 82 4c 4b 2b 0a 08 be 3f |..\......LK+...?| -00000330 11 76 06 4b d3 1b b7 fc 66 d9 db de fb 6a ee 29 |.v.K....f....j.)| -00000340 f6 a5 4b 96 f3 3c a0 67 44 73 d4 46 c5 d4 a1 f8 |..K..<.gDs.F....| -00000350 71 36 7c a5 62 79 fc be f9 34 55 85 31 8f fc e3 |q6|.by...4U.1...| -00000360 46 be 64 1e 2d 1b 21 c3 89 8e 1c cc df 30 05 57 |F.d.-.!......0.W| -00000370 2e d5 d5 67 11 10 46 1a af 99 01 0e fd 40 53 1f |...g..F......@S.| -00000380 b0 f0 76 3e 8e c1 7a 6a fe fe ef c1 08 6e ea 9b |..v>..zj.....n..| -00000390 75 6c 62 86 07 50 ee 1f ef 3b 55 fd 68 44 47 27 |ulb..P...;U.hDG'| -000003a0 07 c1 53 b5 13 c5 e0 a4 d6 9e 8a 3c 78 a0 04 b7 |..S............|.I+NU.t..| +00000130 23 32 9d aa b1 17 15 3d 37 85 42 0e 5f 7c fa 5b |#2.....=7.B._|.[| +00000140 b8 ae f3 b9 4d b2 40 b5 e2 de e2 b3 f0 27 a6 f2 |....M.@......'..| +00000150 0c 28 4b 77 ee 38 dc ec 17 28 18 03 13 85 60 2c |.(Kw.8...(....`,| +00000160 ab 16 e1 1c c6 e1 91 e0 5f f3 b6 f7 1c 3b 5f 03 |........_....;_.| +00000170 6a d5 b0 a0 5b ab 6d 9c b2 ee 8e 50 49 94 7d db |j...[.m....PI.}.| +00000180 3b fe 68 e2 79 3e 2d 33 06 a6 b2 9c 8b 7d 93 04 |;.h.y>-3.....}..| +00000190 b4 9e 07 6d 15 80 63 38 8e 4b c5 e6 88 a0 6a f2 |...m..c8.K....j.| +000001a0 11 60 11 7a f7 6e 7e 47 9f fd 77 12 c9 d5 8e 58 |.`.z.n~G..w....X| +000001b0 84 51 2c f6 fd 2b d1 dc a6 51 d8 20 3f 06 76 ad |.Q,..+...Q. ?.v.| +000001c0 dd 37 b6 e9 86 4e cb 31 76 79 60 26 c7 b4 d5 67 |.7...N.1vy`&...g| +000001d0 2c 70 22 f4 4d b5 60 61 41 48 65 a8 d0 b5 d8 47 |,p".M.`aAHe....G| +000001e0 08 bf 5b 67 e8 99 c4 a5 91 1e 36 6b 37 53 7b 65 |..[g......6k7S{e| +000001f0 ac af 2d df 8e 77 e2 46 1a 65 45 0a 00 f2 8f 9d |..-..w.F.eE.....| +00000200 47 1c 93 64 52 c3 d9 91 47 41 88 7f 81 ea 8f 2b |G..dR...GA.....+| +00000210 a9 fa 4b d5 9d 6f 30 36 dc af e0 96 b3 f0 e4 6a |..K..o06.......j| +00000220 a3 10 cf 0e 53 64 e3 18 52 08 a9 16 e3 6d e9 0a |....Sd..R....m..| +00000230 ec 4d a4 f7 f1 ee 38 28 88 31 aa 38 a7 14 09 f4 |.M....8(.1.8....| +00000240 1a 31 ac 40 46 dd f2 4f 7f ff f4 fc 71 42 61 73 |.1.@F..O....qBas| +00000250 03 47 9f ec 69 7f 77 e3 91 29 cd 89 7f 45 6b 9d |.G..i.w..)...Ek.| +00000260 f5 33 66 8b 74 bc 53 ff 54 c3 af 48 8e d8 25 0a |.3f.t.S.T..H..%.| +00000270 99 49 08 29 f3 b2 a5 d0 5b ca 89 e2 d7 f5 5f 40 |.I.)....[....._@| +00000280 72 6f b4 d6 20 39 79 4a 0e 7c 00 60 68 eb 1e ab |ro.. 9yJ.|.`h...| +00000290 ee 38 35 f2 db 83 9c 0b 52 80 15 14 ae 6b dc f5 |.85.....R....k..| +000002a0 d5 f3 83 cb e7 5f 5c 98 e2 f2 d0 52 68 92 ff f6 |....._\....Rh...| +000002b0 7a ce ff ae 96 6e ad 11 d2 5e bc 60 16 55 cd 81 |z....n...^.`.U..| +000002c0 25 67 5b db 76 59 36 a8 48 d6 91 86 4f cb 87 5f |%g[.vY6.H...O.._| +000002d0 ea 96 e4 71 df ac 54 5a a0 e1 0a bd 88 68 ff 0a |...q..TZ.....h..| +000002e0 97 be 9b da cf aa e1 b1 74 c9 8d 5f 19 f5 df 53 |........t.._...S| +000002f0 a0 57 93 7d c3 fe 37 78 2a ba 6b c2 a1 51 41 f4 |.W.}..7x*.k..QA.| +00000300 ee 57 ed d2 7d 48 14 31 4a f7 14 d4 0e 42 9e fb |.W..}H.1J....B..| +00000310 fb f4 cd 17 03 03 00 99 6b 70 ae fc d3 07 5e 7f |........kp....^.| +00000320 39 2a 27 34 54 8a b6 4d 39 36 d4 38 0c ed 8c 24 |9*'4T..M96.8...$| +00000330 fc 29 1d 59 74 99 f1 e1 a1 23 4b 6d 27 31 f4 2d |.).Yt....#Km'1.-| +00000340 8b b3 23 aa 92 5f 01 3d a1 f6 b5 24 8e 56 ea eb |..#.._.=...$.V..| +00000350 4e 0a dc 23 ae 32 1b 0d cb bc 60 87 b7 35 32 5f |N..#.2....`..52_| +00000360 10 32 fb 89 32 3f 99 0e 30 0d 65 28 69 c4 3b f8 |.2..2?..0.e(i.;.| +00000370 6c 04 a5 bf ec e9 aa c4 bc b4 55 e2 d0 09 a1 4b |l.........U....K| +00000380 82 f8 a5 37 ab ca 69 f4 bc 24 69 c4 ce 07 6c ee |...7..i..$i...l.| +00000390 d6 08 92 14 41 ca 8f c8 c9 37 ae b5 f3 29 ff 69 |....A....7...).i| +000003a0 7a 18 4e 93 dd eb 52 58 d2 6b 22 6d b6 29 70 b3 |z.N...RX.k"m.)p.| +000003b0 ea 17 03 03 00 45 10 35 86 2e d4 e3 92 35 a3 0e |.....E.5.....5..| +000003c0 a1 cd 79 11 05 cd 77 c4 93 f4 6a ba f8 fc 4b bd |..y...w...j...K.| +000003d0 63 5d c0 2d a0 c9 c2 2a 10 79 e9 0c bc 0b 18 c1 |c].-...*.y......| +000003e0 15 18 c0 8a d7 05 39 f1 de 6e 8e cb dd 73 5f ee |......9..n...s_.| +000003f0 28 93 f9 92 35 56 1f c1 e4 8d 89 |(...5V.....| >>> Flow 3 (client to server) -00000000 14 03 03 00 01 01 17 03 03 00 45 ee 00 18 db 1e |..........E.....| -00000010 67 aa 0f 9e 5c 20 7d 25 27 49 e8 d5 60 02 78 7b |g...\ }%'I..`.x{| -00000020 23 58 70 67 67 93 ca 4d 50 69 b1 cf d9 dc 31 d3 |#Xpgg..MPi....1.| -00000030 03 36 b0 07 39 59 52 e1 c7 36 6d 16 0b 56 03 c6 |.6..9YR..6m..V..| -00000040 a0 ec 0e 6b ed de 7b ba 51 96 83 b6 b8 77 8f 6a |...k..{.Q....w.j| -00000050 17 03 03 00 17 77 f6 6f 83 00 ad eb be 16 26 3d |.....w.o......&=| -00000060 27 e8 58 73 a2 bc 11 ff 14 54 4a 15 17 03 03 00 |'.Xs.....TJ.....| -00000070 13 bc 94 3f 6e ee 1b 40 b0 2e 03 13 47 28 38 4d |...?n..@....G(8M| -00000080 2d 26 5d 15 |-&].| +00000000 14 03 03 00 01 01 17 03 03 00 45 2f 08 54 f6 2b |..........E/.T.+| +00000010 fd 13 5d 87 d3 b6 73 5e 20 88 af 53 db 7e 3c 37 |..]...s^ ..S.~<7| +00000020 1d 52 a4 ae 91 3f 24 a7 30 26 02 da 13 f3 c5 60 |.R...?$.0&.....`| +00000030 28 e6 eb 8f e1 1b 58 2d bb d0 06 c4 67 33 1c a1 |(.....X-....g3..| +00000040 03 cb 16 56 1b 91 06 08 b6 34 c5 de 97 04 ee f0 |...V.....4......| +00000050 17 03 03 00 17 6c 7e 3d 5d 98 4e 42 81 42 c5 2c |.....l~=].NB.B.,| +00000060 b2 c2 d3 c9 58 bc 13 bc 61 cd 63 f2 17 03 03 00 |....X...a.c.....| +00000070 13 83 c7 4a b6 10 69 b4 16 be 25 a1 db cb c9 94 |...J..i...%.....| +00000080 8f a2 27 22 |..'"| diff --git a/src/crypto/tls/testdata/Client-TLSv13-ALPN b/src/crypto/tls/testdata/Client-TLSv13-ALPN index f40340ac15..ff0989c567 100644 --- a/src/crypto/tls/testdata/Client-TLSv13-ALPN +++ b/src/crypto/tls/testdata/Client-TLSv13-ALPN @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 01 12 01 00 01 0e 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 2c 01 00 01 28 03 03 00 00 00 00 00 |....,...(.......| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,87 +7,89 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 93 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 ad 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 10 00 10 |................| -000000d0 00 0e 06 70 72 6f 74 6f 32 06 70 72 6f 74 6f 31 |...proto2.proto1| -000000e0 00 2b 00 09 08 03 04 03 03 03 02 03 01 00 33 00 |.+............3.| -000000f0 26 00 24 00 1d 00 20 2f e5 7d a3 47 cd 62 43 15 |&.$... /.}.G.bC.| -00000100 28 da ac 5f bb 29 07 30 ff f6 84 af c4 cf c2 ed |(.._.).0........| -00000110 90 99 5f 58 cb 3b 74 |.._X.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 10 00 10 00 0e 06 70 72 6f |.............pro| +000000f0 74 6f 32 06 70 72 6f 74 6f 31 00 2b 00 09 08 03 |to2.proto1.+....| +00000100 04 03 03 03 02 03 01 00 33 00 26 00 24 00 1d 00 |........3.&.$...| +00000110 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f bb 29 | /.}.G.bC.(.._.)| +00000120 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 cb 3b |.0.........._X.;| +00000130 74 |t| >>> Flow 2 (server to client) -00000000 16 03 03 00 7a 02 00 00 76 03 03 c2 2e 95 0c cf |....z...v.......| -00000010 63 40 d8 a0 bd 51 27 e2 62 79 72 26 b1 d4 38 5b |c@...Q'.byr&..8[| -00000020 50 03 66 d2 2e 8e 46 b7 cf 40 0a 20 00 00 00 00 |P.f...F..@. ....| +00000000 16 03 03 00 7a 02 00 00 76 03 03 bb 72 d9 b8 e5 |....z...v...r...| +00000010 0b 80 14 4c 16 9b 86 ec 26 62 f2 f9 00 85 a6 ae |...L....&b......| +00000020 44 f4 27 c4 13 67 4a 2e 96 e6 33 20 00 00 00 00 |D.'..gJ...3 ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 13 03 00 00 |................| -00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 21 |..+.....3.$... !| -00000060 18 6f 64 73 17 22 b0 11 60 92 ab 01 b3 fb 8a 2d |.ods."..`......-| -00000070 27 15 5a 46 ec 6c c3 0c a7 73 00 b2 7e 9f 4f 14 |'.ZF.l...s..~.O.| -00000080 03 03 00 01 01 17 03 03 00 24 68 7f 90 b2 66 74 |.........$h...ft| -00000090 36 f5 fc 65 55 19 c1 78 65 d8 dc 46 fb ad b6 2c |6..eU..xe..F...,| -000000a0 89 f3 d1 fd 3e 46 c2 50 01 24 72 2a 64 98 17 03 |....>F.P.$r*d...| -000000b0 03 02 6d 40 bc da 1a 9c 8b d7 15 24 4f d4 c1 9c |..m@.......$O...| -000000c0 8b 3c 8b 51 37 41 46 a8 cb b4 9c 50 c0 be 72 ef |.<.Q7AF....P..r.| -000000d0 81 d3 7f ed ec 96 e2 c2 08 0e 7e 23 95 c3 4f 79 |..........~#..Oy| -000000e0 01 2d 26 81 c1 ba d0 58 61 d8 c5 b7 e7 79 4f 3e |.-&....Xa....yO>| -000000f0 d8 c1 07 ae de 6a 1e 78 eb 9d 8c a1 2a 57 9c 56 |.....j.x....*W.V| -00000100 1f 6c 6e bb 2d 70 6d 55 92 10 3f 39 7e 8a d2 30 |.ln.-pmU..?9~..0| -00000110 e5 1c 4b df c0 96 d0 de 16 09 c6 34 23 16 54 a8 |..K........4#.T.| -00000120 f5 0a 1a af 9a 27 60 89 19 6a 3e 69 12 de 76 4c |.....'`..j>i..vL| -00000130 88 f2 ca 6c 0b 94 b8 d2 bc 09 f0 d3 86 74 3c 3f |...l.........tq..| -00000290 5c 9a b7 6b f2 d0 1e 55 2c 1c ac 5d 21 64 a2 d2 |\..k...U,..]!d..| -000002a0 a9 dd a8 49 7c 22 26 8e ca 75 a3 ef 52 42 d0 38 |...I|"&..u..RB.8| -000002b0 f4 02 60 af ee 33 30 46 90 a5 b3 7a 66 c8 ab 10 |..`..30F...zf...| -000002c0 3f 76 d1 76 aa 5d da c4 29 ca d7 22 c4 44 b4 e8 |?v.v.]..)..".D..| -000002d0 64 b6 6d 0f 16 cd d9 e9 62 17 91 64 03 0f 99 8f |d.m.....b..d....| -000002e0 c6 97 c8 4b c9 45 c4 31 e4 1f a8 b0 aa 67 02 e7 |...K.E.1.....g..| -000002f0 20 68 2a 89 f9 b8 e8 ce 93 d0 a3 1b 0d d1 4c 45 | h*...........LE| -00000300 c2 19 ac aa 87 43 95 ae c4 56 56 fe 4b 0e af db |.....C...VV.K...| -00000310 08 6a 14 8e 8b 7e 64 9d 6d 6e 0f 78 7c e4 f8 51 |.j...~d.mn.x|..Q| -00000320 17 03 03 00 99 2d 7b fa e6 dc da 89 93 da 93 91 |.....-{.........| -00000330 9c 25 08 50 66 eb a7 e4 f1 20 da 33 e5 cd a5 89 |.%.Pf.... .3....| -00000340 00 a7 47 9c 84 e6 cf 6d e1 86 02 af fb 54 ff b3 |..G....m.....T..| -00000350 b5 a4 e1 46 1a 3a 89 ad f0 c4 63 fe d2 eb bb 6c |...F.:....c....l| -00000360 6e cc a9 95 b0 e4 df f8 44 46 16 43 07 d7 8e 6e |n.......DF.C...n| -00000370 9b ee 0b 22 7a 23 f4 b8 3e fd fe 99 13 9d 18 bc |..."z#..>.......| -00000380 77 99 2f 90 21 a1 5f cc 9f 08 e2 75 44 2f bf 58 |w./.!._....uD/.X| -00000390 70 f2 95 b2 13 20 f3 ed 51 de e8 02 c6 ca 44 57 |p.... ..Q.....DW| -000003a0 eb 0b 9f 3e 61 f1 1a 6e 6b 13 f5 14 f3 43 19 f6 |...>a..nk....C..| -000003b0 7d 46 3a 73 49 2f fd 83 c3 68 c7 ba b4 e8 17 03 |}F:sI/...h......| -000003c0 03 00 35 67 2b 2b 9b f0 f3 d9 09 c4 01 20 ea 22 |..5g++....... ."| -000003d0 c9 7c e6 7a ce 3f 7f 84 c2 1f 6e eb d6 ce 85 b8 |.|.z.?....n.....| -000003e0 2c 3c 9f 77 8b 37 11 dd 64 d1 ae ba 85 50 7e ba |,<.w.7..d....P~.| -000003f0 14 a9 05 ff 82 3b e5 7d |.....;.}| +00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 69 |..+.....3.$... i| +00000060 d7 31 51 9b e6 1d 98 09 9f 5f 6c 05 10 ba 64 b5 |.1Q......_l...d.| +00000070 b9 8f b8 c0 2a c1 7f 89 13 ed 04 38 e9 78 43 14 |....*......8.xC.| +00000080 03 03 00 01 01 17 03 03 00 24 99 f3 d5 db e2 35 |.........$.....5| +00000090 4b fb b2 05 e6 03 c2 f2 c4 ea 64 d2 e4 d3 17 e7 |K.........d.....| +000000a0 72 34 e8 b2 d6 61 91 3b b3 03 ea 1c 33 57 17 03 |r4...a.;....3W..| +000000b0 03 02 6d 22 da 71 90 42 da 0a 03 52 98 42 e3 71 |..m".q.B...R.B.q| +000000c0 db 57 e0 9d 70 89 4b 4c a9 a5 4d 39 02 19 f1 09 |.W..p.KL..M9....| +000000d0 5a 9c 33 c9 f2 8d 7e 78 c3 b3 ae 1b 2c 7b 73 ef |Z.3...~x....,{s.| +000000e0 3a ad d8 51 82 90 bc 6b 0d 6f a6 f0 46 8d 72 29 |:..Q...k.o..F.r)| +000000f0 ca 84 d8 b1 27 e3 8d 8f f5 ce f0 f0 d9 2f 9c 71 |....'......../.q| +00000100 b9 bc 89 af 92 18 d2 c9 07 b2 eb 94 40 42 d2 7a |............@B.z| +00000110 c8 be 49 35 b6 b7 f3 b9 64 c1 56 fe fc d8 11 04 |..I5....d.V.....| +00000120 6c d7 e9 18 98 29 eb d5 6f 59 0d fa 25 85 f7 3c |l....)..oY..%..<| +00000130 df 76 d9 52 10 72 59 d6 36 5b b0 54 01 1d ac 9e |.v.R.rY.6[.T....| +00000140 9b 86 5f 5b ee 18 74 ec 8e 8b da 0f df 71 50 e2 |.._[..t......qP.| +00000150 cd 58 98 23 a0 21 94 ac eb db 3a fe f6 8d aa cc |.X.#.!....:.....| +00000160 21 23 e6 35 f7 0e 42 0e 50 48 14 22 f3 83 91 3d |!#.5..B.PH."...=| +00000170 73 22 5b 74 e7 e8 d1 b5 ee cd 7e c3 ee 0d 13 a9 |s"[t......~.....| +00000180 aa ae 0b 12 b0 3a 9d 6f 01 68 27 e4 62 e0 0e 67 |.....:.o.h'.b..g| +00000190 e4 de 69 74 8d f1 7a 3b 16 bb 1d a0 ad bf c5 4b |..it..z;.......K| +000001a0 50 9e b0 dc 08 73 14 99 c9 ad de 04 df 75 09 de |P....s.......u..| +000001b0 e4 27 ec 2b 75 79 db 82 8c aa 42 af 40 df 32 0e |.'.+uy....B.@.2.| +000001c0 e6 1d 93 d1 00 f7 18 59 43 9c 03 6c f7 bf ac a2 |.......YC..l....| +000001d0 8b 10 be b1 a8 b6 4e 84 2b c0 ff 87 4d 26 c2 8f |......N.+...M&..| +000001e0 63 64 7a 66 a6 12 0b e4 06 9e ff af fe 03 55 c7 |cdzf..........U.| +000001f0 13 92 22 ec ed 89 76 2d 36 8a 4a 92 f1 a5 b6 ac |.."...v-6.J.....| +00000200 d4 19 46 9d f3 e0 52 6d 01 ee bf ab d5 17 c0 33 |..F...Rm.......3| +00000210 b5 81 e1 81 a2 e9 44 b7 20 0e f4 f0 35 bb d4 8d |......D. ...5...| +00000220 bc 83 fc 59 fb 1d 5e e0 c4 4c 9e cc c3 72 b7 3d |...Y..^..L...r.=| +00000230 01 a4 f2 df e2 a7 44 d1 f1 20 90 31 53 09 50 eb |......D.. .1S.P.| +00000240 80 85 23 52 68 7d b2 51 60 0c 00 87 c3 42 88 07 |..#Rh}.Q`....B..| +00000250 de 59 fd 3d 68 a3 22 50 cb 67 43 94 02 77 24 6a |.Y.=h."P.gC..w$j| +00000260 8d a4 4f 85 7f 19 a0 b5 10 76 2a 85 4c 84 12 e3 |..O......v*.L...| +00000270 f7 ce b8 30 9f d0 9f 8a 26 42 28 f4 cb f7 c4 c2 |...0....&B(.....| +00000280 aa 34 c2 72 64 dc 6d 9d d4 26 2f 14 4d 97 2c 00 |.4.rd.m..&/.M.,.| +00000290 2d 46 0f 07 9c 3d 76 d4 55 a7 15 13 b2 41 e3 f4 |-F...=v.U....A..| +000002a0 33 ae 1b 26 68 43 62 de c1 c2 61 26 08 1b 20 13 |3..&hCb...a&.. .| +000002b0 bc 58 72 c2 16 fe 4d 2e 68 8b 31 61 ac c9 55 c5 |.Xr...M.h.1a..U.| +000002c0 3c 5a 77 c2 61 47 4a d6 0d c4 8a bc bb 63 ca ea |0....8bA.L94..| +000003e0 ee 48 70 3c 23 65 90 cb f9 4f 76 72 dd f3 64 83 |.Hp<#e...Ovr..d.| +000003f0 23 38 79 13 d2 93 57 fb |#8y...W.| >>> Flow 3 (client to server) -00000000 14 03 03 00 01 01 17 03 03 00 35 39 60 84 ac d0 |..........59`...| -00000010 b9 47 4b 47 49 af 52 88 3c 12 50 0d 65 46 f7 a1 |.GKGI.R.<.P.eF..| -00000020 50 39 c5 39 22 b3 45 e6 d3 25 44 a6 bc 3d bc 69 |P9.9".E..%D..=.i| -00000030 35 1d 61 cf a0 3c 53 77 94 67 66 ae 37 7f 3f 84 |5.a..>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,85 +7,86 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 7a 02 00 00 76 03 03 3d 50 78 7e 02 |....z...v..=Px~.| -00000010 dc 79 3a 32 6b 6a 50 24 90 65 72 5e cd fc 96 18 |.y:2kjP$.er^....| -00000020 e1 47 21 43 50 5a 32 0f cf e7 ae 20 00 00 00 00 |.G!CPZ2.... ....| +00000000 16 03 03 00 7a 02 00 00 76 03 03 f9 23 d9 5d 6c |....z...v...#.]l| +00000010 ae 6b 63 2a d8 2c a0 27 8e 7b 39 29 35 04 0e a9 |.kc*.,.'.{9)5...| +00000020 31 f7 a0 c5 77 a7 f3 c5 25 ca 2f 20 00 00 00 00 |1...w...%./ ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 13 03 00 00 |................| -00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 cd |..+.....3.$... .| -00000060 e6 a0 65 6b 1c 9e 5c f0 b7 f9 82 8e 37 d1 c4 35 |..ek..\.....7..5| -00000070 31 c1 3f df 4a 70 33 ba 38 d9 3f 74 0c c2 61 14 |1.?.Jp3.8.?t..a.| -00000080 03 03 00 01 01 17 03 03 00 17 63 c3 02 95 17 f4 |..........c.....| -00000090 a8 76 8d 54 ad 3c 10 c7 cc e8 08 13 d6 9b 0b 0f |.v.T.<..........| -000000a0 db 17 03 03 02 6d 0f ec 8d 0d e5 1a 85 02 3f 92 |.....m........?.| -000000b0 44 09 ac e6 da 2d c8 d7 14 68 00 9d 22 bf 05 1d |D....-...h.."...| -000000c0 cd 07 b5 8b b9 84 3f cf cc c5 48 40 00 2e e1 c9 |......?...H@....| -000000d0 0b 41 6d 39 cb 05 00 d6 7a 10 4a ba 96 e1 96 a9 |.Am9....z.J.....| -000000e0 70 d8 20 76 2f d2 70 83 cb a0 d1 72 43 db 09 cd |p. v/.p....rC...| -000000f0 2d e5 89 11 e8 81 15 13 dd 29 2a c8 88 4a d8 73 |-........)*..J.s| -00000100 35 3d 8e 8a 03 ca ed 32 a9 16 bb 71 88 d5 5f a1 |5=.....2...q.._.| -00000110 1b ec ee 9e 3d 8c f4 d0 c2 5b 72 84 3c 75 aa de |....=....[r......).@..| -00000130 3c f4 32 90 c0 25 b7 f0 fc 6b 16 c1 ab 80 69 79 |<.2..%...k....iy| -00000140 5e dd 95 5a ba e4 5a 68 64 a6 44 f5 a2 3a d6 30 |^..Z..Zhd.D..:.0| -00000150 7e b1 27 b1 79 44 ef 79 95 51 75 02 24 2c ea ab |~.'.yD.y.Qu.$,..| -00000160 d5 e1 fd aa 81 55 89 cf bc 9c 11 2b 0b 4a 99 9f |.....U.....+.J..| -00000170 50 93 68 a1 c8 79 3d d8 aa d8 54 e3 d5 1a 97 90 |P.h..y=...T.....| -00000180 33 87 a9 70 1d 9d ba 78 d0 87 8a 98 6f 1b 1e b0 |3..p...x....o...| -00000190 e8 92 78 df 21 61 88 36 fa 14 4b c9 b1 a4 93 88 |..x.!a.6..K.....| -000001a0 b4 26 9a 13 1b 8f 6c 84 bc b1 78 a8 a1 e7 64 4b |.&....l...x...dK| -000001b0 d4 56 37 b6 d1 80 6d 8d 0f c2 2f 0c 0b 9e 42 8e |.V7...m.../...B.| -000001c0 37 e0 9b 73 e4 ab cf 24 43 86 bc d0 40 fd db 4a |7..s...$C...@..J| -000001d0 c1 f6 55 56 e9 54 5c c7 3c 17 36 44 7b 99 7e 03 |..UV.T\.<.6D{.~.| -000001e0 48 f7 a9 cc 4d b9 b4 bf 09 dd 96 37 8c b5 d5 f0 |H...M......7....| -000001f0 bd af 19 0e 82 6c 5d b6 96 ca 98 a2 56 d3 68 f2 |.....l].....V.h.| -00000200 94 cd 7a 94 8d b3 97 16 03 3d 6a 94 5d 66 32 5d |..z......=j.]f2]| -00000210 11 28 d9 7b c1 8e b1 c4 ec b7 54 94 3b 80 f9 b3 |.(.{......T.;...| -00000220 9d 2d 74 3c 02 55 a0 4a 02 b7 61 19 b0 a2 e6 44 |.-t<.U.J..a....D| -00000230 3e c8 81 e3 a4 18 d7 4c 16 d2 fb e3 90 2c 61 71 |>......L.....,aq| -00000240 a0 82 28 48 de 7c 7c bd ba 27 85 e1 fd c9 df ac |..(H.||..'......| -00000250 b2 61 0f 80 f3 86 31 8f c1 a3 dc b6 43 98 c9 0e |.a....1.....C...| -00000260 73 dd 1d cf 61 f6 25 23 44 ca 5a 4c 12 6c bb 35 |s...a.%#D.ZL.l.5| -00000270 32 c4 32 0d cc 8c 11 b9 4a ee 88 92 d6 27 d4 a8 |2.2.....J....'..| -00000280 25 59 1e fe ba 41 63 50 1e b1 e2 c5 75 95 7d 56 |%Y...AcP....u.}V| -00000290 60 ed 81 d0 e7 12 05 e7 0f b4 5d 6f 27 98 76 72 |`.........]o'.vr| -000002a0 e7 8a e1 ff 5d 6b 29 9f 75 24 a5 fd 6d 1f bc 58 |....]k).u$..m..X| -000002b0 f8 b8 67 d1 b0 21 25 f1 09 c7 f9 41 f5 85 1b eb |..g..!%....A....| -000002c0 56 f6 14 83 bb 08 d5 3e ed 22 e1 c5 9c 14 cc de |V......>."......| -000002d0 d3 45 e1 0e e3 cb 61 b5 ab f6 03 41 bc 71 5d 17 |.E....a....A.q].| -000002e0 99 c6 8f 13 41 f8 78 e8 da 3d 40 1c 1a 47 a9 b2 |....A.x..=@..G..| -000002f0 e7 22 90 2f d8 8f 6f 0d 36 02 b1 36 fa 6d 26 6f |."./..o.6..6.m&o| -00000300 82 e2 54 74 a0 26 3c 0c 57 bb d7 01 ff ee 6f 16 |..Tt.&<.W.....o.| -00000310 63 92 00 17 03 03 00 99 ea 68 e4 08 10 2d 6f b6 |c........h...-o.| -00000320 a2 f8 f5 03 35 00 63 c8 da 23 4c 96 b8 2a 5c f5 |....5.c..#L..*\.| -00000330 9d 24 6f 5a 5b c3 aa d2 df d9 16 b6 9a 91 79 39 |.$oZ[.........y9| -00000340 18 35 65 28 80 97 fe 76 26 79 45 80 4c 8a 7c cc |.5e(...v&yE.L.|.| -00000350 a2 36 1a 8a ad aa f3 06 08 1f b7 4a 9b 22 7f 37 |.6.........J.".7| -00000360 62 3a ae 13 c0 f4 22 05 6f fc 92 5a e0 ed f1 5b |b:....".o..Z...[| -00000370 c6 6b 4f 18 83 a6 39 a7 5c 1c 53 32 08 76 25 03 |.kO...9.\.S2.v%.| -00000380 20 d5 47 57 76 06 38 4e bd b8 dd 7f 0e 37 b3 4e | .GWv.8N.....7.N| -00000390 f1 f3 b1 98 d4 f0 d6 00 ea 6a e9 ec a4 b0 fd 20 |.........j..... | -000003a0 2d 67 20 c8 ef 9f a1 97 00 cd 15 c2 8e c2 ba 46 |-g ............F| -000003b0 76 17 03 03 00 35 d0 f3 18 d0 71 4c 66 8c 40 ef |v....5....qLf.@.| -000003c0 57 92 f3 56 5a 42 1e 4c e6 13 5a cc ab 26 90 6a |W..VZB.L..Z..&.j| -000003d0 9b ca 49 b0 81 ec 38 30 44 27 5a fa ac d6 1f 5c |..I...80D'Z....\| -000003e0 bc 64 4b 0b c3 69 b2 5b ef 7f 4a |.dK..i.[..J| +00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 ba |..+.....3.$... .| +00000060 2b 6b 27 27 14 c0 42 b6 1f bc ad 77 f1 1f 4a b3 |+k''..B....w..J.| +00000070 42 94 a6 3a 2c 7f e6 aa 72 8e d0 70 e8 0e 53 14 |B..:,...r..p..S.| +00000080 03 03 00 01 01 17 03 03 00 17 33 bb 8a 47 b0 a9 |..........3..G..| +00000090 29 d7 bf e4 94 7d 42 8a 19 95 4e d9 7c b7 9a 87 |)....}B...N.|...| +000000a0 83 17 03 03 02 6d 86 a7 6c 3c 4e 45 95 f6 f6 66 |.....m..l.`.`~.....r| +000001d0 a4 bc 66 a7 bd 46 83 88 6e 9f b3 db de e7 b3 04 |..f..F..n.......| +000001e0 62 4c 61 d6 d0 89 84 e4 30 d7 4d a0 61 4f 56 ad |bLa.....0.M.aOV.| +000001f0 51 c6 1f 10 01 9e 8d 75 55 fb 89 b8 d0 57 e3 ce |Q......uU....W..| +00000200 40 72 41 27 96 e0 5b f4 cc ba d0 ec 8c d4 91 ca |@rA'..[.........| +00000210 8f f0 db 11 86 d5 8e 02 6a 1f 29 00 f6 ff 42 a2 |........j.)...B.| +00000220 7c c9 e7 18 38 39 c9 e4 2b 0e e9 36 40 d3 dd bc ||...89..+..6@...| +00000230 f7 e3 7c 2d e9 f0 52 31 16 85 b4 e2 a8 54 cd d0 |..|-..R1.....T..| +00000240 d6 e2 ed f4 fc 91 9f 50 68 a0 74 af 37 c7 4c bd |.......Ph.t.7.L.| +00000250 de 9e c7 78 06 41 6b 62 07 8c 8b f4 f5 ea ab 16 |...x.Akb........| +00000260 b0 16 b9 ea 06 2c ee 66 d5 da b3 2c 0f 03 d2 f6 |.....,.f...,....| +00000270 ae f7 11 85 d8 b6 b8 bf 7e a5 c8 ff 0d 41 29 86 |........~....A).| +00000280 94 e4 32 58 6c 0e 05 47 b8 c5 77 de d1 81 8d 72 |..2Xl..G..w....r| +00000290 d4 e0 64 66 f7 17 8a 96 88 bf 1c 04 22 40 e0 cf |..df........"@..| +000002a0 28 6d f5 4f 89 e2 4a 23 4b 71 e1 15 3b da 45 0b |(m.O..J#Kq..;.E.| +000002b0 13 ee 1f 7f 4e 45 3d 8e d2 f3 bd 23 e7 4c f3 d2 |....NE=....#.L..| +000002c0 0f 4b 6e 6a 3d 6a f1 26 b7 ae f6 1d 39 73 cd fd |.Knj=j.&....9s..| +000002d0 1c c8 c7 45 fa e0 67 d5 2c eb e9 2b 32 8e 65 7b |...E..g.,..+2.e{| +000002e0 c5 32 cc e6 01 91 fc fd 92 6e ab 9a 13 f6 63 81 |.2.......n....c.| +000002f0 e5 b9 25 6d ce 73 39 9e 82 ae 18 89 a5 32 cb d3 |..%m.s9......2..| +00000300 a3 85 55 f5 cd 26 96 18 91 1c 41 36 69 49 93 f2 |..U..&....A6iI..| +00000310 aa 05 ab 17 03 03 00 99 9c 1d 79 c5 7b 73 b9 f9 |..........y.{s..| +00000320 00 2d ea ff c2 8d f6 57 65 7c 92 fa ba 22 18 03 |.-.....We|..."..| +00000330 69 69 e9 05 e0 74 1a e5 9d f9 30 9f 1c 39 86 30 |ii...t....0..9.0| +00000340 aa 1b 86 fa 20 26 20 13 ea 8d eb 8b 4e 8b c1 50 |.... & .....N..P| +00000350 86 ef a3 c5 8e 48 b2 a1 5a ac 05 e7 8f 23 8a 34 |.....H..Z....#.4| +00000360 ab 1f 8e 90 b1 e5 9a d3 d7 28 90 b6 12 35 dc cb |.........(...5..| +00000370 c5 3c 8d 3d fc e2 99 2a 8b f0 6a f4 8b a9 62 3f |.<.=...*..j...b?| +00000380 b6 19 29 fd 79 b9 35 72 b0 89 59 ab 78 c6 c9 f0 |..).y.5r..Y.x...| +00000390 68 bc 0d f5 9a 45 dd 4f d2 40 75 19 47 af e9 6f |h....E.O.@u.G..o| +000003a0 56 ec 73 ce cd 19 31 c0 39 08 b1 63 e0 ac d4 49 |V.s...1.9..c...I| +000003b0 e5 17 03 03 00 35 0d 34 de e9 22 e4 56 18 4a 33 |.....5.4..".V.J3| +000003c0 d1 05 c4 d4 f2 64 24 62 d7 da 6a 8e 34 3b 51 13 |.....d$b..j.4;Q.| +000003d0 27 69 88 37 4b ba 29 9d c5 78 af 62 2b 62 6e 5a |'i.7K.)..x.b+bnZ| +000003e0 28 7a 93 c5 9a f3 84 1d 50 9a 94 |(z......P..| >>> Flow 3 (client to server) -00000000 14 03 03 00 01 01 17 03 03 00 35 ef 3b a2 4d 0f |..........5.;.M.| -00000010 69 53 f2 a3 80 a0 06 a9 99 a9 15 1e bc 8b 4a 08 |iS............J.| -00000020 de 87 e7 b6 10 d6 b3 fc 89 f8 24 f9 2d 04 a1 fd |..........$.-...| -00000030 c2 ce eb 14 e9 df bf ab 80 8e f1 00 53 60 88 82 |............S`..| -00000040 17 03 03 00 17 22 aa a9 e0 1f f8 55 03 22 9b 0f |.....".....U."..| -00000050 b2 6d 73 be 10 5d 6c c6 d8 0e 5e 0d 17 03 03 00 |.ms..]l...^.....| -00000060 13 45 f2 81 7f ea ae 0d 77 bb d4 05 1e 55 af a8 |.E......w....U..| -00000070 3e 0d 10 0f |>...| +00000000 14 03 03 00 01 01 17 03 03 00 35 4f 9c 2d 01 8b |..........5O.-..| +00000010 4a 31 16 77 b4 f2 2b 40 cb 8e d5 7d 93 bd 66 59 |J1.w..+@...}..fY| +00000020 f8 f1 f4 45 69 fd f7 9b 88 5a e5 0a 40 67 e2 17 |...Ei....Z..@g..| +00000030 72 de b0 1d 02 ba b5 a7 58 35 4a 3e b6 2a 0c e8 |r.......X5J>.*..| +00000040 17 03 03 00 17 4a 50 b7 f1 94 a4 64 9e a2 95 0a |.....JP....d....| +00000050 6c f6 93 7f d6 6d 12 10 7a 69 8a d2 17 03 03 00 |l....m..zi......| +00000060 13 10 60 24 3f 6e c9 ee c6 27 50 72 5e 19 22 e0 |..`$?n...'Pr^.".| +00000070 76 12 45 e5 |v.E.| diff --git a/src/crypto/tls/testdata/Client-TLSv13-ClientCert-ECDSA-RSA b/src/crypto/tls/testdata/Client-TLSv13-ClientCert-ECDSA-RSA index db13bd6387..6611cdfed2 100644 --- a/src/crypto/tls/testdata/Client-TLSv13-ClientCert-ECDSA-RSA +++ b/src/crypto/tls/testdata/Client-TLSv13-ClientCert-ECDSA-RSA @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,134 +7,135 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 7a 02 00 00 76 03 03 37 0c 23 2f 26 |....z...v..7.#/&| -00000010 2a b0 8d 47 84 3b 9b 9c 7e 0f 0a cd 77 39 6c c2 |*..G.;..~...w9l.| -00000020 7b c0 56 a8 9d 07 a0 ec b6 e5 79 20 00 00 00 00 |{.V.......y ....| +00000000 16 03 03 00 7a 02 00 00 76 03 03 ea 4e 78 a5 f4 |....z...v...Nx..| +00000010 71 78 37 5b 2c e4 69 b2 00 4d 49 8c 8b 86 4c 80 |qx7[,.i..MI...L.| +00000020 f9 db 03 3f cc 1e 42 f9 87 ff 7b 20 00 00 00 00 |...?..B...{ ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 13 03 00 00 |................| -00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 5e |..+.....3.$... ^| -00000060 9a da 1d cb 90 03 f2 d2 23 e3 54 fc 3d 9b 8c 92 |........#.T.=...| -00000070 42 df cf 7a 3d 47 3f 66 a4 a6 7a 07 44 76 5c 14 |B..z=G?f..z.Dv\.| -00000080 03 03 00 01 01 17 03 03 00 17 53 54 e6 de 6a af |..........ST..j.| -00000090 c2 d9 b8 39 b6 ae 3e 9f 54 60 e1 fa 29 5a fb 16 |...9..>.T`..)Z..| -000000a0 20 17 03 03 00 42 f4 a5 7f e3 e7 ba 6a 88 e1 f2 | ....B......j...| -000000b0 fd 25 3e ba 05 00 29 77 ff 69 6e e0 ac 50 99 50 |.%>...)w.in..P.P| -000000c0 ac 1e bd 8c 52 e6 28 5d 67 bb bb 20 61 69 5b 97 |....R.(]g.. ai[.| -000000d0 7f 29 79 97 bf 13 24 25 ad 3b 01 78 c4 a4 4e 9a |.)y...$%.;.x..N.| -000000e0 06 d6 20 da 63 27 97 8d 17 03 03 02 6d 79 7e 9e |.. .c'......my~.| -000000f0 01 98 a9 7c ba 63 43 2b 21 b1 bc 2c b2 17 c2 35 |...|.cC+!..,...5| -00000100 76 f2 30 01 69 45 d4 56 e0 5a 2c 62 aa 6f a8 1f |v.0.iE.V.Z,b.o..| -00000110 b8 31 df be 6f 3f 60 16 dc 61 5c 9f 99 a9 63 7d |.1..o?`..a\...c}| -00000120 7e 2b d2 ae 02 46 12 db be 51 9e 15 dd 1c 96 b0 |~+...F...Q......| -00000130 74 69 20 c0 e1 78 46 01 a6 23 72 28 ba c7 a3 48 |ti ..xF..#r(...H| -00000140 1e dc 0b 57 c9 b4 39 88 3d 39 c7 6c 38 c7 3a 29 |...W..9.=9.l8.:)| -00000150 a4 45 79 10 04 61 cd db df 5b 88 c1 35 4b 38 ea |.Ey..a...[..5K8.| -00000160 6d 72 57 9f e0 2e 37 61 3d c8 aa b2 25 a6 11 5c |mrW...7a=...%..\| -00000170 09 e2 3a 17 d3 c5 37 2f a7 b4 73 fe e2 61 df 1d |..:...7/..s..a..| -00000180 cd 4f 72 4a 67 c3 c7 e2 53 78 61 78 2c 37 44 12 |.OrJg...Sxax,7D.| -00000190 4d 0e 8c 14 0b de 3b a4 cf ad 8f d4 74 61 77 4b |M.....;.....tawK| -000001a0 36 2d f2 8f 68 95 38 9d e2 9f cf cc 03 15 89 b9 |6-..h.8.........| -000001b0 96 c4 47 e5 2f 65 0a 5c 5d 8f 5c 64 9d c8 76 d2 |..G./e.\].\d..v.| -000001c0 5d a7 90 4d f5 84 2d 31 2d 6c bd ee 0d 45 2b 50 |]..M..-1-l...E+P| -000001d0 79 f7 8c 34 40 f9 bc f4 38 b3 56 a9 6b ca 54 50 |y..4@...8.V.k.TP| -000001e0 19 f8 9a 73 74 9b 0a 92 ee 22 53 05 01 38 43 3a |...st...."S..8C:| -000001f0 49 fe 2d e9 39 c1 76 b0 04 df 8a 3d cc fc 9b 84 |I.-.9.v....=....| -00000200 cd 22 ba 40 24 69 93 b9 c5 b3 ed fd ad 94 1b 83 |.".@$i..........| -00000210 b5 07 a9 e7 94 14 4b c1 59 89 78 56 03 28 29 c3 |......K.Y.xV.().| -00000220 a8 a4 96 14 5a 51 9a 50 f9 34 3c 5a 76 8f 74 68 |....ZQ.P.4..K..k*D?.#..U| -000002f0 a0 11 51 04 0b 82 02 d9 24 85 13 2e d1 29 44 9a |..Q.....$....)D.| -00000300 15 7f a4 1b c4 f5 36 44 88 9a 6e 5a 1e 2f 14 fa |......6D..nZ./..| -00000310 d0 e7 fc 6a fa e5 f3 4a 55 20 73 9b e4 73 2e 47 |...j...JU s..s.G| -00000320 88 25 b7 69 d9 28 fe 50 8c fc f2 94 29 84 c4 7f |.%.i.(.P....)...| -00000330 d6 b2 eb 28 fa 51 8e ff 00 09 35 d3 b2 32 3a c6 |...(.Q....5..2:.| -00000340 bb 91 a7 c4 b7 88 df 4b f7 09 ef e7 e1 92 60 cd |.......K......`.| -00000350 de 34 4f 39 ee b8 ce 50 6a b9 17 03 03 00 99 64 |.4O9...Pj......d| -00000360 76 ab 48 eb 68 7d a6 68 60 aa c2 93 bd 31 81 c8 |v.H.h}.h`....1..| -00000370 b6 15 ba d1 54 94 04 1b 4b 29 86 e1 12 84 ad d5 |....T...K)......| -00000380 ba eb 4a 7a 7a a8 56 41 04 8c 84 c7 83 46 8c 50 |..Jzz.VA.....F.P| -00000390 c4 e3 02 d0 28 a4 fe 24 c4 b8 96 13 4f 87 27 ec |....(..$....O.'.| -000003a0 6b e3 84 4b 97 13 65 fa 1e 5e 9d ac 85 ea a0 3d |k..K..e..^.....=| -000003b0 67 96 e5 ec 88 84 6b 79 d9 16 55 c1 1c 72 17 aa |g.....ky..U..r..| -000003c0 9b 49 13 86 d4 39 0d 2a c8 88 b3 5f f5 11 cb 5f |.I...9.*..._..._| -000003d0 bd 22 57 2c bc c1 01 72 b9 c3 f5 d9 a2 3b 8e ff |."W,...r.....;..| -000003e0 44 b2 82 b6 5b 35 75 b5 7a 50 40 81 4e a7 2d 40 |D...[5u.zP@.N.-@| -000003f0 21 28 d9 c4 d9 e5 07 e1 17 03 03 00 35 23 ab b2 |!(..........5#..| -00000400 60 56 47 6a fe cb 0e 54 22 d5 8f 29 0a 34 e6 82 |`VGj...T"..).4..| -00000410 5b 10 35 ac 93 97 92 6b 39 5d b8 01 54 9c 86 b0 |[.5....k9]..T...| -00000420 41 70 52 88 92 cf dd b7 f8 5d d1 18 e1 1f 78 53 |ApR......]....xS| -00000430 e4 43 |.C| +00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 f1 |..+.....3.$... .| +00000060 bf 65 1e fd e0 5d 1b ca 02 b5 9e 3f a8 82 e0 5a |.e...].....?...Z| +00000070 97 eb af b5 f1 f7 77 3f 46 a8 66 93 de a8 39 14 |......w?F.f...9.| +00000080 03 03 00 01 01 17 03 03 00 17 16 a7 f6 48 b9 11 |.............H..| +00000090 59 75 3d d8 cf eb ba 72 6c f7 0d 26 50 ab 2d 2a |Yu=....rl..&P.-*| +000000a0 61 17 03 03 00 42 00 0f 78 f4 5a 62 c5 56 bd f5 |a....B..x.Zb.V..| +000000b0 4a df d3 78 76 bd 90 71 49 69 8a b3 60 5b 24 8b |J..xv..qIi..`[$.| +000000c0 45 fb c7 e0 ff 04 d8 7b c6 1f 93 c9 f9 b8 0d 38 |E......{.......8| +000000d0 53 d1 2e 95 99 32 52 2e 45 b2 11 08 45 c7 bc 64 |S....2R.E...E..d| +000000e0 6a c2 32 db 70 96 77 6f 17 03 03 02 6d ba 3e 97 |j.2.p.wo....m.>.| +000000f0 ea d7 dd c1 c5 39 9a c4 b1 eb 8b df 35 57 43 35 |.....9......5WC5| +00000100 31 7a 4c 71 ab 57 79 80 f9 48 96 67 5f 3b fe 98 |1zLq.Wy..H.g_;..| +00000110 0b 5d d0 ce 8c 0c 5a 03 28 8f 64 b4 3e 74 75 51 |.]....Z.(.d.>tuQ| +00000120 81 b3 09 a7 8e 33 45 92 49 72 91 b7 2c 45 68 5c |.....3E.Ir..,Eh\| +00000130 ee 27 e8 5b fd b0 80 e3 43 35 2f a2 bd e5 cf d6 |.'.[....C5/.....| +00000140 c3 fc 43 03 1e aa c9 c4 67 db ef 0c c3 aa 46 18 |..C.....g.....F.| +00000150 39 69 31 26 7f 0a 7a b2 e7 c4 cb 09 3a f1 8e a0 |9i1&..z.....:...| +00000160 05 70 87 a9 12 c6 f2 a1 25 87 72 0a 2d fb d5 51 |.p......%.r.-..Q| +00000170 ce 93 8e f8 08 0e 86 90 04 00 9b 76 fd 57 23 cb |...........v.W#.| +00000180 bc 78 23 07 8a 35 92 6e d6 cd f5 b5 2e e1 8f 33 |.x#..5.n.......3| +00000190 7a bb 61 54 65 4f 4d 12 4b ca db 19 4b 30 6e 2c |z.aTeOM.K...K0n,| +000001a0 56 62 b5 32 7a 98 b6 a4 10 98 5a 16 6b 26 8e 7c |Vb.2z.....Z.k&.|| +000001b0 e0 88 77 a6 20 60 c9 fb c5 e2 66 c3 6d 0d df dd |..w. `....f.m...| +000001c0 21 22 10 da 88 24 21 92 74 3b d8 92 c0 ec 2f 57 |!"...$!.t;..../W| +000001d0 79 d7 42 bd d7 b0 e0 23 d2 a0 45 7f 2a 2a ff df |y.B....#..E.**..| +000001e0 a4 61 53 ec 44 e2 3a 7a 06 15 8a ce 02 84 e7 78 |.aS.D.:z.......x| +000001f0 9b ef 15 0e 84 16 fe 0f dd 36 de 0f 69 14 e4 35 |.........6..i..5| +00000200 90 e4 a0 15 a6 97 e5 c9 a1 3c ed 79 c6 03 ae 39 |.........<.y...9| +00000210 f2 36 1e ca 20 4f 20 59 e6 6f c7 15 ba 90 ac 4a |.6.. O Y.o.....J| +00000220 11 ad 3e f5 48 df 94 fe f8 48 2f 12 25 01 6c 9a |..>.H....H/.%.l.| +00000230 e6 ee 41 7b 13 4c 2f cc 3a 2d 8d b8 e7 d5 62 88 |..A{.L/.:-....b.| +00000240 88 5d d4 6e c4 64 c5 32 0a e7 86 08 64 2c 0a 11 |.].n.d.2....d,..| +00000250 8e 51 63 f9 81 30 00 b1 29 fa b8 1c ab 87 88 22 |.Qc..0..)......"| +00000260 f0 ef 79 04 8c 85 78 df 72 6c 99 d6 c7 3a 9f 2a |..y...x.rl...:.*| +00000270 6d c6 24 05 e7 e5 d7 d0 c7 e5 7c 87 50 f9 b7 69 |m.$.......|.P..i| +00000280 6d 1f 39 77 5d 4c f2 98 35 f7 07 b6 30 0d d6 25 |m.9w]L..5...0..%| +00000290 40 cb a4 2d b2 f1 22 ca 26 5d 92 22 97 0a 65 a9 |@..-..".&]."..e.| +000002a0 a0 46 58 be 0d af a1 1c da c8 bf 98 28 72 ea ee |.FX.........(r..| +000002b0 46 f9 c0 0d b3 f1 11 12 5f b7 69 75 ea dd 60 d0 |F......._.iu..`.| +000002c0 53 51 01 ec 7c ff ef 41 68 04 ec a4 6b 51 bb 89 |SQ..|..Ah...kQ..| +000002d0 8b 8d a2 89 05 6f 78 81 16 f8 7a c2 f6 c3 0d ef |.....ox...z.....| +000002e0 b3 12 e2 57 54 95 a6 cd 5d 04 32 88 70 f9 db db |...WT...].2.p...| +000002f0 b3 45 75 32 6f ac 9a fa ad 54 e5 a5 82 ae 3e 73 |.Eu2o....T....>s| +00000300 2d 07 f4 48 83 e2 10 7d cb 2f 4c 18 94 75 37 24 |-..H...}./L..u7$| +00000310 cd 13 dc 3a 56 93 e8 80 a3 ba de b1 0d 14 79 48 |...:V.........yH| +00000320 08 69 a6 f3 2e 9f 7a 78 6e 9c de 16 ba 73 0b a6 |.i....zxn....s..| +00000330 f2 6c 04 e6 e6 89 3d 46 7d db a4 8f 9a e7 5d 0e |.l....=F}.....].| +00000340 b9 6b 05 59 4d 4d e9 48 1a 18 e9 59 7b 56 70 d6 |.k.YMM.H...Y{Vp.| +00000350 0f fc c2 93 31 03 fa ad b4 c9 17 03 03 00 99 62 |....1..........b| +00000360 c5 b8 11 10 72 af 5b 36 7b 4b 86 83 05 1f 5a c5 |....r.[6{K....Z.| +00000370 66 7b b6 ac 30 8d c0 03 64 ec 29 5d 60 e9 e9 9d |f{..0...d.)]`...| +00000380 6d 58 3e 55 7e 19 a3 59 f5 8b ca 1a f0 c8 ca 1b |mX>U~..Y........| +00000390 c6 ed 7f d7 70 fb 4b a5 6a 96 66 ce 4c 96 d1 b4 |....p.K.j.f.L...| +000003a0 de 99 e2 31 4a 88 64 51 7b 73 60 bb 5c 46 9b b7 |...1J.dQ{s`.\F..| +000003b0 9f d8 97 de 03 06 f3 3e 34 8b 75 43 ce cd 9a 12 |.......>4.uC....| +000003c0 1e 27 b5 28 5e 8f b6 04 d2 02 19 02 02 72 85 46 |.'.(^........r.F| +000003d0 1c cb 5e 63 09 e6 ba 81 69 29 97 5f 31 1e 8f f5 |..^c....i)._1...| +000003e0 1a ed 3b 1e 97 83 bf ee 1f 09 f4 f7 be 32 c7 bc |..;..........2..| +000003f0 b6 7e 70 b9 32 4b 07 99 17 03 03 00 35 67 1c 72 |.~p.2K......5g.r| +00000400 de 27 25 26 1b 12 b2 9a a3 38 5c a7 f7 13 a4 1e |.'%&.....8\.....| +00000410 bf f9 7f 1d 57 af ff 2f 89 4b 75 fc 23 c5 47 00 |....W../.Ku.#.G.| +00000420 cd b7 b6 89 af 4e f0 17 e9 e6 31 cd fb b0 31 19 |.....N....1...1.| +00000430 73 61 |sa| >>> Flow 3 (client to server) -00000000 14 03 03 00 01 01 17 03 03 02 1e 19 c5 11 9d 64 |...............d| -00000010 8f f5 a9 21 53 fa cc 91 67 30 39 c0 77 d6 35 7b |...!S...g09.w.5{| -00000020 b8 a3 ae 44 8a 9a b1 68 5a 20 72 a6 ae 3a 1b 9f |...D...hZ r..:..| -00000030 03 eb d9 ed 91 20 49 ba 88 39 99 1c 4e 3a 2b 1b |..... I..9..N:+.| -00000040 42 b7 a3 97 a3 a3 6c 7e 3b 4c c1 74 dc 71 e6 14 |B.....l~;L.t.q..| -00000050 6c 5a 36 12 cb 87 a6 75 ce b3 e3 a8 f2 c8 36 12 |lZ6....u......6.| -00000060 3d c8 b8 2a 36 e4 40 38 3e 20 1d de 2a 31 b1 04 |=..*6.@8> ..*1..| -00000070 86 cb 9b c1 f3 fc 01 67 7e 40 0b b8 c4 fa 8f a0 |.......g~@......| -00000080 a7 5b 24 43 a9 d3 eb 55 99 ec 0b 19 cb ec 19 97 |.[$C...U........| -00000090 c8 0f c0 5e 8c b2 b1 93 80 70 7c 0b aa 7c 6c 44 |...^.....p|..|lD| -000000a0 1a 11 dc bd 0d 97 18 f3 ca c6 50 68 ca 77 ab 18 |..........Ph.w..| -000000b0 79 a9 8b 73 13 48 90 c3 4a cd ae f2 60 ea 0c 20 |y..s.H..J...`.. | -000000c0 eb ad 84 fb 2f 01 7e 2c f6 7d ea da 22 59 5f 88 |..../.~,.}.."Y_.| -000000d0 ff 10 19 81 d5 29 1b 0f 36 7b 84 66 eb bf e3 f9 |.....)..6{.f....| -000000e0 1c 68 fa 03 93 3e ba c6 58 e2 a9 57 94 8c a8 29 |.h...>..X..W...)| -000000f0 e2 f9 4b 6d 85 01 e8 f2 11 a2 04 38 73 8e 69 49 |..Km.......8s.iI| -00000100 4b 7f ca be aa 5f 50 ac 82 16 e6 92 78 87 13 f4 |K...._P.....x...| -00000110 fc 21 e8 2d 89 d0 f7 fb 73 0b f3 b7 6a 67 24 e8 |.!.-....s...jg$.| -00000120 d9 33 59 49 d6 88 24 a2 66 f5 c8 4d fe 88 93 77 |.3YI..$.f..M...w| -00000130 f9 3f ee ae 0b 6a 23 7a 8f b7 66 d4 68 7d 38 51 |.?...j#z..f.h}8Q| -00000140 85 0a a0 f5 03 f6 e8 2f cd 0b ac 58 64 82 38 20 |......./...Xd.8 | -00000150 f2 72 0a 85 83 55 cb db 62 59 f4 40 08 28 f9 8a |.r...U..bY.@.(..| -00000160 47 a2 ea a1 1b e1 4c 0a a4 74 cb a2 11 6f e5 68 |G.....L..t...o.h| -00000170 e4 ff 38 b0 a5 fc 21 9e eb de 43 b6 e7 27 cf 9a |..8...!...C..'..| -00000180 80 23 59 a2 e9 a8 12 ae 47 09 5c 48 c2 cb c8 e0 |.#Y.....G.\H....| -00000190 a6 fa 81 c5 49 a4 77 4b d3 83 0a ce 6e a5 2b 88 |....I.wK....n.+.| -000001a0 f2 f5 12 2f 0e 7e 10 20 5b c7 31 39 54 ed 19 33 |.../.~. [.19T..3| -000001b0 5c 94 b5 56 16 fa 0c b0 ec 28 76 fa 38 ca 08 c6 |\..V.....(v.8...| -000001c0 13 c3 1f 8a 20 35 73 4b bb bf d8 96 65 de cd f3 |.... 5sK....e...| -000001d0 44 d4 5b 3d 54 aa ac 53 a9 cc 31 99 86 22 5a f9 |D.[=T..S..1.."Z.| -000001e0 9e bd f1 f3 74 07 e4 fe f7 3a 35 44 e5 c6 48 3f |....t....:5D..H?| -000001f0 a3 81 1e 67 96 51 0f e6 7d 43 67 9c 12 6c dd 91 |...g.Q..}Cg..l..| -00000200 c4 f9 20 4d 88 41 fc 40 c5 ee c2 11 fb f1 67 da |.. M.A.@......g.| -00000210 7b b6 d0 1b f8 6e f7 8b 07 f2 9e 12 56 dc 75 31 |{....n......V.u1| -00000220 cd b9 53 62 3f 2f 72 cf ee 17 03 03 00 a4 f9 ec |..Sb?/r.........| -00000230 72 94 94 1c 52 ab 9e 6d 04 5a 26 07 15 3a f5 dd |r...R..m.Z&..:..| -00000240 f3 45 18 20 de 2e 97 f7 6a a4 7c 92 68 aa 71 55 |.E. ....j.|.h.qU| -00000250 b7 7a 3c 8f 54 e7 cc 31 e1 54 9c ad 8e b4 57 11 |.z<.T..1.T....W.| -00000260 1d 79 85 4a da 3f 1b ab fb f4 d4 d9 4d 8a 2e da |.y.J.?......M...| -00000270 68 3e f9 aa 16 52 cc 4e 49 7a 00 bf fc e8 b5 16 |h>...R.NIz......| -00000280 43 0c 6d aa 82 49 3c 16 43 56 55 35 ee 47 c3 1c |C.m..I<.CVU5.G..| -00000290 99 25 6d 30 89 64 5e 23 bf de fc cc 7c 40 94 28 |.%m0.d^#....|@.(| -000002a0 d8 ed ec c2 e2 8b 24 64 64 b6 e8 6c 29 82 b5 ba |......$dd..l)...| -000002b0 d5 59 7a 6f 11 6e cc 30 91 c8 c0 8b 9f dd 13 59 |.Yzo.n.0.......Y| -000002c0 a9 72 18 f6 6e ce 3a 47 6b 4f 26 55 61 bf 20 7a |.r..n.:GkO&Ua. z| -000002d0 d8 c3 17 03 03 00 35 d7 fc bc 10 29 75 c3 70 0a |......5....)u.p.| -000002e0 02 e4 cf 36 20 49 5d 64 78 e9 27 db 2d e3 1a 66 |...6 I]dx.'.-..f| -000002f0 f3 a8 82 7e 64 f0 29 27 81 6c bd b7 a7 86 a2 6a |...~d.)'.l.....j| -00000300 ac 4e 7b da 48 7c d8 9c 39 6c 95 45 17 03 03 00 |.N{.H|..9l.E....| -00000310 17 c9 13 54 e9 22 62 7e 89 17 de 98 52 93 26 76 |...T."b~....R.&v| -00000320 73 a0 7d 2c 60 68 c8 68 17 03 03 00 13 ad 3a 53 |s.},`h.h......:S| -00000330 d1 41 0e 99 26 c8 fb 22 8f e6 d3 a4 1d 83 ff 28 |.A..&..".......(| +00000000 14 03 03 00 01 01 17 03 03 02 1e e9 c3 0a e9 35 |...............5| +00000010 c0 d7 d8 1e 01 13 31 2c 39 0c 31 57 df f2 8d 7f |......1,9.1W....| +00000020 ca 2e 8c a0 63 60 e2 61 c6 37 8f cf 66 62 e7 d6 |....c`.a.7..fb..| +00000030 3d 89 6b 3b bd 1c 45 ec 62 a5 1c b3 86 16 bc 03 |=.k;..E.b.......| +00000040 57 9e 2b cd 31 d4 4d ad 57 96 12 12 19 ce 61 14 |W.+.1.M.W.....a.| +00000050 d6 1f 7a d1 c8 9b d4 9e 18 cf 1c f7 d0 ca 84 bb |..z.............| +00000060 8e 93 85 97 4b 53 68 3d f6 45 76 e0 a7 42 df 6a |....KSh=.Ev..B.j| +00000070 96 04 b9 9e 03 97 bb 57 bf 7f 9c 27 68 ba 04 49 |.......W...'h..I| +00000080 a7 c9 a3 f3 77 83 1f 15 0e 02 05 b5 8c e4 a6 ed |....w...........| +00000090 f8 65 5b bb a4 65 08 a1 a3 34 2a 71 66 6c 2e c8 |.e[..e...4*qfl..| +000000a0 e2 5b 08 ca 59 91 da 07 14 61 17 b7 19 28 00 33 |.[..Y....a...(.3| +000000b0 d9 0c 45 df d8 74 83 2e 9b 99 c7 35 cd f4 de 53 |..E..t.....5...S| +000000c0 b0 df 5c 8b 15 b0 e0 81 77 a5 5d d5 33 40 51 60 |..\.....w.].3@Q`| +000000d0 09 36 4f b6 6f ce 95 2b d1 38 88 33 e0 13 a0 c1 |.6O.o..+.8.3....| +000000e0 5f 2c 15 77 56 d1 16 09 9a 78 5c 6f 8c 93 c3 44 |_,.wV....x\o...D| +000000f0 54 04 b4 d3 23 31 ff 61 74 e5 09 3a d3 9b f1 2f |T...#1.at..:.../| +00000100 de f4 a9 0b b8 9d ca 17 2c 3f d5 2b dd c0 9e 07 |........,?.+....| +00000110 48 50 6a 51 72 be 92 10 1a 91 b5 2d 39 76 10 a4 |HPjQr......-9v..| +00000120 42 63 31 df ce 31 9a 5c 0d ee 6e 55 c0 ba 44 9f |Bc1..1.\..nU..D.| +00000130 e4 75 77 0f 88 6d 1d 24 9f 1c a0 12 14 4c ce 68 |.uw..m.$.....L.h| +00000140 24 a5 aa f2 f2 c5 f4 4f a9 c7 e0 dd 5c 6b 4c 53 |$......O....\kLS| +00000150 b5 26 8b e2 a4 af e3 13 77 0a fc dd 2b 56 fa a2 |.&......w...+V..| +00000160 46 7f 9a 11 c6 a0 4c b6 36 29 93 9f 83 99 13 ad |F.....L.6)......| +00000170 a0 62 9a ef 42 d0 dd 49 fe ba e4 fd fd 09 4b d4 |.b..B..I......K.| +00000180 31 6e d9 a5 0e 4d ac 8c 90 7c 26 2b 6b 1a cb 55 |1n...M...|&+k..U| +00000190 47 53 47 e2 d4 a1 d8 2e 5d 9b 36 75 f0 a4 8a 39 |GSG.....].6u...9| +000001a0 88 07 c8 ed 75 40 fd 72 0e 57 02 a6 bf 8a 64 0a |....u@.r.W....d.| +000001b0 98 8a 1c f4 d3 3d c4 af 7d 97 6e b7 e0 f6 d8 10 |.....=..}.n.....| +000001c0 17 0b d1 5c f9 41 c9 5e 5c 8a 38 dd 66 b3 e9 74 |...\.A.^\.8.f..t| +000001d0 41 2a bd 2d f8 6a 27 57 da ef d6 ca 70 49 c6 e2 |A*.-.j'W....pI..| +000001e0 94 ef 1e c6 57 a0 c8 fc d1 05 4f 65 c1 71 e4 ab |....W.....Oe.q..| +000001f0 44 49 f3 e3 6d b1 f4 5a 69 e7 70 30 b5 81 19 3a |DI..m..Zi.p0...:| +00000200 06 33 ef a5 bd 81 8c 3c 7b 2f 9f 41 a5 7d a8 5f |.3.....<{/.A.}._| +00000210 3b 3d 95 6e 04 a8 5f 2a c1 de 6e e4 14 17 91 36 |;=.n.._*..n....6| +00000220 9d 57 9c 34 1a 7d c8 c3 42 17 03 03 00 a3 a0 20 |.W.4.}..B...... | +00000230 06 7e 90 c8 0a b2 db 90 28 38 8f 42 12 89 1d 21 |.~......(8.B...!| +00000240 04 b3 a6 7b 8c 63 60 49 33 4a 70 4b 1a 97 90 51 |...{.c`I3JpK...Q| +00000250 d2 13 6e 56 9a 1d 41 9c 65 19 31 43 56 96 e2 50 |..nV..A.e.1CV..P| +00000260 77 17 67 6e df 3b e1 43 22 fe 0c 49 74 ff b0 e9 |w.gn.;.C"..It...| +00000270 5c f2 66 4e a3 e5 ac 02 1c 69 11 ce de a1 d4 6b |\.fN.....i.....k| +00000280 1c 46 97 02 7e 81 d8 29 78 42 82 5e b7 e2 31 02 |.F..~..)xB.^..1.| +00000290 fb 74 e2 a6 5e 29 f1 28 cf 8a 9c bd f8 a0 09 45 |.t..^).(.......E| +000002a0 67 7e d7 7d 91 8d fe 43 03 92 16 b1 67 cc 7a 32 |g~.}...C....g.z2| +000002b0 7e 3a 88 fc 77 36 b5 69 07 09 a0 1c 5c 76 a7 68 |~:..w6.i....\v.h| +000002c0 93 1a 35 20 f6 c1 20 c7 8f de c9 da 81 25 7a 08 |..5 .. ......%z.| +000002d0 e0 17 03 03 00 35 fa 5b 68 55 45 ee dd d6 a2 cb |.....5.[hUE.....| +000002e0 09 a7 21 23 43 9c c4 ff 1c d6 66 4c ce e1 bd a9 |..!#C.....fL....| +000002f0 77 22 0b b0 d4 ad f9 23 a7 1c 0e 63 27 36 16 c6 |w".....#...c'6..| +00000300 a2 f8 00 ef 36 22 89 a7 d6 76 da 17 03 03 00 17 |....6"...v......| +00000310 ca d3 97 3a 7d cc a0 95 02 4a a8 d8 dd 6d 26 64 |...:}....J...m&d| +00000320 92 be 64 86 00 d9 bf 17 03 03 00 13 18 1e 4f 7b |..d...........O{| +00000330 f9 1a 63 8a 50 6a ee 81 07 76 53 a9 95 ea df |..c.Pj...vS....| diff --git a/src/crypto/tls/testdata/Client-TLSv13-ClientCert-Ed25519 b/src/crypto/tls/testdata/Client-TLSv13-ClientCert-Ed25519 index b524ef43d2..38382edbea 100644 --- a/src/crypto/tls/testdata/Client-TLSv13-ClientCert-Ed25519 +++ b/src/crypto/tls/testdata/Client-TLSv13-ClientCert-Ed25519 @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,117 +7,118 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 7a 02 00 00 76 03 03 28 10 3b 44 b1 |....z...v..(.;D.| -00000010 0f a9 77 89 f9 dd 3c 3a ad 83 a0 ca 3e 60 d6 0e |..w...<:....>`..| -00000020 ab 94 3a ec 2e 63 ef b1 41 90 48 20 00 00 00 00 |..:..c..A.H ....| +00000000 16 03 03 00 7a 02 00 00 76 03 03 72 63 6c 83 50 |....z...v..rcl.P| +00000010 e9 4c 88 85 70 4f e3 cb c7 0e 0c c5 e5 44 b9 7e |.L..pO.......D.~| +00000020 4a 88 d3 32 d2 37 5c 16 d4 a1 e5 20 00 00 00 00 |J..2.7\.... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 13 03 00 00 |................| -00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 d9 |..+.....3.$... .| -00000060 ce 37 c6 7e 9c 0f 75 bb b6 91 c9 af 59 eb 24 07 |.7.~..u.....Y.$.| -00000070 2e 80 3a 7e d2 fc 39 9e 45 19 94 2d ae 33 2c 14 |..:~..9.E..-.3,.| -00000080 03 03 00 01 01 17 03 03 00 17 c6 b7 f1 35 ee 93 |.............5..| -00000090 75 ca 2e 3a a2 3d ed 32 5c e1 2c e0 5b 1c 01 e0 |u..:.=.2\.,.[...| -000000a0 bb 17 03 03 00 42 02 e5 db dc 80 e1 c2 6f 31 1c |.....B.......o1.| -000000b0 33 7b 76 8f 51 9c f8 a8 b0 1b 1a 8a 46 00 c7 ff |3{v.Q.......F...| -000000c0 ff 4c c9 d8 28 14 32 74 ee 59 b3 15 4b 45 90 b6 |.L..(.2t.Y..KE..| -000000d0 da 56 b3 ef d4 6f 8a eb 96 b9 94 ab b9 9e b1 2e |.V...o..........| -000000e0 fe 29 f2 0d 0d 93 66 1a 17 03 03 02 6d 84 4e 43 |.)....f.....m.NC| -000000f0 92 85 d5 e0 7a cd da a6 c0 5a bf 8b eb 83 db a0 |....z....Z......| -00000100 dc c3 e2 a8 d5 ca ad 87 75 19 08 dd 3e 2e 36 a0 |........u...>.6.| -00000110 a1 53 28 09 cd 1c 1d a0 24 77 e3 e6 4d b1 8f 36 |.S(.....$w..M..6| -00000120 43 29 79 b3 e2 fb 9e dc 39 90 b5 b7 db 6d 0a c0 |C)y.....9....m..| -00000130 55 d2 1c fd 8d 57 5b bf e3 70 b7 6a bc af 4f 34 |U....W[..p.j..O4| -00000140 e7 e1 46 d3 9a cc e4 73 33 fb e6 ad f9 b5 35 af |..F....s3.....5.| -00000150 97 77 88 11 19 7c e6 7d 8b 08 bb 78 2c 50 29 0c |.w...|.}...x,P).| -00000160 87 5f ef 04 19 34 9f 59 54 df 14 71 d1 5f e7 dc |._...4.YT..q._..| -00000170 46 2e 73 1a 07 12 be 6e 74 e1 8e 82 ca db a2 6d |F.s....nt......m| -00000180 35 5b fc 4c 71 42 45 86 35 1c c0 dc 0d 4c 40 a8 |5[.LqBE.5....L@.| -00000190 c7 ea 4a b8 33 0b 30 e2 6d a4 82 dc 28 35 1f f2 |..J.3.0.m...(5..| -000001a0 ac 23 41 10 a4 d4 1a 40 28 4d ea db 32 d5 06 de |.#A....@(M..2...| -000001b0 1e 37 91 77 34 ed b4 c8 f2 1c 44 de ee 2f dd af |.7.w4.....D../..| -000001c0 61 cc 1e 59 87 a6 be 36 b0 8e a3 61 01 aa f4 60 |a..Y...6...a...`| -000001d0 1e c8 3a 3c 53 57 31 28 3e 40 32 95 67 02 41 9c |..:@2.g.A.| -000001e0 58 28 50 51 5e 06 1d f1 57 e1 39 ba e0 ab 30 26 |X(PQ^...W.9...0&| -000001f0 25 fe b6 0a a9 d5 b3 72 61 3a 71 ec a2 44 91 5e |%......ra:q..D.^| -00000200 30 1b d4 dd 07 cf 35 6a 85 4a 95 b2 a9 f5 5c 6e |0.....5j.J....\n| -00000210 35 f9 07 7b d9 b0 a5 64 2f c3 34 23 84 3f 1a 97 |5..{...d/.4#.?..| -00000220 dd 25 75 7c 76 0f 9b 73 5b aa c0 a1 00 4b f6 b1 |.%u|v..s[....K..| -00000230 61 34 51 d0 d1 3b 00 4f 87 93 f5 45 2e 23 93 ee |a4Q..;.O...E.#..| -00000240 e6 ce e5 1c 02 22 3c c1 22 ed 33 b2 71 99 52 26 |....."<.".3.q.R&| -00000250 70 86 ad bc 41 d9 13 54 d3 3e 5d 4b 63 4d d2 6f |p...A..T.>]KcM.o| -00000260 bf a5 24 f8 7b 83 b2 0b 13 02 0d 42 74 9b 04 4e |..$.{......Bt..N| -00000270 8a 86 6b 40 92 42 3a d8 a8 21 2f ce e0 90 71 65 |..k@.B:..!/...qe| -00000280 5f ed c7 65 38 e3 85 e2 32 d5 4b c0 84 61 24 a1 |_..e8...2.K..a$.| -00000290 00 be 67 f3 59 b0 b2 f0 65 fe a6 49 19 41 f9 9b |..g.Y...e..I.A..| -000002a0 40 3a 62 ec 4d 1f 83 77 03 9d 4b 4c d2 5d 93 ca |@:b.M..w..KL.]..| -000002b0 01 39 44 dc c6 f7 18 6b 2a c9 1b 3d ef 27 6d a4 |.9D....k*..=.'m.| -000002c0 2e 8f 33 63 2b c5 fb bb 52 23 68 7e 0b 16 92 64 |..3c+...R#h~...d| -000002d0 d9 72 04 2d 0d b2 ba 67 45 ae 14 16 f1 57 3b 59 |.r.-...gE....W;Y| -000002e0 44 ba db b0 c9 d2 9b 8f 6d b2 a4 8c c2 d1 1c e4 |D.......m.......| -000002f0 ce d3 32 bf 04 d9 09 d1 28 3d 25 2d b5 d3 da 12 |..2.....(=%-....| -00000300 77 01 45 09 08 e0 df cc f3 4c c0 e0 b7 d7 d8 16 |w.E......L......| -00000310 82 19 1d 57 dc b4 27 83 48 1b 9f a9 0e cc d6 39 |...W..'.H......9| -00000320 c1 4a 66 b3 42 85 a5 a7 14 97 5c 58 fe 41 e1 2e |.Jf.B.....\X.A..| -00000330 16 e9 70 89 e7 98 a8 f3 4a 81 d4 d8 ff 5f 48 6e |..p.....J...._Hn| -00000340 60 c6 4a 07 c5 57 9c 22 25 3a 9f bf 7e 71 f3 0d |`.J..W."%:..~q..| -00000350 71 e5 a5 d4 2b 6d 70 2f c5 a3 17 03 03 00 99 b9 |q...+mp/........| -00000360 15 c7 70 bc 06 75 26 50 0f 22 90 43 99 25 0d 0f |..p..u&P.".C.%..| -00000370 05 d3 ce e7 3c 53 fb 01 d4 d2 e8 fb b7 49 87 03 |....K......#..._C.| -000003e0 75 65 ac ba 46 43 61 b4 3d be b8 49 44 ad 15 00 |ue..FCa.=..ID...| -000003f0 3b c0 07 ba 18 b2 14 71 17 03 03 00 35 d1 22 81 |;......q....5.".| -00000400 7f 21 e9 e2 7b 11 f5 df dd 3f 15 ce b5 fc 71 f3 |.!..{....?....q.| -00000410 0e f2 d0 1c a4 85 29 88 f2 ca 73 01 ee 1c e4 66 |......)...s....f| -00000420 07 fa 5c a3 32 b0 e4 2a e4 97 e5 70 b1 cd db 79 |..\.2..*...p...y| -00000430 83 1f |..| +00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 d7 |..+.....3.$... .| +00000060 fa 97 47 72 9a 7e 63 47 d6 62 2d dc 5d 4f 7f 9b |..Gr.~cG.b-.]O..| +00000070 aa 86 c9 ba 65 4c ae 91 82 40 38 ad 4b 46 73 14 |....eL...@8.KFs.| +00000080 03 03 00 01 01 17 03 03 00 17 27 2e 49 01 db 5e |..........'.I..^| +00000090 e1 45 48 97 54 02 31 9f ad 62 74 58 70 77 21 5b |.EH.T.1..btXpw![| +000000a0 81 17 03 03 00 42 2c 0a 8a a0 e0 40 32 b1 2f 9f |.....B,....@2./.| +000000b0 e6 13 9f fd 62 88 a7 34 bd 9a bc 64 5d 9d 17 b9 |....b..4...d]...| +000000c0 b0 f6 fc 84 ca 3f 80 0b 97 4f 7a d9 67 42 c5 0a |.....?...Oz.gB..| +000000d0 e5 18 21 e8 08 42 b4 e6 f5 7e c3 70 2c 0e d3 d8 |..!..B...~.p,...| +000000e0 15 36 37 57 1a d5 58 64 17 03 03 02 6d 07 11 32 |.67W..Xd....m..2| +000000f0 d3 1e 03 02 fb 04 35 f2 64 a8 78 c2 b2 f7 7d 5c |......5.d.x...}\| +00000100 7c 94 0c 7b 16 9a 87 7d 2f 96 de 01 74 d6 6c 6f ||..{...}/...t.lo| +00000110 ce 95 eb f0 df 6d 52 89 3a 19 ff 5b b5 f2 d8 6d |.....mR.:..[...m| +00000120 e6 10 94 f7 d9 c4 58 e8 80 db f5 30 22 b1 82 b1 |......X....0"...| +00000130 66 05 b5 d0 71 40 0f 68 83 ec 43 b5 51 c3 f8 ce |f...q@.h..C.Q...| +00000140 e9 71 4a c7 cf 57 b5 53 3f 60 99 ae 84 df 98 cc |.qJ..W.S?`......| +00000150 9f 90 d0 fc 1d 03 e9 80 72 7c 60 51 a1 89 93 6d |........r|`Q...m| +00000160 0a 57 18 c6 dc 22 82 71 be 66 87 93 dd 16 41 c8 |.W...".q.f....A.| +00000170 84 38 33 63 fc 82 db 38 63 f8 84 f7 12 08 3b 82 |.83c...8c.....;.| +00000180 18 cb c0 50 0d dd 19 25 16 88 23 97 35 56 6d 46 |...P...%..#.5VmF| +00000190 3d 75 e1 83 c3 62 e4 19 70 6c 03 f0 33 5d 94 ad |=u...b..pl..3]..| +000001a0 6d be d2 db c4 b8 ad d8 78 78 53 76 62 91 f7 cf |m.......xxSvb...| +000001b0 83 5b 1e 44 11 2f 27 6a 29 d4 ea 96 fb 40 1c 94 |.[.D./'j)....@..| +000001c0 69 c2 cc c7 90 2c 60 14 c7 d4 f2 9c f9 0e 66 1c |i....,`.......f.| +000001d0 08 76 6e 9f 3b 3a 47 8a 40 0a de 00 e4 6f 45 ca |.vn.;:G.@....oE.| +000001e0 1d 41 cc 34 5a 2c 67 78 58 34 eb 19 0c a5 0e a2 |.A.4Z,gxX4......| +000001f0 fb c1 0a 25 74 f5 ec 55 f8 c3 97 00 d0 a5 90 c5 |...%t..U........| +00000200 a1 9c aa 19 2b e6 ee c1 9d 73 a1 3c 1f fa 6a 91 |....+....s.<..j.| +00000210 2b 2d 27 be 06 f3 85 54 63 a5 d9 ac 55 73 0a e4 |+-'....Tc...Us..| +00000220 4f dc 25 a0 9f 39 c0 0e 1a 9d a7 4c bd c9 3c 64 |O.%..9.....L..>> Flow 3 (client to server) -00000000 14 03 03 00 01 01 17 03 03 01 50 dd d8 5d 40 64 |..........P..]@d| -00000010 5d 35 b0 82 0d 46 97 4c a2 d1 4d dd 3c c9 0a f9 |]5...F.L..M.<...| -00000020 39 6a 1c 17 c3 f6 1a 6b 42 cc f7 37 23 7a e1 bf |9j.....kB..7#z..| -00000030 de 51 7f 87 6b 3d d6 4d ed 24 b3 de dd 62 18 4a |.Q..k=.M.$...b.J| -00000040 b5 b3 1e 0f 2f a3 c5 e8 67 65 04 bc 37 97 15 a8 |..../...ge..7...| -00000050 a8 f3 a8 79 99 82 e1 10 5d d7 f2 ee 21 46 aa b8 |...y....]...!F..| -00000060 40 9f 3b fc 12 19 c8 82 b4 8e bc b8 9b a9 f6 aa |@.;.............| -00000070 18 6b 48 4e 03 92 43 12 b8 54 f2 b7 29 0b 0a a1 |.kHN..C..T..)...| -00000080 6f c4 1c 2a af 22 c1 3d 1b 43 a5 3c 7d 39 83 5d |o..*.".=.C.<}9.]| -00000090 ee 09 fb f1 9a 4c ff b3 2a bb 85 53 04 18 5e 18 |.....L..*..S..^.| -000000a0 62 e8 cf ec 01 be 76 31 82 1a 60 19 33 c7 37 0a |b.....v1..`.3.7.| -000000b0 fa 45 4d b1 9a 1e 07 e9 9c 45 c3 89 60 a2 c9 59 |.EM......E..`..Y| -000000c0 8c 7d 02 f6 d6 5c 12 26 bd 6d 97 15 e2 07 27 be |.}...\.&.m....'.| -000000d0 2f 59 93 1b 11 0e 05 ef 83 c6 a2 c0 1a 9a 4c 60 |/Y............L`| -000000e0 a6 84 c0 72 b6 2b 7c a1 37 4c d7 eb 76 0f 00 97 |...r.+|.7L..v...| -000000f0 43 b6 25 ed 36 e1 eb 3a 3d 71 05 d8 d0 f9 80 18 |C.%.6..:=q......| -00000100 b2 9b c0 4e 2c 8e 05 41 52 a5 40 57 3c 1f 48 0c |...N,..AR.@W<.H.| -00000110 55 ea d3 76 6d 3a 26 5d 5d 71 74 1c d5 8d 96 92 |U..vm:&]]qt.....| -00000120 79 c5 9c 78 68 5f 20 12 01 06 c3 52 49 66 e4 5b |y..xh_ ....RIf.[| -00000130 41 09 fa 72 c5 d7 d9 26 1b fa a5 1d 23 b2 4a 1e |A..r...&....#.J.| -00000140 da 83 5e 89 c8 3a c4 26 f2 42 70 6d 1b 90 67 eb |..^..:.&.Bpm..g.| -00000150 37 15 35 b9 a2 b0 2b ef 93 5f 11 17 03 03 00 59 |7.5...+.._.....Y| -00000160 b4 a0 79 ba e4 3f 78 d2 11 1a 71 8a a1 a4 28 fc |..y..?x...q...(.| -00000170 44 c7 bc 32 19 06 71 1b 6d 50 20 26 d5 91 39 48 |D..2..q.mP &..9H| -00000180 59 8b fd 55 0a 35 14 f5 31 47 62 15 ee c1 69 23 |Y..U.5..1Gb...i#| -00000190 eb db 79 ef 20 47 5c ef 31 e1 ae bd 2f 72 f8 9d |..y. G\.1.../r..| -000001a0 92 cc 04 6f 73 22 5d 93 59 9f 06 cb bd 70 9b d8 |...os"].Y....p..| -000001b0 c9 41 44 8f 5b b2 59 2b a9 17 03 03 00 35 22 65 |.AD.[.Y+.....5"e| -000001c0 ef 1e dc 4c 63 ba 6d 6a 46 1c d2 9c 9a 81 4b f3 |...Lc.mjF.....K.| -000001d0 1f 58 4e 08 86 93 f8 3a 53 13 64 1f ca 20 d2 da |.XN....:S.d.. ..| -000001e0 6b df 54 88 a8 f3 af 0d 4a 1b 29 91 3a bb 90 27 |k.T.....J.).:..'| -000001f0 29 3a 97 17 03 03 00 17 09 78 1d f3 95 2e 92 af |):.......x......| -00000200 d8 af 64 59 fb 77 e3 85 de f0 37 be 11 91 2f 17 |..dY.w....7.../.| -00000210 03 03 00 13 4e a2 06 c3 90 6f d3 b0 04 a8 25 32 |....N....o....%2| -00000220 09 65 1c f2 ef 9c 32 |.e....2| +00000000 14 03 03 00 01 01 17 03 03 01 50 90 77 22 64 76 |..........P.w"dv| +00000010 a1 cd 65 49 53 cb f0 2e 21 6c 12 7c 63 e5 ff 49 |..eIS...!l.|c..I| +00000020 6c be e6 ba 70 2d 22 49 6e 5c 5b 65 46 4b 64 01 |l...p-"In\[eFKd.| +00000030 f7 1d 57 a3 5f d5 a3 39 b6 b9 79 62 b3 e2 52 35 |..W._..9..yb..R5| +00000040 95 26 d9 2b 72 39 60 23 c4 5f 7e 88 66 d4 c8 2b |.&.+r9`#._~.f..+| +00000050 2d 89 38 c8 b8 bd 73 0a 02 27 92 ab 89 8a ee 9b |-.8...s..'......| +00000060 a2 bc 9e 55 fd a0 d4 f3 02 d7 d6 4c 6c 49 ef 7e |...U.......LlI.~| +00000070 35 56 90 41 90 53 24 f5 c1 19 f0 ff a0 c8 7c 82 |5V.A.S$.......|.| +00000080 52 01 98 8c ef 87 69 09 d2 17 35 af 9c 4b 3b b3 |R.....i...5..K;.| +00000090 6c 36 70 63 48 a2 88 df cb 87 f3 40 03 a8 b0 64 |l6pcH......@...d| +000000a0 cc 66 fb cf ba b9 be 8c 67 2d 3c 99 ac 7f 93 c1 |.f......g-<.....| +000000b0 15 2e 05 ae 95 51 3d 71 d9 43 09 d7 44 cb df 67 |.....Q=q.C..D..g| +000000c0 b8 b3 33 62 c5 60 cf 22 20 e5 45 17 7c d6 74 12 |..3b.`." .E.|.t.| +000000d0 0f 6d af d0 db dd 91 ad 20 ea 4d 26 fc c4 2b bd |.m...... .M&..+.| +000000e0 ec 3d 75 c8 87 36 b2 d0 1e cc 1d 92 fd 58 5e d5 |.=u..6.......X^.| +000000f0 f7 ad c2 ed 0c b6 c6 bc 25 ff 39 75 ee cf fc 76 |........%.9u...v| +00000100 77 e0 15 2e 22 82 3b 6f 93 e4 e9 a1 5a bb 9d 78 |w...".;o....Z..x| +00000110 e2 3d 18 c8 e5 ea e3 82 52 de bf ca 32 c9 56 21 |.=......R...2.V!| +00000120 ba c9 2b 12 7d 7b f5 18 73 e5 5e 9c 1e e1 23 92 |..+.}{..s.^...#.| +00000130 ec 58 56 e5 a4 aa dc 2b 59 75 71 19 06 77 83 d7 |.XV....+Yuq..w..| +00000140 0b 28 03 e9 fa 2c 89 1a 8c 64 f0 84 b6 13 f0 02 |.(...,...d......| +00000150 22 02 33 cf c4 22 dd fb b0 76 8a 17 03 03 00 59 |".3.."...v.....Y| +00000160 9b 4c 67 95 f4 37 c9 2c b7 33 c7 78 1c e0 1b 49 |.Lg..7.,.3.x...I| +00000170 41 6f 88 2d 99 a7 e3 d3 d1 d1 f6 36 b1 2a 8e df |Ao.-.......6.*..| +00000180 11 b6 8d 04 63 c7 11 49 e2 8c 79 03 6b b8 a4 8b |....c..I..y.k...| +00000190 2a 2c 04 ab b3 e2 50 03 51 77 65 eb 3a 45 f1 ce |*,....P.Qwe.:E..| +000001a0 65 9f 9c be d6 be 7f 28 14 6a 61 37 55 94 8f a7 |e......(.ja7U...| +000001b0 23 2f bc fc bb aa 89 47 76 17 03 03 00 35 f5 be |#/.....Gv....5..| +000001c0 e6 33 9b 48 97 74 b0 ad a4 fc 78 fe 20 ab cd fa |.3.H.t....x. ...| +000001d0 48 ad 8c 55 c3 46 b8 2e d6 ea f0 79 e3 a5 cf 29 |H..U.F.....y...)| +000001e0 56 19 ab 95 c4 7f fd 89 41 f7 a3 6f e4 19 2f 83 |V.......A..o../.| +000001f0 8c 3e 5d 17 03 03 00 17 74 24 c5 8d 30 40 0a 12 |.>].....t$..0@..| +00000200 57 37 d0 27 30 3e 24 ea 81 ca c7 0a f5 12 cf 17 |W7.'0>$.........| +00000210 03 03 00 13 ff 20 1a 76 60 da a1 15 22 16 10 8a |..... .v`..."...| +00000220 9f e1 ee 5d 62 a2 cc |...]b..| diff --git a/src/crypto/tls/testdata/Client-TLSv13-ClientCert-RSA-ECDSA b/src/crypto/tls/testdata/Client-TLSv13-ClientCert-RSA-ECDSA index 0cd5b76d66..10c83c4828 100644 --- a/src/crypto/tls/testdata/Client-TLSv13-ClientCert-RSA-ECDSA +++ b/src/crypto/tls/testdata/Client-TLSv13-ClientCert-RSA-ECDSA @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,129 +7,130 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 7a 02 00 00 76 03 03 40 ad 79 0c ad |....z...v..@.y..| -00000010 83 38 58 82 dc b2 5a d1 e2 de f5 43 99 72 8a 93 |.8X...Z....C.r..| -00000020 ba b1 ea 17 21 52 a7 e9 ed dc 48 20 00 00 00 00 |....!R....H ....| +00000000 16 03 03 00 7a 02 00 00 76 03 03 af 7e fd 3d 23 |....z...v...~.=#| +00000010 96 b6 46 26 9c 09 13 f6 80 4f c9 d2 52 d9 df 52 |..F&.....O..R..R| +00000020 0b 7c da 61 52 ba 99 1b 32 5a 0c 20 00 00 00 00 |.|.aR...2Z. ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 13 03 00 00 |................| -00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 bd |..+.....3.$... .| -00000060 d2 3a 7e c2 30 84 4f f2 39 7e 26 11 65 49 b9 b2 |.:~.0.O.9~&.eI..| -00000070 ac 63 c8 ef ea 5e f6 23 33 70 ec 16 86 49 03 14 |.c...^.#3p...I..| -00000080 03 03 00 01 01 17 03 03 00 17 16 47 c1 58 83 6b |...........G.X.k| -00000090 66 06 c4 39 42 8f 68 fb 3a 07 9e e7 74 41 0d 10 |f..9B.h.:...tA..| -000000a0 97 17 03 03 00 42 42 b2 84 94 a6 18 c6 b6 21 77 |.....BB.......!w| -000000b0 1e 02 57 4a 14 2d c4 84 17 f1 fa b4 63 0f aa d7 |..WJ.-......c...| -000000c0 4a d5 ae 75 f1 da 14 ec 51 09 93 6b 62 6f 8f 7e |J..u....Q..kbo.~| -000000d0 fe 0c 7f 63 ef 1b 87 d8 43 42 d0 f4 2d 6d 0f cc |...c....CB..-m..| -000000e0 ef 77 79 17 1e 39 1e 75 17 03 03 02 22 9c 82 27 |.wy..9.u...."..'| -000000f0 99 e0 4b 44 a7 a7 bb a9 25 a2 58 7f 70 3f 82 1a |..KD....%.X.p?..| -00000100 4b bc e1 35 3e 66 fa 4f ac 7f 7e da 73 13 06 0f |K..5>f.O..~.s...| -00000110 fe 97 ef 82 53 2e d0 e2 11 c6 ee 8d 25 d2 f0 5c |....S.......%..\| -00000120 2e b8 61 40 09 12 d4 11 9b b8 3d 38 d7 d5 a7 76 |..a@......=8...v| -00000130 ed a7 bf 6f 39 9c 83 49 57 86 de 53 da c5 ff 8a |...o9..IW..S....| -00000140 ee 47 bc 19 72 d3 cc d0 5b fc 6b 25 2f 64 2a 0c |.G..r...[.k%/d*.| -00000150 7d e9 8a 1f f8 48 d1 74 d5 70 97 e7 b4 e2 c8 ce |}....H.t.p......| -00000160 dc 74 27 e9 af b1 64 56 19 28 8a 34 93 4e 1c 03 |.t'...dV.(.4.N..| -00000170 67 ae 41 fb 5f d1 e3 20 45 6b bd 49 25 d8 b4 8b |g.A._.. Ek.I%...| -00000180 d4 96 d6 96 b2 72 72 f0 d0 68 f1 f7 f3 17 76 85 |.....rr..h....v.| -00000190 78 0e dd 35 83 8a 7a 45 c5 91 86 4b a6 b5 77 b4 |x..5..zE...K..w.| -000001a0 ef 02 43 5c 42 c7 f8 a6 1d ed 73 d2 41 02 be cb |..C\B.....s.A...| -000001b0 24 40 61 5a 5f 7a f6 bf f9 d0 bd 05 7f 90 52 16 |$@aZ_z........R.| -000001c0 65 49 c6 74 61 f0 05 fa dd 83 69 b7 ff 5a 2c 4b |eI.ta.....i..Z,K| -000001d0 63 6d d2 57 01 43 67 54 25 90 72 f8 12 7e c2 39 |cm.W.CgT%.r..~.9| -000001e0 26 a9 65 55 02 ca 87 8a e6 13 cd a4 6b eb 3c 4d |&.eU........k.#| -00000250 59 38 6c 9f be 1b ba 60 93 e8 c9 24 fb 13 11 b7 |Y8l....`...$....| -00000260 78 d8 a7 30 6d 06 0f 4d 59 5d d1 1f 81 13 33 99 |x..0m..MY]....3.| -00000270 a8 4d 63 16 53 73 40 22 4b 55 21 79 c1 ce 1c 92 |.Mc.Ss@"KU!y....| -00000280 8c d6 95 14 fd 93 5d c2 54 20 30 c5 79 b0 cd eb |......].T 0.y...| -00000290 ac 1b 50 6a 25 b7 e8 f1 0f da f3 d8 6b 17 2b 12 |..Pj%.......k.+.| -000002a0 06 a8 9a 88 be 2f f3 52 b3 d7 70 05 df 57 88 f9 |...../.R..p..W..| -000002b0 ec 59 d4 e7 ce cb c3 1f 33 3e c0 d8 04 9f 59 a0 |.Y......3>....Y.| -000002c0 04 c0 13 b3 a6 7c ce 6c c4 fa 82 cd da 11 17 b6 |.....|.l........| -000002d0 c2 40 cd e6 5a 6e d3 b5 17 f0 4d c4 34 8f 2a 28 |.@..Zn....M.4.*(| -000002e0 4d ce 93 d5 eb 7e 0a d2 57 0a 98 cf ac 48 ee a8 |M....~..W....H..| -000002f0 8a bd ec c2 d7 d9 39 af e2 a0 9f b2 fd d1 4e 96 |......9.......N.| -00000300 fa fd 34 f7 a4 3e 3d 31 9a f6 a2 a7 97 a3 43 17 |..4..>=1......C.| -00000310 03 03 00 a4 cf 0d e1 8d b7 e4 1a c0 79 0d 7e d9 |............y.~.| -00000320 70 a3 34 57 0f 72 b4 5c 05 7f 1e 16 52 ba d3 e7 |p.4W.r.\....R...| -00000330 fb e5 b8 b0 8d cf 91 7e 96 c4 70 6e cb e5 7e 51 |.......~..pn..~Q| -00000340 19 17 c1 94 e9 49 69 a0 21 59 74 a9 1d 34 9c 10 |.....Ii.!Yt..4..| -00000350 a9 10 f0 4a 51 2c e3 1d e3 59 28 f2 3b ea 66 c1 |...JQ,...Y(.;.f.| -00000360 ed 6a 8d 39 72 ea 5a 24 7a ee 9f cd 85 9d 54 60 |.j.9r.Z$z.....T`| -00000370 d4 95 fd 8d 63 a4 78 6c 2f 7d 6a a5 53 e4 42 97 |....c.xl/}j.S.B.| -00000380 e8 19 36 bf 14 9c a8 48 9f 57 ad 29 7a 30 e5 a9 |..6....H.W.)z0..| -00000390 32 e7 0f 24 9c ca 9d 6d b7 47 46 1c cb 90 7d 18 |2..$...m.GF...}.| -000003a0 39 70 d2 c1 08 28 dc d7 3a 3e 5e 62 a7 4a 4a af |9p...(..:>^b.JJ.| -000003b0 02 93 ce 4b 5d a2 96 f3 17 03 03 00 35 10 07 d6 |...K].......5...| -000003c0 82 f3 28 ef 2f 08 17 f6 0b c2 da 1f b7 52 e1 eb |..(./........R..| -000003d0 ca f4 0b c6 21 5c 54 4d f9 0b 04 c1 5a bf 63 58 |....!\TM....Z.cX| -000003e0 1c e1 da 7f f7 1f 84 77 09 3a 35 7c e6 1f 89 f2 |.......w.:5|....| -000003f0 fd 01 |..| +00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 83 |..+.....3.$... .| +00000060 95 cf ff 0f f6 eb 66 dc 4f 61 f3 94 43 18 7b f5 |......f.Oa..C.{.| +00000070 91 6a e5 36 75 7b 6b 2c d4 38 f7 4f 36 f0 3c 14 |.j.6u{k,.8.O6.<.| +00000080 03 03 00 01 01 17 03 03 00 17 b7 83 3c 5c 9e ee |............<\..| +00000090 fc c3 14 33 45 62 69 8b 63 25 03 77 fe 7c 8b c0 |...3Ebi.c%.w.|..| +000000a0 0a 17 03 03 00 42 6c cd df 26 24 42 0d 2e 38 64 |.....Bl..&$B..8d| +000000b0 c5 92 7c 6b 18 47 cc 90 09 57 95 0a f9 cc 81 f1 |..|k.G...W......| +000000c0 db 90 29 ba b0 3f db 99 55 78 93 ab 05 34 91 46 |..)..?..Ux...4.F| +000000d0 ce cb c5 2c b8 fb 43 98 31 cc 18 8f 2e 2a 39 78 |...,..C.1....*9x| +000000e0 68 6d 01 29 05 ff 7e 4f 17 03 03 02 22 c1 3d c5 |hm.)..~O....".=.| +000000f0 cb 42 fe 5d a8 ea 65 fd 1a a8 cd a9 28 ed 8d 69 |.B.]..e.....(..i| +00000100 5b eb 28 11 c5 bb 9f 58 8d f2 2d 44 b4 8f 87 d6 |[.(....X..-D....| +00000110 3f af df 3f 13 c0 7e bf 6f b3 e0 fa 45 5c ee a2 |?..?..~.o...E\..| +00000120 13 70 08 94 2d 87 a7 1c 23 a9 aa a1 64 d2 49 ed |.p..-...#...d.I.| +00000130 33 2c ae 02 9e a7 03 24 3f 4c 43 d4 2e 54 b9 fc |3,.....$?LC..T..| +00000140 39 6c 32 8c b1 0c bb f6 31 60 d9 48 82 5b ed 2b |9l2.....1`.H.[.+| +00000150 ea dd e3 2d 1a 35 a3 22 be e1 f1 13 04 9c aa 1a |...-.5."........| +00000160 24 39 4a 0d 63 fb ce 31 71 af e6 1c f3 a3 dd c1 |$9J.c..1q.......| +00000170 51 40 28 5a 11 a0 9e 19 0a a5 74 e2 40 56 9c 55 |Q@(Z......t.@V.U| +00000180 40 45 e6 20 5d 23 aa 85 ec 42 5f 2c 24 10 fb ff |@E. ]#...B_,$...| +00000190 8a 52 e6 33 8f e1 1e e1 51 8a 9f 5d 6f 63 b8 04 |.R.3....Q..]oc..| +000001a0 13 ab fa 5d 85 ba d3 eb cf b9 0b 89 08 b7 7b a9 |...]..........{.| +000001b0 ea 07 b9 41 07 7a 08 7b 57 01 35 11 a1 65 99 4a |...A.z.{W.5..e.J| +000001c0 4c 4a 1f c2 94 5a 00 09 9a 13 37 23 16 60 45 62 |LJ...Z....7#.`Eb| +000001d0 96 fa 6b 7a 0f d6 68 14 f5 cd 40 d7 0a eb ea 75 |..kz..h...@....u| +000001e0 f0 29 cb ea 7f e7 55 36 d9 02 b2 a0 bc 54 ac 04 |.)....U6.....T..| +000001f0 1b 00 10 c0 db 45 81 e6 97 2a 4a 57 1d e7 de e3 |.....E...*JW....| +00000200 d1 0a 09 c7 73 6a 9e a0 3c 79 7f a8 26 6a 98 05 |....sj..B ]^..| +000003f0 a3 91 |..| >>> Flow 3 (client to server) -00000000 14 03 03 00 01 01 17 03 03 02 11 f1 43 fc 28 7d |............C.(}| -00000010 43 0b 17 e4 ed cc 95 d5 09 4e 8f 44 3c 3b 46 23 |C........N.D<;F#| -00000020 59 a4 62 a7 94 1e da b6 a7 a5 22 15 6a ed e3 eb |Y.b.......".j...| -00000030 4f 6d 0e 91 c6 20 74 af 97 80 95 db 6a b6 2d ac |Om... t.....j.-.| -00000040 a8 d9 95 84 95 5b 32 27 ec 42 42 a8 fd 05 fc ad |.....[2'.BB.....| -00000050 2e 00 e3 4a 9d 93 d1 5e fd dc 22 30 1f 9c e9 cb |...J...^.."0....| -00000060 3f 2e ac ad 0f ab b7 46 82 69 38 db c6 8a be 77 |?......F.i8....w| -00000070 7e 83 77 4c e1 f4 f2 cf c2 b1 86 ff 17 d3 1d 79 |~.wL...........y| -00000080 3e ac f8 6e 73 15 ab 02 4c bf 2a 63 41 ce 93 3b |>..ns...L.*cA..;| -00000090 af 11 70 8c 91 91 f4 14 5c 1b 63 4b 42 3b d8 ca |..p.....\.cKB;..| -000000a0 00 f6 02 b3 c8 d3 ab 01 1d f2 71 86 7b f9 13 de |..........q.{...| -000000b0 1e 39 1c e7 b5 3b b5 bb 26 33 f7 a9 3f 29 e2 8c |.9...;..&3..?)..| -000000c0 d1 67 64 11 b4 29 be 6e c9 cf c5 6e 41 43 41 e7 |.gd..).n...nACA.| -000000d0 43 9c 5d fb a1 b6 b3 f9 0f 4c 17 11 3c 56 0e 49 |C.]......L...z.U.....4..| -00000130 11 86 8a 14 8e d6 5c c0 c2 55 de da 37 c4 ac 69 |......\..U..7..i| -00000140 95 42 84 5f 1d 5f c7 32 91 a9 45 02 c3 a3 da 4f |.B._._.2..E....O| -00000150 96 da c0 a2 09 7a a6 2b 25 f4 a2 94 89 fa bd 0f |.....z.+%.......| -00000160 87 04 e1 87 00 c4 4f 45 39 7a 5a 7d 75 c5 c9 f6 |......OE9zZ}u...| -00000170 27 34 2d ba 12 c5 2c 76 06 b0 aa d0 34 e1 99 e9 |'4-...,v....4...| -00000180 9b 01 db 2a b4 d5 dd 55 2b 92 6d e3 9e fc f1 09 |...*...U+.m.....| -00000190 2b 37 8b 37 8f 70 31 ee d2 f0 86 5a 1f d3 4a 29 |+7.7.p1....Z..J)| -000001a0 7c c9 0e 97 7c 4f e6 87 b7 c8 94 f3 d2 0b 4a 1d ||...|O........J.| -000001b0 59 60 09 81 55 6a 01 38 9f ca 20 e0 6e 44 f7 b5 |Y`..Uj.8.. .nD..| -000001c0 f6 3e 2e d0 81 f6 e6 1d 15 cf c3 d8 ae 98 84 d1 |.>..............| -000001d0 0b c9 e4 65 96 f9 eb c9 60 6d 50 37 49 9f 6d b1 |...e....`mP7I.m.| -000001e0 b9 f6 25 20 81 2d cf b4 17 2b 4c a9 8a 76 8a db |..% .-...+L..v..| -000001f0 77 8c 29 47 05 0b 27 e1 52 8d 37 27 fb c0 70 26 |w.)G..'.R.7'..p&| -00000200 3b 6d 2e 74 05 75 88 e4 63 3d ac 98 3f 74 67 3b |;m.t.u..c=..?tg;| -00000210 c6 dc 41 39 2b 20 ef f9 8b 2f 4e 20 17 03 03 00 |..A9+ .../N ....| -00000220 99 7d 8a 83 dd 34 5e 37 e2 c3 85 22 f3 6b ee bc |.}...4^7...".k..| -00000230 a5 21 1b c5 2c 38 cf 99 09 5b 31 97 5e a0 8b 69 |.!..,8...[1.^..i| -00000240 75 3a 23 64 18 22 fb 31 ed ac 8b 0f ae 9c 4e ee |u:#d.".1......N.| -00000250 06 0e 3c 3a 18 d3 8e 0c dc d4 3f 7b 25 e3 90 85 |..<:......?{%...| -00000260 ca f4 8a 5c 5e 5e 44 f3 1b 57 cd 14 e0 8d 67 36 |...\^^D..W....g6| -00000270 6e c2 a6 95 60 f3 86 20 29 a6 a8 8f b3 b0 0d 57 |n...`.. )......W| -00000280 d2 1e 4a b9 d2 63 33 09 f9 c5 87 94 89 c5 fd 2e |..J..c3.........| -00000290 de b3 f0 0e 7b 4e 3e d6 21 b4 3b 58 bd 2a 35 49 |....{N>.!.;X.*5I| -000002a0 5e b0 f4 5a ca 58 dc a5 8b 45 a5 d1 7b 13 b2 00 |^..Z.X...E..{...| -000002b0 52 c4 b2 6c d1 9a b8 c5 1b fe 17 03 03 00 35 c9 |R..l..........5.| -000002c0 9b c7 94 b3 eb 5f 4e ab 8c c0 de cf b6 b4 5c ee |....._N.......\.| -000002d0 bb 5f fa 48 a2 06 f0 ed f5 b1 ba 74 0c c5 64 1a |._.H.......t..d.| -000002e0 ce 2e 9e 90 4b 6e 98 13 a0 98 99 a3 b4 6f 73 76 |....Kn.......osv| -000002f0 7b e3 26 15 17 03 03 00 17 3e a1 f0 68 e6 00 86 |{.&......>..h...| -00000300 10 f4 bf 26 b6 f5 e6 77 85 ca b7 c1 75 bb f9 78 |...&...w....u..x| -00000310 17 03 03 00 13 43 7f f3 84 ee d7 a9 59 9d c3 5c |.....C......Y..\| -00000320 c0 b7 c8 20 4e 83 ba 23 |... N..#| +00000000 14 03 03 00 01 01 17 03 03 02 11 e0 62 97 8a 4d |............b..M| +00000010 01 cf 8f e2 d2 a8 0d d4 9a fc f5 b2 d7 82 2b 7a |..............+z| +00000020 8c e7 ce 2a 99 3b 41 a2 a3 ca c4 9d 15 79 7f 2f |...*.;A......y./| +00000030 04 7a 18 e4 5b b6 01 d6 b5 03 d2 08 15 41 c7 18 |.z..[........A..| +00000040 8a 66 78 05 ed 33 19 8e 93 9e c3 ff 4a 92 bb 7b |.fx..3......J..{| +00000050 72 e5 81 a6 2a 7f b3 e1 72 67 01 7a 95 f4 3f bc |r...*...rg.z..?.| +00000060 cd e4 bc 45 74 9b 4c 1c 69 68 d0 75 89 9f d5 d0 |...Et.L.ih.u....| +00000070 de 59 d4 1c 47 cc 5e 2e dd bd f9 1f e4 16 c9 c8 |.Y..G.^.........| +00000080 9b 4e 07 6b 7a 12 e7 13 71 ae c1 26 48 32 d6 4e |.N.kz...q..&H2.N| +00000090 8a 15 c2 a0 91 59 9d 21 0d 28 d2 94 3f e9 fc 74 |.....Y.!.(..?..t| +000000a0 98 5b e5 be 50 ad 10 7d d9 a1 da 41 59 15 b3 85 |.[..P..}...AY...| +000000b0 2d 7b 81 b3 ae fb db 4c 00 24 31 57 f2 54 b7 f7 |-{.....L.$1W.T..| +000000c0 64 cc 73 23 bc 6a 93 e0 91 a7 5e 1b 63 f1 59 89 |d.s#.j....^.c.Y.| +000000d0 a9 d9 7b 88 35 17 7a 4d b9 66 d0 a5 f2 d6 79 ed |..{.5.zM.f....y.| +000000e0 c1 3a e7 98 88 96 e7 2f 31 66 bf 16 34 e2 fd 5f |.:...../1f..4.._| +000000f0 fb 0f fb 9a aa ba 78 d8 6a c9 72 d6 39 32 3a 99 |......x.j.r.92:.| +00000100 a2 11 8a 32 79 cf 18 d9 22 da 40 31 3e d3 c8 17 |...2y...".@1>...| +00000110 c4 1f e2 4f c8 7f b9 2f 83 d7 5e 59 48 d3 9b b9 |...O.../..^YH...| +00000120 68 9c c2 e4 45 c2 a3 26 91 cd 3a 26 47 c4 b8 7f |h...E..&..:&G...| +00000130 8f 91 c0 06 b5 6e 5e b4 65 05 42 ea 48 9e 40 bc |.....n^.e.B.H.@.| +00000140 0c 04 22 86 6a 54 6c 27 c3 77 b4 b9 22 99 6a f0 |..".jTl'.w..".j.| +00000150 91 bc 41 ca 24 41 52 fd e2 18 0f 64 13 7e a3 6b |..A.$AR....d.~.k| +00000160 ab 27 1e 15 87 0d 7f 71 1e 29 16 f9 af 81 ec bc |.'.....q.)......| +00000170 28 0b 45 bd 76 fd ff 0e fb 8d c5 0c aa ef a5 17 |(.E.v...........| +00000180 55 49 a6 3d 74 5c 8d 77 60 99 a1 8f aa a9 eb 0f |UI.=t\.w`.......| +00000190 75 1a 55 21 3a 96 da 08 a2 cd ad 11 78 15 6a ce |u.U!:.......x.j.| +000001a0 ef f6 fb 8b a3 dd fd ad 2d a5 2d 59 25 37 fe 53 |........-.-Y%7.S| +000001b0 48 90 fa 9a d3 3c 09 69 47 d3 d1 e4 48 30 fd df |H....<.iG...H0..| +000001c0 15 d7 64 ff ca 91 46 c2 36 82 30 ae 4e 75 12 be |..d...F.6.0.Nu..| +000001d0 58 5d da 63 da bd dc be 81 be ad 37 87 ea 0a 26 |X].c.......7...&| +000001e0 31 cf 1b 1e 7d de a8 04 e3 b8 e5 65 5a 21 db b6 |1...}......eZ!..| +000001f0 2b 7c e7 23 7c 2b e1 89 3f 28 27 97 dd 1c c6 00 |+|.#|+..?('.....| +00000200 0e e4 05 68 0f 9a 8a 1d e6 bd bd aa 1f 46 6e a2 |...h.........Fn.| +00000210 d9 69 91 9b e7 e3 6c 39 33 77 b8 76 17 03 03 00 |.i....l93w.v....| +00000220 99 c9 3e 7e 78 3b 91 65 35 cb 19 44 92 f7 77 f5 |..>~x;.e5..D..w.| +00000230 60 3c 19 2a 97 c5 a0 92 b2 28 e2 44 94 ec 1b 3d |`<.*.....(.D...=| +00000240 f8 1a c1 65 eb 41 3f 61 f1 db 42 1a 0d b8 32 12 |...e.A?a..B...2.| +00000250 f6 1b 83 be 37 d8 fe 78 bd 5b 66 d1 f2 6c 3e e3 |....7..x.[f..l>.| +00000260 8a 0f 3a 28 57 71 1a 78 ab 2a b5 5f ad a3 6e 2c |..:(Wq.x.*._..n,| +00000270 a3 d9 3a 0b d0 99 95 d6 dc 8e 7a f0 b6 e4 cb 46 |..:.......z....F| +00000280 ab cb eb cf ec 86 b3 fe e6 e6 73 2c a2 64 d2 d5 |..........s,.d..| +00000290 9c 8c 25 39 62 07 51 93 12 92 2b e3 4b 2e 3d f5 |..%9b.Q...+.K.=.| +000002a0 f1 d4 22 69 c3 90 cf 91 35 2f e4 60 35 44 6f bf |.."i....5/.`5Do.| +000002b0 7a 75 3d fb 70 bd 20 05 a8 f8 17 03 03 00 35 6e |zu=.p. .......5n| +000002c0 09 00 fa 13 8f d4 17 40 ee 9e 5f 8a 56 ba 7c 69 |.......@.._.V.|i| +000002d0 05 ee 65 8e fd 9c 62 7f f9 af 04 c7 46 20 07 da |..e...b.....F ..| +000002e0 bc 79 f8 cc 53 c6 fc 47 b5 54 9c fb 4d a3 cf 56 |.y..S..G.T..M..V| +000002f0 a4 57 c5 aa 17 03 03 00 17 d6 ea 39 50 a5 8e 67 |.W.........9P..g| +00000300 b9 79 76 17 77 86 a8 58 fb 86 03 74 1a e4 12 37 |.yv.w..X...t...7| +00000310 17 03 03 00 13 e7 07 59 c3 d0 27 b3 d8 e8 a3 7b |.......Y..'....{| +00000320 df e8 17 08 78 4e 9a 6b |....xN.k| diff --git a/src/crypto/tls/testdata/Client-TLSv13-ClientCert-RSA-RSAPSS b/src/crypto/tls/testdata/Client-TLSv13-ClientCert-RSA-RSAPSS index e557181b29..4892e2b555 100644 --- a/src/crypto/tls/testdata/Client-TLSv13-ClientCert-RSA-RSAPSS +++ b/src/crypto/tls/testdata/Client-TLSv13-ClientCert-RSA-RSAPSS @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,138 +7,139 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 7a 02 00 00 76 03 03 46 b8 dc eb 72 |....z...v..F...r| -00000010 ac 41 0a 3c 58 14 84 a0 75 91 e1 ca d7 3c c7 2c |.A..| -00000070 42 63 2e 2a a9 13 0c a9 f2 e6 74 14 1e 5c 52 14 |Bc.*......t..\R.| -00000080 03 03 00 01 01 17 03 03 00 17 23 71 3e 39 7a 0c |..........#q>9z.| -00000090 2a fa 89 f1 65 d1 b0 23 96 8e 6a e4 55 2c fd 34 |*...e..#..j.U,.4| -000000a0 ea 17 03 03 00 20 b7 a2 d6 ff b3 b4 db ce f8 90 |..... ..........| -000000b0 f9 a3 9c 0c 8f f0 77 3e 37 f2 d9 e7 84 65 28 f6 |......w>7....e(.| -000000c0 dd fe b9 42 03 3c 17 03 03 02 7a d4 cf 93 f6 2b |...B.<....z....+| -000000d0 64 e3 13 75 41 62 7d bd cf 4f 42 80 23 f4 03 92 |d..uAb}..OB.#...| -000000e0 35 02 5e ed bb c6 2f b1 a8 57 cf d4 69 94 6a db |5.^.../..W..i.j.| -000000f0 39 b8 3a 05 07 dd f1 1d 63 13 22 9b d7 58 68 6f |9.:.....c."..Xho| -00000100 4f ac 79 6a 47 0a 23 35 3c 9b 9f 15 04 e7 6b d8 |O.yjG.#5<.....k.| -00000110 ff df 00 6c 68 5e a0 41 6a a9 34 9f 37 98 c2 3d |...lh^.Aj.4.7..=| -00000120 51 29 73 c4 ad 34 e5 69 78 18 eb 03 55 c0 c6 0d |Q)s..4.ix...U...| -00000130 43 d5 4a 5d cb 53 e6 b9 df e8 8b 0e 98 04 89 bb |C.J].S..........| -00000140 f4 a1 48 01 af d3 42 ef 17 e7 f9 27 b4 b1 63 99 |..H...B....'..c.| -00000150 91 a6 c5 c1 cb 6d 1c 55 b1 69 1c ec b1 b7 c3 cd |.....m.U.i......| -00000160 7a 93 f2 d8 e4 c4 96 43 0a e1 18 b5 9a 3b 57 83 |z......C.....;W.| -00000170 98 ce 74 f2 4c 65 ad 01 aa 76 b5 b0 7c a0 7d 09 |..t.Le...v..|.}.| -00000180 ad d6 20 7d 12 67 f8 4c 2c 41 37 34 66 86 fe 3d |.. }.g.L,A74f..=| -00000190 44 52 f0 08 26 4c b3 e7 71 b3 89 b3 5c 78 7e db |DR..&L..q...\x~.| -000001a0 34 31 dc dc 7c 7d 28 e1 41 96 f4 2f 28 60 9f 5b |41..|}(.A../(`.[| -000001b0 b2 2b 37 6b 3f 3a 37 e2 38 7a 66 40 fe 44 44 72 |.+7k?:7.8zf@.DDr| -000001c0 b4 e3 97 f3 db 73 c8 af 96 c8 a6 24 ef ea 34 8f |.....s.....$..4.| -000001d0 5e 4b 21 22 19 d8 4a db 2e f1 23 90 d0 d2 38 f3 |^K!"..J...#...8.| -000001e0 c6 08 5d 1d c9 a3 f2 6d 01 eb 30 5e cd f4 98 f5 |..]....m..0^....| -000001f0 0d d8 68 4f 00 f4 cd 24 9f c4 3c 6a 31 5d c0 e5 |..hO...$..S8B.| -00000350 6f 99 20 c4 98 59 48 61 e0 13 80 8e 96 25 96 f8 |o. ..YHa.....%..| -00000360 c9 c8 35 9c 35 c0 13 d7 34 24 0b 6e 59 4f 1b 77 |..5.5...4$.nYO.w| -00000370 1f 9a 71 6b 6b dc 71 23 b1 a2 e8 1e c2 a0 b1 8c |..qkk.q#........| -00000380 27 5e 90 c5 f8 65 30 a2 de fc 6b b2 e3 5d 8d 9f |'^...e0...k..]..| -00000390 70 32 3c 92 47 c7 91 10 49 0d f1 3b 41 f1 14 3b |p2<.G...I..;A..;| -000003a0 09 55 f5 78 0e 91 1b 75 a0 58 fc c9 34 82 fe 51 |.U.x...u.X..4..Q| -000003b0 20 73 71 3d 7f 82 a4 29 bc 04 67 d7 30 c7 a5 4b | sq=...)..g.0..K| -000003c0 f3 94 4d 15 35 2a 1e 46 82 3f 36 f4 7b ff 9f 88 |..M.5*.F.?6.{...| -000003d0 3b e6 60 bc 86 51 59 ad 97 58 95 7e 6a 4b c9 6c |;.`..QY..X.~jK.l| -000003e0 34 96 03 17 03 03 00 35 03 94 eb e1 e5 9d eb 8f |4......5........| -000003f0 34 b1 28 3c 9d 26 40 a9 e7 4c 2b bf 37 32 b6 aa |4.(<.&@..L+.72..| -00000400 78 d2 45 0c 6c 5b 0a 0e 8a 3a b6 1a 01 09 3e 0a |x.E.l[...:....>.| -00000410 45 25 c6 83 8a 4a cc 22 d9 29 c8 8a 32 |E%...J.".)..2| +00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 e0 |..+.....3.$... .| +00000060 70 9a 3d 69 69 1f 8f de d4 c8 7c dc 65 53 9a c6 |p.=ii.....|.eS..| +00000070 77 c2 c4 21 1b 06 2d c4 4f 24 61 52 5b 00 69 14 |w..!..-.O$aR[.i.| +00000080 03 03 00 01 01 17 03 03 00 17 96 99 40 9f d8 9d |............@...| +00000090 70 f0 cf f0 86 3e 7f 4a 3a 8a a4 63 6e e1 7f 24 |p....>.J:..cn..$| +000000a0 f4 17 03 03 00 20 72 bb 5a aa 0e 2e d9 cc 38 0c |..... r.Z.....8.| +000000b0 c8 b9 88 08 6f 19 d8 38 14 14 d7 97 42 6c 45 43 |....o..8....BlEC| +000000c0 51 dc 2b f6 02 e2 17 03 03 02 7a 8d 04 2f 64 c0 |Q.+.......z../d.| +000000d0 e2 7b b5 20 9d 04 69 5e 88 82 aa f3 c6 b2 8d 6c |.{. ..i^.......l| +000000e0 41 08 c3 b1 0c 7d d1 5f d6 e6 b7 1d c0 ad 2b 0d |A....}._......+.| +000000f0 02 c5 f7 6d a0 87 91 07 20 d3 d4 2e 5a 7d 5e 29 |...m.... ...Z}^)| +00000100 37 2b ac 5f d6 cb eb e9 99 a7 05 f7 e7 ea 9c 99 |7+._............| +00000110 cd 33 25 f8 45 95 43 f4 7a 59 2a 91 8c e2 ac 84 |.3%.E.C.zY*.....| +00000120 ba 99 ef d0 d7 ea 9b db 31 b0 27 0c 81 3b b2 83 |........1.'..;..| +00000130 20 c4 8b 7e 05 ac c6 82 e9 56 5a a2 b6 7c c7 33 | ..~.....VZ..|.3| +00000140 a8 31 2f ad 60 be ec c3 2d c0 a8 b4 40 50 98 ea |.1/.`...-...@P..| +00000150 83 d1 cc a8 34 20 11 7c 2e f7 7c ca d8 27 03 a2 |....4 .|..|..'..| +00000160 58 86 e8 e6 41 46 07 18 c7 a7 61 f9 cc 2f 7d 1e |X...AF....a../}.| +00000170 bb 34 7c 6e cb b3 9c 03 2f b0 dd e9 a1 32 13 10 |.4|n..../....2..| +00000180 85 1d fa a6 bf c7 4d ec 94 8f 26 07 94 34 b3 5f |......M...&..4._| +00000190 b8 e4 da 6f 3d 5b 0a 61 8f 44 58 10 1a 4c f3 bc |...o=[.a.DX..L..| +000001a0 ff c7 8f 09 0a e4 1b 35 e8 a9 dc 9c 14 86 e5 67 |.......5.......g| +000001b0 7e 96 e9 79 8d b2 d7 34 a0 7f 43 07 11 f1 03 68 |~..y...4..C....h| +000001c0 95 5e f5 fa e7 8f c8 d6 5b 23 c4 84 e4 c5 40 58 |.^......[#....@X| +000001d0 80 4a ac b7 a7 07 21 93 c1 a9 ad 9a 89 f7 f3 9e |.J....!.........| +000001e0 bb 7d 2a 00 d0 e0 66 9d f7 86 4a ba b1 c9 1e 3b |.}*...f...J....;| +000001f0 f1 c6 6e c1 9c 09 85 38 9d fa 5a b9 ca bb a4 f5 |..n....8..Z.....| +00000200 9e 3f ba d4 31 7d aa d7 f9 bf 83 05 5c 1f 61 18 |.?..1}......\.a.| +00000210 d4 5e 16 98 c6 92 7b bd 12 96 18 c7 33 75 ad 08 |.^....{.....3u..| +00000220 d1 0b 47 4c c8 73 3e 68 fb 53 ff e0 1a 10 6c 5a |..GL.s>h.S....lZ| +00000230 7f 9d 92 32 2f c2 2d 95 7d c6 ef 18 9b 44 a1 bc |...2/.-.}....D..| +00000240 6a f5 88 79 e1 00 a3 14 8f 66 07 03 16 2a 53 80 |j..y.....f...*S.| +00000250 9b 26 80 0d 0b 5e 0c c6 c9 fa a1 3b c9 a6 91 1f |.&...^.....;....| +00000260 bd fb 79 24 ab 93 e4 25 d1 a6 41 8b 9e a9 06 0f |..y$...%..A.....| +00000270 80 2e 4e 8c 20 2c 1e a8 7e 63 7a 4f b8 90 c3 56 |..N. ,..~czO...V| +00000280 a3 9e 63 2a 8b 85 9e ef 66 f5 16 be 79 c3 9b 47 |..c*....f...y..G| +00000290 dc 1c 75 0b 30 3c db 32 e8 ec 33 f9 9f 26 3d 56 |..u.0<.2..3..&=V| +000002a0 36 e9 ea 83 57 c4 59 ac 73 db 04 5a 1d 38 9b e4 |6...W.Y.s..Z.8..| +000002b0 47 50 f8 92 92 7f c9 09 4f f4 9c ab 3e 03 df 80 |GP......O...>...| +000002c0 cc 5b 50 0b 06 ef 8c 59 d2 f6 f3 a4 16 e7 0f 90 |.[P....Y........| +000002d0 c8 79 95 0a 39 0f 33 69 31 29 1c 30 77 72 58 b5 |.y..9.3i1).0wrX.| +000002e0 cf 0e 4c 30 fc 0a 01 93 b1 20 21 34 2a ce 28 8d |..L0..... !4*.(.| +000002f0 57 71 3e c9 b1 51 c9 4f e5 e4 09 0b 1e 32 52 4e |Wq>..Q.O.....2RN| +00000300 d0 be f2 a2 90 75 f4 a8 61 66 43 84 74 4e bb 28 |.....u..afC.tN.(| +00000310 7b ea 68 96 92 6d 4b 8c af 50 13 84 92 b9 6b 48 |{.h..mK..P....kH| +00000320 60 1c 60 62 28 a2 37 d1 1c 86 d4 60 27 a6 5b 6d |`.`b(.7....`'.[m| +00000330 88 d7 56 21 b7 86 f5 b6 34 f9 55 cf 47 f8 4f 90 |..V!....4.U.G.O.| +00000340 78 5c 56 52 97 17 03 03 00 99 35 71 51 6f 73 ba |x\VR......5qQos.| +00000350 76 60 e1 4a 5f ec ce 52 b6 91 58 3d 0c ea e6 58 |v`.J_..R..X=...X| +00000360 7e ee da 1e aa df bb 8e c9 89 ce 43 bd e7 34 9b |~..........C..4.| +00000370 b8 4b dd 50 73 0c f7 e5 15 e0 a1 c3 bd 07 08 62 |.K.Ps..........b| +00000380 a2 d5 2e 9f 46 f7 4d 9c ae ad be 22 89 0f b0 3e |....F.M...."...>| +00000390 82 1c 80 60 38 39 4f 06 f9 fc 4c f8 02 bf b3 5a |...`89O...L....Z| +000003a0 25 22 f4 62 61 ba eb 78 b2 40 68 ea 99 ef 95 90 |%".ba..x.@h.....| +000003b0 b1 b5 25 17 81 43 5c 15 bd a9 1f e8 0f b9 91 be |..%..C\.........| +000003c0 f1 47 91 99 ec 50 3b fa c2 06 fc 89 09 a3 d7 b3 |.G...P;.........| +000003d0 ed e3 3d 41 57 07 4b b0 3d 02 51 7e 13 bb d3 68 |..=AW.K.=.Q~...h| +000003e0 49 4c 6a 17 03 03 00 35 63 f7 b5 68 31 22 c7 f5 |ILj....5c..h1"..| +000003f0 50 ae c0 81 0f 50 fb ba 50 72 8a d7 e0 c0 73 07 |P....P..Pr....s.| +00000400 d0 88 ed 6d 7b e7 66 b3 8d e3 10 ca 2f 68 c3 39 |...m{.f...../h.9| +00000410 d9 b9 09 44 78 4a 11 91 fb 51 ea 9f 9a |...DxJ...Q...| >>> Flow 3 (client to server) -00000000 14 03 03 00 01 01 17 03 03 02 7a 3e 62 91 75 b4 |..........z>b.u.| -00000010 58 7d 61 ac 42 4b 1b 91 86 cd 3f c0 6d 30 5a 01 |X}a.BK....?.m0Z.| -00000020 11 1e 77 87 92 50 bb a0 d2 c6 84 b6 10 37 02 ab |..w..P.......7..| -00000030 2d c2 c2 12 0a db f5 8f e4 1f dd 16 ec 83 ad db |-...............| -00000040 2d 8b ec fa aa 56 44 4e d4 af ce d2 9f 44 3d de |-....VDN.....D=.| -00000050 12 29 db bc 29 2a df 99 d7 d0 53 79 84 a4 b8 2d |.)..)*....Sy...-| -00000060 8b 5c e6 a4 b7 98 07 5a f4 63 10 21 87 13 09 07 |.\.....Z.c.!....| -00000070 28 98 49 48 07 70 c1 ab 8b 62 6d 40 a8 47 27 67 |(.IH.p...bm@.G'g| -00000080 d6 ad 29 8d 2e 14 34 14 18 6b dd f0 76 3b 91 f9 |..)...4..k..v;..| -00000090 e1 93 a2 1c 3a 5e 18 a3 c9 ca b0 c9 cf d9 3c f5 |....:^........<.| -000000a0 a3 38 c7 83 53 67 14 ba 65 6f 11 a2 ef 78 7e ea |.8..Sg..eo...x~.| -000000b0 4a 90 c9 aa bf e9 8e ff 8c 9d 7c 5f 56 c3 9b 16 |J.........|_V...| -000000c0 c1 8a a9 51 24 20 86 dc 99 ac d2 28 af 7b 2d 6e |...Q$ .....(.{-n| -000000d0 16 9b 71 71 82 00 94 51 a4 4f 22 c1 26 a2 6f 67 |..qq...Q.O".&.og| -000000e0 d9 45 ff 80 13 39 16 0f 9c 43 76 54 e5 12 0f 89 |.E...9...CvT....| -000000f0 95 ed 75 df eb cb 6b d2 77 fd fa 37 d7 a3 31 b5 |..u...k.w..7..1.| -00000100 61 47 69 8f 99 55 70 d0 96 b0 f7 a9 1b 53 69 a3 |aGi..Up......Si.| -00000110 e4 59 cc a1 d9 4b d5 4f e2 47 c1 53 30 60 50 03 |.Y...K.O.G.S0`P.| -00000120 c7 07 67 3f 68 ce 8c 32 7e f1 93 12 ba d8 67 21 |..g?h..2~.....g!| -00000130 71 4f c9 ca ae 7b 56 8d f7 64 14 e3 8d d6 a6 ed |qO...{V..d......| -00000140 d0 63 5e 00 1e f7 8a 0c 1e c3 24 e0 bd e2 e8 99 |.c^.......$.....| -00000150 da ca 01 9e fb 21 9e 1f 57 98 f1 36 7d c8 a8 7b |.....!..W..6}..{| -00000160 4b 27 13 fb 8c ab d6 b3 27 3e f5 b5 08 eb cb a9 |K'......'>......| -00000170 b0 a4 d4 3e c9 14 08 75 51 83 48 03 e7 79 65 30 |...>...uQ.H..ye0| -00000180 a4 1a 4f a8 7a 41 c8 af 9e 74 89 4d ec eb 58 9b |..O.zA...t.M..X.| -00000190 20 db 80 ce e0 c8 a7 1c b2 62 fc 85 7d 87 ca 00 | ........b..}...| -000001a0 64 4c 25 4d 3c b2 bf 9d 46 c5 04 b5 dd 7a 29 87 |dL%M<...F....z).| -000001b0 29 30 2e bc 42 31 9b f2 eb 7b 58 63 91 28 6f 43 |)0..B1...{Xc.(oC| -000001c0 6b c1 4e 00 b2 4b 9d 0c ef 18 5b 61 ec 77 84 e1 |k.N..K....[a.w..| -000001d0 88 49 f9 e2 71 2e 35 23 b8 73 6d c2 52 d1 2f ad |.I..q.5#.sm.R./.| -000001e0 55 40 4e a2 b0 14 1b 50 d7 9d 12 80 89 ab 88 a5 |U@N....P........| -000001f0 01 16 88 d5 4f 95 0c ce 79 c7 49 27 4b 44 4d fe |....O...y.I'KDM.| -00000200 f5 cd 95 08 b9 26 8d 52 ff d7 bc 47 11 16 d5 d0 |.....&.R...G....| -00000210 7d 4c 3c 04 74 92 5b 85 d2 2c 95 b8 4b 02 0b 66 |}L<.t.[..,..K..f| -00000220 60 7d b9 12 6e d3 06 73 cc c2 69 b9 fe ad f9 4c |`}..n..s..i....L| -00000230 f6 24 a0 eb 96 f0 b8 7c 32 dc 4c 67 04 83 15 84 |.$.....|2.Lg....| -00000240 f9 ef 70 e7 55 85 0e 8f b3 78 20 2c ed 69 29 89 |..p.U....x ,.i).| -00000250 d4 d8 5e 97 16 59 90 0f 79 41 6e cf 02 d3 9d 08 |..^..Y..yAn.....| -00000260 e4 0c 27 0c 74 97 c6 d6 89 6b c9 65 37 7b ae 6b |..'.t....k.e7{.k| -00000270 b7 0f e8 70 57 a3 1c 95 8d 66 da 4e 34 51 c8 e0 |...pW....f.N4Q..| -00000280 0e 83 e3 24 64 17 03 03 00 99 e3 31 2c ae ae 1c |...$d......1,...| -00000290 64 6c fc 36 c8 9f c2 88 16 c7 b2 ae 4a ef 3a 90 |dl.6........J.:.| -000002a0 f4 ad f2 91 58 37 7c 94 c2 e3 ed 76 c5 90 fb e6 |....X7|....v....| -000002b0 88 08 a6 a2 53 5a 78 cb bd f2 3c 6e 36 b4 cd 87 |....SZx...XCK.......N..ZR..| +000000c0 bd fa f0 a7 88 d5 9e 76 9b 2b 23 fb 37 c0 f1 0a |.......v.+#.7...| +000000d0 d2 df d4 2c 5d 8c 64 f0 98 3c 85 3f bb ed 30 44 |...,].d..<.?..0D| +000000e0 eb cb fc 47 e5 8a 57 ff 37 23 6d e2 75 a7 15 e4 |...G..W.7#m.u...| +000000f0 dc f9 02 8f c4 af d8 e8 bb 07 43 90 5b c2 86 f3 |..........C.[...| +00000100 40 22 a7 bb b6 f1 f6 4c 2e d6 fd d8 02 f0 3d 27 |@".....L......='| +00000110 89 38 97 7d 6e d3 6c b1 4c 87 ca 30 e9 ec fe b3 |.8.}n.l.L..0....| +00000120 db 62 ea 2f 3a 83 95 18 4e 44 4f 97 c4 ff f6 bb |.b./:...NDO.....| +00000130 0b b0 98 c7 c6 c7 94 0a 8b c9 c0 d9 51 d3 6a e1 |............Q.j.| +00000140 36 55 79 c4 37 75 6f e7 14 53 60 9e 22 00 fe d7 |6Uy.7uo..S`."...| +00000150 ef e4 ca 60 38 12 25 8c c6 c9 7e 5f 1a 7c f1 c1 |...`8.%...~_.|..| +00000160 a7 15 b2 f4 32 31 de c8 a2 d4 59 46 1e 68 a6 94 |....21....YF.h..| +00000170 b8 18 52 df 44 01 0b a0 a0 02 60 83 84 fc ad 99 |..R.D.....`.....| +00000180 fc 60 0b 23 0a 7a f9 73 bf d8 a5 af 9b ea dd a3 |.`.#.z.s........| +00000190 fb 5b 41 17 95 0a 57 4a 94 7e 24 9f 31 74 06 65 |.[A...WJ.~$.1t.e| +000001a0 95 90 40 20 17 0b 95 22 b8 49 4e a6 a4 be e1 74 |..@ ...".IN....t| +000001b0 01 a2 7e cd 60 50 46 5c fd 2a 88 90 ef 7f 6c b8 |..~.`PF\.*....l.| +000001c0 3e a1 40 8e 91 cd 8d db ad 81 d0 08 b0 d0 d7 ae |>.@.............| +000001d0 18 4f 47 9b 1a 66 8b a5 d2 fb 01 d3 67 79 46 71 |.OG..f......gyFq| +000001e0 5a 49 dd df 06 c6 57 c7 e0 b1 60 39 d4 a9 37 88 |ZI....W...`9..7.| +000001f0 31 0d c0 92 4e c7 2a 25 c4 df b0 d8 df bb 31 1b |1...N.*%......1.| +00000200 ff 0a 34 46 46 88 0b 11 7d 20 32 cd 01 d0 3f 11 |..4FF...} 2...?.| +00000210 e1 6e 63 42 d7 4a 83 ab ad f7 51 bd c3 37 2b 76 |.ncB.J....Q..7+v| +00000220 9e bb 45 3b 81 d8 47 71 02 b9 fe 7c 56 46 78 3e |..E;..Gq...|VFx>| +00000230 9e 94 00 1b 98 17 72 37 c0 e5 36 a9 f0 02 b7 cf |......r7..6.....| +00000240 f0 b4 66 10 1b 91 07 5f bb 22 e8 12 d9 e3 33 dd |..f...._."....3.| +00000250 87 66 e4 f6 00 f6 3a dc 19 59 af ce 8e ae c4 d3 |.f....:..Y......| +00000260 03 d8 25 02 40 7e 95 70 31 85 53 bc 9e 96 11 69 |..%.@~.p1.S....i| +00000270 5b 2f b9 17 48 f4 ae c5 a1 c5 d1 7f 4a 10 06 b6 |[/..H.......J...| +00000280 2e 34 6c 09 12 17 03 03 00 99 16 4c 04 64 97 e0 |.4l........L.d..| +00000290 26 e1 66 e9 34 05 d7 d3 75 e3 b9 de 56 15 51 67 |&.f.4...u...V.Qg| +000002a0 fb fe 9a c6 9a 3c 38 08 2c c8 8c dd fe 49 c5 ed |.....<8.,....I..| +000002b0 a8 54 86 90 2c f6 7c d1 12 02 99 94 5e 2e 4b 4e |.T..,.|.....^.KN| +000002c0 84 e9 b4 96 5c dc 56 28 3d ea a9 4f 8f ad 51 ff |....\.V(=..O..Q.| +000002d0 02 b1 b9 7a 29 e5 32 7c 2a 8b 60 5d e2 fc b4 8f |...z).2|*.`]....| +000002e0 06 32 4a ea 37 ed 03 f0 68 72 b7 83 1f 04 10 2b |.2J.7...hr.....+| +000002f0 24 db 5b 10 6c 41 55 40 54 69 07 39 d4 db ac 10 |$.[.lAU@Ti.9....| +00000300 77 9f 04 f4 b9 3f 35 7e 04 af ab 7a a0 47 b9 d9 |w....?5~...z.G..| +00000310 4c 6e 25 00 ce ef 93 3f 28 2c 2d f6 42 e4 5f 3e |Ln%....?(,-.B._>| +00000320 26 92 13 17 03 03 00 35 fb 14 eb 5f 18 61 75 ba |&......5..._.au.| +00000330 e4 dc d2 95 fe 93 bb 54 29 e3 38 e3 59 54 81 9f |.......T).8.YT..| +00000340 4e 29 be c6 e6 cd ad 8c 9d 6a ad 28 ec d3 a6 e4 |N).......j.(....| +00000350 bc 5e 8c df a8 7e 14 d8 69 3c 30 7c 0a 17 03 03 |.^...~..i<0|....| +00000360 00 17 10 73 c0 75 88 af 51 90 ff 3f b2 83 47 27 |...s.u..Q..?..G'| +00000370 19 c0 e6 cd 14 a4 c7 8d a0 17 03 03 00 13 fb 1f |................| +00000380 ed 8e 47 c8 79 f9 53 df 6d 97 a7 1d 53 8d 80 85 |..G.y.S.m...S...| +00000390 dd |.| diff --git a/src/crypto/tls/testdata/Client-TLSv13-ECDSA b/src/crypto/tls/testdata/Client-TLSv13-ECDSA index b6a3b2addb..eeab871172 100644 --- a/src/crypto/tls/testdata/Client-TLSv13-ECDSA +++ b/src/crypto/tls/testdata/Client-TLSv13-ECDSA @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,81 +7,82 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 7a 02 00 00 76 03 03 24 80 76 3d db |....z...v..$.v=.| -00000010 cf 32 53 04 de ce 2e 74 95 bb 30 a8 d5 5e ab ed |.2S....t..0..^..| -00000020 3c 1e 1a ae 92 63 8f 40 0b ce a4 20 00 00 00 00 |<....c.@... ....| +00000000 16 03 03 00 7a 02 00 00 76 03 03 a5 7b 07 50 bc |....z...v...{.P.| +00000010 01 11 74 76 99 fb 85 e5 40 6b 02 14 d9 64 b1 8a |..tv....@k...d..| +00000020 8b 78 a3 ee 2e 4d b0 96 14 3a fb 20 00 00 00 00 |.x...M...:. ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 13 03 00 00 |................| -00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 d2 |..+.....3.$... .| -00000060 b3 86 f1 35 22 26 89 f4 07 ab b8 f5 27 a6 d5 c9 |...5"&......'...| -00000070 87 00 59 43 b8 df da 92 f6 f5 ed f4 8d 04 26 14 |..YC..........&.| -00000080 03 03 00 01 01 17 03 03 00 17 ed 6b 14 3a 82 c5 |...........k.:..| -00000090 88 9d a4 96 c7 c4 c7 73 63 c6 58 65 d0 d4 a6 cb |.......sc.Xe....| -000000a0 dc 17 03 03 02 22 e8 c5 15 54 3c 26 7b 87 8c d3 |....."...T<&{...| -000000b0 99 b0 af 98 21 1b 8f be f5 d8 40 c9 05 97 39 fd |....!.....@...9.| -000000c0 3d b2 da 2d 80 26 c9 24 cd 14 0b 48 2e d7 c4 dc |=..-.&.$...H....| -000000d0 4c 61 1e 5d 46 ce 66 cd 94 50 a4 e8 c4 d7 f0 48 |La.]F.f..P.....H| -000000e0 20 16 52 fb 12 04 17 48 7d 65 49 50 c5 b8 e6 9c | .R....H}eIP....| -000000f0 be f6 58 09 ea 8b 94 51 93 cf 0d 7a 76 88 78 cb |..X....Q...zv.x.| -00000100 37 83 43 fa 37 d5 5b 3f 10 1d 07 b1 bb 9b ac 3a |7.C.7.[?.......:| -00000110 43 e0 62 b1 fe 64 43 83 53 49 96 9e 81 1c 05 64 |C.b..dC.SI.....d| -00000120 40 2a 1b 98 5f ed 8d 47 52 2c db 84 8b 6a 1e 3b |@*.._..GR,...j.;| -00000130 de bb 7d 20 e6 cf 2a 79 2e c4 54 71 56 2f 79 45 |..} ..*y..TqV/yE| -00000140 07 3f 05 6c 82 e8 ab f7 62 0a 28 e0 db 83 6b bd |.?.l....b.(...k.| -00000150 55 81 8f 3f b6 1f d0 83 cd 97 67 71 56 f5 13 aa |U..?......gqV...| -00000160 45 95 65 ce 1e 42 bf 6a 83 6e bc 2e 41 28 79 b7 |E.e..B.j.n..A(y.| -00000170 b8 3f 6e 64 14 8d ed 3a a4 02 06 46 17 e5 c7 f8 |.?nd...:...F....| -00000180 72 f1 5f 9b 14 96 c9 c6 53 e6 32 b2 0b cc d5 d7 |r._.....S.2.....| -00000190 89 1e d9 52 fb 8f 48 8b 41 6e c6 f3 55 57 41 5d |...R..H.An..UWA]| -000001a0 95 03 9c 34 ea 3c a8 58 8d b7 89 82 e1 40 e0 60 |...4.<.X.....@.`| -000001b0 22 ab 23 30 e8 f0 4e 21 a1 11 0a 7f 18 80 ad de |".#0..N!........| -000001c0 41 ba a1 12 60 31 60 0f 84 f6 91 b1 ae ca f5 81 |A...`1`.........| -000001d0 3e d6 4e 3a 89 b6 b0 fe 3f 27 18 20 65 a9 d4 6c |>.N:....?'. e..l| -000001e0 ac 8a 46 08 e2 7d 06 6d 52 8c 69 9e 24 9b 8d f9 |..F..}.mR.i.$...| -000001f0 b7 a7 74 87 bd f9 84 ca 18 7d 5b 50 1d 8e 64 e1 |..t......}[P..d.| -00000200 39 6f f7 56 5a ef 08 6b e2 a1 87 e4 7a 5e ea b6 |9o.VZ..k....z^..| -00000210 12 75 2d ee e9 af a4 36 99 91 88 11 97 f3 d5 fb |.u-....6........| -00000220 8b 52 59 bc 9c 18 03 5b b1 59 47 ae d4 bb a1 65 |.RY....[.YG....e| -00000230 cf bf 40 54 e5 e7 6e e0 0c 26 0e a1 d2 4d 41 19 |..@T..n..&...MA.| -00000240 36 b5 b6 48 33 96 8a e3 a5 56 9b 34 16 ae 36 48 |6..H3....V.4..6H| -00000250 c5 ff 12 a7 33 f4 76 40 de d1 4b 41 ed 18 3b 04 |....3.v@..KA..;.| -00000260 06 32 6e f3 57 c6 be 72 58 7f 78 b7 91 65 00 a8 |.2n.W..rX.x..e..| -00000270 8d 5c 7f ff 0a 62 d4 99 82 b2 6b c8 80 3e 89 30 |.\...b....k..>.0| -00000280 dd 31 60 7a 00 6e a2 13 c7 58 08 b0 d5 32 03 2e |.1`z.n...X...2..| -00000290 08 86 a2 97 7a f0 a1 95 10 5f a2 d6 fc e7 a3 93 |....z...._......| -000002a0 16 a2 3d 33 04 e7 aa 3b 99 a5 ce c7 2c 28 71 bb |..=3...;....,(q.| -000002b0 ed e6 b9 5a a5 ec d1 44 54 e0 ff 41 cf 1a cb ff |...Z...DT..A....| -000002c0 67 43 6b af 87 19 40 74 17 03 03 00 a4 bc ef 32 |gCk...@t.......2| -000002d0 22 da e9 d5 93 ce 06 bd 3d 6c 2e f0 0c de ec b8 |".......=l......| -000002e0 12 d6 28 17 c6 64 aa 8d 4b 04 76 9e 41 3c 4a 94 |..(..d..K.v.Aru@.0.| -000003a0 fd 46 9d 5e 79 39 e1 a8 f9 27 2b |.F.^y9...'+| +00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 67 |..+.....3.$... g| +00000060 b0 dc 13 4f 2b 92 43 27 38 b5 2c 7a 3a 87 83 6f |...O+.C'8.,z:..o| +00000070 a1 cc 43 fa 90 9e 2e 4d 88 f6 60 d4 20 32 6a 14 |..C....M..`. 2j.| +00000080 03 03 00 01 01 17 03 03 00 17 9b 51 d0 81 30 4b |...........Q..0K| +00000090 52 65 8b b5 fe 1a cc 44 c9 7a 10 83 41 0b 1a 00 |Re.....D.z..A...| +000000a0 76 17 03 03 02 22 4e 55 d0 64 9c 41 c8 22 2c 9c |v...."NU.d.A.",.| +000000b0 0e 0a 0c 2b 2b 2e 6e 08 d5 54 75 61 99 bf ea f5 |...++.n..Tua....| +000000c0 ca 12 3e 44 7f 81 a8 40 d1 7c 4d a0 a3 d2 f3 07 |..>D...@.|M.....| +000000d0 40 af 68 81 69 dd 7c 77 24 26 87 73 73 5e d2 0c |@.h.i.|w$&.ss^..| +000000e0 2a 32 c5 34 50 ef a8 0f 63 12 3a 47 34 8f f2 c6 |*2.4P...c.:G4...| +000000f0 9f bd 81 bf ea 69 47 04 8b 87 64 4e 67 81 10 a5 |.....iG...dNg...| +00000100 f1 76 92 5e d6 11 a5 48 5b cc ef a8 43 dd cf f5 |.v.^...H[...C...| +00000110 20 9d b8 2f f4 0d 92 10 55 af d1 fa ab 64 5f 99 | ../....U....d_.| +00000120 3e 6b e9 70 70 f1 22 d9 05 04 89 3a fa 65 ae 91 |>k.pp."....:.e..| +00000130 9d 07 ea 54 93 2d 02 0c c0 70 d9 e9 f0 9a 5a 81 |...T.-...p....Z.| +00000140 c6 c6 79 e0 e1 90 ad 34 78 bf d3 c8 9c 68 2e ac |..y....4x....h..| +00000150 e6 2d c0 e5 c8 3c 77 80 d7 dd e5 a4 ac b8 36 4f |.-...@..I<..FW.Ye.| +00000170 4e db 21 ea ab 72 47 79 e6 c1 4f ea 17 e3 b4 73 |N.!..rGy..O....s| +00000180 9d e2 e5 72 be 88 0a 60 1e 35 02 67 33 a0 7a 05 |...r...`.5.g3.z.| +00000190 b8 ae 05 b2 53 6c cd c5 e3 a5 16 56 2b b0 0e 8e |....Sl.....V+...| +000001a0 a0 ca 54 c0 34 6b 00 22 69 de e1 57 81 48 c6 1a |..T.4k."i..W.H..| +000001b0 cc 88 f6 15 1c 7e b6 1f b0 48 82 75 6b ff 42 78 |.....~...H.uk.Bx| +000001c0 f9 85 10 86 5b af 31 62 f6 7b d4 8a a6 86 3f 99 |....[.1b.{....?.| +000001d0 9b ce 91 c0 4d 44 5b 3f 16 81 d0 a9 4a e0 2d 85 |....MD[?....J.-.| +000001e0 a4 80 91 64 13 20 33 dc 84 48 da 79 2e 73 cb 78 |...d. 3..H.y.s.x| +000001f0 9c 05 8a 6c 42 ce b0 b0 45 3c 05 47 47 f7 92 3b |...lB...E<.GG..;| +00000200 d2 fb 65 f0 40 a3 52 b7 aa 04 ae 71 84 35 12 7a |..e.@.R....q.5.z| +00000210 33 f8 8b 0d 21 a3 29 ad 78 de df 7f 53 71 fb 5f |3...!.).x...Sq._| +00000220 a5 ab 07 89 3a 1f e9 ca 6d 8d bb 04 39 8d b3 50 |....:...m...9..P| +00000230 7e 2e bd 0f b8 ff 4f 3f d1 a5 23 b9 80 33 da b0 |~.....O?..#..3..| +00000240 2c dc 0f c2 26 b2 cf 59 d9 10 ef 66 52 40 e4 54 |,...&..Y...fR@.T| +00000250 28 5e 7f c1 94 62 8f 4f 9b 94 fc c9 32 af f5 17 |(^...b.O....2...| +00000260 5d 04 32 08 83 f4 90 68 68 01 d3 00 ed 82 f3 da |].2....hh.......| +00000270 81 2e d5 df 1e 13 c3 c3 76 83 c4 67 23 c4 32 c0 |........v..g#.2.| +00000280 59 5d dd 56 78 d9 74 ef 7b d5 c9 13 4d 62 29 85 |Y].Vx.t.{...Mb).| +00000290 ca 24 53 1a b1 2b 09 a1 a6 26 db 13 cf 2a 2b 92 |.$S..+...&...*+.| +000002a0 85 a3 51 2b 24 e1 90 2a fe 0c 74 ee 86 cc 3b 6a |..Q+$..*..t...;j| +000002b0 07 21 a6 b6 97 a4 e0 9f 3d 75 9a 2b 9e 91 ef d8 |.!......=u.+....| +000002c0 c9 94 28 ba 40 e4 cc 6a 17 03 03 00 a4 ab c3 c1 |..(.@..j........| +000002d0 32 1d 44 0d f7 85 e3 85 df 9e bb 0c 82 18 a2 9f |2.D.............| +000002e0 27 de 78 4f 06 9b 43 59 27 b5 8e 34 4d 96 b3 96 |'.xO..CY'..4M...| +000002f0 af 8b 98 d0 36 91 52 df 9c aa c2 fe e7 0f ed ca |....6.R.........| +00000300 ef 57 73 97 cc c8 dc 7c c8 15 73 ad a6 3e 54 93 |.Ws....|..s..>T.| +00000310 1a ab 72 f6 e0 e3 cb bb fe a5 d1 45 47 f3 1a 89 |..r........EG...| +00000320 40 f7 9d f5 e4 61 16 fa 12 0a 62 24 a7 34 ab 6f |@....a....b$.4.o| +00000330 08 85 b2 fe b2 5c 49 59 7b cb 05 b2 e3 1a 37 79 |.....\IY{.....7y| +00000340 b1 27 28 a5 ab ee ae 72 11 19 61 c0 3b ed 32 ec |.'(....r..a.;.2.| +00000350 57 26 76 8e 42 3c 98 4a ec 10 4e e0 eb e2 19 3d |W&v.B<.J..N....=| +00000360 67 47 99 9c e5 97 a4 07 ff 7a b5 15 65 0e b9 e4 |gG.......z..e...| +00000370 e3 17 03 03 00 35 61 d9 d8 36 a0 1e 83 b0 f8 1f |.....5a..6......| +00000380 74 61 a0 4b 93 7f 98 8b 63 1c 63 82 f4 cd 57 8d |ta.K....c.c...W.| +00000390 1f 75 7a 6d a9 1d e2 35 0b 2b 9a 5f 5f 71 cd 46 |.uzm...5.+.__q.F| +000003a0 48 7f 27 af a5 da 8b 35 b1 18 39 |H.'....5..9| >>> Flow 3 (client to server) -00000000 14 03 03 00 01 01 17 03 03 00 35 09 35 dd b0 97 |..........5.5...| -00000010 7b a4 5b ef 16 90 e4 15 aa 19 e4 5b e8 f1 11 c0 |{.[........[....| -00000020 e0 fa 4b 0e df a3 4a 7c cd 9a 0a c4 05 65 e9 5b |..K...J|.....e.[| -00000030 8b 0b e0 3c b2 5a cc eb 87 2b 67 0d 9f 19 d0 ec |...<.Z...+g.....| -00000040 17 03 03 00 17 68 1f ad 70 7c 49 62 6b 2f 67 15 |.....h..p|Ibk/g.| -00000050 d1 bf bb 35 b3 b3 2b f3 12 27 b6 0e 17 03 03 00 |...5..+..'......| -00000060 13 23 39 42 9f 8a 9e 68 41 39 fa 3b 50 bc 56 59 |.#9B...hA9.;P.VY| -00000070 d0 3a 5a 9a |.:Z.| +00000000 14 03 03 00 01 01 17 03 03 00 35 3d 13 d4 8c 88 |..........5=....| +00000010 73 62 97 8b 18 04 f7 05 8d c8 56 d2 f4 0a 86 93 |sb........V.....| +00000020 d4 6f 08 1c d8 7f 57 be 50 03 a7 4a c8 37 80 04 |.o....W.P..J.7..| +00000030 43 1b 2a 86 21 25 ae 84 53 80 0c f6 4f 2e 73 67 |C.*.!%..S...O.sg| +00000040 17 03 03 00 17 43 99 86 f2 2f a2 22 05 36 d8 47 |.....C.../.".6.G| +00000050 c5 57 92 93 c7 79 d9 fd 13 70 8f 75 17 03 03 00 |.W...y...p.u....| +00000060 13 15 90 47 ea af 57 89 d4 19 70 e7 e1 ce 68 8a |...G..W...p...h.| +00000070 7b 83 8c a5 |{...| diff --git a/src/crypto/tls/testdata/Client-TLSv13-Ed25519 b/src/crypto/tls/testdata/Client-TLSv13-Ed25519 index 3a2915d613..274620a257 100644 --- a/src/crypto/tls/testdata/Client-TLSv13-Ed25519 +++ b/src/crypto/tls/testdata/Client-TLSv13-Ed25519 @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,63 +7,64 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 7a 02 00 00 76 03 03 b2 4d aa 76 5b |....z...v...M.v[| -00000010 b7 38 95 18 e6 81 66 f8 27 82 26 2c b3 44 50 b0 |.8....f.'.&,.DP.| -00000020 f4 a8 f5 f2 87 f0 9d 85 4f ac 60 20 00 00 00 00 |........O.` ....| +00000000 16 03 03 00 7a 02 00 00 76 03 03 5a e2 b6 f0 cf |....z...v..Z....| +00000010 f2 85 49 e0 28 8c d7 89 41 39 5f a4 e8 41 9b f6 |..I.(...A9_..A..| +00000020 1d 2b 3a 8a 3e a3 40 29 76 17 22 20 00 00 00 00 |.+:.>.@)v." ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 13 03 00 00 |................| -00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 e7 |..+.....3.$... .| -00000060 c2 3e 68 73 d9 fd 6e 69 16 15 85 84 24 45 36 47 |.>hs..ni....$E6G| -00000070 1b ad d9 c4 dc 4a 61 c6 12 5c 22 bf 1e 2f 59 14 |.....Ja..\"../Y.| -00000080 03 03 00 01 01 17 03 03 00 17 0f a4 05 81 10 48 |...............H| -00000090 c7 b7 78 9b 56 14 6c 9f 55 28 e3 4c 42 80 cc 1c |..x.V.l.U(.LB...| -000000a0 31 17 03 03 01 50 0d af 3b 08 02 84 89 42 b5 75 |1....P..;....B.u| -000000b0 c5 8f 9f c2 b1 dc cb 7c 6a d5 31 41 9a 16 8f fa |.......|j.1A....| -000000c0 74 40 21 5d f9 cc b0 1d 30 80 87 9a b2 57 58 53 |t@!]....0....WXS| -000000d0 2c 9e 5c 97 20 9c 81 77 16 25 62 9b fc a4 e1 9a |,.\. ..w.%b.....| -000000e0 80 c8 9a 4c f6 fc ae 79 a5 c2 26 4b 55 41 ff d0 |...L...y..&KUA..| -000000f0 25 4b 70 c9 ad b6 04 80 65 19 e0 fe 05 e7 b4 dc |%Kp.....e.......| -00000100 53 8f f8 3b ed 2c df b9 08 c2 da 60 b9 23 17 50 |S..;.,.....`.#.P| -00000110 da 0f 24 76 15 21 e6 e9 a8 f5 3e 08 cc 1b ee 92 |..$v.!....>.....| -00000120 2b 01 92 8d f9 4f 5a 3a 53 11 fc 32 52 cc af cd |+....OZ:S..2R...| -00000130 7b 94 0e 76 10 c2 16 36 2d a4 64 69 1c 05 70 20 |{..v...6-.di..p | -00000140 0d 23 cd 4a 33 c5 c7 db db 0f f8 b6 42 0c 83 0a |.#.J3.......B...| -00000150 a1 73 68 fb 87 2c 9d d2 d3 cf d7 3a bb 36 7e 83 |.sh..,.....:.6~.| -00000160 c3 3f bc e2 61 d9 c2 8b 15 a2 cc bf 14 a0 69 f4 |.?..a.........i.| -00000170 22 02 a9 ff 5e 55 37 6e 61 86 71 73 94 2f 7e 50 |"...^U7na.qs./~P| -00000180 45 96 cf 23 dd 39 90 5d 57 04 a3 d0 9f 97 f8 56 |E..#.9.]W......V| -00000190 fa cf 7a a9 e6 57 1f cb 33 a0 82 7a 84 94 1f 6d |..z..W..3..z...m| -000001a0 d8 0b c7 fb bc 62 94 36 4a d6 96 ce f6 f2 7f 06 |.....b.6J.......| -000001b0 18 59 66 77 77 12 8c 74 06 61 8f b6 37 35 65 fd |.Yfww..t.a..75e.| -000001c0 f1 0b fe e6 cc a9 64 f5 b5 0d 06 4e 38 4b 4b 78 |......d....N8KKx| -000001d0 be 6a cc 67 9e 39 f8 f2 27 33 a9 2d bc 9c 5e 06 |.j.g.9..'3.-..^.| -000001e0 b9 fb 76 0c be 8d 2a a5 6d cf 83 55 4f c5 6e 6e |..v...*.m..UO.nn| -000001f0 d0 08 8b f6 5a 61 17 03 03 00 59 c1 cc 58 14 33 |....Za....Y..X.3| -00000200 5a 39 b5 40 46 e8 b1 28 06 08 22 d3 27 b4 e6 ef |Z9.@F..(..".'...| -00000210 10 79 08 d4 ce 9e e2 cb 0b 86 a4 b1 80 e4 1b ac |.y..............| -00000220 71 15 fd 16 5b aa 01 c2 7b e3 c2 84 01 c0 f6 04 |q...[...{.......| -00000230 a7 31 2b ec f2 50 bf 5a 07 6f b8 03 9f d2 c6 ad |.1+..P.Z.o......| -00000240 73 18 81 f5 fd 9a 5a b2 bc 9f 85 94 9f f6 da da |s.....Z.........| -00000250 dd 56 bc 66 17 03 03 00 35 9f 7e 2e 02 66 bb ac |.V.f....5.~..f..| -00000260 3d d8 92 70 c9 35 c6 df ff 0f 81 b5 ca d4 56 4a |=..p.5........VJ| -00000270 24 06 06 57 28 e9 9d 82 0e 40 06 a7 f8 cc bc 6c |$..W(....@.....l| -00000280 a2 ea 2b 0e 88 77 05 de 3d 30 a0 6f bc 98 |..+..w..=0.o..| +00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 d1 |..+.....3.$... .| +00000060 41 fa 43 c4 c8 0a 98 e0 da 88 c8 58 36 ab 12 61 |A.C........X6..a| +00000070 d5 2d 9a 5b 10 fd 1f 10 bf d4 df 23 d0 de 2c 14 |.-.[.......#..,.| +00000080 03 03 00 01 01 17 03 03 00 17 bf 64 74 65 06 48 |...........dte.H| +00000090 41 72 b9 9f 41 24 a9 d0 05 00 4e 8c 93 a8 bd 91 |Ar..A$....N.....| +000000a0 ce 17 03 03 01 50 20 58 c1 4f 42 ed e9 e6 50 86 |.....P X.OB...P.| +000000b0 5f 49 88 ac 8b b8 3d 25 1d 87 b5 7f 9f 1a a2 cd |_I....=%........| +000000c0 f2 90 d0 6d 13 ed a6 6c f9 1e af c8 73 dd 68 d4 |...m...l....s.h.| +000000d0 46 1f ce d4 74 87 57 0f c1 b7 dd bd 5a 44 7c 08 |F...t.W.....ZD|.| +000000e0 2d 60 ca 34 1f 94 ee 4a cd e7 4a 69 1c 8d 4c 64 |-`.4...J..Ji..Ld| +000000f0 e8 a1 90 89 75 e2 3b 5b 0e 58 f8 7a 0a fe 2d 6d |....u.;[.X.z..-m| +00000100 ee 82 ab 07 e3 09 ae 37 d5 d6 31 9f 47 a5 eb ca |.......7..1.G...| +00000110 fd d9 5e b3 f1 ab 8a 64 8f 66 7d e7 a5 66 b4 46 |..^....d.f}..f.F| +00000120 3c 3c 2c 2f f7 5a 46 b3 e7 8b a4 3e 5f 21 ab 66 |<<,/.ZF....>_!.f| +00000130 60 4d ca 20 4b 7b 75 5a 88 a5 65 97 1b 70 5b 69 |`M. K{uZ..e..p[i| +00000140 7b 22 87 48 e4 a2 a8 32 06 65 00 91 e6 ac 6c 9b |{".H...2.e....l.| +00000150 42 04 53 f5 e5 46 72 d6 3a 7d d8 c1 e4 f1 79 dc |B.S..Fr.:}....y.| +00000160 de 7b 21 83 d0 98 90 99 2d 9d 78 67 89 31 2a 7d |.{!.....-.xg.1*}| +00000170 6a 97 c7 80 a9 2a 91 4e e2 30 29 96 25 97 e9 94 |j....*.N.0).%...| +00000180 2d 0a e0 30 8c e3 54 00 2a 29 e9 60 ef 4c 60 1c |-..0..T.*).`.L`.| +00000190 76 51 db 5d d7 7c 0c ae f3 a8 9e 3b 49 c6 a7 ce |vQ.].|.....;I...| +000001a0 a3 e8 e6 8c 13 ea fa bd 7f 59 36 06 1e 0c 54 2d |.........Y6...T-| +000001b0 d2 75 8a 75 94 f3 5c 77 0a 8e a0 23 9f 21 d8 ed |.u.u..\w...#.!..| +000001c0 65 87 fa f0 65 e1 81 2b 45 50 91 9e 48 8f 4c 80 |e...e..+EP..H.L.| +000001d0 7a c7 32 07 9a d9 d4 59 7a 7c 11 01 c2 75 fd 25 |z.2....Yz|...u.%| +000001e0 15 7b de b1 72 54 42 9e 02 41 a8 1a 04 6a 64 ba |.{..rTB..A...jd.| +000001f0 97 48 48 48 24 3d 17 03 03 00 59 d7 53 12 64 01 |.HHH$=....Y.S.d.| +00000200 d4 b7 e4 bf e1 33 f6 49 24 cf e8 6f 48 56 d6 1b |.....3.I$..oHV..| +00000210 e3 11 e9 a5 fb 7d f7 f5 b7 06 6c ce 4d e7 3c ca |.....}....l.M.<.| +00000220 bc 30 27 2e 02 4a 50 ec 7e 8c d4 cd 7a 78 43 3f |.0'..JP.~...zxC?| +00000230 5d 17 d7 bd 3e 78 68 21 ad 98 93 ad 90 de f7 c9 |]...>xh!........| +00000240 ab 7d 36 59 7e 7b e8 10 92 de ee 44 a2 e3 df 41 |.}6Y~{.....D...A| +00000250 6c a8 6c 9b 17 03 03 00 35 3a 9b 88 fc 4d 78 aa |l.l.....5:...Mx.| +00000260 a3 96 c7 f9 80 87 75 88 41 e6 58 9c f7 f6 88 0c |......u.A.X.....| +00000270 8f 57 8f 41 b7 49 a9 c2 db d6 44 51 a6 cb eb c3 |.W.A.I....DQ....| +00000280 8d e5 32 19 4b e5 dd 4e 19 6b f4 38 cd 3d |..2.K..N.k.8.=| >>> Flow 3 (client to server) -00000000 14 03 03 00 01 01 17 03 03 00 35 1c 60 8f 01 6b |..........5.`..k| -00000010 7c e3 d4 28 24 d8 7c 85 7f 63 44 23 97 7c a0 de ||..($.|..cD#.|..| -00000020 70 61 9e d9 ce 35 d9 3b 81 68 09 12 c1 b9 5e f5 |pa...5.;.h....^.| -00000030 32 23 9b 47 fc be 74 3c e6 1b 3f cd e8 c1 f1 4f |2#.G..t<..?....O| -00000040 17 03 03 00 17 1a 16 bc fe 99 30 d8 97 c1 00 d9 |..........0.....| -00000050 fd 1a 44 bd 84 35 dc 66 62 eb 28 3d 17 03 03 00 |..D..5.fb.(=....| -00000060 13 b4 8a 54 df ae 97 ce 2e ae fa 38 ca 02 a1 d6 |...T.......8....| -00000070 f5 40 64 2b |.@d+| +00000000 14 03 03 00 01 01 17 03 03 00 35 64 73 84 51 69 |..........5ds.Qi| +00000010 81 4c a7 ce 8b 39 08 0e 0f 25 d2 24 49 3c 9d 98 |.L...9...%.$I<..| +00000020 c7 46 f5 7e ba bd d1 9d 79 d3 f6 cb 29 00 95 90 |.F.~....y...)...| +00000030 c2 fa c6 65 01 f2 9d 12 a7 db 14 49 e6 0b 40 c9 |...e.......I..@.| +00000040 17 03 03 00 17 df ad 2a 5f f7 bd 94 90 dd 11 24 |.......*_......$| +00000050 b8 97 6e fc d3 93 91 47 36 26 2d e1 17 03 03 00 |..n....G6&-.....| +00000060 13 40 ad 3c c3 49 76 47 c0 02 f0 bc 80 66 3c e4 |.@.<.IvG.....f<.| +00000070 35 28 eb b5 |5(..| diff --git a/src/crypto/tls/testdata/Client-TLSv13-ExportKeyingMaterial b/src/crypto/tls/testdata/Client-TLSv13-ExportKeyingMaterial index 13ae97153a..13fb604874 100644 --- a/src/crypto/tls/testdata/Client-TLSv13-ExportKeyingMaterial +++ b/src/crypto/tls/testdata/Client-TLSv13-ExportKeyingMaterial @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,85 +7,86 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 7a 02 00 00 76 03 03 48 e6 a7 a9 4c |....z...v..H...L| -00000010 c3 a7 cc 18 b7 71 7d ed c5 6a cb ca b5 9f 00 fd |.....q}..j......| -00000020 f8 2c ac 9c 1f 24 27 b9 c6 55 8e 20 00 00 00 00 |.,...$'..U. ....| +00000000 16 03 03 00 7a 02 00 00 76 03 03 67 c5 21 e2 8b |....z...v..g.!..| +00000010 b6 6a cc 42 40 24 b2 4f 55 61 d9 20 78 e2 e3 40 |.j.B@$.OUa. x..@| +00000020 83 62 3d 08 e3 0a 31 0b 55 f5 b6 20 00 00 00 00 |.b=...1.U.. ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 13 03 00 00 |................| -00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 dd |..+.....3.$... .| -00000060 be 27 eb a0 9c b1 22 6a 8c 29 9a d4 47 c2 ee 14 |.'...."j.)..G...| -00000070 39 0c 60 81 c9 06 3f dc e5 e0 24 9a c4 88 35 14 |9.`...?...$...5.| -00000080 03 03 00 01 01 17 03 03 00 17 25 70 5a e5 6b 9e |..........%pZ.k.| -00000090 56 b9 cf 83 48 b0 bc 99 6a 86 e1 cb 4e ce b5 10 |V...H...j...N...| -000000a0 e0 17 03 03 02 6d c7 a6 79 ef b0 81 d6 e4 0e 02 |.....m..y.......| -000000b0 59 32 88 cc b1 0d 53 f6 33 9b d2 e8 74 a9 0a a7 |Y2....S.3...t...| -000000c0 f9 76 e9 6e 0d 16 75 0b e0 8f 5c b5 31 47 6b 68 |.v.n..u...\.1Gkh| -000000d0 52 c7 c2 84 cb 48 81 a3 da bd a1 50 5c ec 5c a7 |R....H.....P\.\.| -000000e0 10 01 58 cc 03 c3 53 04 03 69 80 f4 ad 4d ce 72 |..X...S..i...M.r| -000000f0 26 4e 6c c7 2c 31 69 2b fd 97 67 5e 7d e0 05 b3 |&Nl.,1i+..g^}...| -00000100 f4 40 64 a1 bd a3 fd a8 f9 7b 18 82 89 8f 25 f9 |.@d......{....%.| -00000110 ca ca c4 8f e4 90 7b 26 7a d5 b2 1e fa 05 db ad |......{&z.......| -00000120 8a 9f 93 e9 13 5b 28 cc cb 8b 30 f2 4c 1d 73 09 |.....[(...0.L.s.| -00000130 7f 6b 63 5c 29 36 2f fc a5 6e eb 24 79 f8 7c 63 |.kc\)6/..n.$y.|c| -00000140 1f ef 41 72 98 69 7c d6 8d f9 76 d4 4d af b0 71 |..Ar.i|...v.M..q| -00000150 2e f7 f8 b5 73 45 05 52 fa 25 46 02 28 0d d9 7a |....sE.R.%F.(..z| -00000160 60 13 b9 6c 6d fb f3 be e3 04 74 76 72 d6 a4 91 |`..lm.....tvr...| -00000170 d1 2c 0d 1e fa 23 ef c7 80 ff 1e aa 1b af 50 58 |.,...#........PX| -00000180 77 ea 49 d9 22 4d ed bc bf a6 0a 41 8e e7 5b 31 |w.I."M.....A..[1| -00000190 de 33 05 10 46 a5 54 aa 5e 90 5c 15 64 2d 1b e9 |.3..F.T.^.\.d-..| -000001a0 5c fc 93 8d 2f b2 af 74 d7 d2 c6 7f 27 68 fd 44 |\.../..t....'h.D| -000001b0 13 60 70 87 e8 08 e1 e2 af 7f 1a 2c 29 5f 45 fe |.`p........,)_E.| -000001c0 49 9a d0 42 c9 51 ef f7 5b ae 02 df 27 1c 29 20 |I..B.Q..[...'.) | -000001d0 35 4f 3d 7d 74 97 0c 20 be f8 a3 c9 b7 ff 65 69 |5O=}t.. ......ei| -000001e0 08 89 92 fe 85 65 9f 8a 00 4b 9f 39 8d 6f 29 7c |.....e...K.9.o)|| -000001f0 7c e9 16 e4 bd 06 a3 b0 5b 7f cf f0 74 14 56 a2 ||.......[...t.V.| -00000200 76 61 b8 79 10 44 55 4f 25 55 a7 be a4 eb 2e 7d |va.y.DUO%U.....}| -00000210 9a b8 7a d8 d7 34 b6 ef 6c f7 fb ef fd 16 c2 61 |..z..4..l......a| -00000220 89 bb 98 22 c6 80 9e 33 7f e9 35 7a 58 b6 33 1c |..."...3..5zX.3.| -00000230 d6 87 68 b7 62 21 3b 26 9b f1 b1 f2 92 d5 4b 19 |..h.b!;&......K.| -00000240 02 58 05 3c 81 cf 00 5a 54 86 a5 61 8f 71 ae 32 |.X.<...ZT..a.q.2| -00000250 f2 0f 08 3b 13 4d f3 e6 03 2e 73 9c 50 4a b7 6c |...;.M....s.PJ.l| -00000260 d8 0a 04 fc b5 44 a5 45 c8 86 c9 9f 29 b4 00 90 |.....D.E....)...| -00000270 d8 8b e0 c8 ba 63 9f 42 65 ef ba 5b dc b2 61 53 |.....c.Be..[..aS| -00000280 e6 4b 29 72 51 c9 21 d4 d7 2d 14 56 82 80 32 36 |.K)rQ.!..-.V..26| -00000290 fd 72 b6 16 6f 06 71 f9 60 4f 32 ce f6 83 94 75 |.r..o.q.`O2....u| -000002a0 d9 23 d3 41 f8 e7 90 60 80 a8 a5 95 c0 a2 dd 2e |.#.A...`........| -000002b0 e7 60 73 5b c0 a5 a0 bd 8b bc cc 32 8a 9e 30 6a |.`s[.......2..0j| -000002c0 72 2f 61 24 56 0b 1e 3e 52 92 d2 e0 11 cd 52 69 |r/a$V..>R.....Ri| -000002d0 c4 73 7f 72 95 fd f5 c4 72 d7 77 73 85 bf be e0 |.s.r....r.ws....| -000002e0 cd 3c 3b 3d 92 63 91 ba c8 a8 d2 32 40 6a 33 91 |.<;=.c.....2@j3.| -000002f0 c0 71 fe ea 76 9f a9 96 dc c0 a9 bd 67 b6 23 42 |.q..v.......g.#B| -00000300 d9 1b 3d 8d d4 5f 81 38 74 1c db 36 9e bd 79 fd |..=.._.8t..6..y.| -00000310 30 c5 db 17 03 03 00 99 61 1e 25 cb 11 26 61 72 |0.......a.%..&ar| -00000320 a0 9a de 5b ad 5b ad 8a 29 43 eb 76 5a 16 a4 d3 |...[.[..)C.vZ...| -00000330 d4 a1 84 e4 7e a1 2b 76 75 b6 a5 a6 36 da d3 bf |....~.+vu...6...| -00000340 0c 3a 39 ca ef 3f 02 22 63 3d 5d c1 30 94 ba 32 |.:9..?."c=].0..2| -00000350 fe c0 20 c1 ba c8 fa 29 e8 1c c6 ab f0 c9 53 a4 |.. ....)......S.| -00000360 73 d0 9a 2d 50 d8 b4 0c db e5 4a 9f 98 38 34 c9 |s..-P.....J..84.| -00000370 9f ff 63 a9 50 7b 26 00 64 26 4d 0d 20 d5 e5 27 |..c.P{&.d&M. ..'| -00000380 e1 41 7b 5a 03 97 0a 14 8c 55 3c 45 4b 72 ce de |.A{Z.....U...,..N.....| +000001e0 6b 24 30 5d f8 a0 52 ca 02 9a 50 58 43 b6 22 04 |k$0]..R...PXC.".| +000001f0 47 c6 ba 1c e1 aa c2 2c ca 50 13 de 2b 2b 34 ec |G......,.P..++4.| +00000200 80 8c 34 77 20 ab f3 f3 42 d2 9a 2b 9d 38 32 f9 |..4w ...B..+.82.| +00000210 de 9c 7b ee 22 4f 41 9e ea 35 88 8c e7 74 f6 ac |..{."OA..5...t..| +00000220 a5 fe af d9 c4 b1 a4 87 aa 9f d9 02 3b 4b 92 2b |............;K.+| +00000230 f4 ea 6f 81 b8 54 ca 77 3d a2 37 f0 60 d8 26 e4 |..o..T.w=.7.`.&.| +00000240 27 04 c8 5b bf bc 5e 9c 8b a9 f6 c1 58 31 de 48 |'..[..^.....X1.H| +00000250 67 5b c5 d7 ae 35 cc d8 8d 01 9b e0 d0 c7 33 f8 |g[...5........3.| +00000260 36 c1 e8 50 32 27 87 6c 64 71 27 3f 66 82 fa 92 |6..P2'.ldq'?f...| +00000270 d3 fe b9 9e d3 e2 63 43 64 13 73 4b e9 34 d9 ae |......cCd.sK.4..| +00000280 49 dd 9c 17 f3 a6 34 27 3e 07 68 ed 6b 98 0a 69 |I.....4'>.h.k..i| +00000290 9c f5 4f 1e fc ac 72 08 7e bb bd 97 fe f9 c1 09 |..O...r.~.......| +000002a0 a2 69 75 c4 e7 a1 83 df 03 0f 74 21 e8 4c 4c d7 |.iu.......t!.LL.| +000002b0 a2 90 5a 4d d9 a2 fa f1 e4 dc ff 75 e8 fe a1 91 |..ZM.......u....| +000002c0 46 a4 c2 0b c3 9e 83 45 40 b4 ba fe ed 9e 3a 81 |F......E@.....:.| +000002d0 a9 27 b9 fa 6f 9e 38 10 2f e6 05 9a 00 43 e9 fb |.'..o.8./....C..| +000002e0 60 b8 26 2e 18 4a 0c 14 6a 9f aa 26 1d 53 9e 4f |`.&..J..j..&.S.O| +000002f0 fc 7e e1 90 60 28 b1 89 db b6 68 58 5d 2a fa 43 |.~..`(....hX]*.C| +00000300 91 99 c1 94 74 77 a9 30 cf 1e 9d 49 fc cd be 6c |....tw.0...I...l| +00000310 5a 72 90 17 03 03 00 99 1b 1f 16 9b 8e 85 5a 8a |Zr............Z.| +00000320 3c c7 d8 e5 86 20 eb 71 83 12 e7 3b 02 ca a1 18 |<.... .q...;....| +00000330 aa b7 ef 67 9d bf 57 46 14 3b ed b2 9b 2e f1 96 |...g..WF.;......| +00000340 67 b0 cc 20 ab 67 63 5c a9 96 d8 22 8e fa f0 94 |g.. .gc\..."....| +00000350 1e 83 6c 53 8a 75 a5 37 1d f1 de 1f a7 22 13 08 |..lS.u.7....."..| +00000360 b7 13 dd 25 26 eb 7a 85 72 33 ed a8 27 be cc ff |...%&.z.r3..'...| +00000370 8d 42 fa 6a f8 0a 59 44 6f 48 4d 58 27 d5 28 fb |.B.j..YDoHMX'.(.| +00000380 37 b0 85 25 49 d0 32 7c dd b8 46 1a aa dc 16 b7 |7..%I.2|..F.....| +00000390 f2 fd 99 17 67 41 c0 2d 75 0d 66 ef 65 e2 5f af |....gA.-u.f.e._.| +000003a0 d8 b4 aa 15 1c 24 40 0d 0d 4f a8 bc c9 92 1c ab |.....$@..O......| +000003b0 91 17 03 03 00 35 f9 69 7e 2a d6 fa 6e 42 25 6c |.....5.i~*..nB%l| +000003c0 da 96 f7 79 5f 02 44 1f d8 1c a2 41 fc eb a5 12 |...y_.D....A....| +000003d0 bf 37 ab b0 40 92 55 50 64 8e 7b e9 e5 f3 04 b5 |.7..@.UPd.{.....| +000003e0 0f 04 93 98 fa ca 24 69 a1 73 26 |......$i.s&| >>> Flow 3 (client to server) -00000000 14 03 03 00 01 01 17 03 03 00 35 a6 7f ef 71 68 |..........5...qh| -00000010 8b 86 84 20 a6 e7 65 3f 3f f8 c6 8b 62 40 31 e2 |... ..e??...b@1.| -00000020 1a ee 8d 0a 64 88 ea 4b 83 5f c5 ff 1b 9d aa 5f |....d..K._....._| -00000030 ce a4 31 76 06 90 da ad b9 17 49 0b a6 b5 37 80 |..1v......I...7.| -00000040 17 03 03 00 17 2b be e8 98 11 37 0d db 46 69 0d |.....+....7..Fi.| -00000050 51 34 ee 13 00 c3 f1 12 8a 13 21 b7 17 03 03 00 |Q4........!.....| -00000060 13 8d ec 94 6f 55 b1 d5 c0 d6 a3 6e a2 8d 67 76 |....oU.....n..gv| -00000070 7b c7 b8 1d |{...| +00000000 14 03 03 00 01 01 17 03 03 00 35 80 f8 9b f1 1d |..........5.....| +00000010 89 31 a8 ea b8 cc 44 a7 6c c3 f7 ea 0f fd f4 a3 |.1....D.l.......| +00000020 4c c2 15 06 bd 79 16 90 a1 bf 44 df e5 21 03 ff |L....y....D..!..| +00000030 e5 83 08 67 70 09 11 21 8e 96 47 e6 f4 e3 36 6e |...gp..!..G...6n| +00000040 17 03 03 00 17 7b 87 be 4e f8 ce 6f 30 b8 5b 95 |.....{..N..o0.[.| +00000050 20 79 23 f7 50 6b 17 b8 13 a2 38 6a 17 03 03 00 | y#.Pk....8j....| +00000060 13 2a d5 e0 a4 17 7d 4f 3b 5a 6c bc 9d 5a 79 5b |.*....}O;Zl..Zy[| +00000070 a8 f6 b2 4a |...J| diff --git a/src/crypto/tls/testdata/Client-TLSv13-HelloRetryRequest b/src/crypto/tls/testdata/Client-TLSv13-HelloRetryRequest index a669920d93..4d58f8d440 100644 --- a/src/crypto/tls/testdata/Client-TLSv13-HelloRetryRequest +++ b/src/crypto/tls/testdata/Client-TLSv13-HelloRetryRequest @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fa 01 00 00 f6 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 14 01 00 01 10 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,14 +7,16 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7b 00 0b 00 02 01 00 ff 01 00 01 00 00 |...{............| +00000080 01 00 00 95 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| -000000a0 00 0a 00 06 00 04 00 1d 00 17 00 0d 00 1a 00 18 |................| +000000a0 00 0a 00 06 00 04 00 1d 00 17 00 0d 00 16 00 14 |................| 000000b0 08 04 04 03 08 07 08 05 08 06 04 01 05 01 06 01 |................| -000000c0 05 03 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 |.........+......| -000000d0 03 03 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f |......3.&.$... /| -000000e0 e5 7d a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 |.}.G.bC.(.._.).0| -000000f0 ff f6 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |.........._X.;t| +000000c0 05 03 06 03 00 32 00 1a 00 18 08 04 04 03 08 07 |.....2..........| +000000d0 08 05 08 06 04 01 05 01 06 01 05 03 06 03 02 01 |................| +000000e0 02 03 00 2b 00 09 08 03 04 03 03 03 02 03 01 00 |...+............| +000000f0 33 00 26 00 24 00 1d 00 20 2f e5 7d a3 47 cd 62 |3.&.$... /.}.G.b| +00000100 43 15 28 da ac 5f bb 29 07 30 ff f6 84 af c4 cf |C.(.._.).0......| +00000110 c2 ed 90 99 5f 58 cb 3b 74 |...._X.;t| >>> Flow 2 (server to client) 00000000 16 03 03 00 58 02 00 00 54 03 03 cf 21 ad 74 e5 |....X...T...!.t.| 00000010 9a 61 11 be 1d 8c 02 1e 65 b8 91 c2 a2 11 16 7a |.a......e......z| @@ -24,7 +26,7 @@ 00000050 0c 00 2b 00 02 03 04 00 33 00 02 00 17 14 03 03 |..+.....3.......| 00000060 00 01 01 |...| >>> Flow 3 (client to server) -00000000 14 03 03 00 01 01 16 03 03 01 1b 01 00 01 17 03 |................| +00000000 14 03 03 00 01 01 16 03 03 01 35 01 00 01 31 03 |..........5...1.| 00000010 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000030 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |. ..............| @@ -32,88 +34,89 @@ 00000050 00 00 00 32 cc a9 cc a8 c0 2b c0 2f c0 2c c0 30 |...2.....+./.,.0| 00000060 c0 09 c0 13 c0 0a c0 14 00 9c 00 9d 00 2f 00 35 |............./.5| 00000070 c0 12 00 0a c0 23 c0 27 00 3c c0 07 c0 11 00 05 |.....#.'.<......| -00000080 13 03 13 01 13 02 01 00 00 9c 00 0b 00 02 01 00 |................| +00000080 13 03 13 01 13 02 01 00 00 b6 00 0b 00 02 01 00 |................| 00000090 ff 01 00 01 00 00 17 00 00 00 12 00 00 00 05 00 |................| 000000a0 05 01 00 00 00 00 00 0a 00 06 00 04 00 1d 00 17 |................| -000000b0 00 0d 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 |................| -000000c0 04 01 05 01 06 01 05 03 06 03 02 01 02 03 00 2b |...............+| -000000d0 00 09 08 03 04 03 03 03 02 03 01 00 33 00 47 00 |............3.G.| -000000e0 45 00 17 00 41 04 1e 18 37 ef 0d 19 51 88 35 75 |E...A...7...Q.5u| -000000f0 71 b5 e5 54 5b 12 2e 8f 09 67 fd a7 24 20 3e b2 |q..T[....g..$ >.| -00000100 56 1c ce 97 28 5e f8 2b 2d 4f 9e f1 07 9f 6c 4b |V...(^.+-O....lK| -00000110 5b 83 56 e2 32 42 e9 58 b6 d7 49 a6 b5 68 1a 41 |[.V.2B.X..I..h.A| -00000120 03 56 6b dc 5a 89 |.Vk.Z.| +000000b0 00 0d 00 16 00 14 08 04 04 03 08 07 08 05 08 06 |................| +000000c0 04 01 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 |...........2....| +000000d0 08 04 04 03 08 07 08 05 08 06 04 01 05 01 06 01 |................| +000000e0 05 03 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 |.........+......| +000000f0 03 03 02 03 01 00 33 00 47 00 45 00 17 00 41 04 |......3.G.E...A.| +00000100 1e 18 37 ef 0d 19 51 88 35 75 71 b5 e5 54 5b 12 |..7...Q.5uq..T[.| +00000110 2e 8f 09 67 fd a7 24 20 3e b2 56 1c ce 97 28 5e |...g..$ >.V...(^| +00000120 f8 2b 2d 4f 9e f1 07 9f 6c 4b 5b 83 56 e2 32 42 |.+-O....lK[.V.2B| +00000130 e9 58 b6 d7 49 a6 b5 68 1a 41 03 56 6b dc 5a 89 |.X..I..h.A.Vk.Z.| >>> Flow 4 (server to client) -00000000 16 03 03 00 9b 02 00 00 97 03 03 9a 1f 7a fa 06 |.............z..| -00000010 c4 5f 92 61 62 d2 a5 f3 ae b9 a6 d8 6b eb 13 a7 |._.ab.......k...| -00000020 2f 17 62 79 3a ca 42 8b 18 06 15 20 00 00 00 00 |/.by:.B.... ....| +00000000 16 03 03 00 9b 02 00 00 97 03 03 3e b5 60 d1 cd |...........>.`..| +00000010 f5 a6 76 2c bd 49 f6 0f c2 ff ff 6b c9 f6 45 19 |..v,.I.....k..E.| +00000020 f6 e3 e7 fc 31 8b 49 4e 88 29 55 20 00 00 00 00 |....1.IN.)U ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 13 03 00 00 |................| 00000050 4f 00 2b 00 02 03 04 00 33 00 45 00 17 00 41 04 |O.+.....3.E...A.| -00000060 d1 56 18 67 59 a5 e1 ed 99 0f ca e5 6b 5f e3 d9 |.V.gY.......k_..| -00000070 e3 fd e6 a2 50 93 bf 87 85 60 e7 7f 0b a0 96 c4 |....P....`......| -00000080 29 55 63 de fe 6b 75 99 b2 a6 75 92 61 d0 96 19 |)Uc..ku...u.a...| -00000090 f5 60 8f ec e9 d3 98 4a b9 6b 98 26 c1 3e 27 7e |.`.....J.k.&.>'~| -000000a0 17 03 03 00 17 5a aa bb 35 67 ec 83 da 8e 85 bd |.....Z..5g......| -000000b0 ae a5 0d c9 8b cd 03 bf 96 2b 35 61 17 03 03 02 |.........+5a....| -000000c0 6d 85 0c 7c d5 ff 0f 77 0a a4 b7 97 aa d3 f7 af |m..|...w........| -000000d0 4b 58 cb 24 4d 9f a6 d8 e2 c3 10 ce 3a 5d e4 cc |KX.$M.......:]..| -000000e0 84 7d 1f 71 bd b6 25 0c 10 75 d3 8d b6 12 04 56 |.}.q..%..u.....V| -000000f0 63 af 53 e5 cc 29 ce f7 18 7a 93 91 73 ae ff c1 |c.S..)...z..s...| -00000100 2e 2b 3d 76 ab 99 c8 e0 fd 69 b3 67 39 e9 58 40 |.+=v.....i.g9.X@| -00000110 4a 63 e8 71 c5 8d de 44 fb ef 4d 0a dc ae 51 12 |Jc.q...D..M...Q.| -00000120 7e ea 6a 25 32 8e 5b 08 6e c7 b2 87 00 4e 35 d8 |~.j%2.[.n....N5.| -00000130 cd 3b bd 8c dc e8 55 a9 2f 65 d1 7f c1 28 33 f9 |.;....U./e...(3.| -00000140 70 e1 af d8 2d 64 4c ac 5a 3a 16 6d 3e 97 a7 0e |p...-dL.Z:.m>...| -00000150 cd 28 05 1c ea 28 8d 63 a3 41 e2 3a 24 27 f4 43 |.(...(.c.A.:$'.C| -00000160 97 c8 89 09 ed 8b 96 74 b3 dc 98 f4 0c c2 6f 25 |.......t......o%| -00000170 fc 30 8a f8 25 49 e1 91 fb c6 39 23 ca d5 16 08 |.0..%I....9#....| -00000180 5f bf 10 88 71 a4 c5 ac e7 ad 9e 5a 4d e8 d3 1f |_...q......ZM...| -00000190 f0 5d 83 9d c9 e2 b3 f8 e4 a3 a5 57 5d ca 30 74 |.].........W].0t| -000001a0 a6 1b c7 51 50 05 5f 7e 93 71 1a 8d fc 04 d6 fe |...QP._~.q......| -000001b0 4e 4b 95 54 18 43 19 4d d2 dc 81 a8 94 76 7e 23 |NK.T.C.M.....v~#| -000001c0 56 8c 86 f9 15 d2 a8 0c 48 4e 0e 81 df e0 31 52 |V.......HN....1R| -000001d0 c9 2e b4 39 f3 cf ae e2 29 72 01 ed 34 4f 09 ce |...9....)r..4O..| -000001e0 64 de a9 9b 84 61 3a bb 0b ac 4e b1 6d 37 41 10 |d....a:...N.m7A.| -000001f0 5b cf 99 b1 3e e6 f5 7b 1c d4 d0 d5 34 fc ab c6 |[...>..{....4...| -00000200 29 8e 0b 53 e4 7b 35 33 e4 e3 f6 77 9b f6 c6 ae |)..S.{53...w....| -00000210 73 3c c5 80 c8 72 f7 56 6c 4c ce e5 a7 05 63 ee |s<...r.VlL....c.| -00000220 07 e0 1d 3e 73 3e 55 73 ba 63 a8 d7 99 6a 48 57 |...>s>Us.c...jHW| -00000230 0c 55 51 42 4b 27 91 4b 75 b3 3b 4c 29 f1 52 e8 |.UQBK'.Ku.;L).R.| -00000240 85 f9 49 53 ed 87 6d 9e 8f 5c 29 7c 5c 9c 4e 9a |..IS..m..\)|\.N.| -00000250 90 a8 99 2a 53 65 f7 d9 61 ef 6a 56 2a da 76 ed |...*Se..a.jV*.v.| -00000260 04 84 11 f5 1c 40 82 52 7d fa 00 79 43 12 42 b4 |.....@.R}..yC.B.| -00000270 ca 7a 86 d5 8d d6 c5 7b 04 13 79 08 72 0c ce d7 |.z.....{..y.r...| -00000280 88 9a f2 2c b5 9a 18 a4 d2 87 48 ce ab 17 33 fd |...,......H...3.| -00000290 cf 22 3c 72 03 86 af 35 2a b3 fe 24 0e 86 d8 82 |."......D..| -000002c0 14 12 cd 16 e5 6a 58 1b 3f f8 70 d6 47 e6 1b 98 |.....jX.?.p.G...| -000002d0 74 9c 21 2b 6d f8 8a 47 05 86 b1 fa 63 9d cc 19 |t.!+m..G....c...| -000002e0 da 9a a0 ea 5a 26 98 e6 b7 d0 da 03 b3 1d 33 e8 |....Z&........3.| -000002f0 55 74 ee 4b 6a 06 0f f1 45 35 72 81 bb c9 61 4e |Ut.Kj...E5r...aN| -00000300 60 d6 83 e6 ab 08 77 a4 f9 73 e5 d8 cb 66 9f 41 |`.....w..s...f.A| -00000310 00 15 2c 09 0e ad 16 02 6c 06 5f bc bf 47 f1 5a |..,.....l._..G.Z| -00000320 85 97 ab 88 e8 45 b0 31 96 ad 56 00 97 59 17 03 |.....E.1..V..Y..| -00000330 03 00 99 5e 77 80 46 1d 2f 47 9f b3 43 4d a6 2b |...^w.F./G..CM.+| -00000340 e9 f7 72 a2 d0 c6 69 7c df 5d ce a0 3b 89 e2 69 |..r...i|.]..;..i| -00000350 e7 35 5e 00 fb 87 10 4a a8 41 02 b7 89 fa 88 fc |.5^....J.A......| -00000360 72 63 ce bf 41 61 16 91 55 06 cd b6 fa 78 09 bc |rc..Aa..U....x..| -00000370 f6 21 a0 c2 1f f3 fa 34 2a 9e b9 8a 0c 72 81 02 |.!.....4*....r..| -00000380 66 a7 da 6b d6 e2 aa 99 6d 4b 42 f5 19 83 52 89 |f..k....mKB...R.| -00000390 9a 26 56 5d d5 a4 a7 bd ad b4 10 db ee 87 1d 15 |.&V]............| -000003a0 15 df 30 95 d8 61 e2 c4 88 47 e1 91 e3 85 33 fe |..0..a...G....3.| -000003b0 7d 02 0c 22 6b 52 22 a7 cf bf bf f0 9d 25 65 e0 |}.."kR"......%e.| -000003c0 6b da a2 8c 9a 00 3d 68 78 55 38 69 17 03 03 00 |k.....=hxU8i....| -000003d0 35 c8 ca 51 96 aa c1 4b a0 09 d3 bc d9 ea 35 db |5..Q...K......5.| -000003e0 f2 8d bb ab b3 23 09 a1 d1 9c 40 3e e4 84 d3 1c |.....#....@>....| -000003f0 60 64 5c ff 01 c7 78 69 c2 4a fb e1 c3 d6 f0 57 |`d\...xi.J.....W| -00000400 fa 3a 5f 7a 8b 70 |.:_z.p| +00000060 f8 a5 4d 81 0a 05 43 42 0b d6 ca 3b 3e 02 44 20 |..M...CB...;>.D | +00000070 56 89 80 d3 03 50 1a b4 70 50 78 aa 81 2b 5b 03 |V....P..pPx..+[.| +00000080 6c 38 22 c1 17 4f e5 b9 57 ab 58 33 76 8e ae c9 |l8"..O..W.X3v...| +00000090 a0 74 47 a0 10 c0 5c a7 8c 77 24 c8 90 bb f4 2a |.tG...\..w$....*| +000000a0 17 03 03 00 17 0c 2a 67 cb 9f a8 e8 5b 97 4a 75 |......*g....[.Ju| +000000b0 24 80 65 28 15 a7 d4 71 eb 24 74 7e 17 03 03 02 |$.e(...q.$t~....| +000000c0 6d 89 a3 fa 0f a6 dd dc b5 5a f9 03 93 5a 2a a6 |m........Z...Z*.| +000000d0 2f 65 81 9e 0d 2c 21 25 0b 7c 04 41 40 3e 95 a4 |/e...,!%.|.A@>..| +000000e0 31 21 2a 08 db 35 bc 5a 93 aa b4 8f 30 28 0c e5 |1!*..5.Z....0(..| +000000f0 11 f6 31 d6 7a b0 df 9c f3 76 30 72 e2 27 1c d3 |..1.z....v0r.'..| +00000100 75 68 3d 63 71 27 da 72 7a 18 19 da 25 94 ee e3 |uh=cq'.rz...%...| +00000110 62 6f 45 c5 38 67 ba 4a 1f 6f f3 ea 46 c6 09 ad |boE.8g.J.o..F...| +00000120 db 3c 42 3c d7 8d 9c 49 8d 2c 22 15 74 98 60 5b |...| +00000190 c6 b2 c3 eb ec 03 7d d2 85 2b c3 7f e7 07 c1 50 |......}..+.....P| +000001a0 c9 b6 6f ab 7a 86 7b b3 fd 8b 9a 6a 3c ea 18 06 |..o.z.{....j<...| +000001b0 13 e4 a4 9b d0 2c ef 8c 3f ea 8e d8 c4 d4 54 33 |.....,..?.....T3| +000001c0 2e e5 b6 40 85 a8 4b 5d 9b 3c f2 9e 70 5a 23 d7 |...@..K].<..pZ#.| +000001d0 c1 e1 b4 7a 42 69 fb b1 49 99 cf 60 5c 8a c0 7f |...zBi..I..`\...| +000001e0 c2 8c 8c 26 4f 0f 6c 10 bd e4 51 ab 19 4d 2a 63 |...&O.l...Q..M*c| +000001f0 b3 39 1e d6 55 00 c9 89 3a c0 5a 2b 5b 0a e9 10 |.9..U...:.Z+[...| +00000200 56 4c 8a 88 2d 37 27 50 07 2a 77 19 92 6a a0 67 |VL..-7'P.*w..j.g| +00000210 c9 34 e7 b2 e4 f8 f8 fc e0 24 c1 8e 6a 04 b0 6a |.4.......$..j..j| +00000220 35 1b 5a 74 78 34 81 09 d5 ed bc 61 55 bd bf 6f |5.Ztx4.....aU..o| +00000230 e4 a1 13 e9 b1 9a de de 54 3b 99 19 f7 90 74 be |........T;....t.| +00000240 48 b0 80 92 e7 19 91 17 12 12 9a 08 77 bf 2c 21 |H...........w.,!| +00000250 33 51 9a 02 fc 8c c5 7b 90 52 89 61 df 64 1f af |3Q.....{.R.a.d..| +00000260 1e 49 2a 7b 33 1b 47 df 34 7f aa ca e3 16 2d 28 |.I*{3.G.4.....-(| +00000270 94 cc 07 d1 0d 1a 07 80 a4 c6 cc 10 a7 72 58 bc |.............rX.| +00000280 65 92 de a1 c7 8b e5 63 9a 83 85 eb ee e8 8d e9 |e......c........| +00000290 63 06 f0 6d 14 81 5a d5 a6 1b 84 d3 a2 5d f1 94 |c..m..Z......]..| +000002a0 a4 af f7 eb 85 d3 00 41 12 b3 bc bf 4a 1a c1 c0 |.......A....J...| +000002b0 b0 46 38 63 f4 05 de e0 c2 b7 ee 5b f8 c8 6c e7 |.F8c.......[..l.| +000002c0 fe a4 3d a2 52 e8 25 4c d0 b4 dd 1a aa e4 9c 5b |..=.R.%L.......[| +000002d0 3c 5c 9b 0f e2 ca 18 a8 59 1d 22 d8 2d cb ca 0d |<\......Y.".-...| +000002e0 61 f0 8e be 55 5e 0b b4 72 2f 32 f1 47 fe b8 94 |a...U^..r/2.G...| +000002f0 ec 14 af c4 59 dd f9 b1 1b 18 84 44 54 c0 16 f0 |....Y......DT...| +00000300 f4 e6 19 82 fb 00 84 6e c0 87 05 82 33 7b 62 d8 |.......n....3{b.| +00000310 e3 83 86 55 d6 06 bd e5 a3 1c c0 f1 ef b3 ae 2c |...U...........,| +00000320 f7 6e fa 9a 3d 6c cf de 5d 77 54 08 03 0c 17 03 |.n..=l..]wT.....| +00000330 03 00 99 03 00 b3 cc ca 76 27 18 16 0a 8e d0 81 |........v'......| +00000340 32 5d 9e 32 75 5e bb b4 c5 5c 6b 61 62 38 3d 2e |2].2u^...\kab8=.| +00000350 21 1a 93 c9 fc b7 90 74 17 78 ae 18 78 86 fc 6d |!......t.x..x..m| +00000360 0b 0c 50 d3 a6 5a 98 a8 76 6f ff 3b 98 f5 2f 11 |..P..Z..vo.;../.| +00000370 3d af 84 92 04 42 93 33 33 5c 9a f2 fc 5f 05 dd |=....B.33\..._..| +00000380 89 a8 c3 c1 e7 92 0f 76 3a ed da 7c 25 e0 96 89 |.......v:..|%...| +00000390 27 97 c1 3e 27 70 3f a4 15 f3 24 6a 47 43 7f d7 |'..>'p?...$jGC..| +000003a0 70 b9 7b 2d 3d 53 c0 f6 53 85 fb f7 62 4a 01 8e |p.{-=S..S...bJ..| +000003b0 3e 30 3b b4 79 17 af 2e 73 56 e5 de ba 48 0e 0c |>0;.y...sV...H..| +000003c0 e0 d3 0a 80 07 b9 53 f1 1d a6 cf 29 17 03 03 00 |......S....)....| +000003d0 35 f8 8f 94 ec 0a b9 d9 b1 2c d3 02 c9 0b ef 19 |5........,......| +000003e0 89 ee a9 c0 b1 f3 9c 87 09 0e fb 9a e2 ad 4a 1e |..............J.| +000003f0 16 6d 84 af b3 fa b9 af 98 79 54 7d 45 29 99 85 |.m.......yT}E)..| +00000400 8c a9 69 b6 ee 4e |..i..N| >>> Flow 5 (client to server) -00000000 17 03 03 00 35 24 4a 53 55 49 92 7a 21 a2 db 69 |....5$JSUI.z!..i| -00000010 e5 2b 00 29 83 cb 91 32 17 48 73 96 89 d1 b2 11 |.+.)...2.Hs.....| -00000020 c4 23 48 41 eb df eb 5a 10 c2 78 4e a2 e4 f0 38 |.#HA...Z..xN...8| -00000030 4a 1c b6 d3 bb 52 bc 7e f6 94 17 03 03 00 17 74 |J....R.~.......t| -00000040 04 34 8d 27 19 da f3 d8 14 30 1b 85 ad 1e 99 cd |.4.'.....0......| -00000050 06 f0 a3 50 94 48 17 03 03 00 13 ac 8f 7e 2e 9c |...P.H.......~..| -00000060 90 96 db 33 e2 e9 94 c1 c9 95 f2 7a d1 8f |...3.......z..| +00000000 17 03 03 00 35 4c c3 af 0b 49 46 e0 51 3a 73 a8 |....5L...IF.Q:s.| +00000010 28 46 95 22 ef d7 05 8a fc 4f 12 98 2f 09 ca a9 |(F.".....O../...| +00000020 4d b8 17 e4 15 15 b5 13 3f 1a cb 8e 3d 19 00 d6 |M.......?...=...| +00000030 19 af 90 66 0e 93 d4 22 4d 54 17 03 03 00 17 56 |...f..."MT.....V| +00000040 31 7c 05 02 1d 84 64 d0 32 21 8d c1 61 7e 7f ce |1|....d.2!..a~..| +00000050 d3 45 b2 df ba df 17 03 03 00 13 3a 57 b6 2e 79 |.E.........:W..y| +00000060 96 09 e9 66 f2 85 7a 21 88 45 cc b4 ff 12 |...f..z!.E....| diff --git a/src/crypto/tls/testdata/Client-TLSv13-KeyUpdate b/src/crypto/tls/testdata/Client-TLSv13-KeyUpdate index 1b8004ad0a..7d04d95a27 100644 --- a/src/crypto/tls/testdata/Client-TLSv13-KeyUpdate +++ b/src/crypto/tls/testdata/Client-TLSv13-KeyUpdate @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 fe 01 00 00 fa 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 18 01 00 01 14 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,97 +7,98 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 7f 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 99 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| 000000a0 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 0d |................| -000000b0 00 1a 00 18 08 04 04 03 08 07 08 05 08 06 04 01 |................| -000000c0 05 01 06 01 05 03 06 03 02 01 02 03 00 2b 00 09 |.............+..| -000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.| -000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._| -000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X| -00000100 cb 3b 74 |.;t| +000000b0 00 16 00 14 08 04 04 03 08 07 08 05 08 06 04 01 |................| +000000c0 05 01 06 01 05 03 06 03 00 32 00 1a 00 18 08 04 |.........2......| +000000d0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| +000000e0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| +000000f0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| +00000100 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| +00000110 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 7a 02 00 00 76 03 03 dc 81 c4 82 2e |....z...v.......| -00000010 a2 4f c4 c2 53 c2 bc 6a bd f3 46 84 b5 ba 66 b5 |.O..S..j..F...f.| -00000020 8b 67 7c 90 51 40 12 39 18 e1 bf 20 00 00 00 00 |.g|.Q@.9... ....| +00000000 16 03 03 00 7a 02 00 00 76 03 03 b2 4e f2 da 8b |....z...v...N...| +00000010 79 31 33 74 d5 37 8e 44 9d ad 6f 91 c4 bb 5d d4 |y13t.7.D..o...].| +00000020 fd f1 e2 42 50 43 f5 3c 7f cf 92 20 00 00 00 00 |...BPC.<... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 13 03 00 00 |................| -00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 3b |..+.....3.$... ;| -00000060 6b 2a e6 c2 7e b6 59 68 e4 e3 f2 f3 14 e5 72 bc |k*..~.Yh......r.| -00000070 c9 61 b4 b0 0a c6 41 0d a9 8e d9 9b 7d 2a 11 14 |.a....A.....}*..| -00000080 03 03 00 01 01 17 03 03 00 17 43 af 38 b9 56 06 |..........C.8.V.| -00000090 2d 10 e3 e5 1d 1b 1e a9 5f 90 ca 0d a9 52 33 86 |-......._....R3.| -000000a0 85 17 03 03 02 6d ac 6a a1 8f 42 27 74 80 25 f9 |.....m.j..B't.%.| -000000b0 1f 48 49 2d c2 33 38 e7 93 7e b0 b2 50 b8 6a ea |.HI-.38..~..P.j.| -000000c0 a6 81 ef 9b 55 83 4e 93 df 92 97 6f 00 f5 c4 fc |....U.N....o....| -000000d0 ec b1 19 dd 68 b5 bd c4 bb ba 63 9a e4 c9 24 af |....h.....c...$.| -000000e0 88 13 65 11 bf ea d9 07 e9 46 fd 5b 60 ce 57 46 |..e......F.[`.WF| -000000f0 8b a9 bd c6 58 1a 3b bd 5e fb 0f 46 ec fc 8b 2c |....X.;.^..F...,| -00000100 ea a7 19 06 6a e5 6f 10 7a 27 04 6b aa a4 2c f4 |....j.o.z'.k..,.| -00000110 ef 3b e8 8a 51 88 fd e0 ae 33 b1 4c b3 04 5e 91 |.;..Q....3.L..^.| -00000120 b0 98 0b 9f 38 a3 3c fb 9f d5 d2 36 e4 09 19 18 |....8.<....6....| -00000130 a5 b3 12 aa c9 03 ac b5 ab bb f1 7a 02 d2 dd 75 |...........z...u| -00000140 0e cb 60 09 39 23 c3 b2 c1 8e e0 18 57 72 54 61 |..`.9#......WrTa| -00000150 4c 99 35 1d ba 31 01 0c 48 d2 f2 88 22 9c 91 7d |L.5..1..H..."..}| -00000160 e3 74 f9 b3 52 bf 0e 0b e1 31 7c 2c cb fd f2 8c |.t..R....1|,....| -00000170 bf 27 40 6d 26 b7 62 47 56 91 22 00 67 9a df 4f |.'@m&.bGV.".g..O| -00000180 f0 47 57 3c a6 46 4d 16 f6 8d fc 2d 91 c4 1a bf |.GW<.FM....-....| -00000190 38 63 ec 63 fe 97 14 80 aa 5b 60 ff c8 77 57 9c |8c.c.....[`..wW.| -000001a0 d5 86 a6 76 96 b3 e9 db c9 eb dd 94 84 2a 46 f5 |...v.........*F.| -000001b0 6a c1 10 66 59 f1 13 b9 41 f3 89 26 ba 52 69 95 |j..fY...A..&.Ri.| -000001c0 b1 f3 66 30 f8 aa 90 f7 90 49 19 48 4c 25 4a 1f |..f0.....I.HL%J.| -000001d0 12 9d 67 32 79 bb 53 d8 c5 d1 b4 6e 89 75 49 c0 |..g2y.S....n.uI.| -000001e0 65 86 ac 72 23 2f 97 d3 ae e2 64 79 5e e2 10 4e |e..r#/....dy^..N| -000001f0 55 0c c6 70 d3 2e 4a 6c b0 73 0a 11 eb ae f7 a1 |U..p..Jl.s......| -00000200 a1 f0 5f 67 45 46 d3 8c 11 ff 21 62 7d ed f9 0e |.._gEF....!b}...| -00000210 2a ba b3 82 f5 6b c1 4a 4e cc 11 90 48 81 96 7a |*....k.JN...H..z| -00000220 df f9 22 ae 53 31 14 9d c9 5c 85 e7 db a2 dd 02 |..".S1...\......| -00000230 56 eb d0 fe 20 35 21 c9 33 63 b5 b7 a8 93 30 7f |V... 5!.3c....0.| -00000240 86 1f d1 af b1 ff 3e 9a d1 a8 90 d9 9c 86 55 e8 |......>.......U.| -00000250 d0 4c c4 6d a3 ce c6 c0 df f8 a8 b6 43 03 ae fc |.L.m........C...| -00000260 7d 94 7b fe be 85 46 d8 42 9d b6 15 b9 a3 27 3d |}.{...F.B.....'=| -00000270 80 64 54 c8 53 c4 a7 94 52 8f 9d 4c 58 54 a5 c4 |.dT.S...R..LXT..| -00000280 e0 e7 2e cb f3 8c d0 82 3f 95 76 c9 ea ea 80 41 |........?.v....A| -00000290 21 5d 3e a3 1e be 4e 0b ce 10 ab 61 a5 76 ef 62 |!]>...N....a.v.b| -000002a0 50 1b 52 a8 75 23 fd eb ea 76 f9 d8 41 3c a2 e4 |P.R.u#...v..A<..| -000002b0 21 cb 56 f7 40 81 78 56 22 06 2a 38 fc 1f d8 9f |!.V.@.xV".*8....| -000002c0 38 b0 7a 93 f0 8c ad 3e 54 27 a2 d7 8b 2c 79 46 |8.z....>T'...,yF| -000002d0 15 65 f1 55 b2 2a 06 a1 97 9b 47 23 f8 9a 3f 88 |.e.U.*....G#..?.| -000002e0 8e 26 7e 13 cd 6e 8b cb d5 a5 78 48 f7 ba ad d8 |.&~..n....xH....| -000002f0 08 3b 34 5b 52 cd e3 2d 12 ac 81 00 c0 d0 4d df |.;4[R..-......M.| -00000300 56 d6 40 86 91 31 3d ba 6b 41 bc 51 6f ac b2 df |V.@..1=.kA.Qo...| -00000310 90 4b 78 17 03 03 00 99 21 0f 5b 18 54 84 98 0c |.Kx.....!.[.T...| -00000320 3a 7b 0b db 99 0e 09 f6 b7 4f a9 cc da bf 4c ac |:{.......O....L.| -00000330 5f 44 fc ba 9d 5d 52 d5 ec 2e 08 0c cc 3c e1 72 |_D...]R......<.r| -00000340 10 77 5b 7b 55 f7 c1 44 a3 25 e0 48 20 9a 3a de |.w[{U..D.%.H .:.| -00000350 2f ae 30 a9 e9 5b 75 84 e3 59 f0 6b 23 a6 d8 20 |/.0..[u..Y.k#.. | -00000360 16 51 2a 19 61 60 35 28 74 41 32 fa 97 8d 3b ed |.Q*.a`5(tA2...;.| -00000370 ff 64 94 d7 27 4c 9b 1e 5e b8 89 43 e3 ae 2a b6 |.d..'L..^..C..*.| -00000380 60 a8 bb f0 d1 75 85 15 bb 95 3c 82 f1 62 da b1 |`....u....<..b..| -00000390 25 d2 58 7d 67 7f 02 5b b4 91 68 3c 70 10 09 94 |%.X}g..[..h...-2.| +000003c0 cd 16 ab da cd e7 93 0d c2 90 a2 62 7b 3c 54 bb |...........b{>> Flow 3 (client to server) -00000000 14 03 03 00 01 01 17 03 03 00 35 c9 09 ac f5 44 |..........5....D| -00000010 40 83 88 5a b9 46 70 b9 ff 9b 2e bb b4 7e 72 b0 |@..Z.Fp......~r.| -00000020 85 26 d6 37 33 ec d1 ac ce f4 db 72 8c e1 07 b5 |.&.73......r....| -00000030 d0 ce ee 2f 19 77 62 ec 97 ae 1b e1 5f 85 bf c4 |.../.wb....._...| -00000040 17 03 03 00 17 1c ae 0f 1d 50 be 4b d0 64 4f 23 |.........P.K.dO#| -00000050 41 60 d9 c7 f5 60 a6 5c 38 14 fd d5 |A`...`.\8...| +00000000 14 03 03 00 01 01 17 03 03 00 35 a8 d6 93 8f 7e |..........5....~| +00000010 65 3a ee 6f c8 37 2a 27 14 dc b7 19 0e aa 14 b6 |e:.o.7*'........| +00000020 22 21 2d ea f4 00 d1 60 55 c0 f1 56 db 43 7a f0 |"!-....`U..V.Cz.| +00000030 1a 47 ce 93 d9 07 7e 61 43 92 3a 95 a9 54 7b c6 |.G....~aC.:..T{.| +00000040 17 03 03 00 17 e6 e4 52 74 15 e2 18 d7 14 59 29 |.......Rt.....Y)| +00000050 59 d8 ce 49 68 3a a8 79 9e f4 ee f1 |Y..Ih:.y....| >>> Flow 4 (server to client) -00000000 17 03 03 00 16 ad 61 13 66 9c 3c dd 88 42 2c 6c |......a.f.<..B,l| -00000010 d1 22 5d b4 b2 6f f0 68 4f 37 4d |."]..o.hO7M| +00000000 17 03 03 00 16 e6 cd 54 e3 31 d9 70 20 25 f4 aa |.......T.1.p %..| +00000010 cd 8f fe e7 88 6b 7f 62 9b 7b de |.....k.b.{.| >>> Flow 5 (client to server) -00000000 17 03 03 00 16 e5 b5 ff ad d4 f5 e5 55 04 83 a7 |............U...| -00000010 59 43 9a 3e 68 4d 38 6f b1 1c 30 |YC.>hM8o..0| +00000000 17 03 03 00 16 bd e9 c4 24 4a 6d 76 aa 83 bb da |........$Jmv....| +00000010 ec 9e d0 c9 38 cc 6b 3c 65 38 91 |....8.k>> Flow 6 (server to client) -00000000 17 03 03 00 1a 64 0c f4 8e 8f 2b 04 e2 36 28 77 |.....d....+..6(w| -00000010 a2 28 97 4b 15 ba 1b b2 10 31 b3 4d 87 09 af |.(.K.....1.M...| +00000000 17 03 03 00 1a 6a e1 ea df 76 a9 fc 4a 80 7b 49 |.....j...v..J.{I| +00000010 dd fa c3 87 e9 e7 c9 b3 ab bf bc a7 d8 cd 36 |..............6| >>> Flow 7 (client to server) -00000000 17 03 03 00 1d 90 c9 33 bf fc 76 12 3d af 9e c8 |.......3..v.=...| -00000010 8c ca e7 a1 63 6e 80 91 b1 7f 5e e4 dc c2 e6 1c |....cn....^.....| -00000020 b6 2b 17 03 03 00 13 ef a8 30 91 b1 20 fe 82 79 |.+.......0.. ..y| -00000030 44 31 a8 af 99 bb 5e 97 75 a3 |D1....^.u.| +00000000 17 03 03 00 1d 1e c5 6f 93 48 41 07 03 e5 8c 6f |.......o.HA....o| +00000010 09 8e 2f 8e da cb 6e 01 e9 b8 6e f6 3f 59 5c 17 |../...n...n.?Y\.| +00000020 91 46 17 03 03 00 13 35 33 12 5e d3 97 0a 1c 54 |.F.....53.^....T| +00000030 cf 54 bb 7d 78 2e 57 a2 5b 39 |.T.}x.W.[9| diff --git a/src/crypto/tls/testdata/Client-TLSv13-P256-ECDHE b/src/crypto/tls/testdata/Client-TLSv13-P256-ECDHE index fa8d312384..410f0dd189 100644 --- a/src/crypto/tls/testdata/Client-TLSv13-P256-ECDHE +++ b/src/crypto/tls/testdata/Client-TLSv13-P256-ECDHE @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 01 19 01 00 01 15 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 33 01 00 01 2f 03 03 00 00 00 00 00 |....3.../.......| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,88 +7,90 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 9a 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| +00000080 01 00 00 b4 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| -000000a0 00 0a 00 04 00 02 00 17 00 0d 00 1a 00 18 08 04 |................| +000000a0 00 0a 00 04 00 02 00 17 00 0d 00 16 00 14 08 04 |................| 000000b0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| -000000c0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| -000000d0 02 03 01 00 33 00 47 00 45 00 17 00 41 04 1e 18 |....3.G.E...A...| -000000e0 37 ef 0d 19 51 88 35 75 71 b5 e5 54 5b 12 2e 8f |7...Q.5uq..T[...| -000000f0 09 67 fd a7 24 20 3e b2 56 1c ce 97 28 5e f8 2b |.g..$ >.V...(^.+| -00000100 2d 4f 9e f1 07 9f 6c 4b 5b 83 56 e2 32 42 e9 58 |-O....lK[.V.2B.X| -00000110 b6 d7 49 a6 b5 68 1a 41 03 56 6b dc 5a 89 |..I..h.A.Vk.Z.| +000000c0 06 03 00 32 00 1a 00 18 08 04 04 03 08 07 08 05 |...2............| +000000d0 08 06 04 01 05 01 06 01 05 03 06 03 02 01 02 03 |................| +000000e0 00 2b 00 09 08 03 04 03 03 03 02 03 01 00 33 00 |.+............3.| +000000f0 47 00 45 00 17 00 41 04 1e 18 37 ef 0d 19 51 88 |G.E...A...7...Q.| +00000100 35 75 71 b5 e5 54 5b 12 2e 8f 09 67 fd a7 24 20 |5uq..T[....g..$ | +00000110 3e b2 56 1c ce 97 28 5e f8 2b 2d 4f 9e f1 07 9f |>.V...(^.+-O....| +00000120 6c 4b 5b 83 56 e2 32 42 e9 58 b6 d7 49 a6 b5 68 |lK[.V.2B.X..I..h| +00000130 1a 41 03 56 6b dc 5a 89 |.A.Vk.Z.| >>> Flow 2 (server to client) -00000000 16 03 03 00 9b 02 00 00 97 03 03 1c 1a ee 30 2f |..............0/| -00000010 02 10 0c 84 ee 6a 2c d1 67 76 00 8a 16 e5 15 c5 |.....j,.gv......| -00000020 4c d7 a9 26 33 43 9a 9a d6 f8 e7 20 00 00 00 00 |L..&3C..... ....| +00000000 16 03 03 00 9b 02 00 00 97 03 03 1f 9f 7f 3f 27 |..............?'| +00000010 c5 5c f2 f1 bb cc a2 89 0d 7f 66 6a ff 85 7e 55 |.\........fj..~U| +00000020 ec 47 a6 5e 9c 09 00 ec 96 e2 a7 20 00 00 00 00 |.G.^....... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 13 03 00 00 |................| 00000050 4f 00 2b 00 02 03 04 00 33 00 45 00 17 00 41 04 |O.+.....3.E...A.| -00000060 f0 2e aa 75 ea 32 f4 3c ea b7 61 13 0f 22 8d 39 |...u.2.<..a..".9| -00000070 9e 0a 53 c8 d6 92 ea 5e 87 5b 46 d3 71 2d d1 df |..S....^.[F.q-..| -00000080 fa 1e 9a 6a 0e b2 bc d7 91 6e 26 56 17 24 11 d8 |...j.....n&V.$..| -00000090 0f be c0 1d f5 fd c7 9d 2d 3c a0 0f ee 03 70 1f |........-<....p.| -000000a0 14 03 03 00 01 01 17 03 03 00 17 8e 76 66 0d 44 |............vf.D| -000000b0 aa a2 d9 80 84 7c 6d 42 f0 ee 9f a3 6c b8 83 21 |.....|mB....l..!| -000000c0 5d 7b 17 03 03 02 6d 18 d3 53 cc 09 6a 23 fc c5 |]{....m..S..j#..| -000000d0 a9 2e 73 b4 3d ea 54 56 42 f5 1f 71 3e 8f 8e 7b |..s.=.TVB..q>..{| -000000e0 12 18 d7 d6 ab ed 24 5f 16 c8 18 5e e0 28 84 40 |......$_...^.(.@| -000000f0 89 49 a7 91 57 d6 2b a0 9c ab 5d 85 ac 4f 6b 70 |.I..W.+...]..Okp| -00000100 c3 31 e0 57 87 d7 7c 45 27 34 54 eb 85 02 14 2c |.1.W..|E'4T....,| -00000110 a0 53 4f ec 21 9f 04 91 38 b8 df 2c 5d 0b 79 0a |.SO.!...8..,].y.| -00000120 4f 96 79 15 72 de b5 fb 43 1f d8 71 62 d8 e0 69 |O.y.r...C..qb..i| -00000130 21 13 87 ab e5 b8 e5 86 01 74 25 b7 39 fc 86 e2 |!........t%.9...| -00000140 2f de 0b 1f 8c db b2 98 b3 47 c1 4e dd db 36 d3 |/........G.N..6.| -00000150 28 de cf 4c 4d 54 8e a3 e5 d3 38 19 1f 4b 05 7f |(..LMT....8..K..| -00000160 9a e1 59 4c a3 4e 42 b6 71 0d 9c 96 e4 d8 29 73 |..YL.NB.q.....)s| -00000170 4e e6 f5 87 56 04 99 c2 56 15 6c 8b 04 7c e5 83 |N...V...V.l..|..| -00000180 8b f3 42 e8 97 7a b0 cc 7d 15 b8 84 d3 08 dd c1 |..B..z..}.......| -00000190 89 f5 d4 19 d2 f6 fd 32 b4 37 6e 6a cc 0c 7a 69 |.......2.7nj..zi| -000001a0 09 57 78 36 d4 5b 8c 23 0f e6 39 08 4c 58 3e 3f |.Wx6.[.#..9.LX>?| -000001b0 b1 a0 ae 2e 85 b7 64 45 dd e1 ae c4 91 53 8c 6f |......dE.....S.o| -000001c0 02 70 45 f0 97 7b c8 90 88 0e 95 ed 1e 81 fc 86 |.pE..{..........| -000001d0 27 83 3d 32 43 d6 e4 f3 84 c6 c4 c1 b2 1c 0d 4a |'.=2C..........J| -000001e0 22 78 cd 1c f8 0a aa 19 1a 96 cc 46 6d a0 7f c7 |"x.........Fm...| -000001f0 2f d8 68 de 48 7d ae 42 b3 75 2a d5 ab cf e7 a7 |/.h.H}.B.u*.....| -00000200 a1 e6 66 e0 88 d8 14 25 81 21 4a 6f f7 7c 84 57 |..f....%.!Jo.|.W| -00000210 9c cd 45 8a c0 2d 5f 97 b6 66 96 f1 be d8 02 d2 |..E..-_..f......| -00000220 a4 8e fb 0d c4 cc 02 12 1d b7 76 73 8d 73 8e 71 |..........vs.s.q| -00000230 ec 62 4b ba d1 94 98 e5 de 45 f4 92 22 79 9a 2e |.bK......E.."y..| -00000240 b4 12 a6 f8 ab 8a 52 c3 df f8 77 a9 71 8b ff d6 |......R...w.q...| -00000250 2b bc 47 0b 63 5b 0f cf f8 f1 86 7a 72 91 78 7b |+.G.c[.....zr.x{| -00000260 b8 52 74 96 40 4c 08 f3 ca 46 ef d9 b9 6d 7a dc |.Rt.@L...F...mz.| -00000270 2c da f1 c2 c4 1f 19 38 84 cf 7d b7 5d f2 19 a7 |,......8..}.]...| -00000280 bc 81 70 48 1c 5d da e7 e1 8f 94 33 fa b9 44 97 |..pH.].....3..D.| -00000290 52 7a 22 75 f3 3e 08 f5 d3 66 be 63 8e e6 fc 7b |Rz"u.>...f.c...{| -000002a0 54 6d 14 2e 88 09 c7 a1 a6 b7 8e f3 9f 66 dd a4 |Tm...........f..| -000002b0 ec 81 e9 4b 44 69 29 78 95 dd 44 80 f5 f9 41 23 |...KDi)x..D...A#| -000002c0 97 53 71 63 2d cc d0 47 d6 f7 3f 6b 61 5f 44 33 |.Sqc-..G..?ka_D3| -000002d0 61 d1 35 94 42 7b 88 b9 af 6f e2 c1 71 7b d9 12 |a.5.B{...o..q{..| -000002e0 2c b6 57 fa 42 98 27 6d 8a da f8 dd de 6f b2 ea |,.W.B.'m.....o..| -000002f0 c8 de 5c 09 cd 47 36 10 0f 52 72 39 b2 e5 92 19 |..\..G6..Rr9....| -00000300 81 2a e0 ae aa cc b5 d1 68 98 c4 69 02 fc 86 1a |.*......h..i....| -00000310 79 9c 11 54 fc 43 8a ed 63 50 83 49 ac bf 4c ad |y..T.C..cP.I..L.| -00000320 80 04 98 fd 33 19 76 49 8f fe 5a 0f 22 69 3e eb |....3.vI..Z."i>.| -00000330 d8 eb 51 71 17 03 03 00 99 42 4d 4b db 37 6c c3 |..Qq.....BMK.7l.| -00000340 fb 93 1f a6 7a 86 3c 5e 88 e5 75 d4 a1 73 4a b3 |....z.<^..u..sJ.| -00000350 0b 99 f1 a6 98 5f 6d 0f 00 0e 4f fa a3 5e 7d f0 |....._m...O..^}.| -00000360 41 dd dd 5c 71 3b 10 f9 75 07 d5 6c f2 83 83 5c |A..\q;..u..l...\| -00000370 60 32 d9 d2 b3 13 1b 6c 84 2b 02 58 da b6 18 4e |`2.....l.+.X...N| -00000380 ea 7d b3 46 2b a9 ec e7 65 3a 8e 2f 77 48 92 72 |.}.F+...e:./wH.r| -00000390 6a 82 47 bd 82 2b f7 01 6b c4 22 e2 43 78 78 03 |j.G..+..k.".Cxx.| -000003a0 3c 40 d9 6c d1 b3 5e 21 4d 52 74 e4 07 70 56 21 |<@.l..^!MRt..pV!| -000003b0 05 37 37 82 13 cd e6 ce 3f 93 61 74 b4 9a 42 7d |.77.....?.at..B}| -000003c0 26 fa 15 4f ed b7 63 22 3c 92 f3 72 9c d2 80 17 |&..O..c"<..r....| -000003d0 30 f0 17 03 03 00 35 8c f6 08 33 76 5a a4 7b ef |0.....5...3vZ.{.| -000003e0 0d 91 b6 bf fa 9e 39 19 6f 79 77 4c 4d 74 95 71 |......9.oywLMt.q| -000003f0 00 73 37 17 50 ef 55 fb 71 04 36 87 2e 16 5e 25 |.s7.P.U.q.6...^%| -00000400 9b d4 9c 52 f9 ec c5 26 7e 58 ed 9f |...R...&~X..| +00000060 f0 c5 09 c6 22 3f 23 06 65 c7 e2 1c f8 e7 c2 59 |...."?#.e......Y| +00000070 a9 9f 00 3d 1a 48 fb b5 7f e4 ad 3d 4f 2d 91 d8 |...=.H.....=O-..| +00000080 f4 2f d5 31 5c dc 2b 53 63 2b 25 1b 60 47 31 3a |./.1\.+Sc+%.`G1:| +00000090 30 72 d8 5d a4 60 9d 68 51 48 45 69 32 73 58 a5 |0r.].`.hQHEi2sX.| +000000a0 14 03 03 00 01 01 17 03 03 00 17 e9 38 fa fe 25 |............8..%| +000000b0 89 ba 85 3b 0e 66 1e 3f b9 52 55 20 e0 3c 07 6f |...;.f.?.RU .<.o| +000000c0 2c 2f 17 03 03 02 6d cf 73 3f de 91 5b 86 ff 90 |,/....m.s?..[...| +000000d0 ca a3 c9 ba e2 9e 56 53 fc 72 28 e5 98 1f 08 ca |......VS.r(.....| +000000e0 6d 0e 80 96 d2 45 74 33 3b 45 ee 2b ab 12 94 57 |m....Et3;E.+...W| +000000f0 be 00 7e f6 14 93 64 62 7b 0d 81 0e 79 8b 63 49 |..~...db{...y.cI| +00000100 36 8a 67 5c bb 33 72 fa 73 0d e1 ab 66 58 fa a3 |6.g\.3r.s...fX..| +00000110 dd 66 c2 bb 0e 64 82 39 59 e1 a0 e1 5c 84 b1 b6 |.f...d.9Y...\...| +00000120 0d 60 94 f2 ff 94 39 72 62 45 cd f6 d8 f3 33 b5 |.`....9rbE....3.| +00000130 20 99 29 c8 d5 ba 8c 49 cb 29 54 e9 cf 7e 26 1f | .)....I.)T..~&.| +00000140 25 96 41 93 82 4c 38 15 0d 0c 6d 7f 89 51 7f 43 |%.A..L8...m..Q.C| +00000150 9d 04 3a 1a 58 86 97 4e 0c 29 c0 2e f0 e7 78 42 |..:.X..N.)....xB| +00000160 f0 b4 11 cb 50 ec 45 62 c5 0a 42 11 cc aa c4 d4 |....P.Eb..B.....| +00000170 33 15 ee 43 e1 80 6f 46 16 ea 30 27 09 d1 34 e6 |3..C..oF..0'..4.| +00000180 59 f7 b0 e0 6f ea 51 bd 02 79 17 06 3f 84 75 08 |Y...o.Q..y..?.u.| +00000190 63 91 b3 58 d3 1c 61 47 bf d9 2a 9e 11 75 b2 5e |c..X..aG..*..u.^| +000001a0 7e 09 62 f2 3c ba 63 4b 2b 09 c4 90 b5 78 9a c4 |~.b.<.cK+....x..| +000001b0 be 35 9b 7f e3 11 5a 82 d8 50 b3 67 20 7a 53 ec |.5....Z..P.g zS.| +000001c0 cb f9 1a b3 b3 b6 b6 39 1b f1 fe 7a 28 27 9c ed |.......9...z('..| +000001d0 25 35 f4 f1 21 11 eb 33 61 64 1d 54 eb ef c3 d0 |%5..!..3ad.T....| +000001e0 2c 0d 76 0d 7e 90 3f 8d a4 d0 b5 d9 27 49 c7 fc |,.v.~.?.....'I..| +000001f0 cc 59 8c c5 af 59 fc 09 98 63 9c fb 63 d8 09 6f |.Y...Y...c..c..o| +00000200 55 2d 1f d2 c7 83 5f 3d ae 00 ef ca 27 03 9d b9 |U-...._=....'...| +00000210 00 03 c5 c7 e5 2d 91 47 b0 6c 67 2a 09 3e bc 57 |.....-.G.lg*.>.W| +00000220 a3 02 3f cf b2 88 d8 3d 25 c5 e1 0e 2b a2 b7 5f |..?....=%...+.._| +00000230 57 18 5c eb 8e ae 5f d6 5f 11 1b 5c 48 3b f5 84 |W.\..._._..\H;..| +00000240 b0 6e 29 3e 58 71 36 6e 66 6e e0 d0 98 b0 1b 84 |.n)>Xq6nfn......| +00000250 ca 8c 53 83 86 ca 26 7a 15 6b 6a 7c 61 91 55 45 |..S...&z.kj|a.UE| +00000260 58 cb bd b2 df df 78 22 83 36 8e 4f b6 40 70 ea |X.....x".6.O.@p.| +00000270 d1 72 33 7d 85 00 01 48 f1 75 73 db b3 aa 1d da |.r3}...H.us.....| +00000280 78 c9 e3 37 7c 1c 52 74 62 6c f6 eb af af 0b 2d |x..7|.Rtbl.....-| +00000290 ef d4 85 3d 9f 48 de 5c 4a 6e 24 69 b9 7b 87 e7 |...=.H.\Jn$i.{..| +000002a0 62 3c 26 67 8a 52 b2 73 66 90 56 07 6f ec 14 62 |b<&g.R.sf.V.o..b| +000002b0 88 15 20 e6 27 59 d4 cf 0e f0 59 cd cb 8e bd e5 |.. .'Y....Y.....| +000002c0 ca 10 39 40 54 a5 57 4e 99 70 93 b4 86 60 5f f1 |..9@T.WN.p...`_.| +000002d0 70 f5 d7 21 ef f2 11 b2 da 7a 7f 27 a8 6b fe 7f |p..!.....z.'.k..| +000002e0 e4 eb 35 9c d5 24 ef 70 4b 3c ed bd 9b b9 b9 f3 |..5..$.pK<......| +000002f0 50 a4 61 7f 24 d0 8c 7f 4f 48 09 4f 1e 26 fb 46 |P.a.$...OH.O.&.F| +00000300 ec c2 84 12 a5 6a 5f 19 f0 03 cc 50 cc 07 26 23 |.....j_....P..&#| +00000310 58 6e 68 d8 20 ae eb db 2f be a6 7b a8 ed 86 20 |Xnh. .../..{... | +00000320 61 07 03 47 e5 19 9b a7 0d 27 e0 56 9f 2a d5 19 |a..G.....'.V.*..| +00000330 e7 b3 39 07 17 03 03 00 99 3a 9b b2 61 6a 40 3a |..9......:..aj@:| +00000340 46 a8 0b 50 e3 95 d2 80 5f 5a 08 c3 54 2e 47 ac |F..P...._Z..T.G.| +00000350 f1 83 07 13 21 7f 5e 4e 1b 67 66 cc 38 a7 f3 91 |....!.^N.gf.8...| +00000360 f0 5f ac 9a 39 55 de bf 02 30 2a 87 35 85 f8 1d |._..9U...0*.5...| +00000370 32 3a 8c f8 90 6a 22 21 b2 e8 87 5e 54 6a 45 de |2:...j"!...^TjE.| +00000380 74 ff 6d 37 00 92 07 6c 09 13 c1 5e 68 bc 28 80 |t.m7...l...^h.(.| +00000390 d6 24 e5 32 fc 13 ee 68 68 91 9a e6 15 74 21 7d |.$.2...hh....t!}| +000003a0 2d b2 c8 f5 1d 05 69 5c 80 ee 8b 7c 3e 23 be 35 |-.....i\...|>#.5| +000003b0 d4 54 3c 52 66 2a f1 12 98 5d 3a 3f 44 26 84 d8 |.T>> Flow 3 (client to server) -00000000 14 03 03 00 01 01 17 03 03 00 35 f5 7f 27 09 c2 |..........5..'..| -00000010 54 9d e7 a7 3b 14 b3 f2 a6 6d 27 5f 9b 79 04 17 |T...;....m'_.y..| -00000020 28 5c de 4f 67 cf a5 24 e4 d3 c5 e1 38 fa 7e e8 |(\.Og..$....8.~.| -00000030 97 03 7e 66 3b d0 6b e7 f8 7e 97 e0 db 6a da 79 |..~f;.k..~...j.y| -00000040 17 03 03 00 17 30 1a e2 fe 4a 7a 03 03 82 f6 05 |.....0...Jz.....| -00000050 e8 18 67 1d 14 ab 4f 3c 22 c6 45 f5 17 03 03 00 |..g...O<".E.....| -00000060 13 f8 8f 43 e7 74 3c a0 28 b2 71 5a 85 69 e5 86 |...C.t<.(.qZ.i..| -00000070 06 e3 4c 91 |..L.| +00000000 14 03 03 00 01 01 17 03 03 00 35 70 3d 2c 7e 6a |..........5p=,~j| +00000010 d9 c5 58 7b 1d b5 d8 af 9e ca b8 30 2a 9b c3 c8 |..X{.......0*...| +00000020 fa 1c 76 f0 64 f8 4c 01 24 19 18 b2 2e 70 b9 e1 |..v.d.L.$....p..| +00000030 d3 45 96 e7 08 7e 7b c8 7d 1a c8 b7 87 13 9d 1d |.E...~{.}.......| +00000040 17 03 03 00 17 3f 62 68 a3 27 6c c3 12 33 ed e6 |.....?bh.'l..3..| +00000050 0e 87 e6 c4 3e 63 55 2a 15 11 aa 35 17 03 03 00 |....>cU*...5....| +00000060 13 f8 81 0f 72 73 8b d0 14 af fe f2 9d b7 c7 fd |....rs..........| +00000070 16 17 b9 60 |...`| diff --git a/src/crypto/tls/testdata/Client-TLSv13-X25519-ECDHE b/src/crypto/tls/testdata/Client-TLSv13-X25519-ECDHE index 855f63de21..9e53626d5d 100644 --- a/src/crypto/tls/testdata/Client-TLSv13-X25519-ECDHE +++ b/src/crypto/tls/testdata/Client-TLSv13-X25519-ECDHE @@ -1,5 +1,5 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 f8 01 00 00 f4 03 03 00 00 00 00 00 |................| +00000000 16 03 01 01 12 01 00 01 0e 03 03 00 00 00 00 00 |................| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -7,84 +7,86 @@ 00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......| 00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#| 00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............| -00000080 01 00 00 79 00 0b 00 02 01 00 ff 01 00 01 00 00 |...y............| +00000080 01 00 00 93 00 0b 00 02 01 00 ff 01 00 01 00 00 |................| 00000090 17 00 00 00 12 00 00 00 05 00 05 01 00 00 00 00 |................| -000000a0 00 0a 00 04 00 02 00 1d 00 0d 00 1a 00 18 08 04 |................| +000000a0 00 0a 00 04 00 02 00 1d 00 0d 00 16 00 14 08 04 |................| 000000b0 04 03 08 07 08 05 08 06 04 01 05 01 06 01 05 03 |................| -000000c0 06 03 02 01 02 03 00 2b 00 09 08 03 04 03 03 03 |.......+........| -000000d0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}| -000000e0 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..| -000000f0 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t| +000000c0 06 03 00 32 00 1a 00 18 08 04 04 03 08 07 08 05 |...2............| +000000d0 08 06 04 01 05 01 06 01 05 03 06 03 02 01 02 03 |................| +000000e0 00 2b 00 09 08 03 04 03 03 03 02 03 01 00 33 00 |.+............3.| +000000f0 26 00 24 00 1d 00 20 2f e5 7d a3 47 cd 62 43 15 |&.$... /.}.G.bC.| +00000100 28 da ac 5f bb 29 07 30 ff f6 84 af c4 cf c2 ed |(.._.).0........| +00000110 90 99 5f 58 cb 3b 74 |.._X.;t| >>> Flow 2 (server to client) -00000000 16 03 03 00 7a 02 00 00 76 03 03 6c f6 24 8a 4a |....z...v..l.$.J| -00000010 82 87 8f c9 9a a3 5a d2 4a 24 d3 52 c8 5d 52 95 |......Z.J$.R.]R.| -00000020 0f 12 e8 8e e6 0c a6 5d 60 de 3c 20 00 00 00 00 |.......]`.< ....| +00000000 16 03 03 00 7a 02 00 00 76 03 03 5a 42 7b 30 69 |....z...v..ZB{0i| +00000010 87 6c 87 6a 9c c4 4f 41 b5 18 58 d5 7a 1d 7d da |.l.j..OA..X.z.}.| +00000020 92 29 4c dd 57 6b 4d 0c f9 7c 74 20 00 00 00 00 |.)L.WkM..|t ....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 13 03 00 00 |................| -00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 1b |..+.....3.$... .| -00000060 e6 5f 3d 83 17 1c a6 90 45 f9 00 d9 96 be 4a 58 |._=.....E.....JX| -00000070 ec 82 73 4d e6 8c 74 e9 80 bc 3a 48 1b 93 71 14 |..sM..t...:H..q.| -00000080 03 03 00 01 01 17 03 03 00 17 71 c1 fc 68 5e 33 |..........q..h^3| -00000090 54 8f 43 df 20 55 ac 3b e8 a4 ee 68 ff 88 7c 71 |T.C. U.;...h..|q| -000000a0 92 17 03 03 02 6d 2a 26 5c 45 13 5f 75 46 56 41 |.....m*&\E._uFVA| -000000b0 25 92 a1 6f cd 7b 01 e2 cb 76 81 4d 33 f0 9d d1 |%..o.{...v.M3...| -000000c0 0d db b1 90 1a a7 d9 a8 4a 79 b1 12 59 62 0d c8 |........Jy..Yb..| -000000d0 cc 92 16 26 27 3e 07 b6 8a 15 77 a8 f6 c3 02 e7 |...&'>....w.....| -000000e0 44 0d b5 d3 11 57 6b 81 15 7d 23 b3 91 82 21 3c |D....Wk..}#...!<| -000000f0 0a 0c ef d5 5b 96 5d 85 aa 3a 1e a6 7b fc 3a eb |....[.]..:..{.:.| -00000100 24 af 13 fa 7f 90 0a 83 b5 0a 0b d0 f7 0c 2d 99 |$.............-.| -00000110 75 9b 84 0c d8 dc 60 a3 62 ed 64 55 02 73 a1 74 |u.....`.b.dU.s.t| -00000120 c1 53 c6 97 a5 23 7c 19 c8 f7 1c 97 e9 e9 f8 ee |.S...#|.........| -00000130 4c 47 7e c4 5e 0f 03 fc 60 9e ba 47 ea a9 9b ef |LG~.^...`..G....| -00000140 9a 04 62 e3 db bf 30 d7 5a 1f 20 c9 4c 37 ff 0e |..b...0.Z. .L7..| -00000150 46 d9 ce 85 c5 47 16 43 9a 89 0b 97 44 7a be 09 |F....G.C....Dz..| -00000160 5d 03 a0 b1 1f a6 ca 78 0d fb f4 1a 6d 3a ec 40 |]......x....m:.@| -00000170 1e 58 fc 67 5e bb 69 a1 ae 1d 6d bc b4 80 b9 71 |.X.g^.i...m....q| -00000180 1a 11 12 35 6a 2a 0c dc b3 b5 4b 0a 06 a7 8b be |...5j*....K.....| -00000190 38 4b 70 32 d4 51 e3 99 5b 60 28 e7 9a 60 90 6b |8Kp2.Q..[`(..`.k| -000001a0 1f 3a 9b 4b 66 fd e6 76 b5 8c 29 c3 36 ae a8 81 |.:.Kf..v..).6...| -000001b0 7e 7c bf e7 46 7d 13 27 0d 38 75 f0 15 e1 64 93 |~|..F}.'.8u...d.| -000001c0 1e 26 bc a8 5d 95 60 a2 e5 42 7f 2f 08 a1 e8 d3 |.&..].`..B./....| -000001d0 79 e8 5e 1f 02 45 cc 05 ca 63 7b f2 d9 ad af ab |y.^..E...c{.....| -000001e0 5a 94 f0 16 e7 60 14 c2 3d 05 3f 8d bb 33 c1 ca |Z....`..=.?..3..| -000001f0 79 28 04 c7 20 07 c8 13 89 7a 11 a2 54 6d b8 d5 |y(.. ....z..Tm..| -00000200 e1 b7 b1 43 48 9b a9 b9 e8 e0 40 7e 5a 36 24 70 |...CH.....@~Z6$p| -00000210 42 9a 51 70 6e 22 8a 2b 4b 9d b0 58 ff ae a9 45 |B.Qpn".+K..X...E| -00000220 34 b2 8b c1 35 d8 65 a5 7e 1f 32 fd 51 21 79 00 |4...5.e.~.2.Q!y.| -00000230 79 20 f7 5f 8a e2 e0 b3 4a 78 3b 03 a8 03 b6 ef |y ._....Jx;.....| -00000240 b2 25 37 e9 f3 ce 22 f0 2b fc f8 dd be 50 10 22 |.%7...".+....P."| -00000250 0b fa fb 04 ab a7 33 07 48 2f ca ec 0d fe 19 75 |......3.H/.....u| -00000260 cc c5 3d 17 36 06 5c 07 08 15 df 36 6c 4f f4 73 |..=.6.\....6lO.s| -00000270 50 49 ff 47 ba 47 6d e1 bb 2d 8f 77 d5 44 a9 87 |PI.G.Gm..-.w.D..| -00000280 2a 05 12 52 bf 2b e2 4b 64 94 9c 89 bb 2c 65 cb |*..R.+.Kd....,e.| -00000290 59 2a f0 1a 15 b2 e3 6e 5a cc 48 b4 44 6c 44 07 |Y*.....nZ.H.DlD.| -000002a0 80 01 93 25 86 83 f2 8f 01 e6 ef 5e 9a 36 4e 7f |...%.......^.6N.| -000002b0 bc 27 0e 4d f0 67 3a de 29 b5 e9 6a 7f 4b b4 77 |.'.M.g:.)..j.K.w| -000002c0 9b e2 3b 73 c9 51 e5 a6 df 97 a7 02 fa f2 f7 db |..;s.Q..........| -000002d0 df 71 fb d1 ad 64 37 46 3e de 57 de 1d fc 8f 6e |.q...d7F>.W....n| -000002e0 bb 6f 58 3f 87 00 d1 a3 52 a5 35 12 17 83 19 a4 |.oX?....R.5.....| -000002f0 2b be 31 bd dc a6 62 ca c3 09 39 e1 cd 0b 64 44 |+.1...b...9...dD| -00000300 1a ef 65 26 f3 e5 31 fb 61 56 df d3 11 d9 cc 65 |..e&..1.aV.....e| -00000310 7f 8f ab 17 03 03 00 99 94 ce 37 3c e1 7f b1 f5 |..........7<....| -00000320 7e 2b 04 17 45 3d 38 40 1b 82 0e f7 22 ef 28 ce |~+..E=8@....".(.| -00000330 1a 69 33 a6 ad c6 1f ab 08 12 31 b4 c7 41 ac c5 |.i3.......1..A..| -00000340 b3 e5 4b 84 56 d9 0c 53 58 4c 8f 40 3a 34 66 d0 |..K.V..SXL.@:4f.| -00000350 c7 8f 9b b3 26 25 1f 68 fc 97 ba a7 de ac cf c5 |....&%.h........| -00000360 8b b3 26 99 68 6e ca e9 65 47 07 bd 38 15 f3 0c |..&.hn..eG..8...| -00000370 d0 14 8e 6d 89 a2 ad cd ad ef 00 54 07 5a 4b ef |...m.......T.ZK.| -00000380 02 ce b9 a1 b0 d0 d6 f7 bb e0 91 51 72 87 99 50 |...........Qr..P| -00000390 f4 68 4c 0e d8 fa 00 d4 dd bd 1d 2e 7b f6 e2 61 |.hL.........{..a| -000003a0 d3 a8 46 9c f7 dc 2a 04 be 3c 42 85 4f ad 59 20 |..F...*..'.........| +000000f0 14 3c a1 5b 2e 60 55 34 73 f2 1d c2 24 df 09 55 |.<.[.`U4s...$..U| +00000100 e5 5b b6 43 de d7 48 6b cd 15 da 06 f1 b6 56 0b |.[.C..Hk......V.| +00000110 fb 7e 97 f4 40 2f 6b c9 5b 4d 0c 70 8d d5 1c 21 |.~..@/k.[M.p...!| +00000120 d6 a2 4f ab e9 c7 cb 69 0e d0 86 d0 b8 1e c5 6b |..O....i.......k| +00000130 3d 2f 78 f7 ab fd db 06 5c 59 69 fe 74 69 2f c9 |=/x.....\Yi.ti/.| +00000140 a0 36 e2 08 2e 42 23 05 da 89 33 e7 b5 c3 b2 5a |.6...B#...3....Z| +00000150 d4 7e 4c 99 1c 24 a8 62 9b 92 7d bb c0 e1 4a 90 |.~L..$.b..}...J.| +00000160 72 83 4d b2 74 13 45 3f ef 91 7c b0 c4 6b 4e f5 |r.M.t.E?..|..kN.| +00000170 5c 3d 56 6f fe 96 63 c2 fe 2c 88 23 ab 92 08 bf |\=Vo..c..,.#....| +00000180 c5 08 25 81 a5 49 a6 5c 95 da 09 b2 c9 4b e0 f2 |..%..I.\.....K..| +00000190 59 4e 5a 67 6b 71 c7 ba 69 ff a8 f5 6d 21 52 68 |YNZgkq..i...m!Rh| +000001a0 05 d6 61 0e d6 67 d9 64 3d 26 a3 65 3c 55 11 42 |..a..g.d=&.e.}..E0L-rC.| +00000260 4f a3 08 d2 7f 70 e9 31 7b c8 cd 77 fc 3e 82 70 |O....p.1{..w.>.p| +00000270 48 ed 83 55 79 16 c1 8c 69 50 60 53 48 08 5b 66 |H..Uy...iP`SH.[f| +00000280 fe 78 02 06 16 ba 02 90 85 11 7b 49 36 71 58 35 |.x........{I6qX5| +00000290 46 7f fd 0f de dc 11 ae 3a bd df 79 93 f9 e3 8d |F.......:..y....| +000002a0 4c d8 c5 55 74 34 7f 01 dd 4d d5 ef ef 4e 3d d3 |L..Ut4...M...N=.| +000002b0 31 94 3f 1c 9b 6c 44 d0 3b 73 d1 5f b4 b6 48 5d |1.?..lD.;s._..H]| +000002c0 16 ba 17 0b d0 f5 b4 16 18 1f 85 be dc f1 75 71 |..............uq| +000002d0 17 f8 b0 8a f3 d2 80 24 d5 3b cd 58 f4 9b 03 e5 |.......$.;.X....| +000002e0 64 c5 ae 5e 9a 25 d2 bb a2 28 91 4b 2e 81 4d e4 |d..^.%...(.K..M.| +000002f0 4e 25 57 12 fc 7a 87 36 66 0b 76 21 66 17 a0 e5 |N%W..z.6f.v!f...| +00000300 0a f7 00 31 48 62 a9 70 f1 75 1b e0 78 c9 fa de |...1Hb.p.u..x...| +00000310 11 6f 3d 17 03 03 00 99 72 f9 ad 67 80 2a 9f 04 |.o=.....r..g.*..| +00000320 a9 0a fb 6f 03 90 88 35 7f cb 97 5f 4e a2 1e a8 |...o...5..._N...| +00000330 34 80 96 d1 60 b4 b4 12 ec c3 2b 15 c9 a0 f9 28 |4...`.....+....(| +00000340 50 1c 53 1d fc 32 a2 c7 c0 03 58 1b 83 a6 ee 94 |P.S..2....X.....| +00000350 2d 98 99 83 62 6a 52 a0 c5 42 94 4f 3a 26 2e 44 |-...bjR..B.O:&.D| +00000360 7b 03 f5 2a 0e 9e 48 e4 2a 18 2e 9b 42 7f 34 d2 |{..*..H.*...B.4.| +00000370 3c b2 92 52 cc 51 0e f0 fd c7 4d e6 d7 1b b2 44 |<..R.Q....M....D| +00000380 99 48 e7 da 1e 43 37 d1 ac 80 c5 34 21 1b d8 0c |.H...C7....4!...| +00000390 9c 92 0d b4 27 b0 78 43 06 a2 90 42 c4 99 5e 5f |....'.xC...B..^_| +000003a0 a4 36 69 a5 a1 92 12 5e 51 47 7f ff 50 07 ac 8a |.6i....^QG..P...| +000003b0 35 17 03 03 00 35 86 65 34 2f d0 12 2a 0b 7c 50 |5....5.e4/..*.|P| +000003c0 b4 c5 67 30 cc 4d cf 4f f7 be a5 0d 2c b2 96 ae |..g0.M.O....,...| +000003d0 da 70 a3 74 c2 e7 9a 18 61 17 95 da 00 ac cc 89 |.p.t....a.......| +000003e0 66 a1 e8 aa ca 8f 02 3c b5 16 3d |f......<..=| >>> Flow 3 (client to server) -00000000 14 03 03 00 01 01 17 03 03 00 35 19 50 85 5d 08 |..........5.P.].| -00000010 c9 5e 25 05 37 ed cc 54 fe ba 86 3e 8a d4 e9 fd |.^%.7..T...>....| -00000020 66 54 6e a3 1f 8b 4f 95 cf 04 51 db 60 96 ae 78 |fTn...O...Q.`..x| -00000030 6b 7d 19 63 03 2a b6 e5 97 37 26 79 98 3f 85 52 |k}.c.*...7&y.?.R| -00000040 17 03 03 00 17 c9 80 91 3e 92 1e a7 9b 00 a3 01 |........>.......| -00000050 19 31 d0 6f 2e 69 0c 15 03 73 20 36 17 03 03 00 |.1.o.i...s 6....| -00000060 13 97 85 32 6f a2 9c 72 be ca 43 db 18 a7 98 b7 |...2o..r..C.....| -00000070 67 44 71 ce |gDq.| +00000000 14 03 03 00 01 01 17 03 03 00 35 a0 a0 1c ae a9 |..........5.....| +00000010 1a 1f 74 01 92 fe bf 91 c4 aa 8b f2 84 7e 39 c1 |..t..........~9.| +00000020 cb f4 ae a8 76 0c de 9e 54 7f ca 4a a2 d3 07 ef |....v...T..J....| +00000030 8e ed 8a be 54 ad 76 fe b6 62 24 4d a7 88 d5 7a |....T.v..b$M...z| +00000040 17 03 03 00 17 a2 d4 e7 78 ef 4a 2e 66 52 6f 2a |........x.J.fRo*| +00000050 e3 07 e0 9c fc 19 f6 f8 96 88 bb be 17 03 03 00 |................| +00000060 13 43 01 14 16 42 27 8a b9 a9 98 5f c7 06 4d 20 |.C...B'...._..M | +00000070 8b c3 cb 33 |...3| diff --git a/src/crypto/tls/testdata/Server-TLSv12-ClientAuthRequestedAndECDSAGiven b/src/crypto/tls/testdata/Server-TLSv12-ClientAuthRequestedAndECDSAGiven index 41ed6c4e1b..73d54e6579 100644 --- a/src/crypto/tls/testdata/Server-TLSv12-ClientAuthRequestedAndECDSAGiven +++ b/src/crypto/tls/testdata/Server-TLSv12-ClientAuthRequestedAndECDSAGiven @@ -1,7 +1,7 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 6d 01 00 00 69 03 03 5e 92 9d 30 27 |....m...i..^..0'| -00000010 23 da fa a0 07 30 03 c8 bd 60 f2 db e9 5e b3 fc |#....0...`...^..| -00000020 65 d3 c5 e1 49 35 63 86 53 ec 87 00 00 04 00 2f |e...I5c.S....../| +00000000 16 03 01 00 6d 01 00 00 69 03 03 5e 1c 8d af f1 |....m...i..^....| +00000010 4a ab 9d e1 c7 9c 85 c3 ab b8 84 84 ee 39 66 0b |J............9f.| +00000020 6d d7 b2 3b 7b bf 4e d1 90 a4 92 00 00 04 00 2f |m..;{.N......../| 00000030 00 ff 01 00 00 3c 00 16 00 00 00 17 00 00 00 0d |.....<..........| 00000040 00 30 00 2e 04 03 05 03 06 03 08 07 08 08 08 09 |.0..............| 00000050 08 0a 08 0b 08 04 08 05 08 06 04 01 05 01 06 01 |................| @@ -49,10 +49,10 @@ 00000260 ee b1 87 82 f1 6c 04 ed 73 bb b3 43 77 8d 0c 1c |.....l..s..Cw...| 00000270 f1 0f a1 d8 40 83 61 c9 4c 72 2b 9d ae db 46 06 |....@.a.Lr+...F.| 00000280 06 4d f4 c1 b3 3e c0 d1 bd 42 d4 db fe 3d 13 60 |.M...>...B...=.`| -00000290 84 5c 21 d3 3b e9 fa e7 16 03 03 00 23 0d 00 00 |.\!.;.......#...| -000002a0 1f 02 01 40 00 18 08 04 04 03 08 07 08 05 08 06 |...@............| -000002b0 04 01 05 01 06 01 05 03 06 03 02 01 02 03 00 00 |................| -000002c0 16 03 03 00 04 0e 00 00 00 |.........| +00000290 84 5c 21 d3 3b e9 fa e7 16 03 03 00 1f 0d 00 00 |.\!.;...........| +000002a0 1b 02 01 40 00 14 08 04 04 03 08 07 08 05 08 06 |...@............| +000002b0 04 01 05 01 06 01 05 03 06 03 00 00 16 03 03 00 |................| +000002c0 04 0e 00 00 00 |.....| >>> Flow 3 (client to server) 00000000 16 03 03 02 0a 0b 00 02 06 00 02 03 00 02 00 30 |...............0| 00000010 82 01 fc 30 82 01 5e 02 09 00 9a 30 84 6c 26 35 |...0..^....0.l&5| @@ -87,40 +87,40 @@ 000001e0 be e8 91 b3 da 1a f5 5d a3 23 f5 26 8b 45 70 8d |.......].#.&.Ep.| 000001f0 65 62 9b 7e 01 99 3d 18 f6 10 9a 38 61 9b 2e 57 |eb.~..=....8a..W| 00000200 e4 fa cc b1 8a ce e2 23 a0 87 f0 e1 67 51 eb 16 |.......#....gQ..| -00000210 03 03 00 86 10 00 00 82 00 80 02 50 e4 cc a3 ad |...........P....| -00000220 fb 33 24 a1 b3 0a 7c 0f 00 e6 1a 06 2b 9f 1e 1f |.3$...|.....+...| -00000230 cc b8 b2 80 90 e7 86 20 32 40 06 ac 1b b0 41 b7 |....... 2@....A.| -00000240 0d 9c 4c 41 90 01 0b 7a 7e b2 b2 46 39 dc 51 25 |..LA...z~..F9.Q%| -00000250 98 e0 b9 ec 36 fc 08 64 f0 51 2a 41 e1 e5 61 3d |....6..d.Q*A..a=| -00000260 fc 07 c1 9b 1f 6f 48 d4 1f 46 bf 14 e6 92 61 1a |.....oH..F....a.| -00000270 bd 5f 25 1f 5e b1 3c ac c7 58 63 02 0d 3a e0 d6 |._%.^.<..Xc..:..| -00000280 e9 39 fc ec 59 66 2e 91 b2 65 37 eb a8 b5 60 d9 |.9..Yf...e7...`.| -00000290 49 05 9f 6f cc 71 79 bb f7 68 16 03 03 00 93 0f |I..o.qy..h......| -000002a0 00 00 8f 04 03 00 8b 30 81 88 02 42 00 bd 6a 29 |.......0...B..j)| -000002b0 21 06 1a e2 67 a1 7f 10 ab ca 3f 74 5a bc 2f 5d |!...g.....?tZ./]| -000002c0 53 d0 59 90 f2 d0 b4 2d 75 47 67 0b 67 55 b6 4f |S.Y....-uGg.gU.O| -000002d0 75 7d 32 d8 a7 25 c8 4c 90 0b 56 65 be 60 5d ee |u}2..%.L..Ve.`].| -000002e0 f7 b3 80 79 26 e5 25 1d 17 cc d8 36 fc 39 02 42 |...y&.%....6.9.B| -000002f0 01 c3 32 d6 f2 59 9e 10 c8 bf 7f 74 27 a1 00 df |..2..Y.....t'...| -00000300 55 05 f0 b3 81 a1 6e 10 a6 fb 0b e4 1c 3f 62 02 |U.....n......?b.| -00000310 c9 cc c2 4b 97 ad 0c 88 98 07 6c 98 6d db 9d 9f |...K......l.m...| -00000320 68 a0 56 ab 5f f9 a2 21 33 86 64 53 de 37 ff 68 |h.V._..!3.dS.7.h| -00000330 04 9d 14 03 03 00 01 01 16 03 03 00 40 85 14 34 |............@..4| -00000340 d6 74 a9 d0 0b e9 1f 34 a9 e9 6c cf 5a ac 88 22 |.t.....4..l.Z.."| -00000350 51 4d ae 16 05 dd 9e c1 36 5e e3 cf b1 5a b5 48 |QM......6^...Z.H| -00000360 6c 24 b1 d6 fb 7f 03 6a 98 41 90 de 6d c7 b2 49 |l$.....j.A..m..I| -00000370 d9 a3 c7 45 ff 18 7c f7 a4 cf 05 59 87 |...E..|....Y.| +00000210 03 03 00 86 10 00 00 82 00 80 b1 e6 1d 71 51 c1 |.............qQ.| +00000220 3a bd 0a 32 95 14 0c 83 7a 2b ec 89 24 f2 29 d8 |:..2....z+..$.).| +00000230 72 84 ae 13 33 90 58 93 b6 46 6c 54 11 54 5b d3 |r...3.X..FlT.T[.| +00000240 59 da 02 4a de 2a 56 67 04 32 3b 44 6b ac 6d 6c |Y..J.*Vg.2;Dk.ml| +00000250 c5 de 9d b2 9e 7b ec 27 05 9d 47 6d a1 0b 50 71 |.....{.'..Gm..Pq| +00000260 ea 19 cc 60 5e db 6c 2f 06 b7 6e ce 51 bf 93 a9 |...`^.l/..n.Q...| +00000270 0e c7 85 c1 83 d2 ac fe 6a d2 a9 bd b3 54 4f 45 |........j....TOE| +00000280 4b e4 40 68 fb 30 21 ec 1c fc 76 a6 db 8b e1 46 |K.@h.0!...v....F| +00000290 8c 0c 56 1f c0 e5 9b 2c 54 eb 16 03 03 00 93 0f |..V....,T.......| +000002a0 00 00 8f 04 03 00 8b 30 81 88 02 42 01 11 9a de |.......0...B....| +000002b0 07 19 df 8b d0 56 e7 b5 b0 d2 d4 c1 32 58 93 88 |.....V......2X..| +000002c0 ea a6 73 86 f9 e6 be b5 c5 1f d6 0d da 28 59 89 |..s..........(Y.| +000002d0 21 73 fe e8 30 b9 f0 d1 01 d3 e0 54 79 a6 67 0d |!s..0......Ty.g.| +000002e0 84 88 94 2c b9 b6 0e 19 06 34 cc f1 5f 01 02 42 |...,.....4.._..B| +000002f0 00 fe 02 83 e8 46 a8 5f ef 5a f0 e1 6f 3f 73 b9 |.....F._.Z..o?s.| +00000300 0f a1 64 db a7 c4 fb 1e 9f ac da 33 ac a2 7f ff |..d........3....| +00000310 64 c1 26 37 17 41 c0 5e f4 37 5c 76 23 7d 92 3a |d.&7.A.^.7\v#}.:| +00000320 ea 35 7f 83 03 7b a4 65 44 5d fb 84 08 39 c7 90 |.5...{.eD]...9..| +00000330 cc 4a 14 03 03 00 01 01 16 03 03 00 40 7b 06 98 |.J..........@{..| +00000340 ff f7 d5 a1 68 60 23 25 bc df 12 27 7f 64 1e c8 |....h`#%...'.d..| +00000350 bc 6d 26 28 29 d0 9f 56 6a f1 5b cd 4e 17 6c 32 |.m&()..Vj.[.N.l2| +00000360 15 b9 7a 55 02 9b 66 1c e3 97 40 26 69 7b e7 02 |..zU..f...@&i{..| +00000370 b0 37 d1 ec ed 96 2e 92 5a 5f 90 c1 be |.7......Z_...| >>> Flow 4 (server to client) 00000000 14 03 03 00 01 01 16 03 03 00 40 00 00 00 00 00 |..........@.....| -00000010 00 00 00 00 00 00 00 00 00 00 00 63 1a 77 66 2a |...........c.wf*| -00000020 49 3a b2 17 83 74 e1 d9 70 96 de 01 84 09 f4 88 |I:...t..p.......| -00000030 c3 e7 3b 65 11 6f 13 32 b8 b4 f4 41 ca 6a d6 d7 |..;e.o.2...A.j..| -00000040 51 a3 a1 f0 2d 5b b4 55 29 f9 d3 17 03 03 00 40 |Q...-[.U)......@| +00000010 00 00 00 00 00 00 00 00 00 00 00 0f e2 df ef c7 |................| +00000020 0e 11 83 70 ba a8 fa 90 e3 d5 df 76 dd 7a f1 63 |...p.......v.z.c| +00000030 ca a3 12 c7 42 45 ae 1a a3 0f 3b 4c 46 52 91 8e |....BE....;LFR..| +00000040 bf df 21 be cb ed 93 12 8a ba 88 17 03 03 00 40 |..!............@| 00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00000060 d7 30 0f 03 89 22 4c 19 5f 06 a7 4b 95 59 91 52 |.0..."L._..K.Y.R| -00000070 2a 65 ab 99 cb 71 99 8b 13 82 44 92 6b ff 59 07 |*e...q....D.k.Y.| -00000080 28 ca 01 68 ab ad ba ee 6c 6a 19 0b e5 6d 82 24 |(..h....lj...m.$| +00000060 12 fd 68 02 2d 6e aa 2f df e4 0b a1 2c 13 e1 23 |..h.-n./....,..#| +00000070 f9 78 4b 18 a3 1f 28 78 4d f6 25 83 4c 0c 8c df |.xK...(xM.%.L...| +00000080 8b ed a9 b2 87 8c 95 e3 87 8e 71 ad d9 23 05 91 |..........q..#..| 00000090 15 03 03 00 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........| -000000a0 00 00 00 00 00 fc 07 f4 d4 bb 24 a3 f1 cf dc 3c |..........$....<| -000000b0 ac 14 63 50 32 34 fd 73 c0 eb f2 78 7b 3b ea 58 |..cP24.s...x{;.X| -000000c0 cc 3e ff 7f e5 |.>...| +000000a0 00 00 00 00 00 80 9a 8c 0e 27 b9 7a f9 61 a4 a6 |.........'.z.a..| +000000b0 4e c9 24 02 ce 1c 93 5c 5a 7a c9 1e 5f b2 a1 9b |N.$....\Zz.._...| +000000c0 e3 0d 47 85 ab |..G..| diff --git a/src/crypto/tls/testdata/Server-TLSv12-ClientAuthRequestedAndEd25519Given b/src/crypto/tls/testdata/Server-TLSv12-ClientAuthRequestedAndEd25519Given index f8cc96058d..4ca8a034ed 100644 --- a/src/crypto/tls/testdata/Server-TLSv12-ClientAuthRequestedAndEd25519Given +++ b/src/crypto/tls/testdata/Server-TLSv12-ClientAuthRequestedAndEd25519Given @@ -1,7 +1,7 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 6d 01 00 00 69 03 03 8a fe ad ad 75 |....m...i......u| -00000010 e4 8c bf bf b7 b6 66 14 92 eb 84 85 9c c8 a7 66 |......f........f| -00000020 04 2a d0 63 5e a6 bf 85 e9 4f 49 00 00 04 00 2f |.*.c^....OI..../| +00000000 16 03 01 00 6d 01 00 00 69 03 03 73 b2 f2 a9 ed |....m...i..s....| +00000010 88 e0 79 65 b4 3b 58 0d b2 d8 ab cf d7 12 12 c6 |..ye.;X.........| +00000020 99 f9 36 75 d3 f8 3e 94 cf 39 25 00 00 04 00 2f |..6u..>..9%..../| 00000030 00 ff 01 00 00 3c 00 16 00 00 00 17 00 00 00 0d |.....<..........| 00000040 00 30 00 2e 04 03 05 03 06 03 08 07 08 08 08 09 |.0..............| 00000050 08 0a 08 0b 08 04 08 05 08 06 04 01 05 01 06 01 |................| @@ -49,10 +49,10 @@ 00000260 ee b1 87 82 f1 6c 04 ed 73 bb b3 43 77 8d 0c 1c |.....l..s..Cw...| 00000270 f1 0f a1 d8 40 83 61 c9 4c 72 2b 9d ae db 46 06 |....@.a.Lr+...F.| 00000280 06 4d f4 c1 b3 3e c0 d1 bd 42 d4 db fe 3d 13 60 |.M...>...B...=.`| -00000290 84 5c 21 d3 3b e9 fa e7 16 03 03 00 23 0d 00 00 |.\!.;.......#...| -000002a0 1f 02 01 40 00 18 08 04 04 03 08 07 08 05 08 06 |...@............| -000002b0 04 01 05 01 06 01 05 03 06 03 02 01 02 03 00 00 |................| -000002c0 16 03 03 00 04 0e 00 00 00 |.........| +00000290 84 5c 21 d3 3b e9 fa e7 16 03 03 00 1f 0d 00 00 |.\!.;...........| +000002a0 1b 02 01 40 00 14 08 04 04 03 08 07 08 05 08 06 |...@............| +000002b0 04 01 05 01 06 01 05 03 06 03 00 00 16 03 03 00 |................| +000002c0 04 0e 00 00 00 |.....| >>> Flow 3 (client to server) 00000000 16 03 03 01 3c 0b 00 01 38 00 01 35 00 01 32 30 |....<...8..5..20| 00000010 82 01 2e 30 81 e1 a0 03 02 01 02 02 10 17 d1 81 |...0............| @@ -74,36 +74,36 @@ 00000110 8a 4e 34 40 39 d6 b3 10 dc 19 fe a0 22 71 b3 f5 |.N4@9......."q..| 00000120 8f a1 58 0d cd f4 f1 85 24 bf e6 3d 14 df df ed |..X.....$..=....| 00000130 0e e1 17 d8 11 a2 60 d0 8a 37 23 2a c2 46 aa 3a |......`..7#*.F.:| -00000140 08 16 03 03 00 86 10 00 00 82 00 80 77 8b 9f 34 |............w..4| -00000150 b4 db a7 0d 5b ed 1b 2f 4a 41 64 f5 ce 4a 00 7c |....[../JAd..J.|| -00000160 91 32 b3 cf 61 18 41 04 ae fa 3b 14 de 19 0e 64 |.2..a.A...;....d| -00000170 f9 ec 75 a6 48 7e 28 57 26 f5 1c 75 1d 42 73 fc |..u.H~(W&..u.Bs.| -00000180 11 51 2b ef e5 08 83 ac 17 ec 78 b8 5b 14 84 c9 |.Q+.......x.[...| -00000190 bc 7f 22 fd 54 69 7a 82 36 c7 21 bc d6 04 c4 e7 |..".Tiz.6.!.....| -000001a0 bc 48 c8 72 56 5d 1e 65 41 21 0a 26 85 a0 d8 c3 |.H.rV].eA!.&....| -000001b0 50 f0 b6 07 25 ee 79 b8 f5 e6 17 85 d4 09 e7 d7 |P...%.y.........| -000001c0 ab 8f 17 cb c2 13 a0 5a 50 cb e4 a7 16 03 03 00 |.......ZP.......| -000001d0 48 0f 00 00 44 08 07 00 40 b7 24 50 46 db d4 8c |H...D...@.$PF...| -000001e0 68 17 f5 5e 79 a9 80 8c 40 23 92 33 4e 1e cc ee |h..^y...@#.3N...| -000001f0 d5 35 4d b8 2a 52 f0 7f 50 8e c6 d5 5f bc 08 35 |.5M.*R..P..._..5| -00000200 a2 6d db cb 96 52 ec 92 c7 62 c7 59 ab d8 6f 9d |.m...R...b.Y..o.| -00000210 d7 46 35 71 28 41 89 59 02 14 03 03 00 01 01 16 |.F5q(A.Y........| -00000220 03 03 00 40 3e 12 44 bc c6 3d 88 71 ba d3 0c 26 |...@>.D..=.q...&| -00000230 20 72 b0 7f 25 83 9f fd 77 c1 f5 1e 47 28 2e 60 | r..%...w...G(.`| -00000240 53 e0 ac 52 e8 94 e4 87 90 3f af f3 a4 c0 d3 ba |S..R.....?......| -00000250 fe b7 06 54 f7 13 33 36 47 8f 5e 45 22 84 18 3a |...T..36G.^E"..:| -00000260 1f 14 21 85 |..!.| +00000140 08 16 03 03 00 86 10 00 00 82 00 80 1c aa 0a c6 |................| +00000150 76 22 2b bc 67 c7 db 5a 59 0c 2b 1d 1a 66 9b c5 |v"+.g..ZY.+..f..| +00000160 55 ac 80 bf 23 11 68 96 82 df 44 cf bc 44 4f 54 |U...#.h...D..DOT| +00000170 ce 0c 32 01 59 5e 3e a8 28 e1 33 7d 7d fb 2a 87 |..2.Y^>.(.3}}.*.| +00000180 53 d1 32 25 b8 29 5a 5e 45 24 4d a8 47 58 bc 9c |S.2%.)Z^E$M.GX..| +00000190 6f f3 61 a9 ca e0 ad 32 88 04 1a da 83 ff fd 31 |o.a....2.......1| +000001a0 84 65 9e 33 bb 79 d4 71 55 52 bc 57 fd 2e d5 98 |.e.3.y.qUR.W....| +000001b0 46 b9 dc 74 58 7c c9 25 44 3c 07 97 5d bc 65 b5 |F..tX|.%D<..].e.| +000001c0 b5 46 50 fa 52 f9 45 d7 0f f5 d2 4e 16 03 03 00 |.FP.R.E....N....| +000001d0 48 0f 00 00 44 08 07 00 40 e2 1c ab 11 6c 52 e6 |H...D...@....lR.| +000001e0 e8 7f 67 f0 6e 6a e4 a8 4f 25 89 31 d7 f8 dd 6f |..g.nj..O%.1...o| +000001f0 fd c7 84 e9 59 6b 77 b6 3b fb bc b3 d6 a7 96 4c |....Ykw.;......L| +00000200 2f 54 d2 cf 6b 06 5f a5 69 b6 85 0e a9 a2 90 aa |/T..k._.i.......| +00000210 c4 b2 89 17 b3 c7 b9 73 00 14 03 03 00 01 01 16 |.......s........| +00000220 03 03 00 40 45 8d 48 5b 23 74 21 05 ae 22 ce c0 |...@E.H[#t!.."..| +00000230 8a 05 9a 15 7e fb 61 73 dd 45 fd d0 97 a4 ca f5 |....~.as.E......| +00000240 84 f0 01 c4 e4 44 78 c2 14 4f b6 27 0f e8 5a 9d |.....Dx..O.'..Z.| +00000250 69 7c 9b c4 c5 a3 4d 42 bf 2b 89 c6 a3 c2 ca 7a |i|....MB.+.....z| +00000260 d3 6c 5e 51 |.l^Q| >>> Flow 4 (server to client) 00000000 14 03 03 00 01 01 16 03 03 00 40 00 00 00 00 00 |..........@.....| -00000010 00 00 00 00 00 00 00 00 00 00 00 d4 e6 b8 6f 53 |..............oS| -00000020 6a d9 37 2b a4 95 9f 04 e5 99 2f f9 9a 16 fd a7 |j.7+....../.....| -00000030 2d 39 d9 aa 7c 26 9e 44 4b 7f 8f d5 c6 24 4d ac |-9..|&.DK....$M.| -00000040 13 ca 8a 45 1e 66 dc 9a bf 76 22 17 03 03 00 40 |...E.f...v"....@| +00000010 00 00 00 00 00 00 00 00 00 00 00 d0 d7 ea c0 57 |...............W| +00000020 b8 c4 0e ad 2b ba 7e f7 40 0e 92 42 0b c1 55 38 |....+.~.@..B..U8| +00000030 89 ac d8 9f 46 96 89 c8 a0 06 e7 84 ac 42 6f a8 |....F........Bo.| +00000040 e2 67 49 fe 5b 2f 66 3e 47 c3 14 17 03 03 00 40 |.gI.[/f>G......@| 00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00000060 3f 5c 60 f8 22 7b aa 82 38 c4 4a 2e 07 50 cb 6c |?\`."{..8.J..P.l| -00000070 3f 6f a9 39 bf 21 ce 7a 30 72 03 90 ec bc 9c 18 |?o.9.!.z0r......| -00000080 1f a9 7f 82 3a d9 46 d9 d8 b8 77 65 e8 b3 e7 f5 |....:.F...we....| +00000060 95 78 c4 75 cf 05 a9 ce aa 85 0b 8e 4e fc 4b dc |.x.u........N.K.| +00000070 59 70 3e 68 85 68 97 9a eb 22 22 3a 8c 61 91 a4 |Yp>h.h..."":.a..| +00000080 89 06 bd 9e fc 8d 1d 4b ed fe 4b d6 e7 0a 6e 2b |.......K..K...n+| 00000090 15 03 03 00 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........| -000000a0 00 00 00 00 00 6d 29 d4 87 0a b4 1d b4 9d f4 12 |.....m).........| -000000b0 bc 3d a3 1b 79 21 85 0d e7 10 64 92 40 39 05 99 |.=..y!....d.@9..| -000000c0 c8 a7 dd ef 0e |.....| +000000a0 00 00 00 00 00 92 d4 46 1f 6b d5 63 a7 95 0d c2 |.......F.k.c....| +000000b0 2f a9 a2 5f 0d 70 8f a5 31 e3 5c 1d fa ac f6 2e |/.._.p..1.\.....| +000000c0 02 6d e8 9f 95 |.m...| diff --git a/src/crypto/tls/testdata/Server-TLSv12-ClientAuthRequestedAndGiven b/src/crypto/tls/testdata/Server-TLSv12-ClientAuthRequestedAndGiven index cc6450a4ce..585e6af657 100644 --- a/src/crypto/tls/testdata/Server-TLSv12-ClientAuthRequestedAndGiven +++ b/src/crypto/tls/testdata/Server-TLSv12-ClientAuthRequestedAndGiven @@ -1,7 +1,7 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 6d 01 00 00 69 03 03 e9 31 0f d0 25 |....m...i...1..%| -00000010 ef 25 a7 1a 9b 8c 4b a3 ca 2b a6 54 89 1c e1 68 |.%....K..+.T...h| -00000020 6f b2 b2 60 6f 8a dc 87 24 8c 7b 00 00 04 00 2f |o..`o...$.{..../| +00000000 16 03 01 00 6d 01 00 00 69 03 03 0e c0 95 b1 0b |....m...i.......| +00000010 7b b5 57 cc 04 e7 03 d0 66 8d ee 9d da 65 dc 74 |{.W.....f....e.t| +00000020 0d de 11 47 38 cd 19 12 f4 06 17 00 00 04 00 2f |...G8........../| 00000030 00 ff 01 00 00 3c 00 16 00 00 00 17 00 00 00 0d |.....<..........| 00000040 00 30 00 2e 04 03 05 03 06 03 08 07 08 08 08 09 |.0..............| 00000050 08 0a 08 0b 08 04 08 05 08 06 04 01 05 01 06 01 |................| @@ -49,10 +49,10 @@ 00000260 ee b1 87 82 f1 6c 04 ed 73 bb b3 43 77 8d 0c 1c |.....l..s..Cw...| 00000270 f1 0f a1 d8 40 83 61 c9 4c 72 2b 9d ae db 46 06 |....@.a.Lr+...F.| 00000280 06 4d f4 c1 b3 3e c0 d1 bd 42 d4 db fe 3d 13 60 |.M...>...B...=.`| -00000290 84 5c 21 d3 3b e9 fa e7 16 03 03 00 23 0d 00 00 |.\!.;.......#...| -000002a0 1f 02 01 40 00 18 08 04 04 03 08 07 08 05 08 06 |...@............| -000002b0 04 01 05 01 06 01 05 03 06 03 02 01 02 03 00 00 |................| -000002c0 16 03 03 00 04 0e 00 00 00 |.........| +00000290 84 5c 21 d3 3b e9 fa e7 16 03 03 00 1f 0d 00 00 |.\!.;...........| +000002a0 1b 02 01 40 00 14 08 04 04 03 08 07 08 05 08 06 |...@............| +000002b0 04 01 05 01 06 01 05 03 06 03 00 00 16 03 03 00 |................| +000002c0 04 0e 00 00 00 |.....| >>> Flow 3 (client to server) 00000000 16 03 03 01 fd 0b 00 01 f9 00 01 f6 00 01 f3 30 |...............0| 00000010 82 01 ef 30 82 01 58 a0 03 02 01 02 02 10 5c 19 |...0..X.......\.| @@ -86,40 +86,40 @@ 000001d0 ac 11 b1 28 56 be 1d cd 61 62 84 09 bf d6 80 c6 |...(V...ab......| 000001e0 45 8d 82 2c b4 d8 83 9b db c9 22 b7 2a 12 11 7b |E..,......".*..{| 000001f0 fa 02 3b c1 c9 ff ea c9 9d a8 49 d3 95 d7 d5 0e |..;.......I.....| -00000200 e5 35 16 03 03 00 86 10 00 00 82 00 80 29 51 da |.5...........)Q.| -00000210 8e 5c 3e fb 44 8a 0f 97 42 23 8b e2 73 cc e2 90 |.\>.D...B#..s...| -00000220 11 c4 98 01 e9 60 96 9e a9 96 30 c5 95 f8 56 0e |.....`....0...V.| -00000230 4a 2e 77 e7 7e 23 b7 49 31 c4 87 c5 69 c6 ca 6f |J.w.~#.I1...i..o| -00000240 ea 53 41 b4 2e 1e f6 0b 33 f5 e1 40 69 c0 91 6f |.SA.....3..@i..o| -00000250 88 c1 68 c8 18 99 6e fe b3 5f 9b ee f1 4a 76 41 |..h...n.._...JvA| -00000260 1f d1 05 f5 39 76 61 e6 a6 ea 75 0e 50 32 a1 19 |....9va...u.P2..| -00000270 20 6a 4c 5d 62 6e 2a 6e af f9 9c 38 b6 3a bc 86 | jL]bn*n...8.:..| -00000280 eb ac 6d d3 b5 48 30 11 4d 98 2e 61 34 16 03 03 |..m..H0.M..a4...| -00000290 00 88 0f 00 00 84 08 04 00 80 82 ed 3f da b5 50 |............?..P| -000002a0 d2 50 51 14 cf ee f7 b9 7b a9 0c 77 2f 88 42 0a |.PQ.....{..w/.B.| -000002b0 34 a9 5d e7 32 26 3a 28 87 49 fb c4 83 31 68 c6 |4.].2&:(.I...1h.| -000002c0 0d 32 d4 31 0a d1 d6 1e 6f 7f 89 93 bf b7 7c c7 |.2.1....o.....|.| -000002d0 95 f8 c3 69 d8 58 4e e4 76 07 36 84 b7 c3 e7 22 |...i.XN.v.6...."| -000002e0 01 4c 59 ae 89 95 bb e0 07 e0 31 6a e2 95 4c d4 |.LY.......1j..L.| -000002f0 01 54 9d 27 82 60 31 13 39 07 47 c2 0c 08 5c d4 |.T.'.`1.9.G...\.| -00000300 03 5a 6f d7 89 a0 67 5e 2d a0 11 03 bf 0e 35 d8 |.Zo...g^-.....5.| -00000310 d0 78 2f 1e d8 15 47 ce c9 d3 14 03 03 00 01 01 |.x/...G.........| -00000320 16 03 03 00 40 d0 0a 0e 93 dd 9a 51 4f a9 7f 5f |....@......QO.._| -00000330 93 a6 60 a6 f2 10 f1 bd bd ae 13 5d 11 b7 0d 1a |..`........]....| -00000340 3d 1e f3 0c b7 53 7c 10 ed fa 8c d7 3f 20 ec f2 |=....S|.....? ..| -00000350 7d e9 15 87 3d d3 05 21 3a bc a5 54 fa 40 3b 53 |}...=..!:..T.@;S| -00000360 41 7c ea c6 28 |A|..(| +00000200 e5 35 16 03 03 00 86 10 00 00 82 00 80 cc d2 66 |.5.............f| +00000210 37 df f1 5d cb 6f 1d 6b 64 ea 62 45 97 dd 47 f8 |7..].o.kd.bE..G.| +00000220 e5 a0 f6 84 46 9b 6c 5b c9 79 60 07 b0 d1 5a e6 |....F.l[.y`...Z.| +00000230 5c 1a 43 b1 04 9f f2 3d 7a 09 da e0 45 ea 30 8a |\.C....=z...E.0.| +00000240 5c 08 07 67 17 2e 55 f5 0a 13 96 5c 92 e5 61 66 |\..g..U....\..af| +00000250 92 fe c6 44 9c 4f 62 54 10 12 df f7 e4 11 74 f6 |...D.ObT......t.| +00000260 35 81 bb 55 4f ce 43 dc 7f 4d bc 4f 8b 0c ef 13 |5..UO.C..M.O....| +00000270 43 8a e5 80 dc 38 3e 8a f5 7b 5c 5d 1c 76 10 06 |C....8>..{\].v..| +00000280 3d c5 05 5b cb 9a 17 20 13 29 a5 36 5d 16 03 03 |=..[... .).6]...| +00000290 00 88 0f 00 00 84 08 04 00 80 a7 7f 2c 3b d1 82 |............,;..| +000002a0 8a 17 50 2a f6 c4 ac ce 47 1b 25 23 4b 0c d0 17 |..P*....G.%#K...| +000002b0 89 18 98 a6 e4 b8 51 70 6a 59 72 1a aa 68 e8 25 |......QpjYr..h.%| +000002c0 f5 4d 72 66 be bb 25 61 9b 36 e0 24 a5 34 e4 36 |.Mrf..%a.6.$.4.6| +000002d0 23 0a 36 a8 81 f4 19 62 98 2b af 1b f5 c4 55 d2 |#.6....b.+....U.| +000002e0 d5 65 58 b8 31 21 f4 fe ce 44 cc ea 77 8e 1d f7 |.eX.1!...D..w...| +000002f0 bc a4 4c e5 cc 90 10 f3 a0 8d 10 72 08 d4 50 1c |..L........r..P.| +00000300 88 82 a7 61 da cb 35 ba 26 3c 18 11 6c 14 d6 1a |...a..5.&<..l...| +00000310 7f 65 3d 2c 74 f0 92 a3 aa fd 14 03 03 00 01 01 |.e=,t...........| +00000320 16 03 03 00 40 f3 3a f0 23 48 35 41 7f d0 ed 22 |....@.:.#H5A..."| +00000330 5b 1a 47 71 60 08 b0 6b cd 32 56 c0 d0 05 90 b3 |[.Gq`..k.2V.....| +00000340 0b 35 3c 03 49 ec 06 5d b4 ce 1d 10 4e bc 75 bf |.5<.I..]....N.u.| +00000350 23 3b f1 d6 8f f6 f0 70 b6 94 8f 51 fd 4f 47 0b |#;.....p...Q.OG.| +00000360 e1 c9 ad c8 14 |.....| >>> Flow 4 (server to client) 00000000 14 03 03 00 01 01 16 03 03 00 40 00 00 00 00 00 |..........@.....| -00000010 00 00 00 00 00 00 00 00 00 00 00 a8 8e 30 08 f0 |.............0..| -00000020 87 7b 13 31 99 6d 7e 9a 9b 03 d3 6f 84 d8 d9 31 |.{.1.m~....o...1| -00000030 2b d2 aa d4 0e ae 6e 72 03 ac e7 7e 5c 22 cc ac |+.....nr...~\"..| -00000040 33 b5 df 04 b2 4a 2b 6f bb a1 6f 17 03 03 00 40 |3....J+o..o....@| +00000010 00 00 00 00 00 00 00 00 00 00 00 6e d3 79 f1 02 |...........n.y..| +00000020 4d 8e ad 3b 33 5a 92 10 55 79 94 b7 43 ed 08 c1 |M..;3Z..Uy..C...| +00000030 e1 5f 04 c6 01 82 ce 96 70 c7 97 8d cc 0a ca d3 |._......p.......| +00000040 46 d4 2f 9f b8 78 57 27 ee 14 aa 17 03 03 00 40 |F./..xW'.......@| 00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00000060 50 9c 81 04 9b 1d 61 8a 30 9c 18 68 c7 e1 c9 f3 |P.....a.0..h....| -00000070 70 f0 1b b6 4a dd fc c7 e3 e3 20 e2 4d 6f 9f bf |p...J..... .Mo..| -00000080 17 b0 5e 5b 45 73 29 1e d4 30 b4 03 ca 8e 69 63 |..^[Es)..0....ic| +00000060 ed 9f 38 f6 99 84 f5 cf 5e ee 27 64 f7 29 3c 18 |..8.....^.'d.)<.| +00000070 a0 55 23 b7 db 4a 6d 2d 80 c9 75 a5 a3 1f 38 24 |.U#..Jm-..u...8$| +00000080 0a 99 18 0d 0b 5d 7d 03 f7 8d d2 55 fd 98 7f 69 |.....]}....U...i| 00000090 15 03 03 00 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........| -000000a0 00 00 00 00 00 28 ca 6a 4c 1b 3c 11 61 ce b2 58 |.....(.jL.<.a..X| -000000b0 94 e7 e4 7d c5 ce 51 03 c4 ae b5 4c 33 0b 3c 95 |...}..Q....L3.<.| -000000c0 ec b1 65 ea da |..e..| +000000a0 00 00 00 00 00 aa 43 ca 95 7d 1a 47 d5 0b 0e c7 |......C..}.G....| +000000b0 cc 61 3d 43 5b 69 05 a1 39 eb 03 52 41 05 54 e9 |.a=C[i..9..RA.T.| +000000c0 5d b6 ca 56 2c |]..V,| diff --git a/src/crypto/tls/testdata/Server-TLSv12-ClientAuthRequestedAndPKCS1v15Given b/src/crypto/tls/testdata/Server-TLSv12-ClientAuthRequestedAndPKCS1v15Given index 875fe1becb..10949e5e3b 100644 --- a/src/crypto/tls/testdata/Server-TLSv12-ClientAuthRequestedAndPKCS1v15Given +++ b/src/crypto/tls/testdata/Server-TLSv12-ClientAuthRequestedAndPKCS1v15Given @@ -1,7 +1,7 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 6d 01 00 00 69 03 03 dc f3 c6 52 a4 |....m...i.....R.| -00000010 9a 9c 53 e0 5a 3c cc 4c 4f 09 32 7f f1 7c 86 6b |..S.Z<.LO.2..|.k| -00000020 75 59 68 a5 81 72 45 46 fb 94 a8 00 00 04 00 2f |uYh..rEF......./| +00000000 16 03 01 00 6d 01 00 00 69 03 03 c2 c7 15 c0 0f |....m...i.......| +00000010 0d fc 44 60 25 22 6c 4a ec f1 b0 66 5d c4 f3 bc |..D`%"lJ...f]...| +00000020 fe da b2 9a af 24 04 b7 bb 74 79 00 00 04 00 2f |.....$...ty..../| 00000030 00 ff 01 00 00 3c 00 16 00 00 00 17 00 00 00 0d |.....<..........| 00000040 00 30 00 2e 04 03 05 03 06 03 08 07 08 08 08 09 |.0..............| 00000050 08 0a 08 0b 08 04 08 05 08 06 04 01 05 01 06 01 |................| @@ -49,10 +49,10 @@ 00000260 ee b1 87 82 f1 6c 04 ed 73 bb b3 43 77 8d 0c 1c |.....l..s..Cw...| 00000270 f1 0f a1 d8 40 83 61 c9 4c 72 2b 9d ae db 46 06 |....@.a.Lr+...F.| 00000280 06 4d f4 c1 b3 3e c0 d1 bd 42 d4 db fe 3d 13 60 |.M...>...B...=.`| -00000290 84 5c 21 d3 3b e9 fa e7 16 03 03 00 23 0d 00 00 |.\!.;.......#...| -000002a0 1f 02 01 40 00 18 08 04 04 03 08 07 08 05 08 06 |...@............| -000002b0 04 01 05 01 06 01 05 03 06 03 02 01 02 03 00 00 |................| -000002c0 16 03 03 00 04 0e 00 00 00 |.........| +00000290 84 5c 21 d3 3b e9 fa e7 16 03 03 00 1f 0d 00 00 |.\!.;...........| +000002a0 1b 02 01 40 00 14 08 04 04 03 08 07 08 05 08 06 |...@............| +000002b0 04 01 05 01 06 01 05 03 06 03 00 00 16 03 03 00 |................| +000002c0 04 0e 00 00 00 |.....| >>> Flow 3 (client to server) 00000000 16 03 03 01 fd 0b 00 01 f9 00 01 f6 00 01 f3 30 |...............0| 00000010 82 01 ef 30 82 01 58 a0 03 02 01 02 02 10 5c 19 |...0..X.......\.| @@ -86,40 +86,40 @@ 000001d0 ac 11 b1 28 56 be 1d cd 61 62 84 09 bf d6 80 c6 |...(V...ab......| 000001e0 45 8d 82 2c b4 d8 83 9b db c9 22 b7 2a 12 11 7b |E..,......".*..{| 000001f0 fa 02 3b c1 c9 ff ea c9 9d a8 49 d3 95 d7 d5 0e |..;.......I.....| -00000200 e5 35 16 03 03 00 86 10 00 00 82 00 80 b5 77 6b |.5............wk| -00000210 fa 10 fb df 48 8f e7 51 b4 cb 14 c5 48 bd 63 d6 |....H..Q....H.c.| -00000220 0e 19 d0 81 a8 5a d7 b5 43 84 35 85 37 b7 8d 2e |.....Z..C.5.7...| -00000230 c7 c8 70 4c f4 45 bf be 17 86 e7 40 1d 6f 88 2a |..pL.E.....@.o.*| -00000240 91 b5 aa aa 34 f7 9a f3 96 e4 dd 51 15 88 be f1 |....4......Q....| -00000250 80 a9 6f 94 ed c7 5d 28 66 b4 37 e8 22 4f 42 c3 |..o...](f.7."OB.| -00000260 b5 f0 2f dd 57 dc 8d e5 5a c0 9d fa ce 3c 7a 2d |../.W...Z....>> Flow 4 (server to client) 00000000 14 03 03 00 01 01 16 03 03 00 40 00 00 00 00 00 |..........@.....| -00000010 00 00 00 00 00 00 00 00 00 00 00 a2 b0 ad 7e 71 |..............~q| -00000020 0c 2c db df 4c b1 4f 19 e6 00 4f 11 ff 5e 4a c5 |.,..L.O...O..^J.| -00000030 c2 9d 8c 6c 03 50 12 3d 81 ec 44 5a 75 ba 2d 48 |...l.P.=..DZu.-H| -00000040 7a 74 c3 a3 68 5a 26 ee 7e f5 a2 17 03 03 00 40 |zt..hZ&.~......@| +00000010 00 00 00 00 00 00 00 00 00 00 00 0c 22 6e 84 b2 |............"n..| +00000020 a1 f9 18 62 3a 86 16 7e e6 17 3b 8e e5 88 b8 8e |...b:..~..;.....| +00000030 3c c5 08 11 8e 0a df df d4 69 bc 01 7d c8 63 33 |<........i..}.c3| +00000040 b5 15 bf 03 5e df 50 29 c5 c4 c2 17 03 03 00 40 |....^.P).......@| 00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00000060 ad 1b 16 8e 39 99 64 7c c5 49 24 83 c4 4e f6 86 |....9.d|.I$..N..| -00000070 6b 5d 68 ae f4 0b 58 23 83 eb ab 01 52 4d 07 a1 |k]h...X#....RM..| -00000080 59 00 e8 dc a5 a1 6f 76 e2 e9 f2 e1 21 58 6b a0 |Y.....ov....!Xk.| +00000060 45 76 91 63 fa 48 9b c9 47 6a f6 7b fa 72 ab 78 |Ev.c.H..Gj.{.r.x| +00000070 4f cb c4 bb 68 78 7c 71 13 f9 47 32 33 59 d4 16 |O...hx|q..G23Y..| +00000080 83 fa 8e db 37 b6 cb d5 a1 1a e5 21 1b 50 a6 d3 |....7......!.P..| 00000090 15 03 03 00 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........| -000000a0 00 00 00 00 00 3c 6e a7 81 36 d0 8c 99 d8 f3 55 |.....>> Flow 1 (client to server) -00000000 16 03 01 00 6d 01 00 00 69 03 03 ac ea d9 49 98 |....m...i.....I.| -00000010 9a 0c 7c 86 64 7c 73 72 6d 79 3f 7b e9 11 8b 1d |..|.d|srmy?{....| -00000020 79 95 f5 f5 23 9f b2 f1 9c f4 b5 00 00 04 00 2f |y...#........../| +00000000 16 03 01 00 6d 01 00 00 69 03 03 f2 1b 6e dc ce |....m...i....n..| +00000010 fe af a8 4b 44 88 5f ba eb c5 d7 92 7e 69 d7 19 |...KD._.....~i..| +00000020 b3 32 d3 99 e6 be 1f 4f 94 04 e6 00 00 04 00 2f |.2.....O......./| 00000030 00 ff 01 00 00 3c 00 16 00 00 00 17 00 00 00 0d |.....<..........| 00000040 00 30 00 2e 04 03 05 03 06 03 08 07 08 08 08 09 |.0..............| 00000050 08 0a 08 0b 08 04 08 05 08 06 04 01 05 01 06 01 |................| @@ -49,37 +49,37 @@ 00000260 ee b1 87 82 f1 6c 04 ed 73 bb b3 43 77 8d 0c 1c |.....l..s..Cw...| 00000270 f1 0f a1 d8 40 83 61 c9 4c 72 2b 9d ae db 46 06 |....@.a.Lr+...F.| 00000280 06 4d f4 c1 b3 3e c0 d1 bd 42 d4 db fe 3d 13 60 |.M...>...B...=.`| -00000290 84 5c 21 d3 3b e9 fa e7 16 03 03 00 23 0d 00 00 |.\!.;.......#...| -000002a0 1f 02 01 40 00 18 08 04 04 03 08 07 08 05 08 06 |...@............| -000002b0 04 01 05 01 06 01 05 03 06 03 02 01 02 03 00 00 |................| -000002c0 16 03 03 00 04 0e 00 00 00 |.........| +00000290 84 5c 21 d3 3b e9 fa e7 16 03 03 00 1f 0d 00 00 |.\!.;...........| +000002a0 1b 02 01 40 00 14 08 04 04 03 08 07 08 05 08 06 |...@............| +000002b0 04 01 05 01 06 01 05 03 06 03 00 00 16 03 03 00 |................| +000002c0 04 0e 00 00 00 |.....| >>> Flow 3 (client to server) 00000000 16 03 03 00 07 0b 00 00 03 00 00 00 16 03 03 00 |................| -00000010 86 10 00 00 82 00 80 2e 37 44 fb d7 1d 2f 3d a5 |........7D.../=.| -00000020 1b 43 cf f4 1c cf 9d 95 fa be 9f 9d 96 8a 27 5d |.C............']| -00000030 7b be 19 10 bd 5e 9a 3e 49 49 d2 af 85 07 70 f8 |{....^.>II....p.| -00000040 c8 4f 69 02 ff 4e 9d ee f4 0d 4d 54 a1 aa 61 a3 |.Oi..N....MT..a.| -00000050 e0 cc db a7 2c 46 80 6e eb 10 fb cd 2e 3b c5 50 |....,F.n.....;.P| -00000060 2b a5 d9 a0 bf 01 d2 f8 d8 51 2b ad 40 6f c6 6f |+........Q+.@o.o| -00000070 0e 30 53 27 73 89 b7 1b c1 28 ff ff 18 4c fa 6f |.0S's....(...L.o| -00000080 fa 5f 16 b3 38 36 9f f4 07 74 ca bb bb c2 3f aa |._..86...t....?.| -00000090 0d e7 42 24 fb f8 4c 14 03 03 00 01 01 16 03 03 |..B$..L.........| -000000a0 00 40 19 02 9e 3a ce b9 38 40 ce d6 3b 87 b2 f6 |.@...:..8@..;...| -000000b0 1b 7d ee 76 62 f8 6e 04 80 8f cb 1b f7 1e 1d a6 |.}.vb.n.........| -000000c0 50 8a 59 b1 ad 7d c5 9d 2f 2d 14 56 2e e5 3b b3 |P.Y..}../-.V..;.| -000000d0 db da 7e 37 10 97 71 91 d3 7b 93 f6 64 a4 d7 8b |..~7..q..{..d...| -000000e0 d2 f0 |..| +00000010 86 10 00 00 82 00 80 36 1c ba 9d 08 27 52 8b f7 |.......6....'R..| +00000020 24 d9 e6 18 d7 21 75 1d 76 e0 13 a0 35 d5 08 7d |$....!u.v...5..}| +00000030 c1 8e 3f b2 aa 10 b4 f9 d4 77 e6 cd b3 92 94 0e |..?......w......| +00000040 7a c9 0b 5f e2 34 88 ad fc 02 1b 84 10 ff e8 2a |z.._.4.........*| +00000050 dd 2d 82 5c bb ca 15 f8 73 74 ad dd 9f 9d e7 38 |.-.\....st.....8| +00000060 7c cd 74 8e 37 0f 87 62 cf 30 68 8a e2 15 9d d2 ||.t.7..b.0h.....| +00000070 43 4b e3 29 69 e4 db 94 9b 5a 7c c6 9b e8 7d 26 |CK.)i....Z|...}&| +00000080 4b a8 4a 28 c1 47 cf 15 7b 22 a2 1d 6b ac 16 e4 |K.J(.G..{"..k...| +00000090 e1 62 6e be 9a 05 67 14 03 03 00 01 01 16 03 03 |.bn...g.........| +000000a0 00 40 98 4e 3d 6c 72 d8 7f 81 b6 b8 ed 32 2e 98 |.@.N=lr......2..| +000000b0 8d fc c1 1d 56 97 82 ef 3f 7c 86 79 e3 27 06 ed |....V...?|.y.'..| +000000c0 87 c4 28 2d 6b f1 b1 88 d0 67 34 64 ba e1 d9 34 |..(-k....g4d...4| +000000d0 a4 2c ff e0 b2 38 21 5d 04 64 99 a4 34 62 aa 81 |.,...8!].d..4b..| +000000e0 cf 21 |.!| >>> Flow 4 (server to client) 00000000 14 03 03 00 01 01 16 03 03 00 40 00 00 00 00 00 |..........@.....| -00000010 00 00 00 00 00 00 00 00 00 00 00 46 c8 31 06 11 |...........F.1..| -00000020 01 8e df b0 e7 cc 16 d3 97 2e a2 68 e7 a4 d1 0f |...........h....| -00000030 91 71 dd ba db 97 20 45 60 c2 47 c7 ee 56 c4 68 |.q.... E`.G..V.h| -00000040 a4 b1 05 09 e2 68 4d 54 fa ff 01 17 03 03 00 40 |.....hMT.......@| +00000010 00 00 00 00 00 00 00 00 00 00 00 66 31 30 4e 0f |...........f10N.| +00000020 de bd de 72 65 0c 74 ab 64 d8 59 47 fc 6b ad d8 |...re.t.d.YG.k..| +00000030 73 24 da 77 62 ba 0a 8c 69 d3 c4 6f 89 ef 5b 92 |s$.wb...i..o..[.| +00000040 d3 ca 3b e8 67 2b 7c bf 39 7c 8b 17 03 03 00 40 |..;.g+|.9|.....@| 00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00000060 79 bf ad 63 e3 11 2b d0 41 0e 24 85 92 c4 9b b5 |y..c..+.A.$.....| -00000070 b2 d3 2e fc aa 46 84 85 a7 37 90 fc f0 2b 5a 7e |.....F...7...+Z~| -00000080 28 9f 2e 57 1d 8f c3 ca eb 40 32 79 af 4b b8 28 |(..W.....@2y.K.(| +00000060 5c a8 b1 1c 7e e1 76 b8 d0 0c 4d 3d 3f 36 a8 26 |\...~.v...M=?6.&| +00000070 66 00 dd 47 3c ae 1c 8b 6f b0 6b 80 75 c4 0b 7e |f..G<...o.k.u..~| +00000080 ee fb 8c fe 2f 2f 65 1b 9b e1 72 a9 ac 8f cf da |....//e...r.....| 00000090 15 03 03 00 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........| -000000a0 00 00 00 00 00 8b 6c 27 b8 ff f9 ea ca 68 75 54 |......l'.....huT| -000000b0 bf bf a7 f4 b1 58 a5 b3 31 01 4d c7 85 58 31 d4 |.....X..1.M..X1.| -000000c0 e7 da 7e 77 68 |..~wh| +000000a0 00 00 00 00 00 9d 96 95 12 3b 42 41 a8 30 b2 8c |.........;BA.0..| +000000b0 3d 18 f6 27 b7 77 30 d9 29 0c 68 ec 2b 09 26 91 |=..'.w0.).h.+.&.| +000000c0 23 0c e2 10 07 |#....| diff --git a/src/crypto/tls/testdata/Server-TLSv13-ClientAuthRequestedAndECDSAGiven b/src/crypto/tls/testdata/Server-TLSv13-ClientAuthRequestedAndECDSAGiven index a957c26399..686011b0fa 100644 --- a/src/crypto/tls/testdata/Server-TLSv13-ClientAuthRequestedAndECDSAGiven +++ b/src/crypto/tls/testdata/Server-TLSv13-ClientAuthRequestedAndECDSAGiven @@ -1,180 +1,182 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 ca 01 00 00 c6 03 03 cd 87 c0 5e 7c |..............^|| -00000010 7b d7 c6 77 d9 21 6f 46 00 07 88 61 18 8c b9 d4 |{..w.!oF...a....| -00000020 ad 25 6a 9d 7e 54 cc 70 52 7c 0f 20 67 9b dd 18 |.%j.~T.pR|. g...| -00000030 84 bb 23 7d 53 10 b9 6c 01 ef 30 6f 79 7d 64 5c |..#}S..l..0oy}d\| -00000040 79 3e c1 11 8f 75 cf 83 02 d3 e8 d9 00 04 13 01 |y>...u..........| +00000000 16 03 01 00 ca 01 00 00 c6 03 03 af 29 1d da b2 |............)...| +00000010 1b 14 96 f9 c9 6a 4d 28 cc 1d 9f c4 95 d0 a6 16 |.....jM(........| +00000020 1f 83 3d d6 17 80 5e 4f 9f d9 87 20 cb 34 16 64 |..=...^O... .4.d| +00000030 39 bb 98 16 55 43 38 3a a2 b4 e0 38 02 04 ee 6b |9...UC8:...8...k| +00000040 a6 4e b9 f8 83 09 aa 7b f5 de e0 79 00 04 13 01 |.N.....{...y....| 00000050 00 ff 01 00 00 79 00 0b 00 04 03 00 01 02 00 0a |.....y..........| 00000060 00 0c 00 0a 00 1d 00 17 00 1e 00 19 00 18 00 16 |................| 00000070 00 00 00 17 00 00 00 0d 00 1e 00 1c 04 03 05 03 |................| 00000080 06 03 08 07 08 08 08 09 08 0a 08 0b 08 04 08 05 |................| 00000090 08 06 04 01 05 01 06 01 00 2b 00 03 02 03 04 00 |.........+......| -000000a0 2d 00 02 01 01 00 33 00 26 00 24 00 1d 00 20 d7 |-.....3.&.$... .| -000000b0 18 8a c1 a5 4d cb 7c f2 7d e4 cf 7a c6 92 28 ee |....M.|.}..z..(.| -000000c0 a6 b4 79 65 bf 2b fb 71 2e a5 2a 58 da 6f 5e |..ye.+.q..*X.o^| +000000a0 2d 00 02 01 01 00 33 00 26 00 24 00 1d 00 20 ee |-.....3.&.$... .| +000000b0 90 71 47 4a 18 b1 78 c4 9a 7d 65 5d 4e b3 88 96 |.qGJ..x..}e]N...| +000000c0 6c b1 bc 2d a3 9d 2d 8e a2 7a 7b eb 94 11 4e |l..-..-..z{...N| >>> Flow 2 (server to client) 00000000 16 03 03 00 7a 02 00 00 76 03 03 00 00 00 00 00 |....z...v.......| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00000020 00 00 00 00 00 00 00 00 00 00 00 20 67 9b dd 18 |........... g...| -00000030 84 bb 23 7d 53 10 b9 6c 01 ef 30 6f 79 7d 64 5c |..#}S..l..0oy}d\| -00000040 79 3e c1 11 8f 75 cf 83 02 d3 e8 d9 13 01 00 00 |y>...u..........| +00000020 00 00 00 00 00 00 00 00 00 00 00 20 cb 34 16 64 |........... .4.d| +00000030 39 bb 98 16 55 43 38 3a a2 b4 e0 38 02 04 ee 6b |9...UC8:...8...k| +00000040 a6 4e b9 f8 83 09 aa 7b f5 de e0 79 13 01 00 00 |.N.....{...y....| 00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 2f |..+.....3.$... /| 00000060 e5 7d a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 |.}.G.bC.(.._.).0| 00000070 ff f6 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 14 |.........._X.;t.| -00000080 03 03 00 01 01 17 03 03 00 17 4d 4b 33 12 cb ed |..........MK3...| -00000090 f7 a2 55 e7 a6 ab 5b b1 55 16 30 c3 ee e1 5c 14 |..U...[.U.0...\.| -000000a0 b8 17 03 03 00 3e 30 04 2a e5 e8 b8 f3 25 9b a9 |.....>0.*....%..| -000000b0 92 e6 eb d9 fb b6 62 64 e2 de 9d c0 48 68 b3 d7 |......bd....Hh..| -000000c0 0f 8b ad 21 69 c7 f0 d7 96 ff 6a 24 2f 01 c9 e7 |...!i.....j$/...| -000000d0 e9 06 4b 93 94 67 97 44 46 c4 69 2f 0e aa e0 9b |..K..g.DF.i/....| -000000e0 8d 19 f2 2c 17 03 03 02 6d a1 fb 2b 5f 10 e9 62 |...,....m..+_..b| -000000f0 8b ad c1 33 58 f6 a7 89 78 a6 dd 64 ff c2 c7 57 |...3X...x..d...W| -00000100 80 9f 59 be 2d bd f5 b9 8a 6b d9 22 1c fe 10 ea |..Y.-....k."....| -00000110 c4 a5 3e 45 d9 d7 12 cf 48 d5 26 18 49 50 80 69 |..>E....H.&.IP.i| -00000120 44 28 03 3b b6 f8 0a 0e b4 cb 5e 5b 57 0f c0 2f |D(.;......^[W../| -00000130 59 4f 13 e3 9c 02 18 b1 ce 94 78 05 18 64 73 c6 |YO........x..ds.| -00000140 05 89 d1 54 37 18 ea 09 61 08 c5 6a 54 f6 48 44 |...T7...a..jT.HD| -00000150 40 63 6a 53 b9 41 5f 4f 8e 05 e7 31 7b 08 d0 67 |@cjS.A_O...1{..g| -00000160 8e bf 56 c4 56 0a 82 b2 74 6a 89 dd b4 f7 3c 0b |..V.V...tj....<.| -00000170 3c fd 21 1f 00 72 1d 4f be b1 50 44 9a 14 67 7d |<.!..r.O..PD..g}| -00000180 a9 93 30 a2 4e ea 61 c9 fd 44 de 5c 88 36 59 a2 |..0.N.a..D.\.6Y.| -00000190 e3 63 b1 9c ea dd 47 0a ca 63 9e 50 9d ca 57 12 |.c....G..c.P..W.| -000001a0 05 9b fc f1 26 a2 5e 18 9b 32 00 38 1f ce a6 58 |....&.^..2.8...X| -000001b0 58 0f 61 e2 44 c2 89 34 cc f4 fd 9a dc 1a 67 a6 |X.a.D..4......g.| -000001c0 e8 b1 fc 9f dc bd 0b 21 01 49 0d 9b e1 40 00 f6 |.......!.I...@..| -000001d0 33 1a 57 c5 84 c1 98 3d 7f 53 d3 4d 2e 04 5e 40 |3.W....=.S.M..^@| -000001e0 7d 38 80 66 bc c5 40 d9 14 f6 83 26 82 9b c8 14 |}8.f..@....&....| -000001f0 61 aa 6c 1c a1 53 81 f8 b0 7f 06 92 5c af be 57 |a.l..S......\..W| -00000200 1a 54 97 02 27 31 1f 58 52 cf 39 2f 82 26 ae 6c |.T..'1.XR.9/.&.l| -00000210 86 d9 46 cd 38 16 e2 67 62 82 2e 53 7a 86 15 30 |..F.8..gb..Sz..0| -00000220 08 0c a7 e2 85 18 55 79 16 44 4d 50 9e b5 e7 e1 |......Uy.DMP....| -00000230 2c 1e 1d eb e1 83 f3 9e d0 7b 45 b8 1e 51 d9 79 |,........{E..Q.y| -00000240 91 7a b8 90 bc 18 94 69 ad 94 08 e5 23 de 2b fa |.z.....i....#.+.| -00000250 8d ef 23 4c 40 df e1 43 0d 71 51 ef 88 a9 bb 89 |..#L@..C.qQ.....| -00000260 59 87 9c db e1 d4 31 94 a7 f5 af 7d 51 be e9 d0 |Y.....1....}Q...| -00000270 f2 49 12 72 47 65 a0 5b 7d 9f 91 85 f7 e8 d6 90 |.I.rGe.[}.......| -00000280 b3 4d f3 5d 6a 51 96 a9 81 84 72 95 47 e8 0a f5 |.M.]jQ....r.G...| -00000290 8d d6 2a 64 c2 34 1b d8 f0 f9 62 0c be 17 12 9b |..*d.4....b.....| -000002a0 40 a2 c3 8a eb 30 20 04 e4 69 a3 27 90 a6 1a 4f |@....0 ..i.'...O| -000002b0 3f 95 65 e6 9e c7 ad 03 e1 d2 34 d2 84 d5 f6 8c |?.e.......4.....| -000002c0 1e 8a aa e4 75 c0 7f 1d 79 4e 70 10 4e 18 9c eb |....u...yNp.N...| -000002d0 17 76 0c 66 6c 82 72 41 83 98 fc 41 41 4a 07 03 |.v.fl.rA...AAJ..| -000002e0 a6 16 51 0d 60 96 43 0a 97 27 72 42 31 70 6b 02 |..Q.`.C..'rB1pk.| -000002f0 e4 58 b0 15 4f 2e a3 5a ed dc 82 99 82 47 d5 6c |.X..O..Z.....G.l| -00000300 4b b4 68 70 f5 a3 31 36 52 8d af ab d1 ac f6 28 |K.hp..16R......(| -00000310 2e 18 bc 4f 1b 7c a8 ad c3 1f 2f 70 a6 c4 39 c6 |...O.|..../p..9.| -00000320 ae 0f 2e b7 58 c9 c0 2a 4b 34 c2 42 12 e3 5d ed |....X..*K4.B..].| -00000330 d1 ac e1 f1 14 66 d4 09 1c a0 99 82 d3 04 13 2a |.....f.........*| -00000340 a4 20 c4 e7 38 1e 0a 02 4e 96 02 71 9d f6 f7 86 |. ..8...N..q....| -00000350 f7 30 1a 5d 65 4f 17 03 03 00 99 3f 3d 4a 91 ae |.0.]eO.....?=J..| -00000360 0f 80 52 0f 1c d1 a2 75 83 e5 08 d8 1f 9d c8 24 |..R....u.......$| -00000370 fc 85 ba 76 1f 9e 1e 35 a3 dd 45 83 8e b9 55 a6 |...v...5..E...U.| -00000380 3b 26 ae 82 4f 1f 2e 8f e5 25 fb d6 22 0f 55 d6 |;&..O....%..".U.| -00000390 ac fa 93 6d d1 d3 7c 41 af c0 15 5c 8b e1 64 c1 |...m..|A...\..d.| -000003a0 3f a2 c8 9e 48 f5 63 61 3a df 13 6e f4 e3 60 9d |?...H.ca:..n..`.| -000003b0 bc 52 bd b7 94 e9 4b 7a 65 97 28 ac 39 6a 77 a7 |.R....Kze.(.9jw.| -000003c0 86 1d b4 6b e4 15 c4 bd 2b 41 b6 06 ac ff b5 9f |...k....+A......| -000003d0 17 47 b4 a7 1d 69 8b 6e 82 eb f7 39 03 95 10 dd |.G...i.n...9....| -000003e0 18 78 50 58 c8 78 80 ae 45 dc 54 0f 33 cb 4a d2 |.xPX.x..E.T.3.J.| -000003f0 90 00 12 d4 17 03 03 00 35 76 fa bf ab 3f c3 3d |........5v...?.=| -00000400 dd 78 65 cc 35 1e 24 35 4f 7d 3c e4 bb 73 d8 19 |.xe.5.$5O}<..s..| -00000410 56 94 f4 ce ad bc 1d 6a fb 1b 75 01 93 36 2b 44 |V......j..u..6+D| -00000420 3a 3c a3 9b 7c 57 6f 98 24 a3 64 b1 13 47 |:<..|Wo.$.d..G| +00000080 03 03 00 01 01 17 03 03 00 17 c3 9d 29 f6 f8 18 |............)...| +00000090 b9 39 9f 93 b2 f5 ab 30 41 d6 95 40 21 ba f8 8e |.9.....0A..@!...| +000000a0 25 17 03 03 00 52 08 a9 80 f3 24 c6 a6 b6 aa bc |%....R....$.....| +000000b0 30 c2 f7 dd e6 47 10 88 db 0c dd 43 ab 78 bd 16 |0....G.....C.x..| +000000c0 82 7b 4f 26 9c 0e 47 6b 75 79 4e da 8e 43 8b e6 |.{O&..GkuyN..C..| +000000d0 6a 25 0d 47 50 bf 26 c8 16 70 41 1c b2 b5 cd d1 |j%.GP.&..pA.....| +000000e0 34 9b 26 13 92 45 b5 f5 03 04 cf 55 ee ff c8 e6 |4.&..E.....U....| +000000f0 92 9e 04 d9 c5 f5 fd 0f 17 03 03 02 6d f6 33 26 |............m.3&| +00000100 26 da 41 f2 4e 6e ed 41 23 44 29 5f 43 38 7d 24 |&.A.Nn.A#D)_C8}$| +00000110 f7 a1 01 d4 23 a5 bf 85 db 39 86 27 ff 9c e9 ac |....#....9.'....| +00000120 6c 0e 0e 51 c7 95 8d aa f6 59 53 0a 89 d4 e7 2d |l..Q.....YS....-| +00000130 6e f8 66 7d e5 b2 ac e4 7b b2 91 2b 31 c9 2b 4e |n.f}....{..+1.+N| +00000140 92 8f a9 c8 79 21 9a 8f a2 79 29 47 c4 ef ab 80 |....y!...y)G....| +00000150 25 02 d6 8c ae 32 3b 1a 55 0e f9 4a ba 92 b9 61 |%....2;.U..J...a| +00000160 86 39 04 0a a7 d6 eb 95 50 4f 86 1b c9 d1 1d 1e |.9......PO......| +00000170 61 06 43 00 c2 2a a9 e2 06 ff ce 4a fd 6f d0 19 |a.C..*.....J.o..| +00000180 2a 0e ec 14 86 19 9c bc 1d 96 e1 b1 00 b2 19 c4 |*...............| +00000190 15 64 4c 33 54 89 fc 15 01 90 13 3b ff 99 e6 23 |.dL3T......;...#| +000001a0 19 38 4f 67 97 ee ab b3 9f ca 1f 18 7d 45 ef 87 |.8Og........}E..| +000001b0 42 7b 57 51 d0 c3 43 50 35 a3 33 ff 19 df 54 8e |B{WQ..CP5.3...T.| +000001c0 e9 98 2f 46 93 87 b4 b1 c2 73 04 4f 06 5b 3c 0a |../F.....s.O.[<.| +000001d0 c3 87 6c 68 68 b4 61 a2 33 bd 11 06 93 19 fb 05 |..lhh.a.3.......| +000001e0 c3 e6 3f 14 e5 a6 6d ec 48 56 a6 37 60 81 a4 cd |..?...m.HV.7`...| +000001f0 89 b5 4e c8 dc 99 79 66 5e 40 44 de 4a 22 9a ce |..N...yf^@D.J"..| +00000200 3d c4 a0 17 03 45 e6 28 70 27 f5 24 e1 81 7a 5f |=....E.(p'.$..z_| +00000210 5d 6e 6c bc 28 c3 fb b1 8b 18 fa 3d 9d f3 c3 a5 |]nl.(......=....| +00000220 f0 41 7a 0d 87 c1 70 77 d3 3a fa ef 2b 11 9b 61 |.Az...pw.:..+..a| +00000230 12 f8 d1 25 73 bc 79 bf ee 9a 5e e0 3b fb 06 da |...%s.y...^.;...| +00000240 7e d6 08 aa 13 73 8a 8c 97 d7 5a e4 dc 88 51 60 |~....s....Z...Q`| +00000250 8c 61 51 65 f6 d0 4e 7d b0 b1 23 2c 69 77 20 fe |.aQe..N}..#,iw .| +00000260 d1 ff 13 57 d8 c5 58 1f 3c e9 86 f4 3a 45 1a 9c |...W..X.<...:E..| +00000270 c2 e0 4d da 67 1b 81 62 bf 07 de a6 ea 74 81 e3 |..M.g..b.....t..| +00000280 ba 1b 1f bf b0 d3 d3 08 c0 23 5f 05 d5 1f 41 51 |.........#_...AQ| +00000290 f2 11 2e 36 ed 00 f8 b5 ea f1 4c 0b b8 d0 a3 cc |...6......L.....| +000002a0 c6 a7 2a ee 1f 6c 6b 33 0d 38 5b 5c 6e f4 53 d2 |..*..lk3.8[\n.S.| +000002b0 6e 90 5b ce 44 e7 f1 50 1e 12 21 76 35 d1 2f 49 |n.[.D..P..!v5./I| +000002c0 a1 27 66 00 93 27 27 34 5d e5 ed 4b 6f 7e 3d e3 |.'f..''4]..Ko~=.| +000002d0 78 de 2f 48 9f 4c 36 a7 5d 62 98 1e 2c ee 82 3c |x./H.L6.]b..,..<| +000002e0 18 17 2d 80 f4 a2 ac e9 a6 c8 2c b9 92 d1 9e 2b |..-.......,....+| +000002f0 5f 3e 33 56 03 b5 76 51 ea c7 af 1c 42 8e 0e 65 |_>3V..vQ....B..e| +00000300 f7 0f ad 36 9f fe b5 a0 06 31 f0 89 02 b4 bf c3 |...6.....1......| +00000310 8e 2f 52 4d 97 99 dd 95 0f c4 32 9e 81 55 d1 2a |./RM......2..U.*| +00000320 05 ff b5 7a 02 0f 6f 1b ef f1 de 48 dc a8 f8 44 |...z..o....H...D| +00000330 35 8c eb df 6b 78 cd 89 75 ca ef 31 ba 8f b8 ff |5...kx..u..1....| +00000340 a3 74 39 ce 42 a0 01 8b db 68 34 21 0a bf 84 fd |.t9.B....h4!....| +00000350 5f 28 87 d4 09 b2 91 c2 f3 1f b8 39 da 2b 55 3c |_(.........9.+U<| +00000360 46 a2 fa 3d 65 eb 41 0c 37 c8 17 03 03 00 99 e8 |F..=e.A.7.......| +00000370 25 eb 99 2f 80 e2 09 ed 2f b9 78 90 7c dc e2 4a |%../..../.x.|..J| +00000380 78 19 49 46 a8 e7 82 a0 85 84 71 da 80 fb d2 5d |x.IF......q....]| +00000390 28 c4 69 cf ac 1c bc 1e ba 90 5c 0a ec dd 31 5c |(.i.......\...1\| +000003a0 87 d0 4f 31 3f 62 cd 91 1e 99 a5 08 c6 de 6c 75 |..O1?b........lu| +000003b0 91 be 31 83 12 5b fd 5a eb 96 ae 70 9c 06 c9 ee |..1..[.Z...p....| +000003c0 63 e9 3c a0 5b 9c 55 cb cd 9d a2 31 33 17 92 fa |c.<.[.U....13...| +000003d0 dc 34 20 43 71 92 8b 16 dd 1c 29 f5 ec a2 e4 ad |.4 Cq.....).....| +000003e0 d6 21 27 37 32 0c 7b f1 60 7f 58 aa fc d6 ae f3 |.!'72.{.`.X.....| +000003f0 c9 7b 5f 59 39 cf 79 ab 5b a3 7e ea 13 72 51 9f |.{_Y9.y.[.~..rQ.| +00000400 a9 c5 fc fb c0 da 39 2a 17 03 03 00 35 b7 6d ed |......9*....5.m.| +00000410 8d d3 c6 09 fd 9b 6b be 6e bc 01 64 3b a1 4e 2d |......k.n..d;.N-| +00000420 3d 85 e3 5b 4b 7b 44 49 81 fd c8 d9 07 fe e5 53 |=..[K{DI.......S| +00000430 ab 5f a3 64 f6 be 22 79 80 52 f0 ee 3c 1e 4e 65 |._.d.."y.R..<.Ne| +00000440 0e e3 |..| >>> Flow 3 (client to server) -00000000 14 03 03 00 01 01 17 03 03 02 1e e0 29 6d d1 38 |............)m.8| -00000010 a6 03 d7 fc 2b df a4 a4 d0 ae 87 01 b8 82 5d eb |....+.........].| -00000020 3c 25 3e a1 33 89 b5 05 eb bc 02 0f ad 84 f0 2b |<%>.3..........+| -00000030 5f 14 af 0d f8 f1 08 e3 ca c1 8e ad 4b a5 a0 09 |_...........K...| -00000040 b8 a0 4f bf e4 0f 93 a9 4a 35 35 26 22 d7 04 03 |..O.....J55&"...| -00000050 70 95 4f 80 df d4 47 5b 21 14 27 d6 17 ea 32 6e |p.O...G[!.'...2n| -00000060 ea 3a ca 31 7c f2 d1 46 a2 ef 47 b9 16 d6 18 d5 |.:.1|..F..G.....| -00000070 17 35 71 9d 14 37 63 cd e1 c6 ff 3d ec a5 d8 53 |.5q..7c....=...S| -00000080 48 d5 d8 0b 75 39 c1 d2 66 ad 97 4e 5f eb c3 c7 |H...u9..f..N_...| -00000090 e0 77 95 fd 16 84 e2 a3 6a f2 a8 88 5e 4c 86 be |.w......j...^L..| -000000a0 81 a5 f2 6b 12 86 63 f1 4f a6 8d 63 7c 07 0f 8d |...k..c.O..c|...| -000000b0 53 d5 d4 00 c7 b7 2a ef b2 1d 07 4e 43 d6 25 35 |S.....*....NC.%5| -000000c0 c9 b1 fa 91 d1 f7 87 c6 98 c7 e7 c2 c3 7d 42 09 |.............}B.| -000000d0 e5 3c 50 83 1b 20 ef ec e4 ac 2e f2 3e 03 73 52 |..sR| -000000e0 2e 1d 20 cf e2 8d 15 c3 c7 a6 2f 68 b5 8e 5f bc |.. ......./h.._.| -000000f0 c5 73 61 ff 52 3c b0 7b 47 82 47 a0 73 f8 1c ab |.sa.R<.{G.G.s...| -00000100 4d ea 15 fa 94 e0 7f 70 c1 c8 9c 55 f0 96 38 42 |M......p...U..8B| -00000110 76 d4 26 6d a7 73 11 59 43 19 2f 49 70 a9 18 1c |v.&m.s.YC./Ip...| -00000120 12 9e ee d3 eb ca 1c c0 3b e1 99 e3 c2 25 de 39 |........;....%.9| -00000130 1a 15 e0 d7 20 9d 1b 95 74 8c ee 96 7b 5e de 13 |.... ...t...{^..| -00000140 99 56 54 a2 31 7b e9 96 02 9e 86 7b 15 9d c6 3e |.VT.1{.....{...>| -00000150 24 a5 19 e5 8e de 85 97 05 68 4f 39 d1 49 05 c9 |$........hO9.I..| -00000160 7a 54 90 29 e7 93 ec 8e 6f cc 73 73 82 7d 72 8d |zT.)....o.ss.}r.| -00000170 4a 85 29 7f a5 53 13 26 16 b2 fa c3 ce 1f 8b ae |J.)..S.&........| -00000180 e6 60 8c 2d b0 64 66 d4 29 7c b5 2d 1d 11 c5 09 |.`.-.df.)|.-....| -00000190 bb a5 44 c6 c8 af e6 f1 d5 f8 d9 45 97 64 7f 03 |..D........E.d..| -000001a0 02 f7 f5 9f cb 31 1e 89 e4 5d a0 e9 34 db be 28 |.....1...]..4..(| -000001b0 51 15 68 54 01 7c e5 1d b4 05 d2 d6 24 ca 10 69 |Q.hT.|......$..i| -000001c0 31 bf 8b 7a ee d9 bf e1 2a d4 7c c8 e8 79 ca dd |1..z....*.|..y..| -000001d0 0f 73 09 c8 cf 97 28 78 04 5b 04 51 44 c4 5f d1 |.s....(x.[.QD._.| -000001e0 dc da 4f f5 d9 5c 9c b1 ea f8 1b f7 43 90 c0 c0 |..O..\......C...| -000001f0 fd 82 56 e3 71 15 18 5e 7e 5c 61 5e b3 80 c1 1c |..V.q..^~\a^....| -00000200 22 92 32 67 23 f6 3b 74 e4 20 4e 1f fb f8 89 55 |".2g#.;t. N....U| -00000210 e7 3c 18 30 24 77 7c 33 5c 89 91 60 65 14 06 9e |.<.0$w|3\..`e...| -00000220 e2 6d f0 07 84 4b b4 14 e8 17 03 03 00 a3 a7 e1 |.m...K..........| -00000230 f7 26 48 56 da 6d ef a5 f4 5f 19 52 37 9e e7 6d |.&HV.m..._.R7..m| -00000240 28 07 70 ee 1e de 85 2b 7a 2d bf eb 48 06 f5 d4 |(.p....+z-..H...| -00000250 ea 4d 83 86 59 d4 14 4f 46 bc 17 89 f1 f5 37 0e |.M..Y..OF.....7.| -00000260 84 60 6e ba 73 d7 c1 bc 6f d7 aa cf f0 36 96 a2 |.`n.s...o....6..| -00000270 83 60 81 6f 48 6c 9d 87 e5 b6 5e 77 ab c5 e3 cb |.`.oHl....^w....| -00000280 8e 55 94 dc 94 f3 8a ce cb f7 b4 d5 33 55 df 88 |.U..........3U..| -00000290 22 44 04 ee 4e f5 30 e7 30 94 dc 95 2d 97 2c e4 |"D..N.0.0...-.,.| -000002a0 34 58 4d 38 9e 25 61 96 c1 37 66 34 2b be ee e6 |4XM8.%a..7f4+...| -000002b0 ee 39 73 89 a3 aa 1b 0a 5a bf 44 23 4e 19 5c c4 |.9s.....Z.D#N.\.| -000002c0 3f 27 47 5c 40 67 6c 50 b8 3f 7c c9 97 f0 55 02 |?'G\@glP.?|...U.| -000002d0 16 17 03 03 00 35 82 8b 0d 4e 87 3c c6 bc 41 8b |.....5...N.<..A.| -000002e0 ec ab 71 9d 57 7b e6 22 e4 87 82 61 5d f8 69 31 |..q.W{."...a].i1| -000002f0 8a 2c be 2c d8 4d 2f dc 9a 91 31 7a ab d8 a4 0e |.,.,.M/...1z....| -00000300 ba cb fc ef 17 a4 7c 87 ca 13 bb 17 03 03 00 13 |......|.........| -00000310 3b d0 da 9f d4 be fa 59 7a 30 8b 7e 8e a0 99 c0 |;......Yz0.~....| -00000320 c2 36 f3 |.6.| +00000000 14 03 03 00 01 01 17 03 03 02 1e a8 48 8d 47 f6 |............H.G.| +00000010 3d d8 59 5b 26 9e bd fc d1 15 7c e1 37 1b db 3c |=.Y[&.....|.7..<| +00000020 e4 02 98 fd aa cc a6 45 97 6e c5 18 4e 45 8e d6 |.......E.n..NE..| +00000030 84 7a b5 e4 da 8b 17 34 e5 fb 21 3c f6 02 c2 5c |.z.....4..!<...\| +00000040 ea 57 ea 16 67 4a 6d b2 0e 5a 39 f8 6b 11 84 bd |.W..gJm..Z9.k...| +00000050 43 80 03 40 5e d2 d2 54 2e d1 38 bc 9a 16 4f 21 |C..@^..T..8...O!| +00000060 0e 07 38 b5 80 21 16 c6 a1 bb 23 79 a6 df ef 27 |..8..!....#y...'| +00000070 dc 30 3c 4a 53 b1 5c 54 a7 fb ff 73 e2 12 ab 90 |.0..*..`.d~q| +000001b0 45 26 b8 91 26 cc d6 bf d5 4d 26 3f 4f c8 73 99 |E&..&....M&?O.s.| +000001c0 a7 50 9d 14 09 b6 07 1a af aa 9b 02 31 b2 c6 22 |.P..........1.."| +000001d0 ca 3e e0 2f 27 87 27 2e 96 f4 b4 ba c6 01 77 d3 |.>./'.'.......w.| +000001e0 52 09 ea 79 9b ee b4 6a 41 29 b1 de de 74 6b b2 |R..y...jA)...tk.| +000001f0 11 b1 58 90 5c 6a 0d b5 51 4b 2e 1b 3e e6 f4 17 |..X.\j..QK..>...| +00000200 8e 8a 1d 1e c8 bd 55 3a fc f4 90 73 14 5f 63 1b |......U:...s._c.| +00000210 22 f0 81 fd 70 05 ca b2 fd 90 3c 9d 2e 73 d3 8c |"...p.....<..s..| +00000220 f0 0a 59 9e 46 fe 8c e2 22 17 03 03 00 a4 78 2b |..Y.F...".....x+| +00000230 ec c5 5e 71 85 c6 e5 5d 75 f3 b5 3d 55 de 1c f9 |..^q...]u..=U...| +00000240 06 92 be df ef 77 31 4b f3 13 b8 c7 7a 68 ec 1b |.....w1K....zh..| +00000250 e2 7c c0 ff b5 6f c2 62 bd 34 23 fd 6a 39 c7 ef |.|...o.b.4#.j9..| +00000260 91 47 77 7e 32 2e a9 b2 85 ae 01 3e 61 43 8a 93 |.Gw~2......>aC..| +00000270 72 14 e1 b7 a5 14 4b ca 6e cb 4d e7 a3 cd 74 98 |r.....K.n.M...t.| +00000280 4e 08 a4 d4 34 ea 73 17 4b 20 8b 40 03 10 a0 33 |N...4.s.K .@...3| +00000290 c9 2f c0 4c 3b a2 2c 61 3c ab ec e3 c0 e8 e2 d6 |./.L;.,a<.......| +000002a0 a0 85 fa 26 26 a9 65 dc 70 5b 8f b7 3f 9e b3 fb |...&&.e.p[..?...| +000002b0 44 36 62 79 75 af ef 94 05 6b d2 44 07 51 ae 91 |D6byu....k.D.Q..| +000002c0 ea e3 e7 d2 f4 2f 19 17 38 aa 1c ae cb 88 db 0b |...../..8.......| +000002d0 66 5a 17 03 03 00 35 6d d9 23 d1 3c c3 25 7b 5d |fZ....5m.#.<.%{]| +000002e0 8a 1a 41 00 00 f8 0c a7 3e 53 4e e5 f6 cb 11 3f |..A.....>SN....?| +000002f0 9c 66 62 80 98 6c 55 19 b1 6f 00 5d 46 93 d2 0b |.fb..lU..o.]F...| +00000300 79 58 1c d6 d7 f9 fc fb 38 c5 32 63 17 03 03 00 |yX......8.2c....| +00000310 13 72 a9 fd 60 5c cf 68 b3 32 15 04 33 1c e1 5f |.r..`\.h.2..3.._| +00000320 11 11 9e 8c |....| >>> Flow 4 (server to client) -00000000 17 03 03 02 90 a2 a0 e4 83 63 ad 8d d5 45 25 dc |.........c...E%.| -00000010 41 02 31 28 8d b0 87 85 66 b8 9c 36 f3 1f 97 87 |A.1(....f..6....| -00000020 8c c9 e6 b4 67 1e 42 ab 84 c4 eb 0a 41 b1 0f 50 |....g.B.....A..P| -00000030 25 c3 7e 69 20 cf 8a d0 56 79 61 e3 e1 5b cc a4 |%.~i ...Vya..[..| -00000040 24 5a c7 2d 3b 17 33 92 59 6c 7e 29 a9 a2 2c 73 |$Z.-;.3.Yl~)..,s| -00000050 3e b1 65 32 3d 6a 2b 61 5d 76 c4 66 0e 4f f1 da |>.e2=j+a]v.f.O..| -00000060 dd d3 7e 29 3d f5 42 99 9e 04 60 a4 9a a1 c0 f7 |..~)=.B...`.....| -00000070 54 4e d5 58 73 85 02 83 38 ba 4e 93 9a 69 68 07 |TN.Xs...8.N..ih.| -00000080 71 c9 a7 e4 83 51 4c 11 21 26 b2 dd ad 4b 2a ef |q....QL.!&...K*.| -00000090 23 9b b0 f6 d6 96 9f 99 1f 69 fe 35 28 86 49 bc |#........i.5(.I.| -000000a0 ec 97 11 4d 4e b7 c1 c2 da 6c ae c7 40 b9 2a 1f |...MN....l..@.*.| -000000b0 ff 9d 9d ea 90 b9 61 6f 76 ae fe 55 70 f6 ee 54 |......aov..Up..T| -000000c0 54 62 6d 19 9a fc 40 16 e5 c2 e2 3e d1 68 c6 09 |Tbm...@....>.h..| -000000d0 be 54 64 25 8a a0 2b e6 b3 14 7e 74 17 91 f0 de |.Td%..+...~t....| -000000e0 87 e8 3c 3e 58 8d 1b b2 4e 2d 7d c1 f8 aa 16 ca |..<>X...N-}.....| -000000f0 2a 3e 8f aa 52 14 e4 f2 2a b9 6e 62 46 ab ed 3a |*>..R...*.nbF..:| -00000100 ff a1 51 53 92 7a 78 c4 ed 9d fd 1f b4 62 2e e7 |..QS.zx......b..| -00000110 cc 9d 09 fa 06 2e 9e 55 e5 98 9e b8 be e9 12 94 |.......U........| -00000120 33 58 6b be 71 a1 4f f8 a0 83 85 f8 7e b4 28 a7 |3Xk.q.O.....~.(.| -00000130 ee 1b ac 3c 46 b6 ac 60 af 5d cc b0 a8 2c 3f 95 |.....Z.| -00000210 6b 5c d2 4d b2 20 35 63 9e 83 c0 7e 83 60 46 57 |k\.M. 5c...~.`FW| -00000220 c0 80 0d d7 b9 9f 14 c0 58 2d 48 2a cc 8c 1d 32 |........X-H*...2| -00000230 2c 34 ec 10 f2 34 b4 28 e1 0e 83 38 c4 2e 5a 09 |,4...4.(...8..Z.| -00000240 ff e6 3f d3 9a 32 8e 33 9e 31 18 e5 1d 6b 97 12 |..?..2.3.1...k..| -00000250 9b 93 84 86 62 8a 0a 8a ab 8d 37 68 af a1 ec 8e |....b.....7h....| -00000260 38 c8 47 ef 10 f8 64 7c e1 13 0a 33 eb c2 4b bf |8.G...d|...3..K.| -00000270 47 49 6d 93 3c c9 44 aa 74 67 a9 93 dd de 66 47 |GIm.<.D.tg....fG| -00000280 1e b3 55 47 b1 16 88 68 82 24 d6 b8 81 b0 5a b6 |..UG...h.$....Z.| -00000290 27 7a f8 0b 5c 17 03 03 00 1e a5 9b 8c d2 3e 96 |'z..\.........>.| -000002a0 f3 49 7a ed d9 fc 33 62 15 12 43 76 11 f9 dc fc |.Iz...3b..Cv....| -000002b0 ea d2 d7 87 22 6f 9e 3d 17 03 03 00 13 e1 30 4e |...."o.=......0N| -000002c0 4c 1d 02 78 57 a5 ee 8f 1c 5f 19 f0 57 3a 8d 7e |L..xW...._..W:.~| +00000000 17 03 03 02 90 2e 71 49 81 51 71 9c 2f da 1e dc |......qI.Qq./...| +00000010 22 c0 a2 59 13 ad 41 ae 7b 18 56 d0 00 7b b5 cf |"..Y..A.{.V..{..| +00000020 47 e7 bc 8e 92 9e dc 88 78 3e 40 8e 8b 01 b0 30 |G.......x>@....0| +00000030 8f 7e 88 95 77 ed de 31 bf c5 78 ba a1 44 55 ec |.~..w..1..x..DU.| +00000040 b6 df 49 a9 df a0 92 b2 be b7 2c 1c 39 1b a0 63 |..I.......,.9..c| +00000050 18 e5 12 b7 5a a5 85 14 97 7d 9e e1 80 b7 15 c5 |....Z....}......| +00000060 2f ca e3 3b 48 91 42 07 f4 49 25 99 2c ee b8 b5 |/..;H.B..I%.,...| +00000070 05 a2 34 7d bb c0 87 4c f3 a8 07 89 fe b7 08 2c |..4}...L.......,| +00000080 e2 0b 27 6f 49 88 80 2f 3b 9c ae a6 3e 38 74 23 |..'oI../;...>8t#| +00000090 53 70 f5 84 0f 77 d4 94 68 f9 86 18 2f dc e1 94 |Sp...w..h.../...| +000000a0 3c e1 2c f2 84 07 f5 3c 88 99 63 ef a1 96 73 f9 |<.,....<..c...s.| +000000b0 46 43 c2 92 be 04 b8 6b 9e db e1 7f 63 b1 d4 15 |FC.....k....c...| +000000c0 36 2c 37 e3 c2 24 b2 4c c5 60 96 15 3b 20 01 67 |6,7..$.L.`..; .g| +000000d0 e5 52 9a 4f 17 6c 0a f1 a0 a3 31 48 e5 31 8e d3 |.R.O.l....1H.1..| +000000e0 b9 49 38 d2 55 4d 40 8e a2 bf dd 0f 19 25 42 55 |.I8.UM@......%BU| +000000f0 06 57 22 c5 06 c9 59 13 f7 c7 56 b1 68 20 f4 62 |.W"...Y...V.h .b| +00000100 19 0a 5d ab 5f 81 c6 50 b7 a2 f8 ce 55 f2 b6 6c |..]._..P....U..l| +00000110 67 39 75 82 1b a1 6b 85 58 37 c0 a5 12 64 a6 ee |g9u...k.X7...d..| +00000120 2e f8 f0 dc d2 50 08 47 0f 15 c8 37 2d ba 69 64 |.....P.G...7-.id| +00000130 e9 ea 7b fa 16 91 ed b6 24 0d fb e8 aa 74 6b 74 |..{.....$....tkt| +00000140 2d 78 2d 1c 2b 98 8e ab 74 6d 06 a3 00 8a e5 be |-x-.+...tm......| +00000150 c0 68 09 05 e0 95 0d c1 27 8a cf 05 09 0a 7c b9 |.h......'.....|.| +00000160 a1 3a 9b 45 3d d4 5d 16 64 5b d5 a3 6c d2 12 78 |.:.E=.].d[..l..x| +00000170 4f 6b ba 3a fe ad 35 9e 5e 0c 5f d4 f3 32 a2 0b |Ok.:..5.^._..2..| +00000180 f1 af d4 e5 f1 91 c6 6c 47 6b 30 a7 2f bf 60 05 |.......lGk0./.`.| +00000190 e3 c0 2d 9c 34 f2 f0 6b f2 ce 7f 19 d0 86 26 b0 |..-.4..k......&.| +000001a0 e1 7e 7b e0 0e 3d e7 f6 3c 7f 42 bc 9f a6 0a 25 |.~{..=..<.B....%| +000001b0 eb cf 1b 4b 44 10 df 7d f1 1f e3 a9 ea 4f 6d 52 |...KD..}.....OmR| +000001c0 70 b2 f0 0b a9 c5 bc 66 46 21 4d 92 c4 c3 f6 71 |p......fF!M....q| +000001d0 eb 46 c0 f3 e7 6f 4a ee 37 ad 8a ea 3b aa 51 79 |.F...oJ.7...;.Qy| +000001e0 d5 d5 18 7e e8 ae 31 1a db 16 04 d8 3c 94 17 f6 |...~..1.....<...| +000001f0 ad 8f 8b 5d 7d 14 fb b4 e9 b4 7e bb 75 f1 df de |...]}.....~.u...| +00000200 6f 0a 0d a8 f9 b5 d8 53 73 36 88 77 db e6 0e 84 |o......Ss6.w....| +00000210 fc 94 6b c9 cc 74 0f 01 40 39 c4 d0 66 2d 23 76 |..k..t..@9..f-#v| +00000220 9f 0d a1 53 94 a2 dd 56 83 9e 62 39 10 13 39 40 |...S...V..b9..9@| +00000230 55 09 b6 77 d2 22 9c 49 ef f9 af 93 ee d1 cf 3d |U..w.".I.......=| +00000240 1f 29 ef 27 94 3c 6d 23 d6 7c 33 e1 f7 cd 70 05 |.).'.Z..~..i7.| +000002b0 b0 90 43 11 e6 76 5e 2d 17 03 03 00 13 4b 69 75 |..C..v^-.....Kiu| +000002c0 3d 46 35 f6 85 4b 0b 6e f4 6b 30 2a 28 37 3c f1 |=F5..K.n.k0*(7<.| diff --git a/src/crypto/tls/testdata/Server-TLSv13-ClientAuthRequestedAndEd25519Given b/src/crypto/tls/testdata/Server-TLSv13-ClientAuthRequestedAndEd25519Given index 6943bf6569..016b7da4df 100644 --- a/src/crypto/tls/testdata/Server-TLSv13-ClientAuthRequestedAndEd25519Given +++ b/src/crypto/tls/testdata/Server-TLSv13-ClientAuthRequestedAndEd25519Given @@ -1,149 +1,151 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 ca 01 00 00 c6 03 03 e4 83 a9 75 06 |..............u.| -00000010 0f 8b c9 35 1e 62 89 7f a8 df 7c 93 b6 f0 8f 94 |...5.b....|.....| -00000020 ea 31 dc 66 11 66 bd 77 33 54 bf 20 38 77 15 8d |.1.f.f.w3T. 8w..| -00000030 b4 21 50 72 6f 95 61 6c 15 b8 35 c9 92 10 72 99 |.!Pro.al..5...r.| -00000040 bc 41 03 53 7c 5e 7b b3 a4 2e b4 19 00 04 13 01 |.A.S|^{.........| +00000000 16 03 01 00 ca 01 00 00 c6 03 03 c3 82 3b bf 9c |.............;..| +00000010 31 25 31 c7 8d 18 7f c1 28 22 0f 23 0c 13 b8 81 |1%1.....(".#....| +00000020 a8 e8 35 00 92 0a 13 21 8d 76 43 20 9e 3a 45 91 |..5....!.vC .:E.| +00000030 73 a0 99 70 ab 96 99 2b ae 4a b1 2a 89 3c 74 94 |s..p...+.J.*.>> Flow 2 (server to client) 00000000 16 03 03 00 7a 02 00 00 76 03 03 00 00 00 00 00 |....z...v.......| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00000020 00 00 00 00 00 00 00 00 00 00 00 20 38 77 15 8d |........... 8w..| -00000030 b4 21 50 72 6f 95 61 6c 15 b8 35 c9 92 10 72 99 |.!Pro.al..5...r.| -00000040 bc 41 03 53 7c 5e 7b b3 a4 2e b4 19 13 01 00 00 |.A.S|^{.........| +00000020 00 00 00 00 00 00 00 00 00 00 00 20 9e 3a 45 91 |........... .:E.| +00000030 73 a0 99 70 ab 96 99 2b ae 4a b1 2a 89 3c 74 94 |s..p...+.J.*.8..`...1&.| -000000b0 db ef e2 b1 99 55 c8 f9 f3 a0 81 19 12 a7 63 85 |.....U........c.| -000000c0 5a 26 2d d1 1c ad 5d ae d6 4b 66 93 62 d7 fe 08 |Z&-...]..Kf.b...| -000000d0 40 e9 fa 16 8b 89 f8 04 e8 33 67 20 2b 21 91 a0 |@........3g +!..| -000000e0 c6 0a 87 ff 17 03 03 02 6d 79 97 6c 2f f6 01 7b |........my.l/..{| -000000f0 3a 49 0e 1a 00 96 10 fd 7f 77 db 76 b2 d4 e4 68 |:I.......w.v...h| -00000100 46 4e 4f 3c 64 54 ca 27 9a 5c 78 98 f4 96 a4 fe |FNO.....u.(..| -00000120 ff d8 ec 27 2c f2 4c e5 a0 6e 88 ce 67 6e 35 f4 |...',.L..n..gn5.| -00000130 e5 d5 96 2d 40 af fa 88 12 8a 48 24 2c f9 82 f5 |...-@.....H$,...| -00000140 cb a4 6e 95 a6 53 bc 79 f7 6a ef 66 77 bc 46 f0 |..n..S.y.j.fw.F.| -00000150 1b 0d 6b 5c 76 82 15 c4 d0 1c dd ec cc ce 09 93 |..k\v...........| -00000160 ce 21 55 9b d8 8a 11 1b 0c 24 fa 9e 5f 29 4a f1 |.!U......$.._)J.| -00000170 2a 2e ad c0 6d 6d 46 06 5b c9 75 b3 3e 32 45 67 |*...mmF.[.u.>2Eg| -00000180 05 26 cc d8 a8 4a a9 b1 67 71 a6 82 1c dc f0 15 |.&...J..gq......| -00000190 6d 25 f5 6e be a2 5f 45 39 dc d1 2e df fa e1 e9 |m%.n.._E9.......| -000001a0 48 ca 7a 78 fa 0e 53 d1 5c 8f c2 40 91 d5 fa 40 |H.zx..S.\..@...@| -000001b0 7e a1 52 23 c8 56 1f 31 17 91 5c 38 bb 54 56 f3 |~.R#.V.1..\8.TV.| -000001c0 1e 14 90 43 b7 ef fd 56 b5 ae 13 90 97 dc 60 15 |...C...V......`.| -000001d0 67 72 fc c2 0a 32 90 be ec de 69 16 d3 1b 22 2c |gr...2....i...",| -000001e0 25 9f 91 27 a7 6d 8c a4 de 02 fd 0e da bf ca 71 |%..'.m.........q| -000001f0 77 9b 56 b8 07 e8 80 00 9b d9 36 1c 09 4f 9f 54 |w.V.......6..O.T| -00000200 76 d5 76 f4 9a 03 94 bb 9e 93 f0 b5 3c a1 71 ec |v.v.........<.q.| -00000210 b3 83 3a 06 b4 46 97 bf ef bb f0 26 94 4e b0 08 |..:..F.....&.N..| -00000220 3b ec 81 20 66 92 11 85 a0 c2 90 fd c5 bc ae 39 |;.. f..........9| -00000230 2c 87 ec e4 5d 59 ee b4 e9 0d f7 2a e0 3b 2a 94 |,...]Y.....*.;*.| -00000240 1a 79 2f e8 5c 88 d3 61 2e 47 c0 f3 c4 01 84 a9 |.y/.\..a.G......| -00000250 cf f6 36 13 cb 4b 0b f7 9a 14 f1 d5 0e 10 80 fd |..6..K..........| -00000260 11 79 20 20 ae 56 5e de 58 53 19 38 26 e2 ac bc |.y .V^.XS.8&...| -00000270 0c 40 38 8b f9 67 62 4c 42 7d 18 4f 27 e9 53 96 |.@8..gbLB}.O'.S.| -00000280 78 4b fa 44 fe c2 c3 d9 99 f2 2c 59 2b 2b 2c 88 |xK.D......,Y++,.| -00000290 5b dc a8 98 3d 17 14 09 70 ce e4 02 8b 3c 5d 94 |[...=...p....<].| -000002a0 44 ac ba 57 2d a9 bf b8 70 e9 b8 a8 c3 b8 90 da |D..W-...p.......| -000002b0 ec b1 b4 57 d6 e3 0f 41 82 bb 21 4a 57 dc ac 4b |...W...A..!JW..K| -000002c0 89 34 75 fc c4 56 6b 70 3d 83 2b fa be c8 2b cd |.4u..Vkp=.+...+.| -000002d0 f8 4f 9f 9e 9a 0e d2 d0 46 cd 21 a5 f7 07 a6 2a |.O......F.!....*| -000002e0 85 7b 30 92 78 a2 da a5 1d 1c 1c 54 63 4b 66 b2 |.{0.x......TcKf.| -000002f0 f1 a7 c4 43 57 97 7f 28 37 e7 15 62 9b 1c f5 90 |...CW..(7..b....| -00000300 0c 19 36 1a c1 48 48 e5 7d 56 93 3c 13 e3 cd 6a |..6..HH.}V.<...j| -00000310 aa aa ba d5 24 95 c7 df 9c a9 76 6c 07 bf 09 2d |....$.....vl...-| -00000320 4b 7b 55 94 37 ec d4 69 ce ab 0f 48 37 74 37 99 |K{U.7..i...H7t7.| -00000330 83 0d 60 8a 73 56 fb e2 9e 0c 39 0e 23 bf 68 b2 |..`.sV....9.#.h.| -00000340 92 51 12 bc cf 1b af 9d 7c fe 77 14 c8 66 4a 6f |.Q......|.w..fJo| -00000350 91 06 55 6a 11 61 17 03 03 00 99 c2 bf 26 a6 fa |..Uj.a.......&..| -00000360 67 16 a3 b9 1f 36 f8 4f 5d 59 b1 be 43 3a 70 01 |g....6.O]Y..C:p.| -00000370 c0 3a 4b c5 20 b1 22 49 04 22 bb 7f 5f f4 bb f8 |.:K. ."I.".._...| -00000380 35 03 0e dc ba ce de 2a 25 ea 96 dd 3d 64 34 90 |5......*%...=d4.| -00000390 30 f8 34 22 bb e4 94 00 bb b3 ea 3c d2 87 90 9a |0.4".......<....| -000003a0 86 76 6b b7 e3 78 fc 35 10 50 ce b6 c0 71 52 ae |.vk..x.5.P...qR.| -000003b0 a5 f7 bf 8c 5e 5d c1 96 c7 92 6f f0 04 87 d9 a8 |....^]....o.....| -000003c0 72 f4 9e ed 6d ab 28 42 7c c8 60 39 81 66 74 a1 |r...m.(B|.`9.ft.| -000003d0 79 79 6a 59 02 29 b8 14 12 34 a7 96 8f e0 c1 d6 |yyjY.)...4......| -000003e0 4e da e2 63 22 c1 60 b1 87 64 d3 80 b9 c4 df 9a |N..c".`..d......| -000003f0 5f 2c 22 91 17 03 03 00 35 9a 62 4d a2 ba 27 31 |_,".....5.bM..'1| -00000400 fc 8e 23 cc 5f f0 5c 8c 9b c1 b0 ae 7b b8 fa e2 |..#._.\.....{...| -00000410 f3 af 6c 6c ac 86 1e e1 2b 9f 14 a1 f3 5f b5 f9 |..ll....+...._..| -00000420 76 b6 dd 73 f5 6a 08 29 f1 29 9e 79 87 aa |v..s.j.).).y..| +00000080 03 03 00 01 01 17 03 03 00 17 84 17 5a 31 cf 40 |............Z1.@| +00000090 61 37 2b 5a 28 91 d9 e1 7b f2 50 14 8e 7b 40 30 |a7+Z(...{.P..{@0| +000000a0 4b 17 03 03 00 52 ad d1 15 51 c8 89 48 44 23 64 |K....R...Q..HD#d| +000000b0 8a b6 8d ac 08 47 ed 65 1d a3 ea cd 3c 89 43 4b |.....G.e....<.CK| +000000c0 36 28 4b b7 bc e4 93 93 ce 37 4c f5 63 ad 3b 3f |6(K......7L.c.;?| +000000d0 05 b9 92 56 88 35 89 30 5e 40 2d 46 ac 9d 1f ec |...V.5.0^@-F....| +000000e0 3d 0a 2a 32 d0 98 79 97 e2 93 2b b0 43 35 37 90 |=.*2..y...+.C57.| +000000f0 64 e3 a6 fd 09 01 14 61 17 03 03 02 6d 3c 5b ed |d......a....m<[.| +00000100 d8 cf c6 d9 e4 b1 7b 15 dc a1 c1 f6 88 87 1a 5c |......{........\| +00000110 22 37 53 87 a7 10 13 50 1c 1c 65 70 09 67 f3 63 |"7S....P..ep.g.c| +00000120 e7 63 88 76 50 45 e6 a8 1a 38 93 3b c0 ef fd c0 |.c.vPE...8.;....| +00000130 17 c2 c5 04 d6 15 c6 e9 70 bd d2 be 9a 38 50 8a |........p....8P.| +00000140 2b 4c a2 ea 4e ad 80 09 8f 24 2c 17 4d 17 e4 d8 |+L..N....$,.M...| +00000150 a1 47 13 fb 76 18 2d 04 8c 39 23 03 67 64 d2 d6 |.G..v.-..9#.gd..| +00000160 3d c8 4f 1d 1c 59 44 08 80 52 6e f3 3f 90 35 bc |=.O..YD..Rn.?.5.| +00000170 7e 58 1e 16 2c b0 7d 89 2a 4a a9 53 5a 2a ce 65 |~X..,.}.*J.SZ*.e| +00000180 c9 85 08 0b 6d e9 a4 9c e7 25 30 49 3c 85 bb 83 |....m....%0I<...| +00000190 7c 78 be 9d ee de 8f fb 01 d7 59 d5 4e 42 bc 21 ||x........Y.NB.!| +000001a0 e6 ba ed 0c 84 3c 8a aa 70 43 8a 46 c5 7f 81 65 |.....<..pC.F...e| +000001b0 b3 18 73 d9 73 8f 4e 67 5e 64 e3 92 0c 2f 03 e4 |..s.s.Ng^d.../..| +000001c0 81 ec 8a a2 0c 7d e9 97 5f 4b 5f 7e 55 48 24 8c |.....}.._K_~UH$.| +000001d0 ea d4 34 18 2b 88 6e 07 17 a9 7a be 6a 99 59 76 |..4.+.n...z.j.Yv| +000001e0 f5 1d 9b e9 4c ad f7 eb 94 8b bb 7d 93 46 ba a7 |....L......}.F..| +000001f0 d5 f8 3b 82 91 6d 5c 7e dc 0f da 08 19 06 40 f0 |..;..m\~......@.| +00000200 fd 16 68 24 fc 85 84 12 65 71 cf 91 63 46 ea 2f |..h$....eq..cF./| +00000210 d6 45 be 8a f3 27 0a 66 cb ed 8a d0 38 02 59 34 |.E...'.f....8.Y4| +00000220 4a 3d dc 6d 2d ef a4 f6 b4 c0 9d 29 85 b3 da 20 |J=.m-......)... | +00000230 4d 60 ec 90 eb 0f f1 5f 83 b4 bd 6a d5 0b b1 01 |M`....._...j....| +00000240 dd df a3 4c 1c b1 f6 b3 0c e0 8d 94 59 84 08 c4 |...L........Y...| +00000250 31 58 83 11 0b 04 5c 5e e3 ef 5a f4 6d 95 3a ca |1X....\^..Z.m.:.| +00000260 7a 11 b9 db e4 dd 38 66 65 b1 24 40 17 22 8f 90 |z.....8fe.$@."..| +00000270 f3 88 c6 a0 76 21 67 be 1f 6c aa ca ad c1 58 20 |....v!g..l....X | +00000280 dd c7 c0 20 32 a8 d7 db 9a 81 c9 82 38 a0 76 6b |... 2.......8.vk| +00000290 54 cf 79 cb 01 f1 59 50 3b 99 e2 68 96 2f 49 01 |T.y...YP;..h./I.| +000002a0 f6 7a ec a5 4f a0 91 be fb 85 52 ef 9b 6d 0c c1 |.z..O.....R..m..| +000002b0 36 82 a2 3f 0b 4e 4e 01 31 43 29 2a c0 26 41 83 |6..?.NN.1C)*.&A.| +000002c0 31 7b 9a b0 bf 0d 0f 96 b7 64 60 4d 07 2b 29 7e |1{.......d`M.+)~| +000002d0 d2 f6 c3 92 89 50 a7 19 b7 5b 15 6d 9c 0b 6e e3 |.....P...[.m..n.| +000002e0 01 d4 58 18 c0 22 95 e6 42 a7 1b 65 a8 2f 5f 6e |..X.."..B..e./_n| +000002f0 fc bc 00 ed 01 21 ec a9 6c ac 9e c7 c0 f0 f5 fc |.....!..l.......| +00000300 bd 0c c1 26 98 20 fa 1d a5 2a b6 fc 01 17 1c ba |...&. ...*......| +00000310 62 17 7d 39 25 76 bb 8c 77 5a bb 5e 74 22 f7 82 |b.}9%v..wZ.^t"..| +00000320 f1 65 8a 25 b5 05 53 db 84 de e6 59 1a a6 e7 09 |.e.%..S....Y....| +00000330 45 8e 14 fc e2 bc 9c 20 42 28 8d e2 ae 48 ad f4 |E...... B(...H..| +00000340 a0 ab 6b 3e 23 02 0a 0f ee 92 68 2f 29 1c 7e 4f |..k>#.....h/).~O| +00000350 8b 92 85 32 15 2f c1 dc fa 87 14 1d 21 3e 95 c6 |...2./......!>..| +00000360 e4 96 f1 66 d6 af bb eb d8 d4 17 03 03 00 99 31 |...f...........1| +00000370 1a 82 6b b3 f2 1d 12 83 7c df 15 6a 5b a8 af 96 |..k.....|..j[...| +00000380 a3 81 92 59 7a 19 c5 6b b4 ec e0 90 14 f1 00 ca |...Yz..k........| +00000390 0d d5 15 c5 24 49 a7 fc c2 2f 40 89 61 c1 6d d4 |....$I.../@.a.m.| +000003a0 da 39 f7 c3 42 50 e2 47 62 b2 5f 2b 91 70 e7 61 |.9..BP.Gb._+.p.a| +000003b0 57 e0 a3 20 a2 79 1f 18 ce f9 ad 5d ea 87 fa 16 |W.. .y.....]....| +000003c0 85 4b 50 a0 43 8f 0a 40 d7 93 cf 82 b5 82 6c 11 |.KP.C..@......l.| +000003d0 b7 cb 7c b2 4d 7d 23 ec a7 f8 2f b6 69 a8 83 29 |..|.M}#.../.i..)| +000003e0 4a ff 72 86 8e 05 79 91 a7 ed 4b 3d c8 86 fc 29 |J.r...y...K=...)| +000003f0 74 1e 88 7b a5 b2 2c 6e 62 08 2e a9 02 c9 05 d8 |t..{..,nb.......| +00000400 66 db 9c 28 35 79 ed 6f 17 03 03 00 35 24 4d e5 |f..(5y.o....5$M.| +00000410 81 c9 80 a9 1b c8 a9 20 27 c8 17 b3 0e 42 91 70 |....... '....B.p| +00000420 cb 4d ac 6f b8 b7 9a 96 94 95 fb ce f1 51 65 21 |.M.o.........Qe!| +00000430 ff 2c c5 53 42 1c b3 1c b1 9b 38 1a 1c a0 bf 3c |.,.SB.....8....<| +00000440 92 06 |..| >>> Flow 3 (client to server) -00000000 14 03 03 00 01 01 17 03 03 01 50 ef 68 27 d6 ec |..........P.h'..| -00000010 76 00 e1 c6 ed 3c f6 a1 83 b4 4b 26 28 ba 0f d6 |v....<....K&(...| -00000020 2a fd f0 4a 10 8f 9c ed 84 3f 0a 0e 5b 77 e2 7d |*..J.....?..[w.}| -00000030 1e 03 2a 76 5b 2b 87 78 ad bd 45 8b 03 b3 8d e7 |..*v[+.x..E.....| -00000040 b7 66 ca 5e 36 f8 53 87 90 3c 1a 33 46 1d 32 4f |.f.^6.S..<.3F.2O| -00000050 f1 90 fb 36 da 96 1c 1a db 9f 9b e6 9f 85 f8 13 |...6............| -00000060 7d e1 ab e1 ca c6 05 df 15 ea af dd 55 58 c7 5f |}...........UX._| -00000070 de 62 1b 93 60 a4 fc 39 0a ef 95 bc 0c ca 8f 84 |.b..`..9........| -00000080 98 0a 6d 5b fd c6 0c ad 02 7f 0c f8 b4 be fe 5a |..m[...........Z| -00000090 fb 22 00 08 09 5d c7 47 76 89 e5 06 d1 90 5b e6 |."...].Gv.....[.| -000000a0 63 64 06 28 37 d9 1b e9 0d 27 45 f7 72 30 d7 f2 |cd.(7....'E.r0..| -000000b0 db 8e bf 95 97 29 43 e7 16 bf a0 59 9c fa d9 59 |.....)C....Y...Y| -000000c0 a0 a6 9b 1f b5 74 80 87 d0 61 2f d5 a5 ac dd b2 |.....t...a/.....| -000000d0 8d 27 fc e6 68 eb 07 b3 3d 97 a9 93 5b 35 99 e9 |.'..h...=...[5..| -000000e0 ba 99 fe 49 d6 39 1a 0a 38 98 cd 47 b9 67 9b 9a |...I.9..8..G.g..| -000000f0 77 65 45 f8 48 fb d3 1c 0f a2 2e af e0 29 68 bc |weE.H........)h.| -00000100 81 24 3b 9b 36 0a ef 51 75 ff 61 6a d4 6c 59 42 |.$;.6..Qu.aj.lYB| -00000110 54 31 47 e9 02 9e 58 33 9e 89 65 b6 65 db b2 81 |T1G...X3..e.e...| -00000120 bd c1 f4 0a 34 eb f3 26 f5 8d 36 6d da 78 e6 88 |....4..&..6m.x..| -00000130 00 8f 92 24 dc 76 e3 95 dc 13 b5 92 91 ee c0 82 |...$.v..........| -00000140 cb 63 85 b6 59 67 dc 14 2e 2d 58 8e 56 7e 7c db |.c..Yg...-X.V~|.| -00000150 2f 54 01 ed 17 8d 9a 97 22 39 7f 17 03 03 00 59 |/T......"9.....Y| -00000160 a1 f2 0d 19 e7 d8 a8 6d cd ea f6 82 ee 5d 0a 55 |.......m.....].U| -00000170 22 61 11 21 f7 b0 1d 86 a8 4d c2 e2 9b ac bb 87 |"a.!.....M......| -00000180 a2 82 67 ee 78 76 9b e0 c0 00 85 bf 1e 2b ab e6 |..g.xv.......+..| -00000190 f1 43 79 69 a0 3d 04 b7 d9 7f 31 c7 7a b7 4f 5c |.Cyi.=....1.z.O\| -000001a0 9f 62 84 dc f4 6d a1 ce 3d ff 24 88 15 10 4a e6 |.b...m..=.$...J.| -000001b0 5c 12 68 08 3c 55 a2 a9 d7 17 03 03 00 35 f4 d9 |\.h..z....5=.| +000001c0 94 02 6e 65 f2 98 8d 45 3e d5 af 22 46 f0 70 3e |..ne...E>.."F.p>| +000001d0 d4 90 9c 02 0a f9 8d e6 c7 8f 52 af ab 74 67 12 |..........R..tg.| +000001e0 6d 8e 25 f8 03 73 02 78 5d 9c 8b 38 68 fe e9 96 |m.%..s.x]..8h...| +000001f0 c6 83 29 |..)| >>> Flow 4 (server to client) -00000000 17 03 03 01 c2 80 69 97 9a 20 30 2a 1c f4 31 f9 |......i.. 0*..1.| -00000010 0f cf f7 79 c0 01 e1 f3 35 f5 16 a0 33 d6 eb 21 |...y....5...3..!| -00000020 44 db bc c6 c4 91 6b a6 75 da ca d3 63 78 47 8b |D.....k.u...cxG.| -00000030 96 e5 6f 63 2c 77 c0 33 29 d8 3e ee bf 8e 6b d4 |..oc,w.3).>...k.| -00000040 de f7 1b 0e e6 ae ce cd 17 0d 24 77 10 3d e4 89 |..........$w.=..| -00000050 06 07 a3 77 68 ac 20 ec 0b ae 47 41 3b 80 4e 95 |...wh. ...GA;.N.| -00000060 02 aa 13 36 19 03 06 1c 47 b3 f7 f0 4b 6d 5a c6 |...6....G...KmZ.| -00000070 42 14 95 03 20 c7 46 96 42 d3 18 5a 40 bd a1 03 |B... .F.B..Z@...| -00000080 b6 d2 8b f9 ff 2d d1 b1 3c 8a 34 af 23 64 31 7d |.....-..<.4.#d1}| -00000090 46 47 21 b4 82 16 df a2 a4 0f 96 03 4b 38 3d 5d |FG!.........K8=]| -000000a0 d0 d1 78 d1 6e 6a a2 95 c0 a7 e6 ee 07 eb 77 68 |..x.nj........wh| -000000b0 35 78 72 3e df d9 4b e9 1b ab 34 99 2d fe 52 99 |5xr>..K...4.-.R.| -000000c0 6e 57 63 13 39 ae 5e ce b6 43 21 07 fd fe b7 6d |nWc.9.^..C!....m| -000000d0 8f 72 a4 f8 7e 0a 56 60 61 d5 5a d4 01 b3 47 8e |.r..~.V`a.Z...G.| -000000e0 f0 48 cd 85 61 a3 d2 d1 eb ba 04 39 6b 5e 5f fc |.H..a......9k^_.| -000000f0 e3 90 c1 cb 3f 40 30 00 5c 94 df bf 5b 89 6d ab |....?@0.\...[.m.| -00000100 15 1e 72 50 ac 56 ee 16 7d 84 4c e6 0c 89 68 fa |..rP.V..}.L...h.| -00000110 d5 8d 5f 09 85 25 5f 8c 70 df 0b b7 94 15 40 20 |.._..%_.p.....@ | -00000120 b1 ff 41 50 5d 9f c6 8a 9b 7f 40 6f dc bd 4f 54 |..AP].....@o..OT| -00000130 d8 1f e6 f1 44 00 11 97 45 ca 80 bc 15 eb 93 01 |....D...E.......| -00000140 dd 54 c6 75 7e 08 b9 38 f5 4d 97 c5 50 56 97 3c |.T.u~..8.M..PV.<| -00000150 3c 72 9a 33 7c 68 b1 73 2b 38 c7 b8 a8 3c 5d af |.....6....[..z| -00000170 f5 74 8d ac a4 0f 38 34 ee cd 08 50 e0 33 b0 e1 |.t....84...P.3..| -00000180 52 e1 5d f2 7d c6 7b 64 c7 46 f6 9e d0 a2 cf 89 |R.].}.{d.F......| -00000190 3c c9 ab 2f fb 8a f3 ba 78 e9 4c c5 2d 62 32 6b |<../....x.L.-b2k| -000001a0 50 4c a0 7e d3 bb 2a 66 57 99 38 69 e8 77 ef 18 |PL.~..*fW.8i.w..| -000001b0 24 af b3 cb e5 c0 37 a2 97 f6 00 d4 68 8a 71 af |$.....7.....h.q.| -000001c0 24 a4 ab 19 07 3b c0 17 03 03 00 1e 60 b4 fc 15 |$....;......`...| -000001d0 f9 9c b1 a1 60 1a ba f5 1b b9 c1 33 f1 8b e5 c0 |....`......3....| -000001e0 48 77 4f 11 42 21 ad 8c d2 d6 17 03 03 00 13 5c |HwO.B!.........\| -000001f0 db 07 5e 65 40 58 74 a4 7f ab 5f cc f0 9a 91 0c |..^e@Xt..._.....| -00000200 17 3d |.=| +00000000 17 03 03 01 c2 48 66 ba b6 48 e4 d9 1a 73 81 09 |.....Hf..H...s..| +00000010 cc 26 f8 2b bd 70 e7 15 c7 29 ac 30 58 21 ee 0c |.&.+.p...).0X!..| +00000020 9b c6 f0 b2 85 23 20 1a 7b ad ce fc 5f b6 ce aa |.....# .{..._...| +00000030 af a3 40 52 bf b3 3f 3d 61 a9 14 d1 eb 3c 21 78 |..@R..?=a......J.........| +00000170 fb ff 37 ce b7 5a 75 34 91 35 de 45 a2 36 71 05 |..7..Zu4.5.E.6q.| +00000180 20 65 d3 e4 fa 48 00 c1 25 3f f2 98 e8 0f 32 2a | e...H..%?....2*| +00000190 ee c5 60 f6 83 25 40 91 f6 13 0b fe 26 a9 f1 4c |..`..%@.....&..L| +000001a0 67 0d e8 c9 25 7e f5 f3 e3 ca 34 c3 e7 0e 4b e1 |g...%~....4...K.| +000001b0 c8 f4 40 94 69 88 a2 81 75 02 7d 6d d4 6a b3 c3 |..@.i...u.}m.j..| +000001c0 61 84 17 29 2a e9 90 17 03 03 00 1e 43 69 c6 7c |a..)*.......Ci.|| +000001d0 1a fa 1a cf bf 78 54 c0 8f b7 8d 83 d8 74 f9 54 |.....xT......t.T| +000001e0 6a 62 2f b1 68 63 69 b7 46 2e 17 03 03 00 13 08 |jb/.hci.F.......| +000001f0 49 af 4e 5f f1 e1 8a 7d 20 4e 55 2b 86 4f 03 a0 |I.N_...} NU+.O..| +00000200 d2 b5 |..| diff --git a/src/crypto/tls/testdata/Server-TLSv13-ClientAuthRequestedAndGiven b/src/crypto/tls/testdata/Server-TLSv13-ClientAuthRequestedAndGiven index 8ba88ebf3f..2a608bda26 100644 --- a/src/crypto/tls/testdata/Server-TLSv13-ClientAuthRequestedAndGiven +++ b/src/crypto/tls/testdata/Server-TLSv13-ClientAuthRequestedAndGiven @@ -1,177 +1,180 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 ca 01 00 00 c6 03 03 56 2e 3c 64 35 |...........V.>> Flow 2 (server to client) 00000000 16 03 03 00 7a 02 00 00 76 03 03 00 00 00 00 00 |....z...v.......| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00000020 00 00 00 00 00 00 00 00 00 00 00 20 7c d3 26 20 |........... |.& | -00000030 a0 dc e9 7a 07 71 02 2d 3b 27 85 16 fb 6e 26 e5 |...z.q.-;'...n&.| -00000040 c3 67 e5 0b bd e5 50 8f bd 39 6f 2c 13 01 00 00 |.g....P..9o,....| +00000020 00 00 00 00 00 00 00 00 00 00 00 20 b9 21 2b 29 |........... .!+)| +00000030 79 05 38 92 c6 fe 41 fa be d7 98 08 0a e4 12 b7 |y.8...A.........| +00000040 7a ea 10 5a 0d 1a f2 b4 81 5d 9d 01 13 01 00 00 |z..Z.....]......| 00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 2f |..+.....3.$... /| 00000060 e5 7d a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 |.}.G.bC.(.._.).0| 00000070 ff f6 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 14 |.........._X.;t.| -00000080 03 03 00 01 01 17 03 03 00 17 43 8e 41 a4 04 13 |..........C.A...| -00000090 01 08 9f 6e 1a fd 00 68 38 5c 93 d9 9a f7 1e 36 |...n...h8\.....6| -000000a0 ea 17 03 03 00 3e 9f ae 80 ef f4 20 66 e7 44 fc |.....>..... f.D.| -000000b0 4d a4 3f 0e dc bb 33 47 0f 13 96 fa 03 07 d6 6f |M.?...3G.......o| -000000c0 cc 9f 3c fd 01 f5 87 d9 ec c9 d0 fc dd bf c8 5c |..<............\| -000000d0 0b 3d aa a7 c6 1d 90 18 d9 a1 1a a0 a1 ea 49 32 |.=............I2| -000000e0 9e 45 86 f7 17 03 03 02 6d 61 29 fe 45 7e 5c b3 |.E......ma).E~\.| -000000f0 8a 73 f2 65 c1 90 4e 93 0d 84 b2 bd e4 46 93 c2 |.s.e..N......F..| -00000100 52 3f 07 38 e7 23 db 25 5e 71 98 a9 7d fd e9 ef |R?.8.#.%^q..}...| -00000110 3f 2c d8 9c ae 41 c4 d3 c7 9e d5 6e f0 0c 33 78 |?,...A.....n..3x| -00000120 98 cf bf 22 3d 1f d0 f3 c8 a2 34 e8 ce 5e 0d 37 |..."=.....4..^.7| -00000130 52 e2 b8 e3 50 ea 35 3e e5 59 a0 6d ed 9e 09 36 |R...P.5>.Y.m...6| -00000140 59 20 33 08 a9 41 f4 72 aa 2d 0c b5 d6 96 d9 04 |Y 3..A.r.-......| -00000150 1a f1 d8 45 ed 67 ab f9 15 fa 25 ef 6d 87 72 ad |...E.g....%.m.r.| -00000160 f0 06 59 a5 8e 61 80 8b 28 f9 a0 df 5b b2 a2 3a |..Y..a..(...[..:| -00000170 1c 91 43 18 f4 a2 f3 4e db dc 24 1b c3 0e 77 22 |..C....N..$...w"| -00000180 83 ae 88 9f 8e 8d 48 38 f4 60 51 42 fa f2 a4 de |......H8.`QB....| -00000190 33 78 35 d0 b6 01 3d 7a f5 54 68 51 fd 0e 4c 9b |3x5...=z.ThQ..L.| -000001a0 92 7c a5 01 96 52 7e de 38 b9 b0 ee 60 1e aa eb |.|...R~.8...`...| -000001b0 8c e6 b4 f4 7c 35 d2 0b 9b 83 94 ac ac ce 7e 58 |....|5........~X| -000001c0 51 6e c3 ae 3b cd f5 85 8a 1e 43 78 19 ee dc a1 |Qn..;.....Cx....| -000001d0 a3 d0 93 24 0d 3b 6a 4b cd dc 78 9c 0b 2f bc 41 |...$.;jK..x../.A| -000001e0 46 2f 64 3c 23 95 04 8b 60 75 bf 4d 45 3b e4 1e |F/d<#...`u.ME;..| -000001f0 9c 5b 1a 46 bb f3 4d a9 1b 59 33 b4 40 78 bd ff |.[.F..M..Y3.@x..| -00000200 30 7d d4 cc 5e 83 03 de 8d a3 a6 27 b4 bc 12 6e |0}..^......'...n| -00000210 5e f2 88 e8 b6 60 f3 01 e8 4a 53 c7 a9 fc a1 cc |^....`...JS.....| -00000220 27 45 c1 06 90 38 9a fb 1b 2a 9e ed 9e f6 19 85 |'E...8...*......| -00000230 dd f7 8a 7f 95 08 3a 25 c0 5b 63 96 44 71 c2 16 |......:%.[c.Dq..| -00000240 9c e1 10 69 e5 6a 5c 4a e8 2a ed 6f bd de f5 98 |...i.j\J.*.o....| -00000250 c0 a0 c5 54 7c cc 06 11 b2 54 1a c3 b4 46 c2 b4 |...T|....T...F..| -00000260 97 d8 9c 7d f1 f3 d4 6f 3c a0 ef 18 c5 a6 e9 13 |...}...o<.......| -00000270 e9 f4 9d bf 9b 25 a2 da c6 ba 7a 6d 91 fd 41 a4 |.....%....zm..A.| -00000280 e8 88 e3 79 2c 99 df 4d 21 48 89 57 5a bf 2a 2d |...y,..M!H.WZ.*-| -00000290 72 4e 1e 3a e8 c9 82 7b c0 ff 6b 7c e8 8f 41 bf |rN.:...{..k|..A.| -000002a0 83 19 9e 96 d1 3f 2b 60 8f 7f 0b f8 6c 70 82 dd |.....?+`....lp..| -000002b0 34 da 91 62 17 20 e9 99 2e e2 a9 9a 9d fd 5d f8 |4..b. ........].| -000002c0 a5 c0 ac e8 a3 df 11 b5 df 2c bd e1 e8 0f 7e 0a |.........,....~.| -000002d0 f2 47 4c 92 33 7b 6b 49 e5 30 31 8b 2e 16 81 3e |.GL.3{kI.01....>| -000002e0 79 25 f7 d7 d2 8f 5e e6 e3 2d ed 0d e1 08 97 13 |y%....^..-......| -000002f0 f3 ce 7d b1 36 0d 7c b0 4f 23 6b 12 ef 3a a4 8b |..}.6.|.O#k..:..| -00000300 b5 d0 c9 ee 48 77 70 28 61 ff ad 49 f6 48 4c 37 |....Hwp(a..I.HL7| -00000310 7b 00 c4 01 5d 8b 54 bc 44 5c 5f 98 6f 7d 84 84 |{...].T.D\_.o}..| -00000320 c8 d0 55 88 f9 17 f6 02 f1 84 b6 3c 1a 03 e8 7b |..U........<...{| -00000330 b9 4e 24 c6 d8 0a f6 8c b9 49 c6 10 38 53 e1 10 |.N$......I..8S..| -00000340 8f 91 cd 39 9a 3a e8 c7 10 f3 c3 91 84 3c 8c a6 |...9.:.......<..| -00000350 55 ab f4 f5 ab e7 17 03 03 00 99 e5 40 f6 35 34 |U...........@.54| -00000360 2d 42 3e 7f e1 51 26 56 50 4e 60 b0 2f 65 e3 cd |-B>..Q&VPN`./e..| -00000370 c7 08 0e 96 77 08 c7 f6 4f e6 70 90 bc 80 95 e7 |....w...O.p.....| -00000380 b2 df 98 83 94 4d 9e 5c 8a af d3 45 da e9 d7 fa |.....M.\...E....| -00000390 d8 d2 60 f8 b1 06 d9 27 64 45 4d e8 d3 07 8a bb |..`....'dEM.....| -000003a0 72 7a c6 71 00 7e 8b b0 2b 7d d0 f7 ab 1a bf d2 |rz.q.~..+}......| -000003b0 50 be a9 3a 0c 68 b8 48 9a 91 ee db 26 4d d3 66 |P..:.h.H....&M.f| -000003c0 5b 00 ef c3 cc b8 f2 4e 1e 51 c7 9b 34 3c e3 01 |[......N.Q..4<..| -000003d0 7f 75 4e 41 e4 56 34 ec 14 92 0f 1e 6d dd 51 9a |.uNA.V4.....m.Q.| -000003e0 e0 8b 33 54 df 77 1f ff d3 72 67 4c 62 16 b7 f8 |..3T.w...rgLb...| -000003f0 4f 8f f8 ee 17 03 03 00 35 b7 83 d2 27 a3 15 f2 |O.......5...'...| -00000400 75 55 aa 06 8c 5f c4 fa 0f 43 88 c9 c5 e3 c7 36 |uU..._...C.....6| -00000410 40 6b 35 0b 7e 60 a1 1e 48 ef 46 2c d6 e4 48 80 |@k5.~`..H.F,..H.| -00000420 91 b0 e5 3b c0 58 5d fe 5d bd 0a 6c 19 ea |...;.X].]..l..| +00000080 03 03 00 01 01 17 03 03 00 17 4d 00 8b d1 bc 63 |..........M....c| +00000090 c3 8c af c4 0f 2e 36 78 8d 2b 52 32 f6 2c 29 0e |......6x.+R2.,).| +000000a0 17 17 03 03 00 52 aa 37 4e 5d 56 9a 8d 72 e7 77 |.....R.7N]V..r.w| +000000b0 f1 b7 0c 0b be 7d 63 92 58 0f 09 d7 a0 36 12 75 |.....}c.X....6.u| +000000c0 c9 0d ec d8 44 b4 8f ad dd a1 84 58 3f 0a 7c 47 |....D......X?.|G| +000000d0 0b c1 6f 56 7a 90 bf 82 6d 29 22 8b b3 50 03 ea |..oVz...m)"..P..| +000000e0 18 96 5e f5 1b f0 67 7d 10 c8 3f a4 f5 44 84 b3 |..^...g}..?..D..| +000000f0 f3 af 3e f2 b3 93 a1 57 17 03 03 02 6d 54 0a b5 |..>....W....mT..| +00000100 be 3f e0 77 de 6f e3 d7 83 60 2e 17 94 77 fb e1 |.?.w.o...`...w..| +00000110 11 e8 8d 22 1a 7b ac 36 94 35 d5 29 e5 fa 9e 07 |...".{.6.5.)....| +00000120 62 87 34 f8 b4 c5 ae d5 ee 84 76 c8 fd 30 cf a8 |b.4.......v..0..| +00000130 b1 a4 fe 42 12 e1 36 80 05 76 e2 d2 04 2b 6e c7 |...B..6..v...+n.| +00000140 0d 7d dc 99 de 3d 62 41 2f 3c c2 78 22 ec 6f 37 |.}...=bA/<.x".o7| +00000150 ab 0d 03 22 fe fc f4 82 41 49 44 fd 0a 02 4a 79 |..."....AID...Jy| +00000160 bd 5b 40 63 46 58 cd 84 b6 cf 46 c3 31 68 38 2a |.[@cFX....F.1h8*| +00000170 cf e0 3f ee de 06 ee de f8 e8 3e 37 ab 92 a6 9b |..?.......>7....| +00000180 0a f3 a8 64 6a 81 86 5d ed e3 a2 8c d0 0f 09 1e |...dj..]........| +00000190 ba e9 b0 6f 6b 1e 32 be 03 de 97 81 e0 42 ad 6e |...ok.2......B.n| +000001a0 f6 af bd 12 7a 2f f4 41 63 c4 f4 6a 61 8c e5 d4 |....z/.Ac..ja...| +000001b0 60 99 f2 d5 92 54 2f 28 ee 3f 9b ab fa c1 51 9b |`....T/(.?....Q.| +000001c0 f5 6b d1 d6 6d b1 17 28 95 5f 3c cc e4 41 bf 9b |.k..m..(._<..A..| +000001d0 c5 6e 29 4b 39 f8 ad b0 fe 51 4c 2b 92 76 ce 22 |.n)K9....QL+.v."| +000001e0 ee 5c 9e ad 0e 50 12 3d 2a a0 7a 6d a1 63 18 f7 |.\...P.=*.zm.c..| +000001f0 f2 a0 2a b7 b6 c9 f3 60 54 47 a8 90 dd 90 7d c3 |..*....`TG....}.| +00000200 6e f8 58 1c 28 e7 21 b4 52 33 da 67 67 2b b1 51 |n.X.(.!.R3.gg+.Q| +00000210 b0 41 97 a3 1f 9b cd c8 28 63 c9 f5 e5 d1 a3 3f |.A......(c.....?| +00000220 ac 1c 39 2e 72 1b e5 16 4d 8c b1 6b 4c 35 07 e9 |..9.r...M..kL5..| +00000230 24 a4 98 fb 67 75 4b 76 b7 2d cc 35 d9 a4 db 74 |$...guKv.-.5...t| +00000240 96 56 96 e0 74 8e f9 4a 45 19 30 57 a0 22 27 a9 |.V..t..JE.0W."'.| +00000250 d9 34 d7 73 f0 16 87 e5 be 8e b3 d2 53 f2 9c 19 |.4.s........S...| +00000260 c1 0a df 07 e7 e8 30 fb 44 ac 34 13 2b 22 4c a2 |......0.D.4.+"L.| +00000270 00 da 45 fc 95 1f 83 a0 c9 fa b3 b9 16 95 83 0f |..E.............| +00000280 a9 fa ae 2f b7 bc a1 55 d2 ab 2d 31 af 39 c2 82 |.../...U..-1.9..| +00000290 f7 bf 9a 9a 5c e6 61 d7 f2 9c d0 b5 53 85 58 cf |....\.a.....S.X.| +000002a0 9d 2e 50 eb 46 a1 a4 a0 aa c4 44 66 f7 61 41 0f |..P.F.....Df.aA.| +000002b0 75 68 36 76 11 7d 1e d7 be 0f a4 7a a8 bb 9e 26 |uh6v.}.....z...&| +000002c0 a9 7b ea 30 14 51 37 78 58 2a 92 e2 2c d3 9e 27 |.{.0.Q7xX*..,..'| +000002d0 86 92 83 a0 bc e8 50 ed da 9c 06 f4 d8 3c d5 6c |......P......<.l| +000002e0 a5 3a cc 1a ce 00 55 30 20 74 ad 17 5c bd 98 2d |.:....U0 t..\..-| +000002f0 1f 11 e7 38 99 2d b4 fc 1c 42 c9 ae f1 af 46 3e |...8.-...B....F>| +00000300 67 13 d2 31 16 34 fd e9 26 7c dd bb a0 25 10 7d |g..1.4..&|...%.}| +00000310 ca 94 20 6a b9 10 b7 94 0d 26 31 46 f2 bf 45 a8 |.. j.....&1F..E.| +00000320 ed 8f 08 15 7d db dd 3a ad 45 9f bd 32 8d ff 80 |....}..:.E..2...| +00000330 c6 1f bf 57 5e a0 dc 74 3c 8a b3 8f 03 ef a1 ef |...W^..t<.......| +00000340 12 65 2c c3 16 4f bc 63 3b 62 ab fa ae 9f d1 84 |.e,..O.c;b......| +00000350 79 80 25 04 bc e0 f9 70 98 e1 8c 15 55 ba cf a3 |y.%....p....U...| +00000360 0a 24 64 8c 3a b2 b7 a8 04 c1 17 03 03 00 99 c0 |.$d.:...........| +00000370 87 16 ce 52 d1 e9 83 f3 46 02 91 89 a1 6d 24 17 |...R....F....m$.| +00000380 dc 6a 05 bb c2 fb bd 93 94 05 60 8c 6c 47 f6 4a |.j........`.lG.J| +00000390 d8 ad 42 99 8b 77 92 91 f3 58 1e 10 3b 59 b1 19 |..B..w...X..;Y..| +000003a0 55 2c 3b f2 5b f3 e5 67 b2 e1 9c a8 68 dd 0e b9 |U,;.[..g....h...| +000003b0 67 c4 61 63 b3 bc 15 7b d6 76 7d 44 42 46 57 96 |g.ac...{.v}DBFW.| +000003c0 b3 10 40 39 2b 8c d5 fa cf a0 32 c0 d5 1a aa 96 |..@9+.....2.....| +000003d0 95 3b d5 55 fe 06 d2 34 31 7c 29 95 86 ac 7e f5 |.;.U...41|)...~.| +000003e0 e6 6b 7d a6 b5 52 37 2d 02 56 b8 12 66 33 67 80 |.k}..R7-.V..f3g.| +000003f0 14 5f 78 b3 a3 bf fc 4f cb 16 82 4e f5 c4 1b a1 |._x....O...N....| +00000400 33 3e 6c ed df 7b 4d 0b 17 03 03 00 35 dd de ca |3>l..{M.....5...| +00000410 4d 9e 09 ba 14 09 72 72 23 9f 3c 7e 2c 46 e5 5e |M.....rr#.<~,F.^| +00000420 50 a2 21 02 f7 03 4b 76 ab 4c a8 0b a2 b3 9b 7a |P.!...Kv.L.....z| +00000430 fc b9 5d a2 ac 0b c3 55 15 b8 b8 23 2b 61 46 00 |..]....U...#+aF.| +00000440 1c 5c |.\| >>> Flow 3 (client to server) -00000000 14 03 03 00 01 01 17 03 03 02 11 9e 9e cf 44 84 |..............D.| -00000010 df e7 23 47 2d 4e 85 fa f2 02 2a 79 4d 3a 3d df |..#G-N....*yM:=.| -00000020 48 95 2e d7 0d 3c d0 05 fc bf bb 23 0a 25 59 76 |H....<.....#.%Yv| -00000030 fd 04 f8 f0 81 88 85 9f 99 f0 55 91 9a 79 8a 39 |..........U..y.9| -00000040 f4 6e 49 92 be ed 1d d1 20 19 77 bc 55 9b b0 da |.nI..... .w.U...| -00000050 d1 c4 9f b5 2f 5c 1a 60 38 e1 92 9b f9 a1 97 6b |..../\.`8......k| -00000060 1b d0 d0 d0 05 7a 41 26 d4 6b 12 a0 b3 c6 33 13 |.....zA&.k....3.| -00000070 4f 74 10 d6 91 fb b0 69 46 46 ca de 7c 05 d6 62 |Ot.....iFF..|..b| -00000080 51 23 12 58 00 ff 25 8e c8 5f 54 85 f4 2f e9 f9 |Q#.X..%.._T../..| -00000090 f1 1e 32 b9 f1 a6 fb 90 9b a9 65 d2 c9 ea a7 1a |..2.......e.....| -000000a0 e8 c9 a8 bb 7e 3d 3f 03 62 fc f4 06 a4 a2 f7 41 |....~=?.b......A| -000000b0 60 f5 f1 df 3e d6 31 51 f4 dc b1 d3 60 4b 84 4f |`...>.1Q....`K.O| -000000c0 99 e2 9f b2 f0 d5 fd b2 f3 5c 24 5f 91 a6 94 cd |.........\$_....| -000000d0 37 61 91 4e cc ae cd c1 b5 cc 58 5f 9a 91 a1 13 |7a.N......X_....| -000000e0 23 42 8a c5 27 4c 66 32 69 9c 75 9f 2a ed 73 1d |#B..'Lf2i.u.*.s.| -000000f0 29 2e 36 50 34 b4 80 d2 08 e6 9f c6 3e da df 9f |).6P4.......>...| -00000100 e0 2a 08 88 47 b6 d3 ff f7 6c 6c 91 1a 8e 53 89 |.*..G....ll...S.| -00000110 53 6c b8 d7 83 37 ab 03 59 e6 4f 41 42 af d4 f9 |Sl...7..Y.OAB...| -00000120 ac 9d ae d1 77 f1 71 79 a0 16 c4 c7 b5 a6 a9 9f |....w.qy........| -00000130 59 da 55 fb c5 88 8c 13 04 c2 06 39 8f ae 7e ca |Y.U........9..~.| -00000140 99 ce cd aa 86 0a 00 bd 56 f1 98 d9 c8 d2 c1 c0 |........V.......| -00000150 df 16 c2 6f 78 da 66 3f cc 43 c7 38 33 1b 3b 5b |...ox.f?.C.83.;[| -00000160 f8 7e d8 b7 ef 4c 6d c7 f6 84 56 8d 76 f7 0d 83 |.~...Lm...V.v...| -00000170 94 e6 ad c5 f3 05 5c f4 17 69 d5 83 98 c3 43 8e |......\..i....C.| -00000180 9f a5 5c 7b 12 ea f4 1f 39 ce 0d 83 15 b1 e6 ce |..\{....9.......| -00000190 c1 35 9b 8c ec c6 d2 d7 f9 02 36 90 24 f4 3a 70 |.5........6.$.:p| -000001a0 ce bb 8d bb 4b b2 aa 64 f0 b5 c0 88 cc 06 e3 9c |....K..d........| -000001b0 f7 70 64 fd 5d 48 f5 c8 07 48 c2 09 c4 07 56 b9 |.pd.]H...H....V.| -000001c0 86 e9 d6 7b dc ac a5 00 2c 1d 80 8f 47 f2 c4 c7 |...{....,...G...| -000001d0 ab dc 7b 41 7b 3d 47 db 09 12 02 9f 1b 63 e7 cc |..{A{=G......c..| -000001e0 38 1d 33 56 e0 ae 63 7a 95 73 5f e6 da 13 53 49 |8.3V..cz.s_...SI| -000001f0 5f 69 e9 ff 86 26 bd 9a dd be 5c 75 e7 69 66 b4 |_i...&....\u.if.| -00000200 27 3f 79 d2 2e 8e 79 9e 89 42 58 20 a2 ca 8c 2a |'?y...y..BX ...*| -00000210 37 b8 99 81 66 3a 31 66 1a 95 4c 47 17 03 03 00 |7...f:1f..LG....| -00000220 99 66 08 07 06 6d 95 fe f1 72 2a 7c de 84 06 b0 |.f...m...r*|....| -00000230 3d d7 d1 6b 47 0e 4d fb 9e ab 55 f7 71 c5 5d 11 |=..kG.M...U.q.].| -00000240 cb c7 fb 45 90 9d 22 eb ec 03 d6 ce 8c 01 ff 81 |...E..".........| -00000250 a2 90 23 1d 7a f3 cb 16 76 a5 05 57 77 f6 af f0 |..#.z...v..Ww...| -00000260 29 6c 6c 39 9e 99 55 c0 38 c3 31 68 49 b3 bf cc |)ll9..U.8.1hI...| -00000270 31 e2 6d a4 4c e7 99 53 2f 31 3f 05 2c 7c 1b 10 |1.m.L..S/1?.,|..| -00000280 60 ce 8b 60 47 16 eb e5 8b be 1b 7a 95 b9 3c 60 |`..`G......z..<`| -00000290 1c d6 b5 13 5f ad b9 bb 13 dd d6 08 8e 70 cb 2a |...._........p.*| -000002a0 26 3e df ce 7c 21 e5 27 7e 27 ec 75 b6 47 a0 89 |&>..|!.'~'.u.G..| -000002b0 2e e1 3c ab 0d 72 90 d1 d5 07 17 03 03 00 35 82 |..<..r........5.| -000002c0 6b 48 4a 9a 63 16 07 8f b2 d3 4a 65 7d e0 c4 e8 |kHJ.c.....Je}...| -000002d0 27 3e ce 4a 0a c8 63 e0 f9 70 98 c0 6a 12 39 ec |'>.J..c..p..j.9.| -000002e0 e1 52 de 73 58 2d f0 7c bc 8d 41 16 be 89 a0 88 |.R.sX-.|..A.....| -000002f0 56 e5 ef f6 |V...| +00000000 14 03 03 00 01 01 17 03 03 02 11 79 f8 bd a7 4e |...........y...N| +00000010 90 84 77 6f d1 a8 95 67 b7 0b e2 7a 4e 16 e9 ca |..wo...g...zN...| +00000020 1c f3 31 df a8 0e 99 02 c0 09 68 de 6a bb c2 bd |..1.......h.j...| +00000030 19 10 30 65 e6 5d d1 43 e2 aa 81 ba ea 3d 30 9a |..0e.].C.....=0.| +00000040 bb a8 66 ef 91 d1 1d 4c cd 93 97 19 f5 b7 52 1f |..f....L......R.| +00000050 c3 4b f8 dd 2f 39 53 54 68 06 dd 90 c1 75 57 9a |.K../9STh....uW.| +00000060 d6 9d c5 79 36 f9 5e bc c6 9b b8 bd 3d 14 40 71 |...y6.^.....=.@q| +00000070 a8 db 5c a8 d0 28 f3 a6 c1 37 29 c1 38 3f a3 51 |..\..(...7).8?.Q| +00000080 29 5c 01 eb 5c 7e c7 09 e6 2b fd 48 6f 53 77 25 |)\..\~...+.HoSw%| +00000090 c8 55 bb fd 68 21 a4 f0 f8 0e 52 41 97 81 20 78 |.U..h!....RA.. x| +000000a0 5e b8 77 3e 4e 6c 0a b1 32 98 2e d4 58 dd 64 fa |^.w>Nl..2...X.d.| +000000b0 8a 3e ba ea 79 67 c1 01 97 d2 5c d6 09 81 57 b0 |.>..yg....\...W.| +000000c0 fa c3 b8 3d 91 ee 7e 06 47 a8 3e 7b 59 74 14 44 |...=..~.G.>{Yt.D| +000000d0 29 28 29 1f 52 00 b8 31 4f ae 60 d5 18 72 fb a7 |)().R..1O.`..r..| +000000e0 21 0f 79 73 d8 e2 5c 6b b7 aa 78 53 f0 83 b5 ec |!.ys..\k..xS....| +000000f0 89 fc d0 fd 84 2e f6 3b 65 1d ac fe e8 75 10 f6 |.......;e....u..| +00000100 52 01 7f 5a 67 6d 1c 1d 82 4d eb 9d 2f fa 54 4e |R..Zgm...M../.TN| +00000110 0f 05 c8 d0 c3 50 6b cb 15 f0 27 5e 1d 15 b4 60 |.....Pk...'^...`| +00000120 85 bc b0 0e 54 3a 10 54 f9 4c 43 db 57 74 96 4b |....T:.T.LC.Wt.K| +00000130 12 1c c8 1b 4c b7 d6 44 e7 df 95 9b 1d 28 cc d0 |....L..D.....(..| +00000140 20 a5 9f 28 5d da 20 1a 46 42 1c b5 88 81 6b 3e | ..(]. .FB....k>| +00000150 0f 7b 37 5f b8 8e e5 b8 57 3c e7 03 6f 4f be 83 |.{7_....W<..oO..| +00000160 5a 3a a9 46 c6 e9 42 68 4f 10 38 bc ba 4d 67 7b |Z:.F..BhO.8..Mg{| +00000170 19 9a b0 bd ce 9a 8f 21 ff eb 82 59 a6 2f 0a 0f |.......!...Y./..| +00000180 b2 eb 76 c0 e2 dc 3f f4 3b c5 26 d3 7e 8c ed c3 |..v...?.;.&.~...| +00000190 5d 0f 80 56 a0 07 76 88 4c ab 04 3c aa 8a 44 65 |]..V..v.L..<..De| +000001a0 a7 5a 7b 31 29 5f 41 b8 12 c0 c0 f1 cd 95 08 0e |.Z{1)_A.........| +000001b0 f7 89 a0 af 91 e6 52 14 5a 2b 39 c5 c6 4e b7 72 |......R.Z+9..N.r| +000001c0 93 e2 a7 6f 00 b4 57 9b 20 e4 90 b9 57 f0 67 40 |...o..W. ...W.g@| +000001d0 e3 87 7d f6 6b f6 87 91 7f f6 3b 99 f2 93 b3 35 |..}.k.....;....5| +000001e0 e7 d4 fe 7c 1c b7 08 4a 00 de 7c 6c 85 df 2d 37 |...|...J..|l..-7| +000001f0 3b 69 62 18 c6 f9 e0 e3 6e 1d 30 cd 35 7d 83 5c |;ib.....n.0.5}.\| +00000200 1d 0c d8 61 df 4b f3 20 77 81 b1 9e 5f 84 79 44 |...a.K. w..._.yD| +00000210 93 b6 30 60 2d 76 4e 6d 4d 18 3a 21 17 03 03 00 |..0`-vNmM.:!....| +00000220 99 30 99 a3 ff 5c 70 58 5a d7 f0 ec 97 a0 d9 b8 |.0...\pXZ.......| +00000230 9e 98 08 f6 ec 87 48 3b c6 46 c2 45 c4 29 ab 08 |......H;.F.E.)..| +00000240 f2 ee 94 4d 89 c9 19 b4 0d b0 f6 df f7 a5 8d 4b |...M...........K| +00000250 2f 53 62 b8 ee 4c 8a cf 81 be fb 7e 16 2f ec f3 |/Sb..L.....~./..| +00000260 03 49 18 93 dc d3 53 67 fc a2 03 f8 f6 ab 26 87 |.I....Sg......&.| +00000270 92 32 7c 06 1a 12 14 29 cf a2 43 e4 36 04 2c ad |.2|....)..C.6.,.| +00000280 68 ea 5f 5a d2 83 81 d7 96 7d 8c 2e 9a 98 14 56 |h._Z.....}.....V| +00000290 a7 a3 23 69 d5 fd 21 9e 2f 81 43 2b 8a ad 2e c9 |..#i..!./.C+....| +000002a0 50 a8 a5 5c 28 b3 a0 62 c0 95 78 92 f7 3b 7b c0 |P..\(..b..x..;{.| +000002b0 1c a9 29 c4 34 28 39 c4 0b ef 17 03 03 00 35 8d |..).4(9.......5.| +000002c0 35 f3 1d 55 34 aa 92 ff 8f e6 2e c2 9b 2f c6 c8 |5..U4......../..| +000002d0 29 69 66 08 db fb 6f b5 22 4e bf 62 35 43 6c 72 |)if...o."N.b5Clr| +000002e0 c6 2a c4 57 8c a9 42 2c b8 5e 82 25 b2 92 aa 82 |.*.W..B,.^.%....| +000002f0 77 5f a4 1f 17 03 03 00 13 cc 12 01 75 9c 9f d3 |w_..........u...| +00000300 3f 17 17 a8 b8 8b b3 ae dc f6 08 34 |?..........4| >>> Flow 4 (server to client) -00000000 17 03 03 02 83 ce c4 10 39 1a fe 62 a2 ff 27 6d |........9..b..'m| -00000010 b7 e3 1d d6 8e b8 a2 7e f5 30 87 35 16 41 fb 04 |.......~.0.5.A..| -00000020 3c 79 9e 02 9b 06 4c a7 ba 01 5b cf 94 bc c8 08 |.| -00000050 58 7d fe c1 e3 78 79 31 48 d2 74 c0 8d 17 97 6f |X}...xy1H.t....o| -00000060 30 bb 8a 2c 8c d4 76 3d 3f f0 20 24 3d 5a 21 0c |0..,..v=?. $=Z!.| -00000070 37 7b 14 45 e6 69 db ed 52 50 a0 77 e9 a2 84 59 |7{.E.i..RP.w...Y| -00000080 0c 96 c1 ad 48 ed 8d 9f 00 4d f2 15 86 71 c0 fa |....H....M...q..| -00000090 14 b9 77 cb 9f 04 d9 1b be da 68 8e 31 8f 25 14 |..w.......h.1.%.| -000000a0 f5 43 bd e5 6e c5 10 ab f7 68 22 7f c2 ba 5c a6 |.C..n....h"...\.| -000000b0 88 31 c0 a5 fb 63 05 95 52 b3 04 94 14 fe eb 0c |.1...c..R.......| -000000c0 53 a0 c2 bf ae 58 e3 f9 84 22 6b ca 95 33 12 80 |S....X..."k..3..| -000000d0 09 e2 97 b0 2b 4b ed fa 34 e1 5a b1 de 52 b1 2c |....+K..4.Z..R.,| -000000e0 a0 aa 11 d6 fa 07 e1 41 ed 36 9f 9a 1a 56 18 b0 |.......A.6...V..| -000000f0 ef e7 85 dc 5b 53 23 56 c2 ac 34 64 c8 9d 4b 49 |....[S#V..4d..KI| -00000100 6d 29 7e 4b 73 4f 0b 8e 30 86 87 ea cf 1c dd 62 |m)~KsO..0......b| -00000110 c0 a4 96 aa fe 41 e7 25 94 8e 08 b5 4d 42 26 d3 |.....A.%....MB&.| -00000120 ba 84 98 bf 27 2b d5 3d 37 b9 b1 b5 24 33 e3 4d |....'+.=7...$3.M| -00000130 3f 05 38 54 fe 2c 15 63 20 2e 70 c0 c6 da 0e 89 |?.8T.,.c .p.....| -00000140 b6 99 07 db e3 7c 3e 58 d0 a3 2b 50 c4 f3 21 92 |.....|>X..+P..!.| -00000150 62 e0 e9 b5 d4 7a 6b 23 a2 05 ef 9c f5 f5 05 57 |b....zk#.......W| -00000160 cd d4 4d 0a 2f 17 ca ac fc 9d 7e 60 ec 3c 80 8c |..M./.....~`.<..| -00000170 1f 99 da b7 f6 14 7a e1 86 76 50 8d f8 6b 92 24 |......z..vP..k.$| -00000180 f2 b7 82 fa 3c 9b 14 af 0f 37 40 ae 7f 10 f5 0a |....<....7@.....| -00000190 f2 0f 0f bd 01 b7 0a f7 b6 d0 7f cf bf e6 67 55 |..............gU| -000001a0 cc 36 af a6 d8 c4 ca 80 c7 af 35 ff 6e 83 56 30 |.6........5.n.V0| -000001b0 62 26 49 bb 1a 04 8b 39 10 7b 0f 09 19 2b 0f 95 |b&I....9.{...+..| -000001c0 08 9d c8 85 3b 5d 8c 97 16 ae cd 92 00 d5 3e 50 |....;]........>P| -000001d0 54 66 85 8f 42 9b 60 3d f8 99 ca c7 07 3b 51 18 |Tf..B.`=.....;Q.| -000001e0 d5 20 37 57 35 0a d8 c6 13 0f 48 94 8f 50 7d 0e |. 7W5.....H..P}.| -000001f0 5a f0 98 b2 5d 5f 46 fb ba 85 c8 4f ba 02 19 86 |Z...]_F....O....| -00000200 0b ef 4a 04 49 1f 06 cd be dc d5 32 74 14 d8 60 |..J.I......2t..`| -00000210 17 a5 b5 a2 70 8e b1 75 29 bc e0 02 e0 a2 1c 7b |....p..u)......{| -00000220 58 cd 96 69 84 0f 95 7b 78 3e 09 72 a6 e0 50 7e |X..i...{x>.r..P~| -00000230 76 b0 7b 44 11 9b b8 7e 7d 09 49 91 75 5b 9b 6f |v.{D...~}.I.u[.o| -00000240 42 a4 e6 54 4d c6 21 65 c4 64 7d c6 29 74 13 8d |B..TM.!e.d}.)t..| -00000250 69 5f 20 8c f1 88 e8 1e 2d c3 13 d5 f5 52 70 24 |i_ .....-....Rp$| -00000260 de ec 64 c7 00 3f 57 e2 3f c4 23 fe e9 65 e6 d9 |..d..?W.?.#..e..| -00000270 92 ae f0 2f 05 4d 01 72 be 0d 7d c0 f4 30 ac 69 |.../.M.r..}..0.i| -00000280 3c 7c c1 72 c1 b7 c4 c9 17 03 03 00 1e 73 8f 48 |<|.r.........s.H| -00000290 cf 34 35 31 9b 63 59 59 1b 23 e1 6b b2 3a 0f df |.451.cYY.#.k.:..| -000002a0 21 69 8e 73 1a 61 09 5b 82 c7 78 17 03 03 00 13 |!i.s.a.[..x.....| -000002b0 4f a0 ab 25 3f a4 85 9e 78 58 69 d2 2c c3 b6 df |O..%?...xXi.,...| -000002c0 32 4a 7f |2J.| +00000000 17 03 03 02 83 63 68 c7 ae a5 c2 03 56 49 d3 13 |.....ch.....VI..| +00000010 45 f0 de 02 20 70 1a cb a5 cc 6f fa 0e 4b 28 65 |E... p....o..K(e| +00000020 4f 6d 76 2e b0 61 cf fe be 43 82 02 44 06 e4 1e |Omv..a...C..D...| +00000030 91 0c 64 1b 0e 58 53 c0 15 84 e8 6a 23 64 a1 cb |..d..XS....j#d..| +00000040 cd af e6 98 c1 c2 10 23 2b dd 54 9c ff d8 11 af |.......#+.T.....| +00000050 41 0c 88 7b 77 5c 12 47 7e f9 61 97 d6 f4 65 a7 |A..{w\.G~.a...e.| +00000060 5e 9c 06 0e 8a 96 5a 4c 60 f9 ce fb 52 a6 61 44 |^.....ZL`...R.aD| +00000070 7a d1 41 54 10 51 b6 26 d4 18 fb 37 75 55 7f 18 |z.AT.Q.&...7uU..| +00000080 10 39 ea b1 f7 d5 8f 3a a4 e8 d8 be f5 2f c2 90 |.9.....:...../..| +00000090 1a dd bc d7 50 b7 0e 7e c8 71 88 8f a0 04 34 2d |....P..~.q....4-| +000000a0 6f 35 f5 3f 43 08 1d 28 c7 30 db 8e c0 6c cd 14 |o5.?C..(.0...l..| +000000b0 93 10 fc b4 58 43 92 6d a3 3c 2e 87 71 12 70 c5 |....XC.m.<..q.p.| +000000c0 ec f8 64 5a 28 ee 3c 67 05 f4 00 f8 16 11 a6 49 |..dZ(.`3e.^_.| +00000110 7b 16 78 d9 8d 2a 92 16 62 02 fc 27 ee 72 f4 2e |{.x..*..b..'.r..| +00000120 86 11 32 55 a2 9b b7 d3 3a 3b 87 be 28 8f 30 e7 |..2U....:;..(.0.| +00000130 c7 ca 34 51 e5 3b 96 55 c1 d2 b2 b1 4e 84 85 0c |..4Q.;.U....N...| +00000140 df d9 25 3e 29 b8 56 4a 32 b7 45 1a b3 05 c1 d6 |..%>).VJ2.E.....| +00000150 ca ac 13 74 59 b6 0d 03 14 f2 fa b7 05 c4 2f da |...tY........./.| +00000160 11 65 a4 89 06 c6 fd 2b 10 3c 13 3d 92 d5 6a 1c |.e.....+.<.=..j.| +00000170 c5 01 10 b5 1a 3d a0 a5 ea ef 11 74 8b 68 24 20 |.....=.....t.h$ | +00000180 04 58 68 e4 e3 69 b7 12 03 f1 4c dd 78 65 04 58 |.Xh..i....L.xe.X| +00000190 d9 85 45 39 d2 74 18 f7 5c b4 59 fc 08 fb e0 49 |..E9.t..\.Y....I| +000001a0 c6 73 e0 0d 18 05 6a 84 95 03 11 ad 73 1d 45 d3 |.s....j.....s.E.| +000001b0 d7 66 c9 14 14 f4 ed 39 a6 b2 bd 81 ac 23 c0 d9 |.f.....9.....#..| +000001c0 ba 6a 82 16 75 2f c1 31 4f 83 25 ce 87 fb 23 97 |.j..u/.1O.%...#.| +000001d0 a0 0d 7c c8 2d 35 ce a6 e8 76 65 cb 72 cc 95 fc |..|.-5...ve.r...| +000001e0 8c 65 eb f7 74 7f a6 fc 1e 03 05 cd dc 56 8d 3c |.e..t........V.<| +000001f0 09 0b 74 48 24 72 19 07 c0 c4 a3 32 28 15 33 45 |..tH$r.....2(.3E| +00000200 ef c6 02 f2 8d bf 39 a9 b9 41 bd 99 77 be 36 67 |......9..A..w.6g| +00000210 0e eb 62 2b fa cd c9 6e b8 59 d8 f9 2b dd 09 1e |..b+...n.Y..+...| +00000220 4c 4a 90 e5 d4 4c 54 10 b9 f1 e3 5a 88 4b 3f 30 |LJ...LT....Z.K?0| +00000230 c9 7c d5 be e5 b0 44 4f bb 41 7a 83 e2 47 0c 73 |.|....DO.Az..G.s| +00000240 28 b9 f2 c0 6c 28 0c 3c 3a cd 34 92 5c 13 f8 15 |(...l(.<:.4.\...| +00000250 88 5b 02 fa 65 fd 1c b9 c0 cc 78 17 37 cc 53 50 |.[..e.....x.7.SP| +00000260 0f 53 5e a0 fa 08 48 93 c2 4e 7d c1 f9 bb f7 6a |.S^...H..N}....j| +00000270 e0 0e 8b 14 1a 64 60 b6 67 3a 07 68 13 20 e1 8a |.....d`.g:.h. ..| +00000280 f2 7b 0d 25 c6 11 2f 9e 17 03 03 00 1e 1e a5 9c |.{.%../.........| +00000290 f5 56 23 e2 91 d8 e1 fd da 88 04 24 b5 66 79 06 |.V#........$.fy.| +000002a0 b2 3d e8 95 60 e1 86 2d 34 f4 c8 17 03 03 00 13 |.=..`..-4.......| +000002b0 2a c7 60 04 0d 2f b5 d7 d2 c2 f9 15 bf 26 d7 84 |*.`../.......&..| +000002c0 05 98 ee |...| diff --git a/src/crypto/tls/testdata/Server-TLSv13-ClientAuthRequestedNotGiven b/src/crypto/tls/testdata/Server-TLSv13-ClientAuthRequestedNotGiven index b839c95879..7a06770a57 100644 --- a/src/crypto/tls/testdata/Server-TLSv13-ClientAuthRequestedNotGiven +++ b/src/crypto/tls/testdata/Server-TLSv13-ClientAuthRequestedNotGiven @@ -1,103 +1,105 @@ >>> Flow 1 (client to server) -00000000 16 03 01 00 ca 01 00 00 c6 03 03 4a ea 7e 77 82 |...........J.~w.| -00000010 17 37 46 db 49 14 d2 41 e4 14 b0 46 20 9d 50 45 |.7F.I..A...F .PE| -00000020 d1 75 08 82 2b 8d bc 9a 75 e3 71 20 ce 77 9a 79 |.u..+...u.q .w.y| -00000030 98 24 bc 15 be ac 30 fe 66 35 ab 51 be bd b4 fa |.$....0.f5.Q....| -00000040 6f 53 1f e9 5f 54 58 75 ce 94 f9 47 00 04 13 01 |oS.._TXu...G....| +00000000 16 03 01 00 ca 01 00 00 c6 03 03 00 69 af 00 d0 |............i...| +00000010 54 e8 0e 25 4c 62 db 87 e1 af 15 9e cf 14 ac b6 |T..%Lb..........| +00000020 ce 8c 5a 65 99 f3 c0 48 2e b6 00 20 c4 bf 7a 0b |..Ze...H... ..z.| +00000030 d8 da 4f 37 b8 12 7c ff 2e 1e ac 80 d4 32 77 0f |..O7..|......2w.| +00000040 92 8c b4 76 53 57 ba 7d bb 15 78 c8 00 04 13 01 |...vSW.}..x.....| 00000050 00 ff 01 00 00 79 00 0b 00 04 03 00 01 02 00 0a |.....y..........| 00000060 00 0c 00 0a 00 1d 00 17 00 1e 00 19 00 18 00 16 |................| 00000070 00 00 00 17 00 00 00 0d 00 1e 00 1c 04 03 05 03 |................| 00000080 06 03 08 07 08 08 08 09 08 0a 08 0b 08 04 08 05 |................| 00000090 08 06 04 01 05 01 06 01 00 2b 00 03 02 03 04 00 |.........+......| -000000a0 2d 00 02 01 01 00 33 00 26 00 24 00 1d 00 20 e0 |-.....3.&.$... .| -000000b0 64 7e 58 b6 e7 32 fc c9 d6 3e f7 e0 f5 6a 9c 3a |d~X..2...>...j.:| -000000c0 e6 8f 83 d7 1c 27 62 72 71 06 71 de 49 96 05 |.....'brq.q.I..| +000000a0 2d 00 02 01 01 00 33 00 26 00 24 00 1d 00 20 30 |-.....3.&.$... 0| +000000b0 a0 2a f8 e2 67 08 84 a8 c9 fc f8 de 0e fb 3c 0c |.*..g.........<.| +000000c0 59 10 2d 50 e9 cc d4 32 5c 86 e2 6e 0d ba 03 |Y.-P...2\..n...| >>> Flow 2 (server to client) 00000000 16 03 03 00 7a 02 00 00 76 03 03 00 00 00 00 00 |....z...v.......| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00000020 00 00 00 00 00 00 00 00 00 00 00 20 ce 77 9a 79 |........... .w.y| -00000030 98 24 bc 15 be ac 30 fe 66 35 ab 51 be bd b4 fa |.$....0.f5.Q....| -00000040 6f 53 1f e9 5f 54 58 75 ce 94 f9 47 13 01 00 00 |oS.._TXu...G....| +00000020 00 00 00 00 00 00 00 00 00 00 00 20 c4 bf 7a 0b |........... ..z.| +00000030 d8 da 4f 37 b8 12 7c ff 2e 1e ac 80 d4 32 77 0f |..O7..|......2w.| +00000040 92 8c b4 76 53 57 ba 7d bb 15 78 c8 13 01 00 00 |...vSW.}..x.....| 00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 2f |..+.....3.$... /| 00000060 e5 7d a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 |.}.G.bC.(.._.).0| 00000070 ff f6 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 14 |.........._X.;t.| -00000080 03 03 00 01 01 17 03 03 00 17 d0 8f 0a 7e 6c 33 |.............~l3| -00000090 0b be 2a 24 0e fc af df 6e 7d ad 22 28 82 77 60 |..*$....n}."(.w`| -000000a0 3d 17 03 03 00 3e 8f 87 8f f1 5a f6 6f eb eb d9 |=....>....Z.o...| -000000b0 da aa fc 3c 6d ac 73 94 a3 13 5f fe 01 bb 75 eb |........| -000001f0 50 76 d6 79 39 e8 25 bc 3b d9 5a a4 a8 5e 08 6a |Pv.y9.%.;.Z..^.j| -00000200 1c 48 b1 11 f0 d9 b9 48 39 e1 23 db 41 8c bf bd |.H.....H9.#.A...| -00000210 20 27 7b 0c 89 10 1f b0 ae 70 18 9a 7f f2 b4 1d | '{......p......| -00000220 20 cd 6d 80 38 00 a4 33 de 22 ef f6 42 52 c7 66 | .m.8..3."..BR.f| -00000230 83 4a 67 18 6b a6 38 27 d3 40 cf a2 a9 3e 58 06 |.Jg.k.8'.@...>X.| -00000240 91 a7 36 08 29 10 4d 8f 1b f9 7c 5a 17 05 81 b9 |..6.).M...|Z....| -00000250 4b 60 48 40 49 73 63 8a ef 9f f2 9e 80 85 57 fa |K`H@Isc.......W.| -00000260 0a b8 72 83 f3 26 fa 07 ae d2 47 99 b5 a6 5d c5 |..r..&....G...].| -00000270 1e b5 fc ea 0f 17 f8 ba e2 5c 7d 59 70 53 2e 23 |.........\}YpS.#| -00000280 f7 55 75 cb de 82 dc ca b1 bf 3f 5f 7d 7d 92 3c |.Uu.......?_}}.<| -00000290 29 29 64 30 74 0a 01 0b c0 95 db 45 fe 20 be 38 |))d0t......E. .8| -000002a0 c5 87 b7 e4 a9 93 63 67 6b 9a 2f 24 9e 62 8f 1d |......cgk./$.b..| -000002b0 bd 8c 4a d4 b0 0f 95 2f 56 b2 1c e8 5a 58 81 2e |..J..../V...ZX..| -000002c0 b5 b5 b5 f2 1b 7f 6c 39 58 75 51 dc 83 2a 59 0b |......l9XuQ..*Y.| -000002d0 78 5e 22 7e af ee 59 af b9 8f dc 65 97 af a5 b5 |x^"~..Y....e....| -000002e0 b8 50 af 35 51 30 e7 0a 75 e2 d0 33 e2 fb f4 b1 |.P.5Q0..u..3....| -000002f0 99 cd 5f 72 6b a9 f8 85 a1 a5 19 7e 2b 91 01 19 |.._rk......~+...| -00000300 09 dd 88 6e a7 d6 54 57 cd ef d0 97 6a 68 d9 6e |...n..TW....jh.n| -00000310 52 38 ef a5 fa 84 63 70 f0 6d 64 ec 66 1a c9 b5 |R8....cp.md.f...| -00000320 78 ba 17 74 f4 b4 2b a2 fe 9a 7f 38 b8 5e 8b 56 |x..t..+....8.^.V| -00000330 a6 7b 2c 92 7f db 58 c8 fa f9 2d 6b 00 25 dc 0a |.{,...X...-k.%..| -00000340 aa 13 e8 40 f3 fd 47 23 f6 bf 1c 30 fc 91 18 95 |...@..G#...0....| -00000350 ac a8 82 3d f5 ef 17 03 03 00 99 7e 30 4f f1 00 |...=.......~0O..| -00000360 1e dd eb c6 54 d2 f5 f7 21 aa 6b b0 83 0c fa 8b |....T...!.k.....| -00000370 12 af ac 15 3e 54 b6 1c 85 9b 0c 80 02 d8 e3 5f |....>T........._| -00000380 36 57 64 fe 7a b8 31 d0 aa 59 f1 e6 af e0 27 c5 |6Wd.z.1..Y....'.| -00000390 b8 d8 2f ab e0 cc c3 02 18 73 30 36 b5 2a 0d 12 |../......s06.*..| -000003a0 a4 45 e6 c3 79 9f 54 cb 51 61 1a b8 aa 87 45 43 |.E..y.T.Qa....EC| -000003b0 8e 93 58 66 f2 97 cb 3b 44 df ae 93 17 de 22 99 |..Xf...;D.....".| -000003c0 3c b4 9d 21 a6 db 03 ce 7b fb 67 b9 6e fb ab 50 |<..!....{.g.n..P| -000003d0 f8 33 9f 20 a0 fb e9 54 bb 62 16 19 d6 df 8c fe |.3. ...T.b......| -000003e0 3d 63 42 7c b0 72 2b 0d 87 1e f7 7d bb 59 ba f5 |=cB|.r+....}.Y..| -000003f0 d6 e8 f3 57 17 03 03 00 35 9e 6f 39 92 2e 32 10 |...W....5.o9..2.| -00000400 03 cd f0 28 2c 1a 32 77 19 c8 39 38 60 0c 28 b7 |...(,.2w..98`.(.| -00000410 8c 3a d8 50 a1 44 e4 d6 c5 64 59 88 2d a4 23 c9 |.:.P.D...dY.-.#.| -00000420 26 d1 96 0c c9 5d da 84 3e 8a 7d fe 80 77 |&....]..>.}..w| +00000080 03 03 00 01 01 17 03 03 00 17 47 a8 92 ce cd bb |..........G.....| +00000090 b5 b2 f6 47 50 c3 e7 c4 44 59 20 07 13 9a ca 98 |...GP...DY .....| +000000a0 f5 17 03 03 00 52 b6 9d 37 b2 ed bf 53 10 e2 28 |.....R..7...S..(| +000000b0 09 25 e5 f1 f8 6d 10 99 f8 b0 b8 1d cd 5c 82 ff |.%...m.......\..| +000000c0 de fd 9d 8e 89 94 2e 7a 7f ed 30 80 7e f0 e5 ef |.......z..0.~...| +000000d0 13 06 7b cf 8f 91 c9 38 e0 77 52 80 0d 74 a2 28 |..{....8.wR..t.(| +000000e0 a7 73 cd 06 df c4 7e 04 ad 6e e3 44 04 86 98 95 |.s....~..n.D....| +000000f0 b7 2d 76 99 3e 8b cd 7c 17 03 03 02 6d cb e5 77 |.-v.>..|....m..w| +00000100 58 3e c2 74 44 db 85 f8 54 12 02 89 8d 2b 8d 24 |X>.tD...T....+.$| +00000110 2a c0 db 71 25 b8 23 a1 86 1a 09 66 8e 60 b9 58 |*..q%.#....f.`.X| +00000120 40 0f 72 34 95 e2 6b 7c 76 8a 85 e5 dd cd be 0a |@.r4..k|v.......| +00000130 1f a3 13 42 aa 58 d7 95 0a 69 fc 60 5a 4d 17 db |...B.X...i.`ZM..| +00000140 19 59 d3 86 04 3e c2 1b 93 76 68 27 53 ae 07 af |.Y...>...vh'S...| +00000150 47 4e e6 03 b8 fe 8e c5 06 f1 84 54 0c e5 24 be |GN.........T..$.| +00000160 83 43 1f da 1e 3e 7e a3 2f 2f 4d bc cd e5 a5 b5 |.C...>~.//M.....| +00000170 5d 66 e1 2a 9b 1e 76 6c be e7 9d f7 ed c5 1b e9 |]f.*..vl........| +00000180 91 39 18 30 22 b5 d8 71 66 4d 62 b8 6f 94 7f 5f |.9.0"..qfMb.o.._| +00000190 84 77 a2 b5 79 02 a1 44 6a 5c d2 39 c2 95 d6 8e |.w..y..Dj\.9....| +000001a0 49 36 91 97 2e 02 59 47 e8 fa 78 b9 a7 0e 41 f2 |I6....YG..x...A.| +000001b0 df 92 44 7b 59 8f 9c e9 c8 1b 0a 15 cf 1a fe 5a |..D{Y..........Z| +000001c0 b2 5a 9d 9c b2 0b 1e 48 03 a9 2b 73 df 9f dd b2 |.Z.....H..+s....| +000001d0 30 d1 ba bd 46 e6 50 30 ed e3 c5 f7 d8 96 d5 cc |0...F.P0........| +000001e0 d2 3a 39 3b f0 a1 f2 8e 29 c4 be e9 ee af cb 7b |.:9;....)......{| +000001f0 f6 7d c3 be 4e 20 6e 63 21 50 d5 34 9a b4 9c 7f |.}..N nc!P.4....| +00000200 95 22 15 e3 ad 12 c8 6a 9c 68 a3 c1 35 c1 e1 fa |.".....j.h..5...| +00000210 ce 15 ef 12 b5 50 5b d3 56 8a 24 b0 61 ca 67 1d |.....P[.V.$.a.g.| +00000220 60 12 b3 4b 42 6a 3d ba ef 80 b1 b9 74 cf ba e0 |`..KBj=.....t...| +00000230 95 5f 1a b9 c6 24 d7 c5 ec 96 3f 6c e8 13 39 66 |._...$....?l..9f| +00000240 da e6 49 39 dc ca bc 2a 50 10 cf 51 fe d0 eb 80 |..I9...*P..Q....| +00000250 9c 21 dc 9d ae 10 31 d6 9c 9b ac 3e d6 84 36 e6 |.!....1....>..6.| +00000260 76 a1 d2 86 2a a0 2b d8 91 ba c3 f0 17 f7 7a 69 |v...*.+.......zi| +00000270 0d d3 14 6f ca ba 33 d2 d0 2e 85 a9 d7 dc d2 4a |...o..3........J| +00000280 dc bf 88 68 73 4f b1 35 e0 36 3b ed bd f6 37 0b |...hsO.5.6;...7.| +00000290 07 32 a1 96 81 29 63 e1 38 4d 52 7c 5a d0 4c 6c |.2...)c.8MR|Z.Ll| +000002a0 dd 65 83 75 1d 9e bc e4 c8 e7 75 13 5f 71 11 87 |.e.u......u._q..| +000002b0 ea 4b f3 ee d2 fd 38 2a 88 a6 35 e4 a8 63 77 0e |.K....8*..5..cw.| +000002c0 5f 57 ac a6 a2 e7 43 3c 79 1a 2d c9 1d 5f 65 22 |_W....C.K.5.| +000003c0 29 1d 3e ba a0 91 22 0a 8a aa a3 f8 9b eb 77 fe |).>...".......w.| +000003d0 19 ac 2e a7 29 ab 8f 61 91 af 09 b1 3b b3 4b 69 |....)..a....;.Ki| +000003e0 e6 96 a3 05 46 db 28 9b 1d d0 79 71 3d 93 4e 66 |....F.(...yq=.Nf| +000003f0 5d f4 22 38 91 a1 30 c5 c3 b7 72 fa e6 91 d8 a4 |]."8..0...r.....| +00000400 e9 a0 47 cc 5a 87 5e 60 17 03 03 00 35 ce b7 6e |..G.Z.^`....5..n| +00000410 2c 11 dc d4 b8 e1 a4 4b d8 d6 09 1e fe e3 d3 d3 |,......K........| +00000420 52 be fc cc af 5d 73 45 db 1e 05 b6 b1 38 59 65 |R....]sE.....8Ye| +00000430 df 72 6d 7b af b5 7a 3d e1 8a 27 44 6e 72 25 04 |.rm{..z=..'Dnr%.| +00000440 7c 61 ||a| >>> Flow 3 (client to server) -00000000 14 03 03 00 01 01 17 03 03 00 19 87 49 99 a6 d9 |............I...| -00000010 ed cd f7 7a 75 14 e1 26 41 d2 6e 5c 79 a6 be 7c |...zu..&A.n\y..|| -00000020 5d 9d 44 36 17 03 03 00 35 1b 51 a9 b1 ce 11 ed |].D6....5.Q.....| -00000030 95 47 34 b9 3d 2f 6e 27 b2 e5 31 54 7f e3 8a 11 |.G4.=/n'..1T....| -00000040 fd 54 75 2c b6 8a 56 25 00 29 a7 5f 7a 1e 16 be |.Tu,..V%.)._z...| -00000050 16 e3 86 3a 72 84 0e bc 40 ef fd ad 18 33 |...:r...@....3| +00000000 14 03 03 00 01 01 17 03 03 00 19 01 ab 91 41 25 |..............A%| +00000010 d3 52 97 b2 f8 4e 57 9d c5 d3 7d 34 c4 c3 44 93 |.R...NW...}4..D.| +00000020 79 a5 0c fe 17 03 03 00 35 ba 56 09 d8 9d 73 5e |y.......5.V...s^| +00000030 f4 f4 03 4d bf f7 e4 ab cc 83 26 28 cc 68 78 91 |...M......&(.hx.| +00000040 9f 6f f6 dc d5 34 e5 a5 e6 86 11 b3 71 89 70 25 |.o...4......q.p%| +00000050 8c 83 79 b7 c8 56 92 1d 98 c7 35 cd bb 56 |..y..V....5..V| >>> Flow 4 (server to client) -00000000 17 03 03 00 8b 69 2e 81 c4 4d 43 a6 1f 96 b7 8e |.....i...MC.....| -00000010 87 4a 9b be 48 3c 31 18 98 f4 8c 04 24 b2 52 96 |.J..H<1.....$.R.| -00000020 04 b5 12 7c 54 37 83 6d 51 42 c6 52 f4 a5 bc d3 |...|T7.mQB.R....| -00000030 d1 c8 29 ab 4f e4 02 da 74 ec 8e 13 ad 03 f3 e0 |..).O...t.......| -00000040 7f 44 58 6b c7 28 a5 6a 75 30 b8 b1 31 38 fe ba |.DXk.(.ju0..18..| -00000050 e7 27 ae b3 e7 cb 5e 78 24 82 03 61 ba ae dd 4c |.'....^x$..a...L| -00000060 c6 7b f3 45 cf 6f a8 dc 7d 5d 73 65 db ae dc 10 |.{.E.o..}]se....| -00000070 ff 32 dc 4c b4 5e dc ce 4c 34 37 83 a0 0c d5 20 |.2.L.^..L47.... | -00000080 f1 f6 81 42 bc 63 65 47 80 d0 d6 f3 08 aa e2 58 |...B.ceG.......X| -00000090 17 03 03 00 1e 85 84 f3 e4 0f a8 24 c0 fe fa 2c |...........$...,| -000000a0 8b 60 52 32 73 2b 95 e9 37 3d 1c bd 2f ee ff e2 |.`R2s+..7=../...| -000000b0 70 13 df 17 03 03 00 13 65 2b 11 5f 50 7c 11 eb |p.......e+._P|..| -000000c0 3b 06 75 23 28 13 ca 4a b5 fb dc |;.u#(..J...| +00000000 17 03 03 00 8b eb fd 9e 19 36 7f 54 7f 9f 5a 6b |.........6.T..Zk| +00000010 31 0e e8 ca f3 40 7d 74 0d 82 6f 97 41 fb 15 52 |1....@}t..o.A..R| +00000020 36 00 50 c3 c5 36 ea e3 8f ca 02 b1 de ed 61 8e |6.P..6........a.| +00000030 60 0a d8 cf 0a 7c 47 60 87 3f fa 00 6f 74 a8 42 |`....|G`.?..ot.B| +00000040 c1 8d df f7 4d 7c ac c0 52 7c c9 21 5c 45 32 3f |....M|..R|.!\E2?| +00000050 42 0d 75 64 76 93 18 29 a1 50 06 36 94 bb 1e 52 |B.udv..).P.6...R| +00000060 31 5b b7 32 9a b1 9f 59 30 8a da ff 93 4f c1 b3 |1[.2...Y0....O..| +00000070 e9 8d f2 ec 4a 7b 01 51 5e a2 9b ea 8d a8 53 bd |....J{.Q^.....S.| +00000080 db 94 88 73 3b 9f da 77 a8 de 11 55 7b 06 0f c6 |...s;..w...U{...| +00000090 17 03 03 00 1e 1b 76 21 ea fd a4 47 6e ec 6e 26 |......v!...Gn.n&| +000000a0 00 3e fc 2f 87 8f 4e ee 08 58 e7 cc 46 aa b7 8c |.>./..N..X..F...| +000000b0 c1 5d dd 17 03 03 00 13 dd ed 88 b0 f5 e8 17 f1 |.]..............| +000000c0 66 85 c4 f5 6b 47 7d 5f 19 21 7f |f...kG}_.!.| diff --git a/src/crypto/tls/ticket.go b/src/crypto/tls/ticket.go index dbbcef7637..c56898c6f7 100644 --- a/src/crypto/tls/ticket.go +++ b/src/crypto/tls/ticket.go @@ -84,15 +84,14 @@ type SessionState struct { // createdAt is the generation time of the secret on the sever (which for // TLS 1.0–1.2 might be earlier than the current session) and the time at // which the ticket was received on the client. - createdAt uint64 // seconds since UNIX epoch - secret []byte // master secret for TLS 1.2, or the PSK for TLS 1.3 - extMasterSecret bool - peerCertificates []*x509.Certificate - activeCertHandles []*activeCert - ocspResponse []byte - scts [][]byte - verifiedChains [][]*x509.Certificate - alpnProtocol string // only set if EarlyData is true + createdAt uint64 // seconds since UNIX epoch + secret []byte // master secret for TLS 1.2, or the PSK for TLS 1.3 + extMasterSecret bool + peerCertificates []*x509.Certificate + ocspResponse []byte + scts [][]byte + verifiedChains [][]*x509.Certificate + alpnProtocol string // only set if EarlyData is true // Client-side TLS 1.3-only fields. useBy uint64 // seconds since UNIX epoch @@ -239,8 +238,7 @@ func ParseSessionState(data []byte) (*SessionState, error) { if err != nil { return nil, err } - ss.activeCertHandles = append(ss.activeCertHandles, c) - ss.peerCertificates = append(ss.peerCertificates, c.cert) + ss.peerCertificates = append(ss.peerCertificates, c) } if ss.isClient && len(ss.peerCertificates) == 0 { return nil, errors.New("tls: no server certificates in client session") @@ -270,8 +268,7 @@ func ParseSessionState(data []byte) (*SessionState, error) { if err != nil { return nil, err } - ss.activeCertHandles = append(ss.activeCertHandles, c) - chain = append(chain, c.cert) + chain = append(chain, c) } ss.verifiedChains = append(ss.verifiedChains, chain) } @@ -300,18 +297,17 @@ func ParseSessionState(data []byte) (*SessionState, error) { // from the current connection. func (c *Conn) sessionState() *SessionState { return &SessionState{ - version: c.vers, - cipherSuite: c.cipherSuite, - createdAt: uint64(c.config.time().Unix()), - alpnProtocol: c.clientProtocol, - peerCertificates: c.peerCertificates, - activeCertHandles: c.activeCertHandles, - ocspResponse: c.ocspResponse, - scts: c.scts, - isClient: c.isClient, - extMasterSecret: c.extMasterSecret, - verifiedChains: c.verifiedChains, - curveID: c.curveID, + version: c.vers, + cipherSuite: c.cipherSuite, + createdAt: uint64(c.config.time().Unix()), + alpnProtocol: c.clientProtocol, + peerCertificates: c.peerCertificates, + ocspResponse: c.ocspResponse, + scts: c.scts, + isClient: c.isClient, + extMasterSecret: c.extMasterSecret, + verifiedChains: c.verifiedChains, + curveID: c.curveID, } } diff --git a/src/crypto/tls/tls_test.go b/src/crypto/tls/tls_test.go index 4913a3ae5c..bfcc62ccfb 100644 --- a/src/crypto/tls/tls_test.go +++ b/src/crypto/tls/tls_test.go @@ -811,7 +811,7 @@ func TestWarningAlertFlood(t *testing.T) { } func TestCloneFuncFields(t *testing.T) { - const expectedCount = 9 + const expectedCount = 10 called := 0 c1 := Config{ @@ -851,6 +851,10 @@ func TestCloneFuncFields(t *testing.T) { called |= 1 << 8 return nil }, + GetEncryptedClientHelloKeys: func(*ClientHelloInfo) ([]EncryptedClientHelloKey, error) { + called |= 1 << 9 + return nil, nil + }, } c2 := c1.Clone() @@ -864,6 +868,7 @@ func TestCloneFuncFields(t *testing.T) { c2.UnwrapSession(nil, ConnectionState{}) c2.WrapSession(ConnectionState{}, nil) c2.EncryptedClientHelloRejectionVerify(ConnectionState{}) + c2.GetEncryptedClientHelloKeys(nil) if called != (1< math.MaxInt { return false, 0, errors.New("x509: invalid basic constraints") } + maxPathLen = int(mpl) } - // TODO: map out.MaxPathLen to 0 if it has the -1 default value? (Issue 19285) return isCA, maxPathLen, nil } diff --git a/src/crypto/x509/parser_test.go b/src/crypto/x509/parser_test.go index e7c1d87bfa..3b9d9aed82 100644 --- a/src/crypto/x509/parser_test.go +++ b/src/crypto/x509/parser_test.go @@ -208,3 +208,46 @@ func TestParsePolicies(t *testing.T) { }) } } + +func TestParseCertificateNegativeMaxPathLength(t *testing.T) { + certs := []string{ + // Certificate with MaxPathLen set to -1. + ` +-----BEGIN CERTIFICATE----- +MIIByTCCATKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDEwRURVNU +MB4XDTcwMDEwMTAwMTY0MFoXDTcwMDEwMjAzNDY0MFowDzENMAsGA1UEAxMEVEVT +VDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAsaHglFuSicTT8TKfipgsSi3N +Wb/TcvuAhanFF1VGB+vS95kO7yFqyfRgX3GgOwT0KlJVsVjPjghEGR9RGTSLqkTD +UFbiBgm8+VEPMOrUtIHIHXhl+ye44AkOEStxfz7gjN/EAS2h8ffPKhvDTHOlShKw +Y3LQlxR0LdeJXq3eSqUCAwEAAaM1MDMwEgYDVR0TAQH/BAgwBgEB/wIB/zAdBgNV +HQ4EFgQUrbrk0tqQAEsce8uYifP0BIVhuFAwDQYJKoZIhvcNAQELBQADgYEAIkhV +ZBj1ThT+eyh50XsoU570NUysTg3Nj/3lbkEolzdcE+wu0CPXvgxLRM6Y62u1ey82 +8d5VQHstzF4dXgc3W+O9UySa+CKdcHx/q7o7seOGXdysT0IJtAY3w66mFkuF7PIn +y9b7M5t6pmWjb7N0QqGuWeNqi4ZvS8gLKmVEgGY= +-----END CERTIFICATE----- +`, + // Certificate with MaxPathLen set to -2. + ` +-----BEGIN CERTIFICATE----- +MIIByTCCATKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDEwRURVNU +MB4XDTcwMDEwMTAwMTY0MFoXDTcwMDEwMjAzNDY0MFowDzENMAsGA1UEAxMEVEVT +VDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAsaHglFuSicTT8TKfipgsSi3N +Wb/TcvuAhanFF1VGB+vS95kO7yFqyfRgX3GgOwT0KlJVsVjPjghEGR9RGTSLqkTD +UFbiBgm8+VEPMOrUtIHIHXhl+ye44AkOEStxfz7gjN/EAS2h8ffPKhvDTHOlShKw +Y3LQlxR0LdeJXq3eSqUCAwEAAaM1MDMwEgYDVR0TAQH/BAgwBgEB/wIB/jAdBgNV +HQ4EFgQUrbrk0tqQAEsce8uYifP0BIVhuFAwDQYJKoZIhvcNAQELBQADgYEAGjIr +YGQc7Ods+BuKck7p+vpAMONM8SLEuUtKorCP3ecsO51MoA4/niLbgMHaOGNHwzMp +ajg0zLbY0Dj6Ml0VZ+lS3rjgTEhYXc626eZkoQqgUzL1jhe3S0ZbSxxmHMBKjJFl +d5l1tRhScKu2NBgm74nYmJxJYgvuTA38wGhRrGU= +-----END CERTIFICATE----- +`, + } + + for _, cert := range certs { + b, _ := pem.Decode([]byte(cert)) + _, err := ParseCertificate(b.Bytes) + if err == nil || err.Error() != "x509: invalid basic constraints" { + t.Errorf(`ParseCertificate() = %v; want = "x509: invalid basic constraints"`, err) + } + } +} diff --git a/src/crypto/x509/x509.go b/src/crypto/x509/x509.go index 788b9aca9b..1f06b4fbc5 100644 --- a/src/crypto/x509/x509.go +++ b/src/crypto/x509/x509.go @@ -29,6 +29,7 @@ import ( "crypto/elliptic" "crypto/rsa" "crypto/sha1" + "crypto/sha256" "crypto/x509/pkix" "encoding/asn1" "encoding/pem" @@ -1690,6 +1691,10 @@ func CreateCertificate(rand io.Reader, template, parent *Certificate, pub, priv return nil, errors.New("x509: serial number must be positive") } + if template.BasicConstraintsValid && template.MaxPathLen < -1 { + return nil, errors.New("x509: invalid MaxPathLen, must be greater or equal to -1") + } + if template.BasicConstraintsValid && !template.IsCA && template.MaxPathLen != -1 && (template.MaxPathLen != 0 || template.MaxPathLenZero) { return nil, errors.New("x509: only CAs are allowed to specify MaxPathLen") } @@ -1724,12 +1729,22 @@ func CreateCertificate(rand io.Reader, template, parent *Certificate, pub, priv subjectKeyId := template.SubjectKeyId if len(subjectKeyId) == 0 && template.IsCA { - // SubjectKeyId generated using method 1 in RFC 5280, Section 4.2.1.2: - // (1) The keyIdentifier is composed of the 160-bit SHA-1 hash of the - // value of the BIT STRING subjectPublicKey (excluding the tag, - // length, and number of unused bits). - h := sha1.Sum(publicKeyBytes) - subjectKeyId = h[:] + if x509sha256skid.Value() == "0" { + x509sha256skid.IncNonDefault() + // SubjectKeyId generated using method 1 in RFC 5280, Section 4.2.1.2: + // (1) The keyIdentifier is composed of the 160-bit SHA-1 hash of the + // value of the BIT STRING subjectPublicKey (excluding the tag, + // length, and number of unused bits). + h := sha1.Sum(publicKeyBytes) + subjectKeyId = h[:] + } else { + // SubjectKeyId generated using method 1 in RFC 7093, Section 2: + // 1) The keyIdentifier is composed of the leftmost 160-bits of the + // SHA-256 hash of the value of the BIT STRING subjectPublicKey + // (excluding the tag, length, and number of unused bits). + h := sha256.Sum256(publicKeyBytes) + subjectKeyId = h[:20] + } } // Check that the signer's public key matches the private key, if available. @@ -1777,6 +1792,8 @@ func CreateCertificate(rand io.Reader, template, parent *Certificate, pub, priv }) } +var x509sha256skid = godebug.New("x509sha256skid") + // pemCRLPrefix is the magic string that indicates that we have a PEM encoded // CRL. var pemCRLPrefix = []byte("-----BEGIN X509 CRL") diff --git a/src/crypto/x509/x509_test.go b/src/crypto/x509/x509_test.go index 7c8972eef4..98f3f7941c 100644 --- a/src/crypto/x509/x509_test.go +++ b/src/crypto/x509/x509_test.go @@ -4238,3 +4238,28 @@ func TestMessageSigner(t *testing.T) { t.Fatalf("CheckSignatureFrom failed: %s", err) } } + +func TestCreateCertificateNegativeMaxPathLength(t *testing.T) { + template := Certificate{ + SerialNumber: big.NewInt(1), + Subject: pkix.Name{CommonName: "TEST"}, + NotBefore: time.Unix(1000, 0), + NotAfter: time.Unix(100000, 0), + BasicConstraintsValid: true, + IsCA: true, + + // CreateCertificate treats -1 in the same way as: MaxPathLen == 0 && MaxPathLenZero == false. + MaxPathLen: -1, + } + + _, err := CreateCertificate(rand.Reader, &template, &template, rsaPrivateKey.Public(), rsaPrivateKey) + if err != nil { + t.Fatalf("CreateCertificate() unexpected error: %v", err) + } + + template.MaxPathLen = -2 + _, err = CreateCertificate(rand.Reader, &template, &template, rsaPrivateKey.Public(), rsaPrivateKey) + if err == nil || err.Error() != "x509: invalid MaxPathLen, must be greater or equal to -1" { + t.Fatalf(`CreateCertificate() = %v; want = "x509: invalid MaxPathLen, must be greater or equal to -1"`, err) + } +} diff --git a/src/fmt/fmt_test.go b/src/fmt/fmt_test.go index 82daf62771..86e458ae64 100644 --- a/src/fmt/fmt_test.go +++ b/src/fmt/fmt_test.go @@ -1495,11 +1495,15 @@ var mallocTest = []struct { {1, `Sprintf("%x %x")`, func() { _ = Sprintf("%x %x", 7, 112) }}, {1, `Sprintf("%g")`, func() { _ = Sprintf("%g", float32(3.14159)) }}, {0, `Fprintf(buf, "%s")`, func() { mallocBuf.Reset(); Fprintf(&mallocBuf, "%s", "hello") }}, + {0, `Fprintf(buf, "%s")`, func() { mallocBuf.Reset(); s := "hello"; Fprintf(&mallocBuf, "%s", s) }}, + {1, `Fprintf(buf, "%s")`, func() { mallocBuf.Reset(); s := "hello"; Fprintf(&mallocBuf, "%s", noliteral(s)) }}, {0, `Fprintf(buf, "%x")`, func() { mallocBuf.Reset(); Fprintf(&mallocBuf, "%x", 7) }}, {0, `Fprintf(buf, "%x")`, func() { mallocBuf.Reset(); Fprintf(&mallocBuf, "%x", 1<<16) }}, - {1, `Fprintf(buf, "%x")`, func() { mallocBuf.Reset(); i := 1 << 16; Fprintf(&mallocBuf, "%x", i) }}, // not constant + {0, `Fprintf(buf, "%x")`, func() { mallocBuf.Reset(); i := 1 << 16; Fprintf(&mallocBuf, "%x", i) }}, + {1, `Fprintf(buf, "%x")`, func() { mallocBuf.Reset(); i := 1 << 16; Fprintf(&mallocBuf, "%x", noliteral(i)) }}, {4, `Fprintf(buf, "%v")`, func() { mallocBuf.Reset(); s := []int{1, 2}; Fprintf(&mallocBuf, "%v", s) }}, - {1, `Fprintf(buf, "%v")`, func() { mallocBuf.Reset(); type P struct{ x, y int }; Fprintf(&mallocBuf, "%v", P{1, 2}) }}, + {0, `Fprintf(buf, "%v")`, func() { mallocBuf.Reset(); type P struct{ x, y int }; Fprintf(&mallocBuf, "%v", P{1, 2}) }}, + {1, `Fprintf(buf, "%v")`, func() { mallocBuf.Reset(); type P struct{ x, y int }; Fprintf(&mallocBuf, "%v", noliteral(P{1, 2})) }}, {2, `Fprintf(buf, "%80000s")`, func() { mallocBuf.Reset(); Fprintf(&mallocBuf, "%80000s", "hello") }}, // large buffer (>64KB) // If the interface value doesn't need to allocate, amortized allocation overhead should be zero. {0, `Fprintf(buf, "%x %x %x")`, func() { @@ -1519,8 +1523,8 @@ func TestCountMallocs(t *testing.T) { } for _, mt := range mallocTest { mallocs := testing.AllocsPerRun(100, mt.fn) - if got, max := mallocs, float64(mt.count); got > max { - t.Errorf("%s: got %v allocs, want <=%v", mt.desc, got, max) + if got, max := mallocs, float64(mt.count); got != max { + t.Errorf("%s: got %v allocs, want %v", mt.desc, got, max) } } } @@ -2010,3 +2014,10 @@ func TestAppendln(t *testing.T) { t.Fatalf("Appendln allocated a new slice") } } + +// noliteral prevents escape analysis from recognizing a literal value. +// +//go:noinline +func noliteral[T any](t T) T { + return t +} diff --git a/src/go/build/deps_test.go b/src/go/build/deps_test.go index 3a81f5a8ca..b2668a3d7d 100644 --- a/src/go/build/deps_test.go +++ b/src/go/build/deps_test.go @@ -98,6 +98,7 @@ var depsRules = ` < internal/runtime/math < internal/runtime/maps < internal/runtime/strconv + < internal/runtime/cgroup < runtime < sync/atomic < internal/sync @@ -471,6 +472,7 @@ var depsRules = ` # FIPS is the FIPS 140 module. # It must not depend on external crypto packages. + # Package hash is ok as it's only the interface. # See also fips140deps.AllowedInternalPackages. io, math/rand/v2 < crypto/internal/randutil; @@ -484,7 +486,8 @@ var depsRules = ` internal/cpu, internal/goarch < crypto/internal/fips140deps/cpu; internal/godebug < crypto/internal/fips140deps/godebug; - STR, crypto/internal/impl, + STR, hash, + crypto/internal/impl, crypto/internal/entropy, crypto/internal/randutil, crypto/internal/fips140deps/byteorder, @@ -516,11 +519,9 @@ var depsRules = ` < crypto/internal/fips140/edwards25519 < crypto/internal/fips140/ed25519 < crypto/internal/fips140/rsa - < FIPS; + < FIPS < crypto/fips140; - FIPS, internal/godebug < crypto/fips140; - - crypto, hash !< FIPS; + crypto !< FIPS; # CRYPTO is core crypto algorithms - no cgo, fmt, net. # Mostly wrappers around the FIPS module. @@ -528,7 +529,7 @@ var depsRules = ` NONE < crypto/internal/boring/sig, crypto/internal/boring/syso; sync/atomic < crypto/internal/boring/bcache; - FIPS, internal/godebug, hash, embed, + FIPS, internal/godebug, embed, crypto/internal/boring/sig, crypto/internal/boring/syso, crypto/internal/boring/bcache @@ -794,6 +795,8 @@ var depsRules = ` FMT, compress/gzip, embed, encoding/binary < encoding/json/internal/jsontest; CGO, internal/syscall/unix < net/internal/cgotest; FMT < math/big/internal/asmgen; + + FMT, testing < internal/cgrouptest; ` // listStdPkgs returns the same list of packages as "go list std". diff --git a/src/go/types/stdlib_test.go b/src/go/types/stdlib_test.go index ec76f8ee17..633d7be84d 100644 --- a/src/go/types/stdlib_test.go +++ b/src/go/types/stdlib_test.go @@ -334,6 +334,7 @@ func TestStdFixed(t *testing.T) { "issue49814.go", // go/types does not have constraints on array size "issue56103.go", // anonymous interface cycles; will be a type checker error in 1.22 "issue52697.go", // go/types does not have constraints on stack size + "issue73309.go", // this test requires GODEBUG=gotypesalias=1 // These tests requires runtime/cgo.Incomplete, which is only available on some platforms. // However, go/types does not know about build constraints. diff --git a/src/hash/adler32/adler32.go b/src/hash/adler32/adler32.go index e2551e0952..c6179789ea 100644 --- a/src/hash/adler32/adler32.go +++ b/src/hash/adler32/adler32.go @@ -78,6 +78,11 @@ func (d *digest) UnmarshalBinary(b []byte) error { return nil } +func (d *digest) Clone() (hash.Cloner, error) { + r := *d + return &r, nil +} + // Add p to the running checksum d. func update(d digest, p []byte) digest { s1, s2 := uint32(d&0xffff), uint32(d>>16) diff --git a/src/hash/crc32/crc32.go b/src/hash/crc32/crc32.go index d40bb1b7ac..e58f112319 100644 --- a/src/hash/crc32/crc32.go +++ b/src/hash/crc32/crc32.go @@ -194,6 +194,11 @@ func (d *digest) UnmarshalBinary(b []byte) error { return nil } +func (d *digest) Clone() (hash.Cloner, error) { + r := *d + return &r, nil +} + func update(crc uint32, tab *Table, p []byte, checkInitIEEE bool) uint32 { switch { case haveCastagnoli.Load() && tab == castagnoliTable: diff --git a/src/hash/crc64/crc64.go b/src/hash/crc64/crc64.go index c40c7024b6..1e551ff454 100644 --- a/src/hash/crc64/crc64.go +++ b/src/hash/crc64/crc64.go @@ -133,6 +133,11 @@ func (d *digest) UnmarshalBinary(b []byte) error { return nil } +func (d *digest) Clone() (hash.Cloner, error) { + r := *d + return &r, nil +} + func update(crc uint64, tab *Table, p []byte) uint64 { buildSlicing8TablesOnce() crc = ^crc diff --git a/src/hash/fnv/fnv.go b/src/hash/fnv/fnv.go index 5c4b9b5da8..dd4a77ce1a 100644 --- a/src/hash/fnv/fnv.go +++ b/src/hash/fnv/fnv.go @@ -348,3 +348,33 @@ func (s *sum128a) UnmarshalBinary(b []byte) error { s[1] = byteorder.BEUint64(b[12:]) return nil } + +func (d *sum32) Clone() (hash.Cloner, error) { + r := *d + return &r, nil +} + +func (d *sum32a) Clone() (hash.Cloner, error) { + r := *d + return &r, nil +} + +func (d *sum64) Clone() (hash.Cloner, error) { + r := *d + return &r, nil +} + +func (d *sum64a) Clone() (hash.Cloner, error) { + r := *d + return &r, nil +} + +func (d *sum128) Clone() (hash.Cloner, error) { + r := *d + return &r, nil +} + +func (d *sum128a) Clone() (hash.Cloner, error) { + r := *d + return &r, nil +} diff --git a/src/hash/hash.go b/src/hash/hash.go index 08a0c6764c..af84e7796b 100644 --- a/src/hash/hash.go +++ b/src/hash/hash.go @@ -10,8 +10,8 @@ import "io" // Hash is the common interface implemented by all hash functions. // // Hash implementations in the standard library (e.g. [hash/crc32] and -// [crypto/sha256]) implement the [encoding.BinaryMarshaler], [encoding.BinaryAppender] -// and [encoding.BinaryUnmarshaler] interfaces. Marshaling a hash implementation +// [crypto/sha256]) implement the [encoding.BinaryMarshaler], [encoding.BinaryAppender], +// [encoding.BinaryUnmarshaler] and [Cloner] interfaces. Marshaling a hash implementation // allows its internal state to be saved and used for additional processing // later, without having to re-write the data previously written to the hash. // The hash state may contain portions of the input in its original form, @@ -56,3 +56,35 @@ type Hash64 interface { Hash Sum64() uint64 } + +// A Cloner is a hash function whose state can be cloned. +// +// All [Hash] implementations in the standard library implement this interface, +// unless GOFIPS140=v1.0.0 is set. +// +// If a hash can only determine at runtime if it can be cloned, +// (e.g., if it wraps another hash), it may return [errors.ErrUnsupported]. +type Cloner interface { + Hash + Clone() (Cloner, error) +} + +// XOF (extendable output function) is a hash function with arbitrary or unlimited output length. +type XOF interface { + // Write absorbs more data into the XOF's state. It panics if called + // after Read. + io.Writer + + // Read reads more output from the XOF. It may return io.EOF if there + // is a limit to the XOF output length. + io.Reader + + // Reset resets the XOF to its initial state. + Reset() + + // BlockSize returns the XOF's underlying block size. + // The Write method must be able to accept any amount + // of data, but it may operate more efficiently if all writes + // are a multiple of the block size. + BlockSize() int +} diff --git a/src/hash/maphash/maphash.go b/src/hash/maphash/maphash.go index a8872d72a5..c6f3e62b5d 100644 --- a/src/hash/maphash/maphash.go +++ b/src/hash/maphash/maphash.go @@ -13,8 +13,8 @@ package maphash import ( - "internal/byteorder" - "math" + "hash" + "internal/abi" ) // A Seed is a random value that selects the specific hash function @@ -80,7 +80,7 @@ func String(seed Seed, s string) uint64 { // // The zero Hash is a valid Hash ready to use. // A zero Hash chooses a random seed for itself during -// the first call to a Reset, Write, Seed, or Sum64 method. +// the first call to a Reset, Write, Seed, Clone, or Sum64 method. // For control over the seed, use SetSeed. // // The computed hash values depend only on the initial seed and @@ -281,30 +281,24 @@ func (h *Hash) Size() int { return 8 } // BlockSize returns h's block size. func (h *Hash) BlockSize() int { return len(h.buf) } +// Clone implements [hash.Cloner]. +func (h *Hash) Clone() (hash.Cloner, error) { + h.initSeed() + r := *h + return &r, nil +} + // Comparable returns the hash of comparable value v with the given seed // such that Comparable(s, v1) == Comparable(s, v2) if v1 == v2. // If v != v, then the resulting hash is randomly distributed. func Comparable[T comparable](seed Seed, v T) uint64 { - escapeForHash(v) + abi.EscapeNonString(v) return comparableHash(v, seed) } -// escapeForHash forces v to be on the heap, if v contains a -// non-string pointer. We cannot hash pointers to local variables, -// as the address of the local variable might change on stack growth. -// Strings are okay as the hash depends on only the content, not -// the pointer. -// -// This is essentially -// -// if hasNonStringPointers(T) { abi.Escape(v) } -// -// Implemented as a compiler intrinsic. -func escapeForHash[T comparable](v T) { panic("intrinsic") } - // WriteComparable adds x to the data hashed by h. func WriteComparable[T comparable](h *Hash, x T) { - escapeForHash(x) + abi.EscapeNonString(x) // writeComparable (not in purego mode) directly operates on h.state // without using h.buf. Mix in the buffer length so it won't // commute with a buffered write, which either changes h.n or changes @@ -314,25 +308,3 @@ func WriteComparable[T comparable](h *Hash, x T) { } writeComparable(h, x) } - -func (h *Hash) float64(f float64) { - if f == 0 { - h.WriteByte(0) - return - } - var buf [8]byte - if f != f { - byteorder.LEPutUint64(buf[:], randUint64()) - h.Write(buf[:]) - return - } - byteorder.LEPutUint64(buf[:], math.Float64bits(f)) - h.Write(buf[:]) -} - -func btoi(b bool) byte { - if b { - return 1 - } - return 0 -} diff --git a/src/hash/maphash/maphash_purego.go b/src/hash/maphash/maphash_purego.go index 07b5eaa460..e286c5a5aa 100644 --- a/src/hash/maphash/maphash_purego.go +++ b/src/hash/maphash/maphash_purego.go @@ -10,6 +10,7 @@ import ( "crypto/rand" "errors" "internal/byteorder" + "math" "math/bits" "reflect" ) @@ -175,3 +176,25 @@ func appendT(h *Hash, v reflect.Value) { } panic(errors.New("maphash: hash of unhashable type " + v.Type().String())) } + +func (h *Hash) float64(f float64) { + if f == 0 { + h.WriteByte(0) + return + } + var buf [8]byte + if f != f { + byteorder.LEPutUint64(buf[:], randUint64()) + h.Write(buf[:]) + return + } + byteorder.LEPutUint64(buf[:], math.Float64bits(f)) + h.Write(buf[:]) +} + +func btoi(b bool) byte { + if b { + return 1 + } + return 0 +} diff --git a/src/internal/abi/escape.go b/src/internal/abi/escape.go index 8cdae1438e..d37be0177e 100644 --- a/src/internal/abi/escape.go +++ b/src/internal/abi/escape.go @@ -31,3 +31,35 @@ func Escape[T any](x T) T { } return x } + +// EscapeNonString forces v to be on the heap, if v contains a +// non-string pointer. +// +// This is used in hash/maphash.Comparable. We cannot hash pointers +// to local variables on stack, as their addresses might change on +// stack growth. Strings are okay as the hash depends on only the +// content, not the pointer. +// +// This is essentially +// +// if hasNonStringPointers(T) { Escape(v) } +// +// Implemented as a compiler intrinsic. +func EscapeNonString[T any](v T) { panic("intrinsic") } + +// EscapeToResultNonString models a data flow edge from v to the result, +// if v contains a non-string pointer. If v contains only string pointers, +// it returns a copy of v, but is not modeled as a data flow edge +// from the escape analysis's perspective. +// +// This is used in unique.clone, to model the data flow edge on the +// value with strings excluded, because strings are cloned (by +// content). +// +// TODO: probably we should define this as a intrinsic and EscapeNonString +// could just be "heap = EscapeToResultNonString(v)". This way we can model +// an edge to the result but not necessarily heap. +func EscapeToResultNonString[T any](v T) T { + EscapeNonString(v) + return *(*T)(NoEscape(unsafe.Pointer(&v))) +} diff --git a/src/internal/cgrouptest/cgrouptest_linux.go b/src/internal/cgrouptest/cgrouptest_linux.go new file mode 100644 index 0000000000..f23c37a705 --- /dev/null +++ b/src/internal/cgrouptest/cgrouptest_linux.go @@ -0,0 +1,206 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package cgrouptest provides best-effort helpers for running tests inside a +// cgroup. +package cgrouptest + +import ( + "fmt" + "internal/runtime/cgroup" + "os" + "path/filepath" + "slices" + "strconv" + "strings" + "syscall" + "testing" +) + +type CgroupV2 struct { + orig string + path string +} + +func (c *CgroupV2) Path() string { + return c.path +} + +// Path to cpu.max. +func (c *CgroupV2) CPUMaxPath() string { + return filepath.Join(c.path, "cpu.max") +} + +// Set cpu.max. Pass -1 for quota to disable the limit. +func (c *CgroupV2) SetCPUMax(quota, period int64) error { + q := "max" + if quota >= 0 { + q = strconv.FormatInt(quota, 10) + } + buf := fmt.Sprintf("%s %d", q, period) + return os.WriteFile(c.CPUMaxPath(), []byte(buf), 0) +} + +// InCgroupV2 creates a new v2 cgroup, migrates the current process into it, +// and then calls fn. When fn returns, the current process is migrated back to +// the original cgroup and the new cgroup is destroyed. +// +// If a new cgroup cannot be created, the test is skipped. +// +// This must not be used in parallel tests, as it affects the entire process. +func InCgroupV2(t *testing.T, fn func(*CgroupV2)) { + mount, rel := findCurrent(t) + parent := findOwnedParent(t, mount, rel) + orig := filepath.Join(mount, rel) + + // Make sure the parent allows children to control cpu. + b, err := os.ReadFile(filepath.Join(parent, "cgroup.subtree_control")) + if err != nil { + t.Skipf("unable to read cgroup.subtree_control: %v", err) + } + if !slices.Contains(strings.Fields(string(b)), "cpu") { + // N.B. We should have permission to add cpu to + // subtree_control, but it seems like a bad idea to change this + // on a high-level cgroup that probably has lots of existing + // children. + t.Skipf("Parent cgroup %s does not allow children to control cpu, only %q", parent, string(b)) + } + + path, err := os.MkdirTemp(parent, "go-cgrouptest") + if err != nil { + t.Skipf("unable to create cgroup directory: %v", err) + } + // Important: defer cleanups so they run even in the event of panic. + // + // TODO(prattmic): Consider running everything in a subprocess just so + // we can clean up if it throws or otherwise doesn't run the defers. + defer func() { + if err := os.Remove(path); err != nil { + // Not much we can do, but at least inform of the + // problem. + t.Errorf("Error removing cgroup directory: %v", err) + } + }() + + migrateTo(t, path) + defer migrateTo(t, orig) + + c := &CgroupV2{ + orig: orig, + path: path, + } + fn(c) +} + +// Returns the mount and relative directory of the current cgroup the process +// is in. +func findCurrent(t *testing.T) (string, string) { + // Find the path to our current CPU cgroup. Currently this package is + // only used for CPU cgroup testing, so the distinction of different + // controllers doesn't matter. + var scratch [cgroup.ParseSize]byte + buf := make([]byte, cgroup.PathSize) + n, err := cgroup.FindCPUMountPoint(buf, scratch[:]) + if err != nil { + t.Skipf("cgroup: unable to find current cgroup mount: %v", err) + } + mount := string(buf[:n]) + + n, ver, err := cgroup.FindCPURelativePath(buf, scratch[:]) + if err != nil { + t.Skipf("cgroup: unable to find current cgroup path: %v", err) + } + if ver != cgroup.V2 { + t.Skipf("cgroup: running on cgroup v%d want v2", ver) + } + rel := string(buf[1:n]) // The returned path always starts with /, skip it. + rel = filepath.Join(".", rel) // Make sure this isn't empty string at root. + return mount, rel +} + +// Returns a parent directory in which we can create our own cgroup subdirectory. +func findOwnedParent(t *testing.T, mount, rel string) string { + // There are many ways cgroups may be set up on a system. We don't try + // to cover all of them, just common ones. + // + // To start with, systemd: + // + // Our test process is likely running inside a user session, in which + // case we are likely inside a cgroup that looks something like: + // + // /sys/fs/cgroup/user.slice/user-1234.slice/user@1234.service/vte-spawn-1.scope/ + // + // Possibly with additional slice layers between user@1234.service and + // the leaf scope. + // + // On new enough kernel and systemd versions (exact versions unknown), + // full unprivileged control of the user's cgroups is permitted + // directly via the cgroup filesystem. Specifically, the + // user@1234.service directory is owned by the user, as are all + // subdirectories. + + // We want to create our own subdirectory that we can migrate into and + // then manipulate at will. It is tempting to create a new subdirectory + // inside the current cgroup we are already in, however that will likey + // not work. cgroup v2 only allows processes to be in leaf cgroups. Our + // current cgroup likely contains multiple processes (at least this one + // and the cmd/go test runner). If we make a subdirectory and try to + // move our process into that cgroup, then the subdirectory and parent + // would both contain processes. Linux won't allow us to do that [1]. + // + // Instead, we will simply walk up to the highest directory that our + // user owns and create our new subdirectory. Since that directory + // already has a bunch of subdirectories, it must not directly contain + // and processes. + // + // (This would fall apart if we already in the highest directory we + // own, such as if there was simply a single cgroup for the entire + // user. Luckily systemd at least does not do this.) + // + // [1] Minor technicality: By default a new subdirectory has no cgroup + // controller (they must be explicitly enabled in the parent's + // cgroup.subtree_control). Linux will allow moving processes into a + // subdirectory that has no controllers while there are still processes + // in the parent, but it won't allow adding controller until the parent + // is empty. As far as I tell, the only purpose of this is to allow + // reorganizing processes into a new set of subdirectories and then + // adding controllers once done. + root, err := os.OpenRoot(mount) + if err != nil { + t.Fatalf("error opening cgroup mount root: %v", err) + } + + uid := os.Getuid() + var prev string + for rel != "." { + fi, err := root.Stat(rel) + if err != nil { + t.Fatalf("error stating cgroup path: %v", err) + } + + st := fi.Sys().(*syscall.Stat_t) + if int(st.Uid) != uid { + // Stop at first directory we don't own. + break + } + + prev = rel + rel = filepath.Join(rel, "..") + } + + if prev == "" { + t.Skipf("No parent cgroup owned by UID %d", uid) + } + + // We actually want the last directory where we were the owner. + return filepath.Join(mount, prev) +} + +// Migrate the current process to the cgroup directory dst. +func migrateTo(t *testing.T, dst string) { + pid := []byte(strconv.FormatInt(int64(os.Getpid()), 10)) + if err := os.WriteFile(filepath.Join(dst, "cgroup.procs"), pid, 0); err != nil { + t.Skipf("Unable to migrate into %s: %v", dst, err) + } +} diff --git a/src/internal/cgrouptest/cgrouptest_linux_test.go b/src/internal/cgrouptest/cgrouptest_linux_test.go new file mode 100644 index 0000000000..f3a4a133e8 --- /dev/null +++ b/src/internal/cgrouptest/cgrouptest_linux_test.go @@ -0,0 +1,19 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cgrouptest + +import ( + "fmt" + "testing" +) + +func TestInCgroupV2(t *testing.T) { + InCgroupV2(t, func(c *CgroupV2) { + fmt.Println("Created", c.Path()) + if err := c.SetCPUMax(500000, 100000); err != nil { + t.Errorf("Erroring setting cpu.max: %v", err) + } + }) +} diff --git a/src/internal/coverage/pkid.go b/src/internal/coverage/pkid.go index f68523a348..30b5ad49ac 100644 --- a/src/internal/coverage/pkid.go +++ b/src/internal/coverage/pkid.go @@ -45,18 +45,29 @@ package coverage // as opposed to a fixed list. var rtPkgs = [...]string{ + "internal/asan", + "internal/byteorder", + "internal/coverage/rtcov", "internal/cpu", - "internal/goarch", - "internal/runtime/atomic", - "internal/goos", - "internal/chacha8rand", - "internal/runtime/sys", - "internal/abi", - "internal/runtime/maps", - "internal/runtime/math", "internal/bytealg", + "internal/goarch", + "internal/abi", + "internal/chacha8rand", + "internal/godebugs", "internal/goexperiment", + "internal/goos", + "internal/msan", + "internal/profilerecord", + "internal/race", + "internal/runtime/atomic", + "internal/runtime/exithook", + "internal/runtime/gc", + "internal/runtime/math", + "internal/runtime/strconv", + "internal/runtime/sys", + "internal/runtime/maps", "internal/runtime/syscall", + "internal/runtime/cgroup", "internal/stringslite", "runtime", } diff --git a/src/internal/cpu/cpu.go b/src/internal/cpu/cpu.go index e07463f870..760dc0b469 100644 --- a/src/internal/cpu/cpu.go +++ b/src/internal/cpu/cpu.go @@ -70,6 +70,7 @@ var ARM64 struct { HasSHA1 bool HasSHA2 bool HasSHA512 bool + HasSHA3 bool HasCRC32 bool HasATOMICS bool HasCPUID bool diff --git a/src/internal/cpu/cpu_arm64.go b/src/internal/cpu/cpu_arm64.go index 1365991e78..7709966d57 100644 --- a/src/internal/cpu/cpu_arm64.go +++ b/src/internal/cpu/cpu_arm64.go @@ -16,6 +16,7 @@ func doinit() { {Name: "sha1", Feature: &ARM64.HasSHA1}, {Name: "sha2", Feature: &ARM64.HasSHA2}, {Name: "sha512", Feature: &ARM64.HasSHA512}, + {Name: "sha3", Feature: &ARM64.HasSHA3}, {Name: "crc32", Feature: &ARM64.HasCRC32}, {Name: "atomics", Feature: &ARM64.HasATOMICS}, {Name: "cpuid", Feature: &ARM64.HasCPUID}, @@ -38,6 +39,7 @@ func extractBits(data uint64, start, end uint) uint { func parseARM64SystemRegisters(isar0, pfr0 uint64) { // ID_AA64ISAR0_EL1 + // https://developer.arm.com/documentation/ddi0601/2025-03/AArch64-Registers/ID-AA64ISAR0-EL1--AArch64-Instruction-Set-Attribute-Register-0 switch extractBits(isar0, 4, 7) { case 1: ARM64.HasAES = true @@ -69,6 +71,11 @@ func parseARM64SystemRegisters(isar0, pfr0 uint64) { ARM64.HasATOMICS = true } + switch extractBits(isar0, 32, 35) { + case 1: + ARM64.HasSHA3 = true + } + switch extractBits(pfr0, 48, 51) { case 1: ARM64.HasDIT = true diff --git a/src/internal/cpu/cpu_arm64_darwin.go b/src/internal/cpu/cpu_arm64_darwin.go index 57cf631e89..28b47d60e8 100644 --- a/src/internal/cpu/cpu_arm64_darwin.go +++ b/src/internal/cpu/cpu_arm64_darwin.go @@ -9,15 +9,21 @@ package cpu import _ "unsafe" // for linkname func osInit() { + // macOS 12 moved these to the hw.optional.arm tree, but as of Go 1.24 we + // still support macOS 11. See [Determine Encryption Capabilities]. + // + // [Determine Encryption Capabilities]: https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics#3918855 ARM64.HasATOMICS = sysctlEnabled([]byte("hw.optional.armv8_1_atomics\x00")) ARM64.HasCRC32 = sysctlEnabled([]byte("hw.optional.armv8_crc32\x00")) ARM64.HasSHA512 = sysctlEnabled([]byte("hw.optional.armv8_2_sha512\x00")) + ARM64.HasSHA3 = sysctlEnabled([]byte("hw.optional.armv8_2_sha3\x00")) + ARM64.HasDIT = sysctlEnabled([]byte("hw.optional.arm.FEAT_DIT\x00")) - // There are no hw.optional sysctl values for the below features on Mac OS 11.0 - // to detect their supported state dynamically. Assume the CPU features that - // Apple Silicon M1 supports to be available as a minimal set of features - // to all Go programs running on darwin/arm64. + // There are no hw.optional sysctl values for the below features on macOS 11 + // to detect their supported state dynamically (although they are available + // in the hw.optional.arm tree on macOS 12). Assume the CPU features that + // Apple Silicon M1 supports to be available on all future iterations. ARM64.HasAES = true ARM64.HasPMULL = true ARM64.HasSHA1 = true diff --git a/src/internal/cpu/cpu_arm64_hwcap.go b/src/internal/cpu/cpu_arm64_hwcap.go index e6711ae275..b6cc1f4d98 100644 --- a/src/internal/cpu/cpu_arm64_hwcap.go +++ b/src/internal/cpu/cpu_arm64_hwcap.go @@ -22,6 +22,7 @@ import _ "unsafe" // for linkname var HWCap uint // HWCAP bits. These are exposed by Linux. +// See arch/arm64/include/uapi/asm/hwcap.h. const ( hwcap_AES = 1 << 3 hwcap_PMULL = 1 << 4 @@ -30,18 +31,21 @@ const ( hwcap_CRC32 = 1 << 7 hwcap_ATOMICS = 1 << 8 hwcap_CPUID = 1 << 11 + hwcap_SHA3 = 1 << 17 hwcap_SHA512 = 1 << 21 hwcap_DIT = 1 << 24 ) func hwcapInit(os string) { // HWCap was populated by the runtime from the auxiliary vector. + // See https://docs.kernel.org/arch/arm64/elf_hwcaps.html. // Use HWCap information since reading aarch64 system registers // is not supported in user space on older linux kernels. ARM64.HasAES = isSet(HWCap, hwcap_AES) ARM64.HasPMULL = isSet(HWCap, hwcap_PMULL) ARM64.HasSHA1 = isSet(HWCap, hwcap_SHA1) ARM64.HasSHA2 = isSet(HWCap, hwcap_SHA2) + ARM64.HasSHA3 = isSet(HWCap, hwcap_SHA3) ARM64.HasCRC32 = isSet(HWCap, hwcap_CRC32) ARM64.HasCPUID = isSet(HWCap, hwcap_CPUID) ARM64.HasSHA512 = isSet(HWCap, hwcap_SHA512) diff --git a/src/internal/godebug/godebug.go b/src/internal/godebug/godebug.go index 0756d313e6..8c66a8a19a 100644 --- a/src/internal/godebug/godebug.go +++ b/src/internal/godebug/godebug.go @@ -237,8 +237,14 @@ func update(def, env string) { // Update all the cached values, creating new ones as needed. // We parse the environment variable first, so that any settings it has // are already locked in place (did[name] = true) before we consider - // the defaults. + // the defaults. Existing immutable settings are always locked. did := make(map[string]bool) + cache.Range(func(name, s any) bool { + if info := s.(*setting).info; info != nil && info.Immutable { + did[name.(string)] = true + } + return true + }) parse(did, env) parse(did, def) diff --git a/src/internal/godebug/godebug_test.go b/src/internal/godebug/godebug_test.go index 60c35a9619..47f4cc2761 100644 --- a/src/internal/godebug/godebug_test.go +++ b/src/internal/godebug/godebug_test.go @@ -162,3 +162,32 @@ func TestBisectTestCase(t *testing.T) { } } } + +func TestImmutable(t *testing.T) { + defer func(godebug string) { + os.Setenv("GODEBUG", godebug) + }(os.Getenv("GODEBUG")) + + setting := New("fips140") + value := setting.Value() + + os.Setenv("GODEBUG", "fips140=off") + if setting.Value() != value { + t.Errorf("Value() changed after setting GODEBUG=fips140=off") + } + + os.Setenv("GODEBUG", "fips140=on") + if setting.Value() != value { + t.Errorf("Value() changed after setting GODEBUG=fips140=on") + } + + os.Setenv("GODEBUG", "fips140=") + if setting.Value() != value { + t.Errorf("Value() changed after setting GODEBUG=fips140=") + } + + os.Setenv("GODEBUG", "") + if setting.Value() != value { + t.Errorf("Value() changed after setting GODEBUG=") + } +} diff --git a/src/internal/godebugs/godebugs_test.go b/src/internal/godebugs/godebugs_test.go index 046193b5c6..168acc134a 100644 --- a/src/internal/godebugs/godebugs_test.go +++ b/src/internal/godebugs/godebugs_test.go @@ -46,7 +46,8 @@ func TestAll(t *testing.T) { if info.Old != "" && info.Changed == 0 { t.Errorf("Name=%s has Old, missing Changed", info.Name) } - if !strings.Contains(doc, "`"+info.Name+"`") { + if !strings.Contains(doc, "`"+info.Name+"`") && + !strings.Contains(doc, "`"+info.Name+"=") { t.Errorf("Name=%s not documented in doc/godebug.md", info.Name) } if !info.Opaque && !incs[info.Name] { diff --git a/src/internal/godebugs/table.go b/src/internal/godebugs/table.go index 8ebe221fd3..38dc7b0fac 100644 --- a/src/internal/godebugs/table.go +++ b/src/internal/godebugs/table.go @@ -9,11 +9,12 @@ package godebugs // An Info describes a single known GODEBUG setting. type Info struct { - Name string // name of the setting ("panicnil") - Package string // package that uses the setting ("runtime") - Changed int // minor version when default changed, if any; 21 means Go 1.21 - Old string // value that restores behavior prior to Changed - Opaque bool // setting does not export information to runtime/metrics using [internal/godebug.Setting.IncNonDefault] + Name string // name of the setting ("panicnil") + Package string // package that uses the setting ("runtime") + Changed int // minor version when default changed, if any; 21 means Go 1.21 + Old string // value that restores behavior prior to Changed + Opaque bool // setting does not export information to runtime/metrics using [internal/godebug.Setting.IncNonDefault] + Immutable bool // setting cannot be changed after program start } // All is the table of known settings, sorted by Name. @@ -26,11 +27,12 @@ type Info struct { // (Otherwise the test in this package will fail.) var All = []Info{ {Name: "asynctimerchan", Package: "time", Changed: 23, Old: "1"}, + {Name: "containermaxprocs", Package: "runtime", Changed: 25, Old: "0"}, {Name: "dataindependenttiming", Package: "crypto/subtle", Opaque: true}, {Name: "decoratemappings", Package: "runtime", Opaque: true, Changed: 25, Old: "0"}, {Name: "embedfollowsymlinks", Package: "cmd/go"}, {Name: "execerrdot", Package: "os/exec"}, - {Name: "fips140", Package: "crypto/fips140", Opaque: true}, + {Name: "fips140", Package: "crypto/fips140", Opaque: true, Immutable: true}, {Name: "gocachehash", Package: "cmd/go"}, {Name: "gocachetest", Package: "cmd/go"}, {Name: "gocacheverify", Package: "cmd/go"}, @@ -60,12 +62,15 @@ var All = []Info{ {Name: "tlsmaxrsasize", Package: "crypto/tls"}, {Name: "tlsmlkem", Package: "crypto/tls", Changed: 24, Old: "0", Opaque: true}, {Name: "tlsrsakex", Package: "crypto/tls", Changed: 22, Old: "1"}, + {Name: "tlssha1", Package: "crypto/tls", Changed: 25, Old: "1"}, {Name: "tlsunsafeekm", Package: "crypto/tls", Changed: 22, Old: "1"}, + {Name: "updatemaxprocs", Package: "runtime", Changed: 25, Old: "0"}, {Name: "winreadlinkvolume", Package: "os", Changed: 23, Old: "0"}, {Name: "winsymlink", Package: "os", Changed: 23, Old: "0"}, {Name: "x509keypairleaf", Package: "crypto/tls", Changed: 23, Old: "0"}, {Name: "x509negativeserial", Package: "crypto/x509", Changed: 23, Old: "1"}, {Name: "x509rsacrt", Package: "crypto/x509", Changed: 24, Old: "0"}, + {Name: "x509sha256skid", Package: "crypto/x509", Changed: 25, Old: "0"}, {Name: "x509usefallbackroots", Package: "crypto/x509"}, {Name: "x509usepolicies", Package: "crypto/x509", Changed: 24, Old: "0"}, {Name: "zipinsecurepath", Package: "archive/zip"}, diff --git a/src/internal/pkgbits/decoder.go b/src/internal/pkgbits/decoder.go index bbda6e9285..f9e37b9e1e 100644 --- a/src/internal/pkgbits/decoder.go +++ b/src/internal/pkgbits/decoder.go @@ -131,7 +131,7 @@ func (pr *PkgDecoder) Fingerprint() [8]byte { // AbsIdx returns the absolute index for the given (section, index) // pair. -func (pr *PkgDecoder) AbsIdx(k SectionKind, idx RelIndex) int { +func (pr *PkgDecoder) AbsIdx(k SectionKind, idx RelElemIdx) int { absIdx := int(idx) if k > 0 { absIdx += int(pr.elemEndsEnds[k-1]) @@ -144,7 +144,7 @@ func (pr *PkgDecoder) AbsIdx(k SectionKind, idx RelIndex) int { // DataIdx returns the raw element bitstream for the given (section, // index) pair. -func (pr *PkgDecoder) DataIdx(k SectionKind, idx RelIndex) string { +func (pr *PkgDecoder) DataIdx(k SectionKind, idx RelElemIdx) string { absIdx := pr.AbsIdx(k, idx) var start uint32 @@ -157,13 +157,13 @@ func (pr *PkgDecoder) DataIdx(k SectionKind, idx RelIndex) string { } // StringIdx returns the string value for the given string index. -func (pr *PkgDecoder) StringIdx(idx RelIndex) string { +func (pr *PkgDecoder) StringIdx(idx RelElemIdx) string { return pr.DataIdx(SectionString, idx) } // NewDecoder returns a Decoder for the given (section, index) pair, // and decodes the given SyncMarker from the element bitstream. -func (pr *PkgDecoder) NewDecoder(k SectionKind, idx RelIndex, marker SyncMarker) Decoder { +func (pr *PkgDecoder) NewDecoder(k SectionKind, idx RelElemIdx, marker SyncMarker) Decoder { r := pr.NewDecoderRaw(k, idx) r.Sync(marker) return r @@ -173,7 +173,7 @@ func (pr *PkgDecoder) NewDecoder(k SectionKind, idx RelIndex, marker SyncMarker) // and decodes the given SyncMarker from the element bitstream. // If possible the Decoder should be RetireDecoder'd when it is no longer // needed, this will avoid heap allocations. -func (pr *PkgDecoder) TempDecoder(k SectionKind, idx RelIndex, marker SyncMarker) Decoder { +func (pr *PkgDecoder) TempDecoder(k SectionKind, idx RelElemIdx, marker SyncMarker) Decoder { r := pr.TempDecoderRaw(k, idx) r.Sync(marker) return r @@ -187,7 +187,7 @@ func (pr *PkgDecoder) RetireDecoder(d *Decoder) { // NewDecoderRaw returns a Decoder for the given (section, index) pair. // // Most callers should use NewDecoder instead. -func (pr *PkgDecoder) NewDecoderRaw(k SectionKind, idx RelIndex) Decoder { +func (pr *PkgDecoder) NewDecoderRaw(k SectionKind, idx RelElemIdx) Decoder { r := Decoder{ common: pr, k: k, @@ -199,13 +199,13 @@ func (pr *PkgDecoder) NewDecoderRaw(k SectionKind, idx RelIndex) Decoder { r.Relocs = make([]RefTableEntry, r.Len()) for i := range r.Relocs { r.Sync(SyncReloc) - r.Relocs[i] = RefTableEntry{SectionKind(r.Len()), RelIndex(r.Len())} + r.Relocs[i] = RefTableEntry{SectionKind(r.Len()), RelElemIdx(r.Len())} } return r } -func (pr *PkgDecoder) TempDecoderRaw(k SectionKind, idx RelIndex) Decoder { +func (pr *PkgDecoder) TempDecoderRaw(k SectionKind, idx RelElemIdx) Decoder { r := Decoder{ common: pr, k: k, @@ -223,7 +223,7 @@ func (pr *PkgDecoder) TempDecoderRaw(k SectionKind, idx RelIndex) Decoder { } for i := range r.Relocs { r.Sync(SyncReloc) - r.Relocs[i] = RefTableEntry{SectionKind(r.Len()), RelIndex(r.Len())} + r.Relocs[i] = RefTableEntry{SectionKind(r.Len()), RelElemIdx(r.Len())} } return r @@ -238,7 +238,7 @@ type Decoder struct { Data strings.Reader k SectionKind - Idx RelIndex + Idx RelElemIdx } func (r *Decoder) checkErr(err error) { @@ -292,7 +292,7 @@ func (r *Decoder) rawVarint() int64 { return x } -func (r *Decoder) rawReloc(k SectionKind, idx int) RelIndex { +func (r *Decoder) rawReloc(k SectionKind, idx int) RelElemIdx { e := r.Relocs[idx] assert(e.Kind == k) return e.Idx @@ -401,7 +401,7 @@ func (r *Decoder) Code(mark SyncMarker) int { // Reloc decodes a relocation of expected section k from the element // bitstream and returns an index to the referenced element. -func (r *Decoder) Reloc(k SectionKind) RelIndex { +func (r *Decoder) Reloc(k SectionKind) RelElemIdx { r.Sync(SyncUseReloc) return r.rawReloc(k, r.Len()) } @@ -478,7 +478,7 @@ func (r *Decoder) bigFloat() *big.Float { // PeekPkgPath returns the package path for the specified package // index. -func (pr *PkgDecoder) PeekPkgPath(idx RelIndex) string { +func (pr *PkgDecoder) PeekPkgPath(idx RelElemIdx) string { var path string { r := pr.TempDecoder(SectionPkg, idx, SyncPkgDef) @@ -493,8 +493,8 @@ func (pr *PkgDecoder) PeekPkgPath(idx RelIndex) string { // PeekObj returns the package path, object name, and CodeObj for the // specified object index. -func (pr *PkgDecoder) PeekObj(idx RelIndex) (string, string, CodeObj) { - var ridx RelIndex +func (pr *PkgDecoder) PeekObj(idx RelElemIdx) (string, string, CodeObj) { + var ridx RelElemIdx var name string var rcode int { diff --git a/src/internal/pkgbits/doc.go b/src/internal/pkgbits/doc.go index bd05daa3a6..5c2a937afa 100644 --- a/src/internal/pkgbits/doc.go +++ b/src/internal/pkgbits/doc.go @@ -8,88 +8,88 @@ package pkgbits. The most basic primitives are laid out as below. -Bool = [ Sync ] byte . -Int64 = [ Sync ] zvarint . -Uint64 = [ Sync ] uvarint . + Bool = [ Sync ] byte . + Int64 = [ Sync ] zvarint . + Uint64 = [ Sync ] uvarint . -zvarint = (* a zig-zag encoded signed variable-width integer *) . -uvarint = (* an unsigned variable-width integer *) . - -# Strings -A string is a series of bytes. - -// TODO(markfreeman): Does this need a marker? -String = { byte } . - -Strings are typically not encoded directly. Rather, they are deduplicated -during encoding and referenced where needed; this process is called interning. - -StringRef = [ Sync ] Ref[String] . - -Note that StringRef is *not* equivalent to Ref[String] due to the extra marker. + zvarint = (* a zig-zag encoded signed variable-width integer *) . + uvarint = (* an unsigned variable-width integer *) . # References References specify the location of a value. While the representation here is fixed, the interpretation of a reference is left to other packages. -Ref[T] = [ Sync ] Uint64 . // points to a value of type T - -# Slices -Slices are a convenience for encoding a series of values of the same type. - -// TODO(markfreeman): Does this need a marker? -Slice[T] = Uint64 // the number of values in the slice - { T } // the values - . - -# Constants -Constants appear as defined via the package constant. - -Constant = [ Sync ] - Bool // whether the constant is a complex number - Scalar // the real part - [ Scalar ] // if complex, the imaginary part - . - -A scalar represents a value using one of several potential formats. The exact -format and interpretation is distinguished by a code preceding the value. - -Scalar = [ Sync ] - Uint64 // the code indicating the type of Val - Val - . - -Val = Bool - | Int64 - | StringRef - | Term // big integer - | Term Term // big ratio, numerator / denominator - | BigBytes // big float, precision 512 - . - -Term = BigBytes - Bool // whether the term is negative - . - -BigBytes = StringRef . // bytes of a big value + Ref[T] = [ Sync ] Uint64 . // points to a value of type T # Markers -Markers provide a mechanism for asserting that encoders and decoders are -synchronized. If an unexpected marker is found, decoding panics. +Markers provide a mechanism for asserting that encoders and decoders +are synchronized. If an unexpected marker is found, decoding panics. -Sync = uvarint // indicates what should follow if synchronized - WriterPCs - . + Sync = uvarint // indicates what should follow if synchronized + WriterPCs + . A marker also records a configurable number of program counters (PCs) during encoding to assist with debugging. -WriterPCs = uvarint // the number of PCs that follow - { uvarint } // the PCs - . + WriterPCs = uvarint // the number of PCs that follow + { uvarint } // the PCs + . Note that markers are always defined using terminals — they never contain a marker themselves. + +# Strings +A string is a series of bytes. + + // TODO(markfreeman): Does this need a marker? + String = { byte } . + +Strings are typically not encoded directly. Rather, they are deduplicated +during encoding and referenced where needed; this process is called interning. + + StringRef = [ Sync ] Ref[String] . + +Note that StringRef is *not* equivalent to Ref[String] due to the extra marker. + +# Slices +Slices are a convenience for encoding a series of values of the same type. + + // TODO(markfreeman): Does this need a marker? + Slice[T] = Uint64 // the number of values in the slice + { T } // the values + . + +# Constants +Constants appear as defined via the package constant. + + Constant = [ Sync ] + Bool // whether the constant is a complex number + Scalar // the real part + [ Scalar ] // if complex, the imaginary part + . + +A scalar represents a value using one of several potential formats. The exact +format and interpretation is distinguished by a code preceding the value. + + Scalar = [ Sync ] + Uint64 // the code indicating the type of Val + Val + . + + Val = Bool + | Int64 + | StringRef + | Term // big integer + | Term Term // big ratio, numerator / denominator + | BigBytes // big float, precision 512 + . + + Term = BigBytes + Bool // whether the term is negative + . + + BigBytes = StringRef . // bytes of a big value */ // Package pkgbits implements low-level coding abstractions for Unified IR's diff --git a/src/internal/pkgbits/encoder.go b/src/internal/pkgbits/encoder.go index 3d1223bb63..6e3716570f 100644 --- a/src/internal/pkgbits/encoder.go +++ b/src/internal/pkgbits/encoder.go @@ -27,7 +27,7 @@ type PkgEncoder struct { // stringsIdx maps previously encoded strings to their index within // the RelocString section, to allow deduplication. That is, // elems[RelocString][stringsIdx[s]] == s (if present). - stringsIdx map[string]RelIndex + stringsIdx map[string]RelElemIdx // syncFrames is the number of frames to write at each sync // marker. A negative value means sync markers are omitted. @@ -47,7 +47,7 @@ func (pw *PkgEncoder) SyncMarkers() bool { return pw.syncFrames >= 0 } func NewPkgEncoder(version Version, syncFrames int) PkgEncoder { return PkgEncoder{ version: version, - stringsIdx: make(map[string]RelIndex), + stringsIdx: make(map[string]RelElemIdx), syncFrames: syncFrames, } } @@ -72,14 +72,17 @@ func (pw *PkgEncoder) DumpTo(out0 io.Writer) (fingerprint [8]byte) { writeUint32(flags) } - // Write elemEndsEnds. + // TODO(markfreeman): Also can use delta encoding to write section ends, + // but not as impactful. var sum uint32 for _, elems := range &pw.elems { sum += uint32(len(elems)) writeUint32(sum) } - // Write elemEnds. + // TODO(markfreeman): Use delta encoding to store element ends and inflate + // back to this representation during decoding; the numbers will be much + // smaller. sum = 0 for _, elems := range &pw.elems { for _, elem := range elems { @@ -106,13 +109,13 @@ func (pw *PkgEncoder) DumpTo(out0 io.Writer) (fingerprint [8]byte) { // StringIdx adds a string value to the strings section, if not // already present, and returns its index. -func (pw *PkgEncoder) StringIdx(s string) RelIndex { +func (pw *PkgEncoder) StringIdx(s string) RelElemIdx { if idx, ok := pw.stringsIdx[s]; ok { assert(pw.elems[SectionString][idx] == s) return idx } - idx := RelIndex(len(pw.elems[SectionString])) + idx := RelElemIdx(len(pw.elems[SectionString])) pw.elems[SectionString] = append(pw.elems[SectionString], s) pw.stringsIdx[s] = idx return idx @@ -132,7 +135,7 @@ func (pw *PkgEncoder) NewEncoder(k SectionKind, marker SyncMarker) *Encoder { // // Most callers should use NewEncoder instead. func (pw *PkgEncoder) NewEncoderRaw(k SectionKind) *Encoder { - idx := RelIndex(len(pw.elems[k])) + idx := RelElemIdx(len(pw.elems[k])) pw.elems[k] = append(pw.elems[k], "") // placeholder return &Encoder{ @@ -154,11 +157,11 @@ type Encoder struct { encodingRelocHeader bool k SectionKind - Idx RelIndex // index within relocation section + Idx RelElemIdx // index within relocation section } -// Flush finalizes the element's bitstream and returns its [RelIndex]. -func (w *Encoder) Flush() RelIndex { +// Flush finalizes the element's bitstream and returns its [RelElemIdx]. +func (w *Encoder) Flush() RelElemIdx { var sb strings.Builder // Backup the data so we write the relocations at the front. @@ -210,7 +213,7 @@ func (w *Encoder) rawVarint(x int64) { w.rawUvarint(ux) } -func (w *Encoder) rawReloc(k SectionKind, idx RelIndex) int { +func (w *Encoder) rawReloc(k SectionKind, idx RelElemIdx) int { e := RefTableEntry{k, idx} if w.RelocMap != nil { if i, ok := w.RelocMap[e]; ok { @@ -302,7 +305,7 @@ func (w *Encoder) Uint(x uint) { w.Uint64(uint64(x)) } // Note: Only the index is formally written into the element // bitstream, so bitstream decoders must know from context which // section an encoded relocation refers to. -func (w *Encoder) Reloc(k SectionKind, idx RelIndex) { +func (w *Encoder) Reloc(k SectionKind, idx RelElemIdx) { w.Sync(SyncUseReloc) w.Len(w.rawReloc(k, idx)) } @@ -325,7 +328,7 @@ func (w *Encoder) String(s string) { // StringRef writes a reference to the given index, which must be a // previously encoded string value. -func (w *Encoder) StringRef(idx RelIndex) { +func (w *Encoder) StringRef(idx RelElemIdx) { w.Sync(SyncString) w.Reloc(SectionString, idx) } diff --git a/src/internal/pkgbits/reloc.go b/src/internal/pkgbits/reloc.go index d132f4e995..5f6ec2ab79 100644 --- a/src/internal/pkgbits/reloc.go +++ b/src/internal/pkgbits/reloc.go @@ -28,20 +28,26 @@ const ( // particular section. type Index int32 -// TODO(markfreeman): Make RelIndex its own named type once we point external -// references from Index to RelIndex. -type RelIndex = Index +// An AbsElemIdx, or absolute element index, is an index into the elements +// that is not relative to some other index. +type AbsElemIdx = uint32 +// TODO(markfreeman): Make this its own type. +// A RelElemIdx, or relative element index, is an index into the elements +// relative to some other index, such as the start of a section. +type RelElemIdx = Index + +// TODO(markfreeman): Isn't this strictly less efficient than an AbsElemIdx? // A RefTableEntry is an entry in an element's reference table. All // elements are preceded by a reference table which provides locations // for referenced elements. type RefTableEntry struct { Kind SectionKind - Idx RelIndex + Idx RelElemIdx } // Reserved indices within the [SectionMeta] section. const ( - PublicRootIdx RelIndex = 0 - PrivateRootIdx RelIndex = 1 + PublicRootIdx RelElemIdx = 0 + PrivateRootIdx RelElemIdx = 1 ) diff --git a/src/internal/runtime/cgroup/cgroup_linux.go b/src/internal/runtime/cgroup/cgroup_linux.go new file mode 100644 index 0000000000..2fc3b225c5 --- /dev/null +++ b/src/internal/runtime/cgroup/cgroup_linux.go @@ -0,0 +1,710 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cgroup + +import ( + "internal/bytealg" + "internal/runtime/strconv" + "internal/runtime/syscall" +) + +var ( + ErrNoCgroup error = stringError("not in a cgroup") + + errMalformedFile error = stringError("malformed file") +) + +const _PATH_MAX = 4096 + +const ( + // Required amount of scratch space for CPULimit. + // + // TODO(prattmic): This is shockingly large (~70KiB) due to the (very + // unlikely) combination of extremely long paths consisting mostly + // escaped characters. The scratch buffer ends up in .bss in package + // runtime, so it doesn't contribute to binary size and generally won't + // be faulted in, but it would still be nice to shrink this. A more + // complex parser that did not need to keep entire lines in memory + // could get away with much less. Alternatively, we could do a one-off + // mmap allocation for this buffer, which is only mapped larger if we + // actually need the extra space. + ScratchSize = PathSize + ParseSize + + // Required space to store a path of the cgroup in the filesystem. + PathSize = _PATH_MAX + + // /proc/self/mountinfo path escape sequences are 4 characters long, so + // a path consisting entirely of escaped characters could be 4 times + // larger. + escapedPathMax = 4 * _PATH_MAX + + // Required space to parse /proc/self/mountinfo and /proc/self/cgroup. + // See findCPUMount and findCPURelativePath. + ParseSize = 4 * escapedPathMax +) + +// Include explicit NUL to be sure we include it in the slice. +const ( + v2MaxFile = "/cpu.max\x00" + v1QuotaFile = "/cpu.cfs_quota_us\x00" + v1PeriodFile = "/cpu.cfs_period_us\x00" +) + +// Version indicates the cgroup version. +type Version int + +const ( + VersionUnknown Version = iota + V1 + V2 +) + +// CPU owns the FDs required to read the CPU limit from a cgroup. +type CPU struct { + version Version + + // For cgroup v1, this is cpu.cfs_quota_us. + // For cgroup v2, this is cpu.max. + quotaFD int + + // For cgroup v1, this is cpu.cfs_period_us. + // For cgroup v2, this is unused. + periodFD int +} + +func (c CPU) Close() { + switch c.version { + case V1: + syscall.Close(c.quotaFD) + syscall.Close(c.periodFD) + case V2: + syscall.Close(c.quotaFD) + default: + throw("impossible cgroup version") + } +} + +func checkBufferSize(s []byte, size int) { + if len(s) != size { + println("runtime: cgroup buffer length", len(s), "want", size) + throw("runtime: cgroup invalid buffer length") + } +} + +// OpenCPU returns a CPU for the CPU cgroup containing the current process, or +// ErrNoCgroup if the process is not in a CPU cgroup. +// +// scratch must have length ScratchSize. +func OpenCPU(scratch []byte) (CPU, error) { + checkBufferSize(scratch, ScratchSize) + + base := scratch[:PathSize] + scratch2 := scratch[PathSize:] + + n, version, err := FindCPU(base, scratch2) + if err != nil { + return CPU{}, err + } + + switch version { + case 1: + n2 := copy(base[n:], v1QuotaFile) + path := base[:n+n2] + quotaFD, errno := syscall.Open(&path[0], syscall.O_RDONLY|syscall.O_CLOEXEC, 0) + if errno != 0 { + // This may fail if this process was migrated out of + // the cgroup found by FindCPU and that cgroup has been + // deleted. + return CPU{}, errSyscallFailed + } + + n2 = copy(base[n:], v1PeriodFile) + path = base[:n+n2] + periodFD, errno := syscall.Open(&path[0], syscall.O_RDONLY|syscall.O_CLOEXEC, 0) + if errno != 0 { + // This may fail if this process was migrated out of + // the cgroup found by FindCPU and that cgroup has been + // deleted. + return CPU{}, errSyscallFailed + } + + c := CPU{ + version: 1, + quotaFD: quotaFD, + periodFD: periodFD, + } + return c, nil + case 2: + n2 := copy(base[n:], v2MaxFile) + path := base[:n+n2] + maxFD, errno := syscall.Open(&path[0], syscall.O_RDONLY|syscall.O_CLOEXEC, 0) + if errno != 0 { + // This may fail if this process was migrated out of + // the cgroup found by FindCPU and that cgroup has been + // deleted. + return CPU{}, errSyscallFailed + } + + c := CPU{ + version: 2, + quotaFD: maxFD, + periodFD: -1, + } + return c, nil + default: + throw("impossible cgroup version") + panic("unreachable") + } +} + +// Returns average CPU throughput limit from the cgroup, or ok false if there +// is no limit. +func ReadCPULimit(c CPU) (float64, bool, error) { + switch c.version { + case 1: + quota, err := readV1Number(c.quotaFD) + if err != nil { + return 0, false, errMalformedFile + } + + if quota < 0 { + // No limit. + return 0, false, nil + } + + period, err := readV1Number(c.periodFD) + if err != nil { + return 0, false, errMalformedFile + } + + return float64(quota) / float64(period), true, nil + case 2: + // quotaFD is the cpu.max FD. + return readV2Limit(c.quotaFD) + default: + throw("impossible cgroup version") + panic("unreachable") + } +} + +// Returns the value from the quota/period file. +func readV1Number(fd int) (int64, error) { + // The format of the file is "\n" where the value is in + // int64 microseconds and, if quota, may be -1 to indicate no limit. + // + // MaxInt64 requires 19 bytes to display in base 10, thus the + // conservative max size of this file is 19 + 1 (newline) = 20 bytes. + // We'll provide a bit more for good measure. + // + // Always read from the beginning of the file to get a fresh value. + var b [64]byte + n, errno := syscall.Pread(fd, b[:], 0) + if errno != 0 { + return 0, errSyscallFailed + } + if n == len(b) { + return 0, errMalformedFile + } + + buf := b[:n] + return parseV1Number(buf) +} + +func parseV1Number(buf []byte) (int64, error) { + // Ignore trailing newline. + i := bytealg.IndexByte(buf, '\n') + if i < 0 { + return 0, errMalformedFile + } + buf = buf[:i] + + val, ok := strconv.Atoi64(string(buf)) + if !ok { + return 0, errMalformedFile + } + + return val, nil +} + +// Returns CPU throughput limit, or ok false if there is no limit. +func readV2Limit(fd int) (float64, bool, error) { + // The format of the file is " \n" where quota and + // period are microseconds and quota may be "max" to indicate no limit. + // + // Note that the kernel is inconsistent about whether the values are + // uint64 or int64: values are parsed as uint64 but printed as int64. + // See kernel/sched/core.c:cpu_max_{show,write}. + // + // In practice, the kernel limits the period to 1s (1000000us) (see + // max_cfs_quota_period), and the quota to (1<<44)us (see + // max_cfs_runtime), so these values can't get large enough for the + // distinction to matter. + // + // MaxInt64 requires 19 bytes to display in base 10, thus the + // conservative max size of this file is 19 + 19 + 1 (space) + 1 + // (newline) = 40 bytes. We'll provide a bit more for good measure. + // + // Always read from the beginning of the file to get a fresh value. + var b [64]byte + n, errno := syscall.Pread(fd, b[:], 0) + if errno != 0 { + return 0, false, errSyscallFailed + } + if n == len(b) { + return 0, false, errMalformedFile + } + + buf := b[:n] + return parseV2Limit(buf) +} + +func parseV2Limit(buf []byte) (float64, bool, error) { + i := bytealg.IndexByte(buf, ' ') + if i < 0 { + return 0, false, errMalformedFile + } + + quotaStr := buf[:i] + if bytealg.Compare(quotaStr, []byte("max")) == 0 { + // No limit. + return 0, false, nil + } + + periodStr := buf[i+1:] + // Ignore trailing newline, if any. + i = bytealg.IndexByte(periodStr, '\n') + if i < 0 { + return 0, false, errMalformedFile + } + periodStr = periodStr[:i] + + quota, ok := strconv.Atoi64(string(quotaStr)) + if !ok { + return 0, false, errMalformedFile + } + + period, ok := strconv.Atoi64(string(periodStr)) + if !ok { + return 0, false, errMalformedFile + } + + return float64(quota) / float64(period), true, nil +} + +// FindCPU finds the path to the CPU cgroup that this process is a member of +// and places it in out. scratch is a scratch buffer for internal use. +// +// out must have length PathSize. scratch must have length ParseSize. +// +// Returns the number of bytes written to out and the cgroup version (1 or 2). +// +// Returns ErrNoCgroup if the process is not in a CPU cgroup. +func FindCPU(out []byte, scratch []byte) (int, Version, error) { + checkBufferSize(out, PathSize) + checkBufferSize(scratch, ParseSize) + + // The cgroup path is + . + // + // This is racy if our cgroup is changed while this runs. For example, + // initially there is only a cgroup v2 mount and we are not in a + // cgroup. After, there a cgroup v1 mount with a CPU controller and we + // are placed in a cgroup in this hierarchy. In that case, findCPUMount + // could pick the v2 mount, and findCPURelativePath could find the v2 + // relative path. + // + // In this case we'll later fail to read the cgroup files and fall back + // to assuming no cgroup. + + n, err := FindCPUMountPoint(out, scratch) + if err != nil { + return 0, 0, err + } + + // The relative path always starts with /, so we can directly append it + // to the mount point. + n2, version, err := FindCPURelativePath(out[n:], scratch) + if err != nil { + return 0, 0, err + } + n += n2 + + return n, version, nil +} + +// FindCPURelativePath finds the path to the CPU cgroup that this process is a member of +// relative to the root of the cgroup mount and places it in out. scratch is a +// scratch buffer for internal use. +// +// out must have length PathSize minus the size of the cgroup mount root (if +// known). scratch must have length ParseSize. +// +// Returns the number of bytes written to out and the cgroup version (1 or 2). +// +// Returns ErrNoCgroup if the process is not in a CPU cgroup. +func FindCPURelativePath(out []byte, scratch []byte) (int, Version, error) { + path := []byte("/proc/self/cgroup\x00") + fd, errno := syscall.Open(&path[0], syscall.O_RDONLY|syscall.O_CLOEXEC, 0) + if errno == syscall.ENOENT { + return 0, 0, ErrNoCgroup + } else if errno != 0 { + return 0, 0, errSyscallFailed + } + + // The relative path always starts with /, so we can directly append it + // to the mount point. + n, version, err := parseCPURelativePath(fd, syscall.Read, out[:], scratch) + if err != nil { + syscall.Close(fd) + return 0, 0, err + } + + syscall.Close(fd) + return n, version, nil +} + +// Finds the path of the current process's CPU cgroup relative to the cgroup +// mount and writes it to out. +// +// Returns the number of bytes written and the cgroup version (1 or 2). +func parseCPURelativePath(fd int, read func(fd int, b []byte) (int, uintptr), out []byte, scratch []byte) (int, Version, error) { + // The format of each line is + // + // hierarchy-ID:controller-list:cgroup-path + // + // controller-list is comma-separated. + // See man 5 cgroup for more details. + // + // cgroup v2 has hierarchy-ID 0. If a v1 hierarchy contains "cpu", that + // is the CPU controller. Otherwise the v2 hierarchy (if any) is the + // CPU controller. + // + // hierarchy-ID and controller-list have relatively small maximum + // sizes, and the path can be up to _PATH_MAX, so we need a bit more + // than 1 _PATH_MAX of scratch space. + + l := newLineReader(fd, scratch, read) + + // Bytes written to out. + n := 0 + + for { + err := l.next() + if err == errIncompleteLine { + // Don't allow incomplete lines. While in theory the + // incomplete line may be for a controller we don't + // care about, in practice all lines should be of + // similar length, so we should just have a buffer big + // enough for any. + return 0, 0, err + } else if err == errEOF { + break + } else if err != nil { + return 0, 0, err + } + + line := l.line() + + // The format of each line is + // + // hierarchy-ID:controller-list:cgroup-path + // + // controller-list is comma-separated. + // See man 5 cgroup for more details. + i := bytealg.IndexByte(line, ':') + if i < 0 { + return 0, 0, errMalformedFile + } + + hierarchy := line[:i] + line = line[i+1:] + + i = bytealg.IndexByte(line, ':') + if i < 0 { + return 0, 0, errMalformedFile + } + + controllers := line[:i] + line = line[i+1:] + + path := line + + if string(hierarchy) == "0" { + // v2 hierarchy. + n = copy(out, path) + // Keep searching, we might find a v1 hierarchy with a + // CPU controller, which takes precedence. + } else { + // v1 hierarchy + if containsCPU(controllers) { + // Found a v1 CPU controller. This must be the + // only one, so we're done. + return copy(out, path), V1, nil + } + } + } + + if n == 0 { + // Found nothing. + return 0, 0, ErrNoCgroup + } + + // Must be v2, v1 returns above. + return n, V2, nil +} + +// Returns true if comma-separated list b contains "cpu". +func containsCPU(b []byte) bool { + for len(b) > 0 { + i := bytealg.IndexByte(b, ',') + if i < 0 { + // Neither cmd/compile nor gccgo allocates for these string conversions. + return string(b) == "cpu" + } + + curr := b[:i] + rest := b[i+1:] + + if string(curr) == "cpu" { + return true + } + + b = rest + } + + return false +} + +// FindCPUMountPoint finds the root of the CPU cgroup mount places it in out. +// scratch is a scratch buffer for internal use. +// +// out must have length PathSize. scratch must have length ParseSize. +// +// Returns the number of bytes written to out. +// +// Returns ErrNoCgroup if the process is not in a CPU cgroup. +func FindCPUMountPoint(out []byte, scratch []byte) (int, error) { + checkBufferSize(out, PathSize) + checkBufferSize(scratch, ParseSize) + + path := []byte("/proc/self/mountinfo\x00") + fd, errno := syscall.Open(&path[0], syscall.O_RDONLY|syscall.O_CLOEXEC, 0) + if errno == syscall.ENOENT { + return 0, ErrNoCgroup + } else if errno != 0 { + return 0, errSyscallFailed + } + + n, err := parseCPUMount(fd, syscall.Read, out, scratch) + if err != nil { + syscall.Close(fd) + return 0, err + } + syscall.Close(fd) + + return n, nil +} + +// Returns the mount point for the cpu cgroup controller (v1 or v2) from +// /proc/self/mountinfo. +func parseCPUMount(fd int, read func(fd int, b []byte) (int, uintptr), out []byte, scratch []byte) (int, error) { + // The format of each line is: + // + // 36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue + // (1)(2)(3) (4) (5) (6) (7) (8) (9) (10) (11) + // + // (1) mount ID: unique identifier of the mount (may be reused after umount) + // (2) parent ID: ID of parent (or of self for the top of the mount tree) + // (3) major:minor: value of st_dev for files on filesystem + // (4) root: root of the mount within the filesystem + // (5) mount point: mount point relative to the process's root + // (6) mount options: per mount options + // (7) optional fields: zero or more fields of the form "tag[:value]" + // (8) separator: marks the end of the optional fields + // (9) filesystem type: name of filesystem of the form "type[.subtype]" + // (10) mount source: filesystem specific information or "none" + // (11) super options: per super block options + // + // See man 5 proc_pid_mountinfo for more details. + // + // Note that emitted paths will not contain space, tab, newline, or + // carriage return. Those are escaped. See Linux show_mountinfo -> + // show_path. We must unescape before returning. + // + // We return the mount point (5) if the filesystem type (9) is cgroup2, + // or cgroup with "cpu" in the super options (11). + // + // (4), (5), and (10) are up to _PATH_MAX. The remaining fields have a + // small fixed maximum size, so 4*_PATH_MAX is plenty of scratch space. + // Note that non-cgroup mounts may have arbitrarily long (11), but we + // can skip those when parsing. + + l := newLineReader(fd, scratch, read) + + // Bytes written to out. + n := 0 + + for { + //incomplete := false + err := l.next() + if err == errIncompleteLine { + // An incomplete line is fine as long as it doesn't + // impede parsing the fields we need. It shouldn't be + // possible for any mount to use more than 3*PATH_MAX + // before (9) because there are two paths and all other + // earlier fields have bounded options. Only (11) has + // unbounded options. + } else if err == errEOF { + break + } else if err != nil { + return 0, err + } + + line := l.line() + + // Skip first four fields. + for range 4 { + i := bytealg.IndexByte(line, ' ') + if i < 0 { + return 0, errMalformedFile + } + line = line[i+1:] + } + + // (5) mount point: mount point relative to the process's root + i := bytealg.IndexByte(line, ' ') + if i < 0 { + return 0, errMalformedFile + } + mnt := line[:i] + line = line[i+1:] + + // Skip ahead past optional fields, delimited by " - ". + for { + i = bytealg.IndexByte(line, ' ') + if i < 0 { + return 0, errMalformedFile + } + if i+3 >= len(line) { + return 0, errMalformedFile + } + delim := line[i : i+3] + if string(delim) == " - " { + line = line[i+3:] + break + } + line = line[i+1:] + } + + // (9) filesystem type: name of filesystem of the form "type[.subtype]" + i = bytealg.IndexByte(line, ' ') + if i < 0 { + return 0, errMalformedFile + } + ftype := line[:i] + line = line[i+1:] + + if string(ftype) != "cgroup" && string(ftype) != "cgroup2" { + continue + } + + // As in findCPUPath, cgroup v1 with a CPU controller takes + // precendence over cgroup v2. + if string(ftype) == "cgroup2" { + // v2 hierarchy. + n, err = unescapePath(out, mnt) + if err != nil { + // Don't keep searching on error. The kernel + // should never produce broken escaping. + return n, err + } + // Keep searching, we might find a v1 hierarchy with a + // CPU controller, which takes precedence. + continue + } + + // (10) mount source: filesystem specific information or "none" + i = bytealg.IndexByte(line, ' ') + if i < 0 { + return 0, errMalformedFile + } + // Don't care about mount source. + line = line[i+1:] + + // (11) super options: per super block options + superOpt := line + + // v1 hierarchy + if containsCPU(superOpt) { + // Found a v1 CPU controller. This must be the + // only one, so we're done. + return unescapePath(out, mnt) + } + } + + if n == 0 { + // Found nothing. + return 0, ErrNoCgroup + } + + return n, nil +} + +var errInvalidEscape error = stringError("invalid path escape sequence") + +// unescapePath copies in to out, unescaping escape sequences generated by +// Linux's show_path. +// +// That is, '\', ' ', '\t', and '\n' are converted to octal escape sequences, +// like '\040' for space. +// +// out must be at least as large as in. +// +// Returns the number of bytes written to out. +// +// Also see escapePath in cgroup_linux_test.go. +func unescapePath(out []byte, in []byte) (int, error) { + // Not strictly necessary, but simplifies the implementation and will + // always hold in users. + if len(out) < len(in) { + throw("output too small") + } + + var outi, ini int + for ini < len(in) { + c := in[ini] + if c != '\\' { + out[outi] = c + outi++ + ini++ + continue + } + + // Start of escape sequence. + + // Escape sequence is always 4 characters: one slash and three + // digits. + if ini+3 >= len(in) { + return outi, errInvalidEscape + } + + var outc byte + for i := range 3 { + c := in[ini+1+i] + if c < '0' || c > '9' { + return outi, errInvalidEscape + } + + outc *= 8 + outc += c - '0' + } + + out[outi] = outc + outi++ + + ini += 4 + } + + return outi, nil +} diff --git a/src/internal/runtime/cgroup/cgroup_linux_test.go b/src/internal/runtime/cgroup/cgroup_linux_test.go new file mode 100644 index 0000000000..d47fe42067 --- /dev/null +++ b/src/internal/runtime/cgroup/cgroup_linux_test.go @@ -0,0 +1,476 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cgroup_test + +import ( + "fmt" + "internal/runtime/cgroup" + "io" + "strconv" + "strings" + "testing" +) + +const _PATH_MAX = 4096 + +func TestParseV1Number(t *testing.T) { + tests := []struct { + name string + contents string + want int64 + wantErr bool + }{ + { + name: "disabled", + contents: "-1\n", + want: -1, + }, + { + name: "500000", + contents: "500000\n", + want: 500000, + }, + { + name: "MaxInt64", + contents: "9223372036854775807\n", + want: 9223372036854775807, + }, + { + name: "missing-newline", + contents: "500000", + wantErr: true, + }, + { + name: "not-a-number", + contents: "123max\n", + wantErr: true, + }, + { + name: "v2", + contents: "1000 5000\n", + wantErr: true, + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + got, err := cgroup.ParseV1Number([]byte(tc.contents)) + if tc.wantErr { + if err == nil { + t.Fatalf("parseV1Number got err nil want non-nil") + } + return + } + if err != nil { + t.Fatalf("parseV1Number got err %v want nil", err) + } + + if got != tc.want { + t.Errorf("parseV1Number got %d want %d", got, tc.want) + } + }) + } +} + +func TestParseV2Limit(t *testing.T) { + tests := []struct { + name string + contents string + want float64 + wantOK bool + wantErr bool + }{ + { + name: "disabled", + contents: "max 100000\n", + wantOK: false, + }, + { + name: "5", + contents: "500000 100000\n", + want: 5, + wantOK: true, + }, + { + name: "0.5", + contents: "50000 100000\n", + want: 0.5, + wantOK: true, + }, + { + name: "2.5", + contents: "250000 100000\n", + want: 2.5, + wantOK: true, + }, + { + name: "MaxInt64", + contents: "9223372036854775807 9223372036854775807\n", + want: 1, + wantOK: true, + }, + { + name: "missing-newline", + contents: "500000 100000", + wantErr: true, + }, + { + name: "v1", + contents: "500000\n", + wantErr: true, + }, + { + name: "quota-not-a-number", + contents: "500000us 100000\n", + wantErr: true, + }, + { + name: "period-not-a-number", + contents: "500000 100000us\n", + wantErr: true, + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + got, gotOK, err := cgroup.ParseV2Limit([]byte(tc.contents)) + if tc.wantErr { + if err == nil { + t.Fatalf("parseV1Limit got err nil want non-nil") + } + return + } + if err != nil { + t.Fatalf("parseV2Limit got err %v want nil", err) + } + + if gotOK != tc.wantOK { + t.Errorf("parseV2Limit got ok %v want %v", gotOK, tc.wantOK) + } + + if tc.wantOK && got != tc.want { + t.Errorf("parseV2Limit got %f want %f", got, tc.want) + } + }) + } +} + +func TestParseCPURelativePath(t *testing.T) { + tests := []struct { + name string + contents string + want string + wantVer cgroup.Version + wantErr bool + }{ + { + name: "empty", + contents: "", + wantErr: true, + }, + { + name: "v1", + contents: `2:cpu,cpuacct:/a/b/cpu +1:blkio:/a/b/blkio +`, + want: "/a/b/cpu", + wantVer: cgroup.V1, + }, + { + name: "v2", + contents: "0::/a/b/c\n", + want: "/a/b/c", + wantVer: cgroup.V2, + }, + { + name: "mixed", + contents: `2:cpu,cpuacct:/a/b/cpu +1:blkio:/a/b/blkio +0::/a/b/v2 +`, + want: "/a/b/cpu", + wantVer: cgroup.V1, + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + r := strings.NewReader(tc.contents) + read := func(fd int, b []byte) (int, uintptr) { + n, err := r.Read(b) + if err != nil && err != io.EOF { + const dummyErrno = 42 + return n, dummyErrno + } + return n, 0 + } + + var got [cgroup.PathSize]byte + var scratch [cgroup.ParseSize]byte + n, gotVer, err := cgroup.ParseCPURelativePath(0, read, got[:], scratch[:]) + if (err != nil) != tc.wantErr { + t.Fatalf("parseCPURelativePath got err %v want %v", err, tc.wantErr) + } + + if gotVer != tc.wantVer { + t.Errorf("parseCPURelativePath got cgroup version %d want %d", gotVer, tc.wantVer) + } + + if string(got[:n]) != tc.want { + t.Errorf("parseCPURelativePath got %q want %q", string(got[:n]), tc.want) + } + }) + } +} + +func TestContainsCPU(t *testing.T) { + tests := []struct { + in string + want bool + }{ + { + in: "", + want: false, + }, + { + in: ",", + want: false, + }, + { + in: "cpu", + want: true, + }, + { + in: "memory,cpu", + want: true, + }, + { + in: "cpu,memory", + want: true, + }, + { + in: "memory,cpu,block", + want: true, + }, + { + in: "memory,cpuacct,block", + want: false, + }, + } + + for _, tc := range tests { + t.Run(tc.in, func(t *testing.T) { + got := cgroup.ContainsCPU([]byte(tc.in)) + if got != tc.want { + t.Errorf("containsCPU(%q) got %v want %v", tc.in, got, tc.want) + } + }) + } +} + +func TestParseCPUMount(t *testing.T) { + // Used for v2-longline. We want an overlayfs mount to have an option + // so long that the entire line can't possibly fit in the scratch + // buffer. + const lowerPath = "/so/many/overlay/layers" + overlayLongLowerDir := lowerPath + for i := 0; len(overlayLongLowerDir) < cgroup.ScratchSize; i++ { + overlayLongLowerDir += fmt.Sprintf(":%s%d", lowerPath, i) + } + + tests := []struct { + name string + contents string + want string + wantErr bool + }{ + { + name: "empty", + contents: "", + wantErr: true, + }, + { + name: "v1", + contents: `22 1 8:1 / / rw,relatime - ext4 /dev/root rw +20 22 0:19 / /proc rw,nosuid,nodev,noexec - proc proc rw +21 22 0:20 / /sys rw,nosuid,nodev,noexec - sysfs sysfs rw +49 22 0:37 / /sys/fs/cgroup/memory rw - cgroup cgroup rw,memory +54 22 0:38 / /sys/fs/cgroup/io rw - cgroup cgroup rw,io +56 22 0:40 / /sys/fs/cgroup/cpu rw - cgroup cgroup rw,cpu,cpuacct +58 22 0:42 / /sys/fs/cgroup/net rw - cgroup cgroup rw,net +59 22 0:43 / /sys/fs/cgroup/cpuset rw - cgroup cgroup rw,cpuset +`, + want: "/sys/fs/cgroup/cpu", + }, + { + name: "v2", + contents: `22 1 8:1 / / rw,relatime - ext4 /dev/root rw +20 22 0:19 / /proc rw,nosuid,nodev,noexec - proc proc rw +21 22 0:20 / /sys rw,nosuid,nodev,noexec - sysfs sysfs rw +25 21 0:22 / /sys/fs/cgroup rw,nosuid,nodev,noexec - cgroup2 cgroup2 rw +`, + want: "/sys/fs/cgroup", + }, + { + name: "mixed", + contents: `22 1 8:1 / / rw,relatime - ext4 /dev/root rw +20 22 0:19 / /proc rw,nosuid,nodev,noexec - proc proc rw +21 22 0:20 / /sys rw,nosuid,nodev,noexec - sysfs sysfs rw +25 21 0:22 / /sys/fs/cgroup rw,nosuid,nodev,noexec - cgroup2 cgroup2 rw +49 22 0:37 / /sys/fs/cgroup/memory rw - cgroup cgroup rw,memory +54 22 0:38 / /sys/fs/cgroup/io rw - cgroup cgroup rw,io +56 22 0:40 / /sys/fs/cgroup/cpu rw - cgroup cgroup rw,cpu,cpuacct +58 22 0:42 / /sys/fs/cgroup/net rw - cgroup cgroup rw,net +59 22 0:43 / /sys/fs/cgroup/cpuset rw - cgroup cgroup rw,cpuset +`, + want: "/sys/fs/cgroup/cpu", + }, + { + name: "v2-escaped", + contents: `22 1 8:1 / / rw,relatime - ext4 /dev/root rw +20 22 0:19 / /proc rw,nosuid,nodev,noexec - proc proc rw +21 22 0:20 / /sys rw,nosuid,nodev,noexec - sysfs sysfs rw +25 21 0:22 / /sys/fs/cgroup/tab\011tab rw,nosuid,nodev,noexec - cgroup2 cgroup2 rw +`, + want: `/sys/fs/cgroup/tab tab`, + }, + { + // Overly long line on a different mount doesn't matter. + name: "v2-longline", + contents: `22 1 8:1 / / rw,relatime - ext4 /dev/root rw +20 22 0:19 / /proc rw,nosuid,nodev,noexec - proc proc rw +21 22 0:20 / /sys rw,nosuid,nodev,noexec - sysfs sysfs rw +262 31 0:72 / /tmp/overlay2/0143e063b02f4801de9c847ad1c5ddc21fd2ead00653064d0c72ea967b248870/merged rw,relatime shared:729 - overlay overlay rw,lowerdir=` + overlayLongLowerDir + `,upperdir=/tmp/diff,workdir=/tmp/work +25 21 0:22 / /sys/fs/cgroup rw,nosuid,nodev,noexec - cgroup2 cgroup2 rw +`, + want: "/sys/fs/cgroup", + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + r := strings.NewReader(tc.contents) + read := func(fd int, b []byte) (int, uintptr) { + n, err := r.Read(b) + if err != nil && err != io.EOF { + const dummyErrno = 42 + return n, dummyErrno + } + return n, 0 + } + + var got [cgroup.PathSize]byte + var scratch [cgroup.ParseSize]byte + n, err := cgroup.ParseCPUMount(0, read, got[:], scratch[:]) + if (err != nil) != tc.wantErr { + t.Fatalf("parseCPUMount got err %v want %v", err, tc.wantErr) + } + + if string(got[:n]) != tc.want { + t.Errorf("parseCPUMount got %q want %q", string(got[:n]), tc.want) + } + }) + } +} + +// escapePath performs escaping equivalent to Linux's show_path. +// +// That is, '\', ' ', '\t', and '\n' are converted to octal escape sequences, +// like '\040' for space. +func escapePath(s string) string { + out := make([]rune, 0, len(s)) + for _, c := range s { + switch c { + case '\\', ' ', '\t', '\n': + out = append(out, '\\') + cs := strconv.FormatInt(int64(c), 8) + if len(cs) <= 2 { + out = append(out, '0') + } + if len(cs) <= 1 { + out = append(out, '0') + } + for _, csc := range cs { + out = append(out, csc) + } + default: + out = append(out, c) + } + } + return string(out) +} + +func TestEscapePath(t *testing.T) { + tests := []struct { + name string + unescaped string + escaped string + }{ + { + name: "boring", + unescaped: `/a/b/c`, + escaped: `/a/b/c`, + }, + { + name: "space", + unescaped: `/a/b b/c`, + escaped: `/a/b\040b/c`, + }, + { + name: "tab", + unescaped: `/a/b b/c`, + escaped: `/a/b\011b/c`, + }, + { + name: "newline", + unescaped: `/a/b +b/c`, + escaped: `/a/b\012b/c`, + }, + { + name: "slash", + unescaped: `/a/b\b/c`, + escaped: `/a/b\134b/c`, + }, + { + name: "beginning", + unescaped: `\b/c`, + escaped: `\134b/c`, + }, + { + name: "ending", + unescaped: `/a/\`, + escaped: `/a/\134`, + }, + } + + t.Run("escapePath", func(t *testing.T) { + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + got := escapePath(tc.unescaped) + if got != tc.escaped { + t.Errorf("escapePath got %q want %q", got, tc.escaped) + } + }) + } + }) + + t.Run("unescapePath", func(t *testing.T) { + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + in := []byte(tc.escaped) + out := make([]byte, len(in)) + n, err := cgroup.UnescapePath(out, in) + if err != nil { + t.Errorf("unescapePath got err %v want nil", err) + } + got := string(out[:n]) + if got != tc.unescaped { + t.Errorf("unescapePath got %q want %q", got, tc.escaped) + } + }) + } + }) +} diff --git a/src/internal/runtime/cgroup/export_linux_test.go b/src/internal/runtime/cgroup/export_linux_test.go new file mode 100644 index 0000000000..653fcd1b2f --- /dev/null +++ b/src/internal/runtime/cgroup/export_linux_test.go @@ -0,0 +1,15 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cgroup + +var ContainsCPU = containsCPU + +var ParseV1Number = parseV1Number +var ParseV2Limit = parseV2Limit + +var ParseCPURelativePath = parseCPURelativePath +var ParseCPUMount = parseCPUMount + +var UnescapePath = unescapePath diff --git a/src/internal/runtime/cgroup/export_test.go b/src/internal/runtime/cgroup/export_test.go new file mode 100644 index 0000000000..200e5aee12 --- /dev/null +++ b/src/internal/runtime/cgroup/export_test.go @@ -0,0 +1,24 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cgroup + +type LineReader = lineReader + +func (l *LineReader) Next() error { + return l.next() +} + +func (l *LineReader) Line() []byte { + return l.line() +} + +func NewLineReader(fd int, scratch []byte, read func(fd int, b []byte) (int, uintptr)) *LineReader { + return newLineReader(fd, scratch, read) +} + +var ( + ErrEOF = errEOF + ErrIncompleteLine = errIncompleteLine +) diff --git a/src/internal/runtime/cgroup/line_reader.go b/src/internal/runtime/cgroup/line_reader.go new file mode 100644 index 0000000000..382cfd70d1 --- /dev/null +++ b/src/internal/runtime/cgroup/line_reader.go @@ -0,0 +1,179 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cgroup + +import ( + "internal/bytealg" +) + +// stringError is a trival implementation of error, equivalent to errors.New, +// which cannot be imported from a runtime package. +type stringError string + +func (e stringError) Error() string { + return string(e) +} + +// All errors are explicit converted to type error in global initialization to +// ensure that the linker allocates a static interface value. This is necessary +// because these errors may be used before the allocator is available. + +var ( + // The entire line did not fit into the scratch buffer. + errIncompleteLine error = stringError("incomplete line") + + // A system call failed. + errSyscallFailed error = stringError("syscall failed") + + // Reached EOF. + errEOF error = stringError("end of file") +) + +// lineReader reads line-by-line using only a single fixed scratch buffer. +// +// When a single line is too long for the scratch buffer, the remainder of the +// line will be skipped. +type lineReader struct { + read func(fd int, b []byte) (int, uintptr) + fd int + scratch []byte + + n int // bytes of scratch in use. + newline int // index of the first newline in scratch. + + eof bool // read reached EOF. +} + +// newLineReader returns a lineReader which reads lines from fd. +// +// fd is the file descriptor to read from. +// +// scratch is the scratch buffer to read into. Note that len(scratch) is the +// longest line that can be read. Lines longer than len(scratch) will have the +// remainder of the line skipped. See next for more details. +// +// read is the function used to read more bytes from fd. This is usually +// internal/runtime/syscall.Read. Note that this follows syscall semantics (not +// io.Reader), so EOF is indicated with n=0, errno=0. +func newLineReader(fd int, scratch []byte, read func(fd int, b []byte) (n int, errno uintptr)) *lineReader { + return &lineReader{ + read: read, + fd: fd, + scratch: scratch, + n: 0, + newline: -1, + } +} + +// next advances to the next line. +// +// May return errIncompleteLine if the scratch buffer is too small to hold the +// entire line, in which case [r.line] will return the beginning of the line. A +// subsequent call to next will skip the remainder of the incomplete line. +// +// N.B. this behavior is important for /proc/self/mountinfo. Some lines +// (mounts), such as overlayfs, may be extremely long due to long super-block +// options, but we don't care about those. The mount type will appear early in +// the line. +// +// Returns errEOF when there are no more lines. +func (r *lineReader) next() error { + // Three cases: + // + // 1. First call, no data read. + // 2. Previous call had a complete line. Drop it and look for the end + // of the next line. + // 3. Previous call had an incomplete line. Find the end of that line + // (start of the next line), and the end of the next line. + + prevComplete := r.newline >= 0 + firstCall := r.n == 0 + + for { + if prevComplete { + // Drop the previous line. + copy(r.scratch, r.scratch[r.newline+1:r.n]) + r.n -= r.newline + 1 + + r.newline = bytealg.IndexByte(r.scratch[:r.n], '\n') + if r.newline >= 0 { + // We have another line already in scratch. Done. + return nil + } + } + + // No newline available. + + if !prevComplete { + // If the previous line was incomplete, we are + // searching for the end of that line and have no need + // for any buffered data. + r.n = 0 + } + + n, errno := r.read(r.fd, r.scratch[r.n:len(r.scratch)]) + if errno != 0 { + return errSyscallFailed + } + r.n += n + + if r.n == 0 { + // Nothing left. + // + // N.B. we can't immediately return EOF when read + // returns 0 as we may still need to return an + // incomplete line. + return errEOF + } + + r.newline = bytealg.IndexByte(r.scratch[:r.n], '\n') + if prevComplete || firstCall { + // Already have the start of the line, just need to find the end. + + if r.newline < 0 { + // We filled the entire buffer or hit EOF, but + // still no newline. + return errIncompleteLine + } + + // Found the end of the line. Done. + return nil + } else { + // Don't have the start of the line. We are currently + // looking for the end of the previous line. + + if r.newline < 0 { + // Not there yet. + if n == 0 { + // No more to read. + return errEOF + } + continue + } + + // Found the end of the previous line. The next + // iteration will drop the remainder of the previous + // line and look for the next line. + prevComplete = true + } + } +} + +// line returns a view of the current line, excluding the trailing newline. +// +// If [r.next] returned errIncompleteLine, then this returns only the beginning +// of the line. +// +// Preconditions: [r.next] is called prior to the first call to line. +// +// Postconditions: The caller must not keep a reference to the returned slice. +func (r *lineReader) line() []byte { + if r.newline < 0 { + // Incomplete line + return r.scratch[:r.n] + } + // Complete line. + return r.scratch[:r.newline] +} diff --git a/src/internal/runtime/cgroup/line_reader_test.go b/src/internal/runtime/cgroup/line_reader_test.go new file mode 100644 index 0000000000..ceef1b5b4c --- /dev/null +++ b/src/internal/runtime/cgroup/line_reader_test.go @@ -0,0 +1,170 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cgroup_test + +import ( + "internal/runtime/cgroup" + "io" + "strings" + "testing" +) + +func TestLineReader(t *testing.T) { + type nextLine struct { + line string + incomplete bool // next call before this line should return incomplete + } + complete := func(s string) nextLine { + return nextLine{line: s} + } + incomplete := func(s string) nextLine { + return nextLine{line: s, incomplete: true} + } + + const scratchSize = 8 + + tests := []struct { + name string + contents string + want []nextLine + }{ + { + name: "empty", + contents: "", + }, + { + name: "single", + contents: "1234\n", + want: []nextLine{ + complete("1234"), + }, + }, + { + name: "single-incomplete", + contents: "1234", + want: []nextLine{ + incomplete("1234"), + }, + }, + { + name: "single-exact", + contents: "1234567\n", + want: []nextLine{ + complete("1234567"), + }, + }, + { + name: "single-exact-incomplete", + contents: "12345678", + want: []nextLine{ + incomplete("12345678"), + }, + }, + { + name: "multi", + contents: `1234 +5678 +`, + want: []nextLine{ + complete("1234"), + complete("5678"), + }, + }, + { + name: "multi-short", + contents: `12 +34 +56 +78 +`, + want: []nextLine{ + complete("12"), + complete("34"), + complete("56"), + complete("78"), + }, + }, + { + name: "multi-notrailingnewline", + contents: `1234 +5678`, + want: []nextLine{ + complete("1234"), + incomplete("5678"), + }, + }, + { + name: "middle-too-long", + contents: `1234 +1234567890 +5678 +`, + want: []nextLine{ + complete("1234"), + incomplete("12345678"), + complete("5678"), + }, + }, + { + // Multiple reads required to find newline. + name: "middle-way-too-long", + contents: `1234 +12345678900000000000000000000000000000000000000000000000000 +5678 +`, + want: []nextLine{ + complete("1234"), + incomplete("12345678"), + complete("5678"), + }, + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + r := strings.NewReader(tc.contents) + read := func(fd int, b []byte) (int, uintptr) { + n, err := r.Read(b) + if err != nil && err != io.EOF { + const dummyErrno = 42 + return n, dummyErrno + } + return n, 0 + } + + var scratch [scratchSize]byte + l := cgroup.NewLineReader(0, scratch[:], read) + + var got []nextLine + for { + err := l.Next() + if err == cgroup.ErrEOF { + break + } else if err == cgroup.ErrIncompleteLine { + got = append(got, incomplete(string(l.Line()))) + } else if err != nil { + t.Fatalf("next got err %v", err) + } else { + got = append(got, complete(string(l.Line()))) + } + } + + if len(got) != len(tc.want) { + t.Logf("got lines %+v", got) + t.Logf("want lines %+v", tc.want) + t.Fatalf("lineReader got %d lines, want %d", len(got), len(tc.want)) + } + + for i := range got { + if got[i].line != tc.want[i].line { + t.Errorf("line %d got %q want %q", i, got[i].line, tc.want[i].line) + } + if got[i].incomplete != tc.want[i].incomplete { + t.Errorf("line %d got incomplete %v want %v", i, got[i].incomplete, tc.want[i].incomplete) + } + } + }) + } +} diff --git a/src/internal/runtime/cgroup/runtime.go b/src/internal/runtime/cgroup/runtime.go new file mode 100644 index 0000000000..39c9295b07 --- /dev/null +++ b/src/internal/runtime/cgroup/runtime.go @@ -0,0 +1,14 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cgroup + +import ( + _ "unsafe" // for linkname +) + +// Functions below pushed from runtime. + +//go:linkname throw +func throw(s string) diff --git a/src/internal/syscall/windows/at_windows.go b/src/internal/syscall/windows/at_windows.go index 87a84c3da5..87e0195d30 100644 --- a/src/internal/syscall/windows/at_windows.go +++ b/src/internal/syscall/windows/at_windows.go @@ -159,6 +159,8 @@ func ntCreateFileError(err error, flag uint64) error { } case STATUS_FILE_IS_A_DIRECTORY: return syscall.EISDIR + case STATUS_OBJECT_NAME_COLLISION: + return syscall.EEXIST } return s.Errno() } diff --git a/src/internal/syscall/windows/syscall_windows.go b/src/internal/syscall/windows/syscall_windows.go index 20e6ae57a8..905cabc81e 100644 --- a/src/internal/syscall/windows/syscall_windows.go +++ b/src/internal/syscall/windows/syscall_windows.go @@ -548,6 +548,7 @@ func (s NTStatus) Error() string { // At the moment, we only need a couple, so just put them here manually. // If this list starts getting long, we should consider generating the full set. const ( + STATUS_OBJECT_NAME_COLLISION NTStatus = 0xC0000035 STATUS_FILE_IS_A_DIRECTORY NTStatus = 0xC00000BA STATUS_DIRECTORY_NOT_EMPTY NTStatus = 0xC0000101 STATUS_NOT_A_DIRECTORY NTStatus = 0xC0000103 diff --git a/src/internal/testhash/hash.go b/src/internal/testhash/hash.go index d863408f55..3413d5c20d 100644 --- a/src/internal/testhash/hash.go +++ b/src/internal/testhash/hash.go @@ -18,7 +18,49 @@ type MakeHash func() hash.Hash // TestHash performs a set of tests on hash.Hash implementations, checking the // documented requirements of Write, Sum, Reset, Size, and BlockSize. func TestHash(t *testing.T, mh MakeHash) { + TestHashWithoutClone(t, mh) + // Test whether the results after cloning are consistent. + t.Run("Clone", func(t *testing.T) { + h, ok := mh().(hash.Cloner) + if !ok { + t.Fatalf("%T does not implement hash.Cloner", mh) + } + h3, err := h.Clone() + if err != nil { + t.Fatalf("Clone failed: %v", err) + } + prefix := []byte("tmp") + writeToHash(t, h, prefix) + h2, err := h.Clone() + if err != nil { + t.Fatalf("Clone failed: %v", err) + } + prefixSum := h.Sum(nil) + if !bytes.Equal(prefixSum, h2.Sum(nil)) { + t.Fatalf("%T Clone results are inconsistent", h) + } + suffix := []byte("tmp2") + writeToHash(t, h, suffix) + writeToHash(t, h3, append(prefix, suffix...)) + compositeSum := h3.Sum(nil) + if !bytes.Equal(h.Sum(nil), compositeSum) { + t.Fatalf("%T Clone results are inconsistent", h) + } + if !bytes.Equal(h2.Sum(nil), prefixSum) { + t.Fatalf("%T Clone results are inconsistent", h) + } + writeToHash(t, h2, suffix) + if !bytes.Equal(h.Sum(nil), compositeSum) { + t.Fatalf("%T Clone results are inconsistent", h) + } + if !bytes.Equal(h2.Sum(nil), compositeSum) { + t.Fatalf("%T Clone results are inconsistent", h) + } + }) +} + +func TestHashWithoutClone(t *testing.T, mh MakeHash) { // Test that Sum returns an appended digest matching output of Size t.Run("SumAppend", func(t *testing.T) { h := mh() diff --git a/src/internal/trace/base.go b/src/internal/trace/base.go index 693dbc6fa6..1f17daa5f5 100644 --- a/src/internal/trace/base.go +++ b/src/internal/trace/base.go @@ -41,7 +41,7 @@ func (e *baseEvent) extra(v version.Version) []uint64 { // evTable contains the per-generation data necessary to // interpret an individual event. type evTable struct { - freq frequency + sync strings dataTable[stringID, string] stacks dataTable[stackID, stack] pcs map[uint64]frame diff --git a/src/internal/trace/batch.go b/src/internal/trace/batch.go index 58f18d6381..3ff056f604 100644 --- a/src/internal/trace/batch.go +++ b/src/internal/trace/batch.go @@ -11,6 +11,7 @@ import ( "io" "internal/trace/tracev2" + "internal/trace/version" ) // timestamp is an unprocessed timestamp. @@ -37,8 +38,10 @@ func (b *batch) isCPUSamplesBatch() bool { return b.exp == tracev2.NoExperiment && len(b.data) > 0 && tracev2.EventType(b.data[0]) == tracev2.EvCPUSamples } -func (b *batch) isFreqBatch() bool { - return b.exp == tracev2.NoExperiment && len(b.data) > 0 && tracev2.EventType(b.data[0]) == tracev2.EvFrequency +func (b *batch) isSyncBatch(ver version.Version) bool { + return (b.exp == tracev2.NoExperiment && len(b.data) > 0) && + ((tracev2.EventType(b.data[0]) == tracev2.EvFrequency && ver < version.Go125) || + (tracev2.EventType(b.data[0]) == tracev2.EvSync && ver >= version.Go125)) } // readBatch reads the next full batch from r. diff --git a/src/internal/trace/event.go b/src/internal/trace/event.go index 896ab7f73a..21f1569f43 100644 --- a/src/internal/trace/event.go +++ b/src/internal/trace/event.go @@ -665,17 +665,22 @@ func (e Event) Sync() Sync { if e.Kind() != EventSync { panic("Sync called on non-Sync event") } - var expBatches map[string][]ExperimentalBatch + s := Sync{N: int(e.base.args[0])} if e.table != nil { - expBatches = make(map[string][]ExperimentalBatch) + expBatches := make(map[string][]ExperimentalBatch) for exp, batches := range e.table.expBatches { expBatches[tracev2.Experiments()[exp]] = batches } + s.ExperimentalBatches = expBatches + if e.table.hasClockSnapshot { + s.ClockSnapshot = &ClockSnapshot{ + Trace: e.table.freq.mul(e.table.snapTime), + Wall: e.table.snapWall, + Mono: e.table.snapMono, + } + } } - return Sync{ - N: int(e.base.args[0]), - ExperimentalBatches: expBatches, - } + return s } // Sync contains details potentially relevant to all the following events, up to but excluding @@ -684,10 +689,30 @@ type Sync struct { // N indicates that this is the Nth sync event in the trace. N int + // ClockSnapshot is a snapshot of different clocks taken in close in time + // that can be used to correlate trace events with data captured by other + // tools. May be nil for older trace versions. + ClockSnapshot *ClockSnapshot + // ExperimentalBatches contain all the unparsed batches of data for a given experiment. ExperimentalBatches map[string][]ExperimentalBatch } +// ClockSnapshot represents a near-simultaneous clock reading of several +// different system clocks. The snapshot can be used as a reference to convert +// timestamps to different clocks, which is helpful for correlating timestamps +// with data captured by other tools. +type ClockSnapshot struct { + // Trace is a snapshot of the trace clock. + Trace Time + + // Wall is a snapshot of the system's wall clock. + Wall time.Time + + // Mono is a snapshot of the system's monotonic clock. + Mono uint64 +} + // Experimental returns a view of the raw event for an experimental event. // // Panics if Kind != EventExperimental. @@ -844,6 +869,16 @@ func (e Event) String() string { fmt.Fprintf(&sb, "%s=%s", arg, r.ArgValue(i).String()) } fmt.Fprintf(&sb, "]") + case EventSync: + s := e.Sync() + fmt.Fprintf(&sb, " N=%d", s.N) + if s.ClockSnapshot != nil { + fmt.Fprintf(&sb, " Trace=%d Mono=%d Wall=%s", + s.ClockSnapshot.Trace, + s.ClockSnapshot.Mono, + s.ClockSnapshot.Wall.Format(time.RFC3339), + ) + } } if stk := e.Stack(); stk != NoStack { fmt.Fprintln(&sb) diff --git a/src/internal/trace/gc_test.go b/src/internal/trace/gc_test.go index 39f28cc0f6..9c6d0fcb0e 100644 --- a/src/internal/trace/gc_test.go +++ b/src/internal/trace/gc_test.go @@ -118,7 +118,7 @@ func TestMMUTrace(t *testing.T) { } t.Run("V2", func(t *testing.T) { testPath := "testdata/tests/go122-gc-stress.test" - r, _, err := testtrace.ParseFile(testPath) + r, _, _, err := testtrace.ParseFile(testPath) if err != nil { t.Fatalf("malformed test %s: bad trace file: %v", testPath, err) } diff --git a/src/internal/trace/generation.go b/src/internal/trace/generation.go index 90a7f3b6c6..e91ba80f7d 100644 --- a/src/internal/trace/generation.go +++ b/src/internal/trace/generation.go @@ -13,8 +13,10 @@ import ( "io" "slices" "strings" + "time" "internal/trace/tracev2" + "internal/trace/version" ) // generation contains all the trace data for a single @@ -45,7 +47,7 @@ type spilledBatch struct { // // If gen is non-nil, it is valid and must be processed before handling the returned // error. -func readGeneration(r *bufio.Reader, spill *spilledBatch) (*generation, *spilledBatch, error) { +func readGeneration(r *bufio.Reader, spill *spilledBatch, ver version.Version) (*generation, *spilledBatch, error) { g := &generation{ evTable: &evTable{ pcs: make(map[uint64]frame), @@ -55,7 +57,8 @@ func readGeneration(r *bufio.Reader, spill *spilledBatch) (*generation, *spilled // Process the spilled batch. if spill != nil { g.gen = spill.gen - if err := processBatch(g, *spill.batch); err != nil { + g.minTs = spill.batch.time + if err := processBatch(g, *spill.batch, ver); err != nil { return nil, nil, err } spill = nil @@ -103,7 +106,7 @@ func readGeneration(r *bufio.Reader, spill *spilledBatch) (*generation, *spilled if g.minTs == 0 || b.time < g.minTs { g.minTs = b.time } - if err := processBatch(g, b); err != nil { + if err := processBatch(g, b, ver); err != nil { return nil, nil, err } } @@ -112,6 +115,10 @@ func readGeneration(r *bufio.Reader, spill *spilledBatch) (*generation, *spilled if g.freq == 0 { return nil, nil, fmt.Errorf("no frequency event found") } + if ver >= version.Go125 && !g.hasClockSnapshot { + return nil, nil, fmt.Errorf("no clock snapshot event found") + } + // N.B. Trust that the batch order is correct. We can't validate the batch order // by timestamp because the timestamps could just be plain wrong. The source of // truth is the order things appear in the trace and the partial order sequence @@ -140,7 +147,7 @@ func readGeneration(r *bufio.Reader, spill *spilledBatch) (*generation, *spilled } // processBatch adds the batch to the generation. -func processBatch(g *generation, b batch) error { +func processBatch(g *generation, b batch, ver version.Version) error { switch { case b.isStringsBatch(): if err := addStrings(&g.strings, b); err != nil { @@ -156,15 +163,10 @@ func processBatch(g *generation, b batch) error { return err } g.cpuSamples = samples - case b.isFreqBatch(): - freq, err := parseFreq(b) - if err != nil { + case b.isSyncBatch(ver): + if err := setSyncBatch(&g.sync, b, ver); err != nil { return err } - if g.freq != 0 { - return fmt.Errorf("found multiple frequency events") - } - g.freq = freq case b.exp != tracev2.NoExperiment: if g.expBatches == nil { g.expBatches = make(map[tracev2.Experiment][]ExperimentalBatch) @@ -421,21 +423,81 @@ func addCPUSamples(samples []cpuSample, b batch) ([]cpuSample, error) { return samples, nil } -// parseFreq parses out a lone EvFrequency from a batch. -func parseFreq(b batch) (frequency, error) { - if !b.isFreqBatch() { - return 0, fmt.Errorf("internal error: parseFreq called on non-frequency batch") +// sync holds the per-generation sync data. +type sync struct { + freq frequency + hasClockSnapshot bool + snapTime timestamp + snapMono uint64 + snapWall time.Time +} + +func setSyncBatch(s *sync, b batch, ver version.Version) error { + if !b.isSyncBatch(ver) { + return fmt.Errorf("internal error: setSyncBatch called on non-sync batch") } r := bytes.NewReader(b.data) - r.ReadByte() // Consume the EvFrequency byte. - - // Read the frequency. It'll come out as timestamp units per second. - f, err := binary.ReadUvarint(r) - if err != nil { - return 0, err + if ver >= version.Go125 { + hdr, err := r.ReadByte() // Consume the EvSync byte. + if err != nil || tracev2.EventType(hdr) != tracev2.EvSync { + return fmt.Errorf("missing sync batch header") + } } - // Convert to nanoseconds per timestamp unit. - return frequency(1.0 / (float64(f) / 1e9)), nil + + lastTs := b.time + for r.Len() != 0 { + // Read the header + ev, err := r.ReadByte() + if err != nil { + return err + } + et := tracev2.EventType(ev) + switch { + case et == tracev2.EvFrequency: + if s.freq != 0 { + return fmt.Errorf("found multiple frequency events") + } + // Read the frequency. It'll come out as timestamp units per second. + f, err := binary.ReadUvarint(r) + if err != nil { + return err + } + // Convert to nanoseconds per timestamp unit. + s.freq = frequency(1.0 / (float64(f) / 1e9)) + case et == tracev2.EvClockSnapshot && ver >= version.Go125: + if s.hasClockSnapshot { + return fmt.Errorf("found multiple clock snapshot events") + } + s.hasClockSnapshot = true + // Read the EvClockSnapshot arguments. + tdiff, err := binary.ReadUvarint(r) + if err != nil { + return err + } + lastTs += timestamp(tdiff) + s.snapTime = lastTs + mono, err := binary.ReadUvarint(r) + if err != nil { + return err + } + s.snapMono = mono + sec, err := binary.ReadUvarint(r) + if err != nil { + return err + } + nsec, err := binary.ReadUvarint(r) + if err != nil { + return err + } + // TODO(felixge): In theory we could inject s.snapMono into the time + // value below to make it comparable. But there is no API for this + // in the time package right now. + s.snapWall = time.Unix(int64(sec), int64(nsec)) + default: + return fmt.Errorf("expected frequency or clock snapshot event, got %d", ev) + } + } + return nil } // addExperimentalBatch takes an experimental batch and adds it to the list of experimental diff --git a/src/internal/trace/internal/testgen/trace.go b/src/internal/trace/internal/testgen/trace.go index 0ae7e9924e..415acaccae 100644 --- a/src/internal/trace/internal/testgen/trace.go +++ b/src/internal/trace/internal/testgen/trace.go @@ -11,6 +11,7 @@ import ( "os" "regexp" "strings" + "time" "internal/trace" "internal/trace/raw" @@ -55,6 +56,7 @@ type Trace struct { events []raw.Event gens []*Generation validTimestamps bool + lastTs Time // Expectation state. bad bool @@ -66,6 +68,7 @@ func NewTrace(ver version.Version) *Trace { return &Trace{ names: tracev2.EventNames(ver.Specs()), specs: ver.Specs(), + ver: ver, validTimestamps: true, } } @@ -106,6 +109,7 @@ func (t *Trace) Generation(gen uint64) *Generation { gen: gen, strings: make(map[string]uint64), stacks: make(map[stack]uint64), + sync: sync{freq: 15625000}, } t.gens = append(t.gens, g) return g @@ -115,7 +119,7 @@ func (t *Trace) Generation(gen uint64) *Generation { func (t *Trace) Generate() []byte { // Trace file contents. var buf bytes.Buffer - tw, err := raw.NewTextWriter(&buf, version.Go122) + tw, err := raw.NewTextWriter(&buf, t.ver) if err != nil { panic(err.Error()) } @@ -153,7 +157,7 @@ func (t *Trace) createEvent(ev tracev2.EventType, data []byte, args ...uint64) r } } return raw.Event{ - Version: version.Go122, + Version: t.ver, Ev: ev, Args: args, Data: data, @@ -177,6 +181,7 @@ type Generation struct { batches []*Batch strings map[string]uint64 stacks map[stack]uint64 + sync sync // Options applied when Trace.Generate is called. ignoreStringBatchSizeLimit bool @@ -187,14 +192,11 @@ type Generation struct { // // This is convenience function for generating correct batches. func (g *Generation) Batch(thread trace.ThreadID, time Time) *Batch { - if !g.trace.validTimestamps { - time = 0 - } b := &Batch{ - gen: g, - thread: thread, - timestamp: time, + gen: g, + thread: thread, } + b.setTimestamp(time) g.batches = append(g.batches, b) return b } @@ -237,20 +239,59 @@ func (g *Generation) Stack(stk []trace.StackFrame) uint64 { return id } +// Sync configures the sync batch for the generation. For go1.25 and later, +// the time value is the timestamp of the EvClockSnapshot event. For earlier +// version, the time value is the timestamp of the batch containing a lone +// EvFrequency event. +func (g *Generation) Sync(freq uint64, time Time, mono uint64, wall time.Time) { + if g.trace.ver < version.Go125 && (mono != 0 || !wall.IsZero()) { + panic(fmt.Sprintf("mono and wall args are not supported in go1.%d traces", g.trace.ver)) + } + g.sync = sync{ + freq: freq, + time: time, + mono: mono, + walltime: wall, + } +} + +type sync struct { + freq uint64 + time Time + mono uint64 + walltime time.Time +} + // writeEventsTo emits event batches in the generation to tw. func (g *Generation) writeEventsTo(tw *raw.TextWriter) { + // go1.25+ sync batches are emitted at the start of the generation. + if g.trace.ver >= version.Go125 { + b := g.newStructuralBatch() + // Arrange for EvClockSnapshot's ts to be exactly g.sync.time. + b.setTimestamp(g.sync.time - 1) + b.RawEvent(tracev2.EvSync, nil) + b.RawEvent(tracev2.EvFrequency, nil, g.sync.freq) + sec := uint64(g.sync.walltime.Unix()) + nsec := uint64(g.sync.walltime.Nanosecond()) + b.Event("ClockSnapshot", g.sync.mono, sec, nsec) + b.writeEventsTo(tw) + } + // Write event batches for the generation. for _, b := range g.batches { b.writeEventsTo(tw) } - // Write frequency. - b := g.newStructuralBatch() - b.RawEvent(tracev2.EvFrequency, nil, 15625000) - b.writeEventsTo(tw) + // Write lone EvFrequency sync batch for older traces. + if g.trace.ver < version.Go125 { + b := g.newStructuralBatch() + b.setTimestamp(g.sync.time) + b.RawEvent(tracev2.EvFrequency, nil, g.sync.freq) + b.writeEventsTo(tw) + } // Write stacks. - b = g.newStructuralBatch() + b := g.newStructuralBatch() b.RawEvent(tracev2.EvStacks, nil) for stk, id := range g.stacks { stk := stk.stk[:stk.len] @@ -284,7 +325,9 @@ func (g *Generation) writeEventsTo(tw *raw.TextWriter) { } func (g *Generation) newStructuralBatch() *Batch { - return &Batch{gen: g, thread: trace.NoThread} + b := &Batch{gen: g, thread: trace.NoThread} + b.setTimestamp(g.trace.lastTs + 1) + return b } // Batch represents an event batch. @@ -309,6 +352,7 @@ func (b *Batch) Event(name string, args ...any) { if b.gen.trace.specs[ev].IsTimedEvent { if b.gen.trace.validTimestamps { uintArgs = []uint64{1} + b.gen.trace.lastTs += 1 } else { uintArgs = []uint64{0} } @@ -332,7 +376,7 @@ func (b *Batch) uintArgFor(arg any, argSpec string) uint64 { } var u uint64 switch typStr { - case "value": + case "value", "mono", "sec", "nsec": u = arg.(uint64) case "stack": u = b.gen.Stack(arg.([]trace.StackFrame)) @@ -382,7 +426,7 @@ func (b *Batch) RawEvent(typ tracev2.EventType, data []byte, args ...uint64) { // writeEventsTo emits events in the batch, including the batch header, to tw. func (b *Batch) writeEventsTo(tw *raw.TextWriter) { tw.WriteEvent(raw.Event{ - Version: version.Go122, + Version: b.gen.trace.ver, Ev: tracev2.EvEventBatch, Args: []uint64{b.gen.gen, uint64(b.thread), uint64(b.timestamp), b.size}, }) @@ -391,6 +435,14 @@ func (b *Batch) writeEventsTo(tw *raw.TextWriter) { } } +// setTimestamp sets the timestamp for the batch. +func (b *Batch) setTimestamp(t Time) { + if b.gen.trace.validTimestamps { + b.timestamp = t + b.gen.trace.lastTs = t + } +} + // Seq represents a sequence counter. type Seq uint64 diff --git a/src/internal/trace/reader.go b/src/internal/trace/reader.go index 7212a424d7..83b5a2f123 100644 --- a/src/internal/trace/reader.go +++ b/src/internal/trace/reader.go @@ -54,7 +54,7 @@ func NewReader(r io.Reader) (*Reader, error) { return &Reader{ v1Events: convertV1Trace(tr), }, nil - case version.Go122, version.Go123: + case version.Go122, version.Go123, version.Go125: return &Reader{ version: v, r: br, @@ -158,7 +158,7 @@ func (r *Reader) ReadEvent() (e Event, err error) { return syncEvent(nil, r.lastTs, r.syncs), nil } // Read the next generation. - r.gen, r.spill, r.spillErr = readGeneration(r.r, r.spill) + r.gen, r.spill, r.spillErr = readGeneration(r.r, r.spill, r.version) if r.gen == nil { r.spillErrSync = true r.syncs++ @@ -183,11 +183,8 @@ func (r *Reader) ReadEvent() (e Event, err error) { r.frontier = heapInsert(r.frontier, bc) } r.syncs++ - if r.lastTs == 0 { - r.lastTs = r.gen.freq.mul(r.gen.minTs) - } // Always emit a sync event at the beginning of the generation. - return syncEvent(r.gen.evTable, r.lastTs, r.syncs), nil + return syncEvent(r.gen.evTable, r.gen.freq.mul(r.gen.minTs), r.syncs), nil } tryAdvance := func(i int) (bool, error) { bc := r.frontier[i] diff --git a/src/internal/trace/reader_test.go b/src/internal/trace/reader_test.go index 37c21da667..691cda6688 100644 --- a/src/internal/trace/reader_test.go +++ b/src/internal/trace/reader_test.go @@ -13,6 +13,7 @@ import ( "path/filepath" "strings" "testing" + "time" "internal/trace" "internal/trace/raw" @@ -37,11 +38,13 @@ func TestReaderGolden(t *testing.T) { t.Fatalf("failed to relativize testdata path: %v", err) } t.Run(testName, func(t *testing.T) { - tr, exp, err := testtrace.ParseFile(testPath) + tr, ver, exp, err := testtrace.ParseFile(testPath) if err != nil { t.Fatalf("failed to parse test file at %s: %v", testPath, err) } - testReader(t, tr, exp) + v := testtrace.NewValidator() + v.GoVersion = ver + testReader(t, tr, v, exp) }) } } @@ -93,7 +96,7 @@ func FuzzReader(f *testing.F) { }) } -func testReader(t *testing.T, tr io.Reader, exp *testtrace.Expectation) { +func testReader(t *testing.T, tr io.Reader, v *testtrace.Validator, exp *testtrace.Expectation) { r, err := trace.NewReader(tr) if err != nil { if err := exp.Check(err); err != nil { @@ -101,7 +104,6 @@ func testReader(t *testing.T, tr io.Reader, exp *testtrace.Expectation) { } return } - v := testtrace.NewValidator() for { ev, err := r.ReadEvent() if err == io.EOF { @@ -170,3 +172,76 @@ func dumpTraceToFile(t *testing.T, testName string, stress bool, b []byte) strin } return f.Name() } + +func TestTraceGenSync(t *testing.T) { + type sync struct { + Time trace.Time + ClockSnapshot *trace.ClockSnapshot + } + runTest := func(testName string, wantSyncs []sync) { + t.Run(testName, func(t *testing.T) { + testPath := "testdata/tests/" + testName + r, _, _, err := testtrace.ParseFile(testPath) + if err != nil { + t.Fatalf("malformed test %s: bad trace file: %v", testPath, err) + } + tr, err := trace.NewReader(r) + if err != nil { + t.Fatalf("malformed test %s: bad trace file: %v", testPath, err) + } + var syncEvents []trace.Event + for { + ev, err := tr.ReadEvent() + if err == io.EOF { + break + } + if err != nil { + t.Fatalf("malformed test %s: bad trace file: %v", testPath, err) + } + if ev.Kind() == trace.EventSync { + syncEvents = append(syncEvents, ev) + } + } + + if got, want := len(syncEvents), len(wantSyncs); got != want { + t.Errorf("got %d sync events, want %d", got, want) + } + + for i, want := range wantSyncs { + got := syncEvents[i] + gotSync := syncEvents[i].Sync() + if got.Time() != want.Time { + t.Errorf("sync=%d got time %d, want %d", i+1, got.Time(), want.Time) + } + if gotSync.ClockSnapshot == nil && want.ClockSnapshot == nil { + continue + } + if gotSync.ClockSnapshot.Trace != want.ClockSnapshot.Trace { + t.Errorf("sync=%d got trace time %d, want %d", i+1, gotSync.ClockSnapshot.Trace, want.ClockSnapshot.Trace) + } + if !gotSync.ClockSnapshot.Wall.Equal(want.ClockSnapshot.Wall) { + t.Errorf("sync=%d got wall time %s, want %s", i+1, gotSync.ClockSnapshot.Wall, want.ClockSnapshot.Wall) + } + if gotSync.ClockSnapshot.Mono != want.ClockSnapshot.Mono { + t.Errorf("sync=%d got mono time %d, want %d", i+1, gotSync.ClockSnapshot.Mono, want.ClockSnapshot.Mono) + } + } + }) + } + + runTest("go123-sync.test", []sync{ + {10, nil}, + {40, nil}, + // The EvFrequency batch for generation 3 is emitted at trace.Time(80), + // but 60 is the minTs of the generation, see b30 in the go generator. + {60, nil}, + {63, nil}, + }) + + runTest("go125-sync.test", []sync{ + {9, &trace.ClockSnapshot{Trace: 10, Mono: 99, Wall: time.Date(2025, 2, 28, 15, 4, 9, 123, time.UTC)}}, + {38, &trace.ClockSnapshot{Trace: 40, Mono: 199, Wall: time.Date(2025, 2, 28, 15, 4, 10, 123, time.UTC)}}, + {58, &trace.ClockSnapshot{Trace: 60, Mono: 299, Wall: time.Date(2025, 2, 28, 15, 4, 11, 123, time.UTC)}}, + {83, nil}, + }) +} diff --git a/src/internal/trace/summary_test.go b/src/internal/trace/summary_test.go index 396bd5f096..c5f1910262 100644 --- a/src/internal/trace/summary_test.go +++ b/src/internal/trace/summary_test.go @@ -264,7 +264,7 @@ func basicGoroutineSummaryChecks(t *testing.T, summary *trace.GoroutineSummary) } func summarizeTraceTest(t *testing.T, testPath string) *trace.Summary { - trc, _, err := testtrace.ParseFile(testPath) + trc, _, _, err := testtrace.ParseFile(testPath) if err != nil { t.Fatalf("malformed test %s: bad trace file: %v", testPath, err) } @@ -388,7 +388,7 @@ func basicGoroutineExecStatsChecks(t *testing.T, stats *trace.GoroutineExecStats func TestRelatedGoroutinesV2Trace(t *testing.T) { testPath := "testdata/tests/go122-gc-stress.test" - trc, _, err := testtrace.ParseFile(testPath) + trc, _, _, err := testtrace.ParseFile(testPath) if err != nil { t.Fatalf("malformed test %s: bad trace file: %v", testPath, err) } diff --git a/src/internal/trace/testdata/generators/go123-sync.go b/src/internal/trace/testdata/generators/go123-sync.go new file mode 100644 index 0000000000..257581c7ea --- /dev/null +++ b/src/internal/trace/testdata/generators/go123-sync.go @@ -0,0 +1,30 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + "internal/trace" + "internal/trace/internal/testgen" + "internal/trace/tracev2" + "internal/trace/version" + "time" +) + +func main() { + testgen.Main(version.Go123, gen) +} + +func gen(t *testgen.Trace) { + g1 := t.Generation(1) + g1.Sync(1000000000, 10, 0, time.Time{}) + b10 := g1.Batch(1, 15) + b10.Event("ProcStatus", trace.ProcID(0), tracev2.ProcRunning) + g2 := t.Generation(2) + g2.Sync(500000000, 20, 0, time.Time{}) + g3 := t.Generation(3) + b30 := g3.Batch(1, 30) + b30.Event("ProcStatus", trace.ProcID(0), tracev2.ProcRunning) + g3.Sync(500000000, 40, 0, time.Time{}) +} diff --git a/src/internal/trace/testdata/generators/go125-sync.go b/src/internal/trace/testdata/generators/go125-sync.go new file mode 100644 index 0000000000..30ebf6717a --- /dev/null +++ b/src/internal/trace/testdata/generators/go125-sync.go @@ -0,0 +1,31 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + "internal/trace" + "internal/trace/internal/testgen" + "internal/trace/tracev2" + "internal/trace/version" + "time" +) + +func main() { + testgen.Main(version.Go125, gen) +} + +func gen(t *testgen.Trace) { + start := time.Date(2025, 2, 28, 15, 4, 9, 123, time.UTC) + g1 := t.Generation(1) + g1.Sync(1000000000, 10, 99, start) + b10 := g1.Batch(1, 15) + b10.Event("ProcStatus", trace.ProcID(0), tracev2.ProcRunning) + g2 := t.Generation(2) + g2.Sync(500000000, 20, 199, start.Add(1*time.Second)) + g3 := t.Generation(3) + g3.Sync(500000000, 30, 299, start.Add(2*time.Second)) + b30 := g3.Batch(1, 40) + b30.Event("ProcStatus", trace.ProcID(0), tracev2.ProcRunning) +} diff --git a/src/internal/trace/testdata/tests/go123-sync.test b/src/internal/trace/testdata/tests/go123-sync.test new file mode 100644 index 0000000000..44e98e6c95 --- /dev/null +++ b/src/internal/trace/testdata/tests/go123-sync.test @@ -0,0 +1,26 @@ +-- expect -- +SUCCESS +-- trace -- +Trace Go1.23 +EventBatch gen=1 m=1 time=15 size=4 +ProcStatus dt=1 p=0 pstatus=1 +EventBatch gen=1 m=18446744073709551615 time=10 size=6 +Frequency freq=1000000000 +EventBatch gen=1 m=18446744073709551615 time=11 size=1 +Stacks +EventBatch gen=1 m=18446744073709551615 time=12 size=1 +Strings +EventBatch gen=2 m=18446744073709551615 time=20 size=6 +Frequency freq=500000000 +EventBatch gen=2 m=18446744073709551615 time=21 size=1 +Stacks +EventBatch gen=2 m=18446744073709551615 time=22 size=1 +Strings +EventBatch gen=3 m=1 time=30 size=4 +ProcStatus dt=1 p=0 pstatus=1 +EventBatch gen=3 m=18446744073709551615 time=40 size=6 +Frequency freq=500000000 +EventBatch gen=3 m=18446744073709551615 time=41 size=1 +Stacks +EventBatch gen=3 m=18446744073709551615 time=42 size=1 +Strings diff --git a/src/internal/trace/testdata/tests/go125-sync.test b/src/internal/trace/testdata/tests/go125-sync.test new file mode 100644 index 0000000000..dac3723b62 --- /dev/null +++ b/src/internal/trace/testdata/tests/go125-sync.test @@ -0,0 +1,32 @@ +-- expect -- +SUCCESS +-- trace -- +Trace Go1.25 +EventBatch gen=1 m=18446744073709551615 time=9 size=16 +Sync +Frequency freq=1000000000 +ClockSnapshot dt=1 mono=99 sec=1740755049 nsec=123 +EventBatch gen=1 m=1 time=15 size=4 +ProcStatus dt=1 p=0 pstatus=1 +EventBatch gen=1 m=18446744073709551615 time=11 size=1 +Stacks +EventBatch gen=1 m=18446744073709551615 time=12 size=1 +Strings +EventBatch gen=2 m=18446744073709551615 time=19 size=17 +Sync +Frequency freq=500000000 +ClockSnapshot dt=1 mono=199 sec=1740755050 nsec=123 +EventBatch gen=2 m=18446744073709551615 time=21 size=1 +Stacks +EventBatch gen=2 m=18446744073709551615 time=22 size=1 +Strings +EventBatch gen=3 m=18446744073709551615 time=29 size=17 +Sync +Frequency freq=500000000 +ClockSnapshot dt=1 mono=299 sec=1740755051 nsec=123 +EventBatch gen=3 m=1 time=40 size=4 +ProcStatus dt=1 p=0 pstatus=1 +EventBatch gen=3 m=18446744073709551615 time=31 size=1 +Stacks +EventBatch gen=3 m=18446744073709551615 time=32 size=1 +Strings diff --git a/src/internal/trace/testtrace/format.go b/src/internal/trace/testtrace/format.go index 82b69340ae..5c3c64787d 100644 --- a/src/internal/trace/testtrace/format.go +++ b/src/internal/trace/testtrace/format.go @@ -8,33 +8,34 @@ import ( "bytes" "fmt" "internal/trace/raw" + "internal/trace/version" "internal/txtar" "io" ) // ParseFile parses a test file generated by the testgen package. -func ParseFile(testPath string) (io.Reader, *Expectation, error) { +func ParseFile(testPath string) (io.Reader, version.Version, *Expectation, error) { ar, err := txtar.ParseFile(testPath) if err != nil { - return nil, nil, fmt.Errorf("failed to read test file for %s: %v", testPath, err) + return nil, 0, nil, fmt.Errorf("failed to read test file for %s: %v", testPath, err) } if len(ar.Files) != 2 { - return nil, nil, fmt.Errorf("malformed test %s: wrong number of files", testPath) + return nil, 0, nil, fmt.Errorf("malformed test %s: wrong number of files", testPath) } if ar.Files[0].Name != "expect" { - return nil, nil, fmt.Errorf("malformed test %s: bad filename %s", testPath, ar.Files[0].Name) + return nil, 0, nil, fmt.Errorf("malformed test %s: bad filename %s", testPath, ar.Files[0].Name) } if ar.Files[1].Name != "trace" { - return nil, nil, fmt.Errorf("malformed test %s: bad filename %s", testPath, ar.Files[1].Name) + return nil, 0, nil, fmt.Errorf("malformed test %s: bad filename %s", testPath, ar.Files[1].Name) } tr, err := raw.NewTextReader(bytes.NewReader(ar.Files[1].Data)) if err != nil { - return nil, nil, fmt.Errorf("malformed test %s: bad trace file: %v", testPath, err) + return nil, 0, nil, fmt.Errorf("malformed test %s: bad trace file: %v", testPath, err) } var buf bytes.Buffer tw, err := raw.NewWriter(&buf, tr.Version()) if err != nil { - return nil, nil, fmt.Errorf("failed to create trace byte writer: %v", err) + return nil, 0, nil, fmt.Errorf("failed to create trace byte writer: %v", err) } for { ev, err := tr.ReadEvent() @@ -42,15 +43,15 @@ func ParseFile(testPath string) (io.Reader, *Expectation, error) { break } if err != nil { - return nil, nil, fmt.Errorf("malformed test %s: bad trace file: %v", testPath, err) + return nil, 0, nil, fmt.Errorf("malformed test %s: bad trace file: %v", testPath, err) } if err := tw.WriteEvent(ev); err != nil { - return nil, nil, fmt.Errorf("internal error during %s: failed to write trace bytes: %v", testPath, err) + return nil, 0, nil, fmt.Errorf("internal error during %s: failed to write trace bytes: %v", testPath, err) } } exp, err := ParseExpectation(ar.Files[0].Data) if err != nil { - return nil, nil, fmt.Errorf("internal error during %s: failed to parse expectation %q: %v", testPath, string(ar.Files[0].Data), err) + return nil, 0, nil, fmt.Errorf("internal error during %s: failed to parse expectation %q: %v", testPath, string(ar.Files[0].Data), err) } - return &buf, exp, nil + return &buf, tr.Version(), exp, nil } diff --git a/src/internal/trace/testtrace/validation.go b/src/internal/trace/testtrace/validation.go index f61f7a3ffa..3de1e1d4bd 100644 --- a/src/internal/trace/testtrace/validation.go +++ b/src/internal/trace/testtrace/validation.go @@ -8,20 +8,24 @@ import ( "errors" "fmt" "internal/trace" + "internal/trace/version" "slices" "strings" ) // Validator is a type used for validating a stream of trace.Events. type Validator struct { - lastTs trace.Time - gs map[trace.GoID]*goState - ps map[trace.ProcID]*procState - ms map[trace.ThreadID]*schedContext - ranges map[trace.ResourceID][]string - tasks map[trace.TaskID]string - nSync int - Go121 bool + lastTs trace.Time + gs map[trace.GoID]*goState + ps map[trace.ProcID]*procState + ms map[trace.ThreadID]*schedContext + ranges map[trace.ResourceID][]string + tasks map[trace.TaskID]string + lastSync trace.Sync + GoVersion version.Version + + // Flags to modify validation behavior. + skipClockSnapshotChecks bool // Some platforms can't guarantee a monotonically increasing clock reading. } type schedContext struct { @@ -43,14 +47,23 @@ type procState struct { // NewValidator creates a new Validator. func NewValidator() *Validator { return &Validator{ - gs: make(map[trace.GoID]*goState), - ps: make(map[trace.ProcID]*procState), - ms: make(map[trace.ThreadID]*schedContext), - ranges: make(map[trace.ResourceID][]string), - tasks: make(map[trace.TaskID]string), + gs: make(map[trace.GoID]*goState), + ps: make(map[trace.ProcID]*procState), + ms: make(map[trace.ThreadID]*schedContext), + ranges: make(map[trace.ResourceID][]string), + tasks: make(map[trace.TaskID]string), + GoVersion: version.Current, } } +// SkipClockSnapshotChecks causes the validator to skip checks on the clock snapshots. +// +// Some platforms like Windows, with a small enough trace period, are unable to produce +// monotonically increasing timestamps due to very coarse clock granularity. +func (v *Validator) SkipClockSnapshotChecks() { + v.skipClockSnapshotChecks = true +} + // Event validates ev as the next event in a stream of trace.Events. // // Returns an error if validation fails. @@ -74,10 +87,41 @@ func (v *Validator) Event(ev trace.Event) error { switch ev.Kind() { case trace.EventSync: s := ev.Sync() - if s.N != v.nSync+1 { - e.Errorf("sync count is not sequential: expected %d, got %d", v.nSync+1, s.N) + if s.N != v.lastSync.N+1 { + e.Errorf("sync count is not sequential: expected %d, got %d", v.lastSync.N+1, s.N) } - v.nSync = s.N + // The trace reader currently emits synthetic sync events at the end of + // a trace. Those don't contain clock snapshots data, so we don't try + // to validate them. + // + // TODO(felixge): Drop the synthetic syncs as discussed in CL 653576. + if v.GoVersion >= version.Go125 && !(s.N > 1 && s.ClockSnapshot == nil) { + if s.ClockSnapshot == nil { + e.Errorf("sync %d has no clock snapshot", s.N) + } else { + if s.ClockSnapshot.Wall.IsZero() { + e.Errorf("sync %d has zero wall time", s.N) + } + if s.ClockSnapshot.Mono == 0 { + e.Errorf("sync %d has zero mono time", s.N) + } + if s.ClockSnapshot.Trace == 0 { + e.Errorf("sync %d has zero trace time", s.N) + } + if !v.skipClockSnapshotChecks { + if s.N >= 2 && !s.ClockSnapshot.Wall.After(v.lastSync.ClockSnapshot.Wall) { + e.Errorf("sync %d has non-increasing wall time: %v vs %v", s.N, s.ClockSnapshot.Wall, v.lastSync.ClockSnapshot.Wall) + } + if s.N >= 2 && !(s.ClockSnapshot.Mono > v.lastSync.ClockSnapshot.Mono) { + e.Errorf("sync %d has non-increasing mono time: %v vs %v", s.N, s.ClockSnapshot.Mono, v.lastSync.ClockSnapshot.Mono) + } + if s.N >= 2 && !(s.ClockSnapshot.Trace > v.lastSync.ClockSnapshot.Trace) { + e.Errorf("sync %d has non-increasing trace time: %v vs %v", s.N, s.ClockSnapshot.Trace, v.lastSync.ClockSnapshot.Trace) + } + } + } + } + v.lastSync = s case trace.EventMetric: m := ev.Metric() if !strings.Contains(m.Name, ":") { @@ -143,7 +187,7 @@ func (v *Validator) Event(ev trace.Event) error { if new == trace.GoUndetermined { e.Errorf("transition to undetermined state for goroutine %d", id) } - if v.nSync > 1 && old == trace.GoUndetermined { + if v.lastSync.N > 1 && old == trace.GoUndetermined { e.Errorf("undetermined goroutine %d after first global sync", id) } if new == trace.GoNotExist && v.hasAnyRange(trace.MakeResourceID(id)) { @@ -196,7 +240,7 @@ func (v *Validator) Event(ev trace.Event) error { if new == trace.ProcUndetermined { e.Errorf("transition to undetermined state for proc %d", id) } - if v.nSync > 1 && old == trace.ProcUndetermined { + if v.lastSync.N > 1 && old == trace.ProcUndetermined { e.Errorf("undetermined proc %d after first global sync", id) } if new == trace.ProcNotExist && v.hasAnyRange(trace.MakeResourceID(id)) { @@ -325,7 +369,7 @@ func (v *Validator) getOrCreateThread(e *errAccumulator, ev trace.Event, m trace // Be lenient about GoUndetermined -> GoSyscall transitions if they // originate from an old trace. These transitions lack thread // information in trace formats older than 1.22. - if !v.Go121 { + if v.GoVersion >= version.Go122 { return false } if ev.Kind() != trace.EventStateTransition { diff --git a/src/internal/trace/trace_test.go b/src/internal/trace/trace_test.go index 4ff87c1ede..0aa297d762 100644 --- a/src/internal/trace/trace_test.go +++ b/src/internal/trace/trace_test.go @@ -12,6 +12,7 @@ import ( "internal/testenv" "internal/trace" "internal/trace/testtrace" + "internal/trace/version" "io" "os" "path/filepath" @@ -617,7 +618,16 @@ func testTraceProg(t *testing.T, progName string, extra func(t *testing.T, trace tb := traceBuf.Bytes() // Test the trace and the parser. - testReader(t, bytes.NewReader(tb), testtrace.ExpectSuccess()) + v := testtrace.NewValidator() + v.GoVersion = version.Current + if runtime.GOOS == "windows" && stress { + // Under stress mode we're constantly advancing trace generations. + // Windows' clock granularity is too coarse to guarantee monotonic + // timestamps for monotonic and wall clock time in this case, so + // skip the checks. + v.SkipClockSnapshotChecks() + } + testReader(t, bytes.NewReader(tb), v, testtrace.ExpectSuccess()) // Run some extra validation. if !t.Failed() && extra != nil { diff --git a/src/internal/trace/tracev1_test.go b/src/internal/trace/tracev1_test.go index 008c7535c9..42a8371887 100644 --- a/src/internal/trace/tracev1_test.go +++ b/src/internal/trace/tracev1_test.go @@ -7,6 +7,7 @@ package trace_test import ( "internal/trace" "internal/trace/testtrace" + "internal/trace/version" "io" "os" "path/filepath" @@ -38,7 +39,7 @@ func TestTraceV1(t *testing.T) { } v := testtrace.NewValidator() - v.Go121 = true + v.GoVersion = version.Go121 for { ev, err := tr.ReadEvent() if err != nil { diff --git a/src/internal/trace/tracev2/events.go b/src/internal/trace/tracev2/events.go index 2f3581ab5b..bfbbdec00f 100644 --- a/src/internal/trace/tracev2/events.go +++ b/src/internal/trace/tracev2/events.go @@ -83,6 +83,14 @@ const ( // Batch event for an experimental batch with a custom format. Added in Go 1.23. EvExperimentalBatch // start of extra data [experiment ID, generation, M ID, timestamp, batch length, batch data...] + // Sync batch. Added in Go 1.25. Previously a lone EvFrequency event. + EvSync // start of a sync batch [...EvFrequency|EvClockSnapshot] + EvClockSnapshot // snapshot of trace, mono and wall clocks [timestamp, mono, sec, nsec] + + // Reserved internal in-band end-of-generation signal. Must never appear in the trace. Added in Go 1.25. + // This could be used as an explicit in-band end-of-generation signal in the future. + EvEndOfGeneration + NumEvents ) @@ -182,6 +190,12 @@ var specs = [...]EventSpec{ Args: []string{"exp", "gen", "m", "time"}, HasData: true, // Easier to represent for raw readers. }, + EvSync: { + Name: "Sync", + }, + EvEndOfGeneration: { + Name: "EndOfGeneration", + }, // "Timed" Events. EvProcsChange: { @@ -419,6 +433,11 @@ var specs = [...]EventSpec{ IsTimedEvent: true, StackIDs: []int{4}, }, + EvClockSnapshot: { + Name: "ClockSnapshot", + Args: []string{"dt", "mono", "sec", "nsec"}, + IsTimedEvent: true, + }, // Experimental events. diff --git a/src/internal/trace/version/version.go b/src/internal/trace/version/version.go index 8c460734ce..ce994bbf4a 100644 --- a/src/internal/trace/version/version.go +++ b/src/internal/trace/version/version.go @@ -20,7 +20,8 @@ const ( Go121 Version = 21 // v1 Go122 Version = 22 // v2 Go123 Version = 23 // v2 - Current = Go123 + Go125 Version = 25 // v2 + Current = Go125 ) var versions = map[Version][]tracev2.EventSpec{ @@ -30,8 +31,9 @@ var versions = map[Version][]tracev2.EventSpec{ Go119: nil, Go121: nil, - Go122: tracev2.Specs()[:tracev2.EvUserLog+1], // All events after are Go 1.23+. - Go123: tracev2.Specs(), + Go122: tracev2.Specs()[:tracev2.EvUserLog+1], // All events after are Go 1.23+. + Go123: tracev2.Specs()[:tracev2.EvExperimentalBatch+1], // All events after are Go 1.25+. + Go125: tracev2.Specs(), } // Specs returns the set of event.Specs for this version. diff --git a/src/log/slog/attr.go b/src/log/slog/attr.go index 067c537cc9..c592e54eaf 100644 --- a/src/log/slog/attr.go +++ b/src/log/slog/attr.go @@ -67,6 +67,15 @@ func Group(key string, args ...any) Attr { return Attr{key, GroupValue(argsToAttrSlice(args)...)} } +// GroupAttrs returns an Attr for a Group [Value] +// consisting of the given Attrs. +// +// GroupAttrs is a more efficient version of [Group] +// that accepts only [Attr] values. +func GroupAttrs(key string, attrs ...Attr) Attr { + return Attr{key, GroupValue(attrs...)} +} + func argsToAttrSlice(args []any) []Attr { var ( attr Attr diff --git a/src/log/slog/example_test.go b/src/log/slog/example_test.go index b03cc01066..c8a05a7bd5 100644 --- a/src/log/slog/example_test.go +++ b/src/log/slog/example_test.go @@ -5,6 +5,7 @@ package slog_test import ( + "context" "log/slog" "net/http" "os" @@ -35,3 +36,46 @@ func ExampleGroup() { // Output: // level=INFO msg=finished req.method=GET req.url=localhost status=200 duration=1s } + +func ExampleGroupAttrs() { + r, _ := http.NewRequest("POST", "localhost", http.NoBody) + // ... + + logger := slog.New( + slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{ + Level: slog.LevelDebug, + ReplaceAttr: func(groups []string, a slog.Attr) slog.Attr { + if a.Key == slog.TimeKey && len(groups) == 0 { + return slog.Attr{} + } + return a + }, + }), + ) + + // Use []slog.Attr to accumulate attributes. + attrs := []slog.Attr{slog.String("method", r.Method)} + attrs = append(attrs, slog.String("url", r.URL.String())) + + if r.Method == "POST" { + attrs = append(attrs, slog.Int("content-length", int(r.ContentLength))) + } + + // Group the attributes under a key. + logger.LogAttrs(context.Background(), slog.LevelInfo, + "finished", + slog.Int("status", http.StatusOK), + slog.GroupAttrs("req", attrs...), + ) + + // Groups with empty keys are inlined. + logger.LogAttrs(context.Background(), slog.LevelInfo, + "finished", + slog.Int("status", http.StatusOK), + slog.GroupAttrs("", attrs...), + ) + + // Output: + // level=INFO msg=finished status=200 req.method=POST req.url=localhost req.content-length=0 + // level=INFO msg=finished status=200 method=POST url=localhost content-length=0 +} diff --git a/src/log/slog/handler.go b/src/log/slog/handler.go index e56be5f494..26eb4b82fc 100644 --- a/src/log/slog/handler.go +++ b/src/log/slog/handler.go @@ -492,6 +492,9 @@ func (s *handleState) appendAttr(a Attr) bool { // Special case: Source. if v := a.Value; v.Kind() == KindAny { if src, ok := v.Any().(*Source); ok { + if src.isEmpty() { + return false + } if s.h.json { a.Value = src.group() } else { diff --git a/src/log/slog/handler_test.go b/src/log/slog/handler_test.go index 445f43f1f5..3c4c36912c 100644 --- a/src/log/slog/handler_test.go +++ b/src/log/slog/handler_test.go @@ -652,7 +652,7 @@ func TestJSONAndTextHandlersWithUnavailableSource(t *testing.T) { h Handler want string }{ - {"text", NewTextHandler(&buf, opts), "source=:0 msg=message"}, + {"text", NewTextHandler(&buf, opts), "msg=message"}, {"json", NewJSONHandler(&buf, opts), `{"msg":"message"}`}, } { t.Run(test.name, func(t *testing.T) { diff --git a/src/log/slog/logger_test.go b/src/log/slog/logger_test.go index 558aecaf6e..63595504fe 100644 --- a/src/log/slog/logger_test.go +++ b/src/log/slog/logger_test.go @@ -349,7 +349,7 @@ func TestAlloc(t *testing.T) { t.Run("2 pairs", func(t *testing.T) { s := "abc" i := 2000 - wantAllocs(t, 2, func() { + wantAllocs(t, 0, func() { dl.Info("hello", "n", i, "s", s, @@ -360,7 +360,7 @@ func TestAlloc(t *testing.T) { l := New(DiscardHandler) s := "abc" i := 2000 - wantAllocs(t, 2, func() { + wantAllocs(t, 0, func() { l.Log(ctx, LevelInfo, "hello", "n", i, "s", s, @@ -384,7 +384,7 @@ func TestAlloc(t *testing.T) { s := "abc" i := 2000 d := time.Second - wantAllocs(t, 10, func() { + wantAllocs(t, 1, func() { dl.Info("hello", "n", i, "s", s, "d", d, "n", i, "s", s, "d", d, diff --git a/src/log/slog/record.go b/src/log/slog/record.go index 53ecc67cc8..3b4e68ce76 100644 --- a/src/log/slog/record.go +++ b/src/log/slog/record.go @@ -211,6 +211,9 @@ func (s *Source) group() Value { return GroupValue(as...) } +// isEmpty returns whether the Source struct is nil or only contains zero fields. +func (s *Source) isEmpty() bool { return s == nil || *s == Source{} } + // Source returns a new Source for the log event using r's PC. // If the PC field is zero, meaning the Record was created without the necessary information // or the location is unavailable, then nil is returned. diff --git a/src/net/fd_fake.go b/src/net/fd_fake.go index ae567acc69..946805ab94 100644 --- a/src/net/fd_fake.go +++ b/src/net/fd_fake.go @@ -104,6 +104,7 @@ func (fd *netFD) accept() (netfd *netFD, err error) { func (fd *netFD) setAddr(laddr, raddr Addr) { fd.laddr = laddr fd.raddr = raddr + // TODO Replace with runtime.AddCleanup. runtime.SetFinalizer(fd, (*netFD).Close) } @@ -111,6 +112,7 @@ func (fd *netFD) Close() error { if fd.fakeNetFD != nil { return fd.fakeNetFD.Close() } + // TODO Replace with runtime.AddCleanup. runtime.SetFinalizer(fd, nil) return fd.pfd.Close() } diff --git a/src/net/fd_posix.go b/src/net/fd_posix.go index 93e6b5378e..023cd534e4 100644 --- a/src/net/fd_posix.go +++ b/src/net/fd_posix.go @@ -40,10 +40,12 @@ func (fd *netFD) name() string { func (fd *netFD) setAddr(laddr, raddr Addr) { fd.laddr = laddr fd.raddr = raddr + // TODO Replace with runtime.AddCleanup. runtime.SetFinalizer(fd, (*netFD).Close) } func (fd *netFD) Close() error { + // TODO Replace with runtime.AddCleanup. runtime.SetFinalizer(fd, nil) return fd.pfd.Close() } diff --git a/src/net/http/clientserver_test.go b/src/net/http/clientserver_test.go index 208c6509fa..c3cf3984ef 100644 --- a/src/net/http/clientserver_test.go +++ b/src/net/http/clientserver_test.go @@ -15,7 +15,6 @@ import ( "crypto/tls" "fmt" "hash" - "internal/synctest" "io" "log" "maps" @@ -34,6 +33,7 @@ import ( "sync" "sync/atomic" "testing" + "testing/synctest" "time" ) @@ -95,33 +95,13 @@ func run[T TBRun[T]](t T, f func(t T, mode testMode), opts ...any) { } } -// cleanupT wraps a testing.T and adds its own Cleanup method. -// Used to execute cleanup functions within a synctest bubble. -type cleanupT struct { - *testing.T - cleanups []func() -} - -// Cleanup replaces T.Cleanup. -func (t *cleanupT) Cleanup(f func()) { - t.cleanups = append(t.cleanups, f) -} - -func (t *cleanupT) done() { - for _, f := range slices.Backward(t.cleanups) { - f() - } -} - // runSynctest is run combined with synctest.Run. // // The TB passed to f arranges for cleanup functions to be run in the synctest bubble. -func runSynctest(t *testing.T, f func(t testing.TB, mode testMode), opts ...any) { +func runSynctest(t *testing.T, f func(t *testing.T, mode testMode), opts ...any) { run(t, func(t *testing.T, mode testMode) { - synctest.Run(func() { - ct := &cleanupT{T: t} - defer ct.done() - f(ct, mode) + synctest.Test(t, func(t *testing.T) { + f(t, mode) }) }, opts...) } @@ -292,12 +272,12 @@ func TestNewClientServerTest(t *testing.T) { }, modes) }) t.Run("synctest", func(t *testing.T) { - runSynctest(t, func(t testing.TB, mode testMode) { + runSynctest(t, func(t *testing.T, mode testMode) { testNewClientServerTest(t, mode, optFakeNet) }, modes) }) } -func testNewClientServerTest(t testing.TB, mode testMode, opts ...any) { +func testNewClientServerTest(t *testing.T, mode testMode, opts ...any) { var got struct { sync.Mutex proto string diff --git a/src/net/http/csrf.go b/src/net/http/csrf.go new file mode 100644 index 0000000000..a46071f806 --- /dev/null +++ b/src/net/http/csrf.go @@ -0,0 +1,182 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http + +import ( + "errors" + "fmt" + "net/url" + "sync" + "sync/atomic" +) + +// CrossOriginProtection implements protections against [Cross-Site Request +// Forgery (CSRF)] by rejecting non-safe cross-origin browser requests. +// +// Cross-origin requests are currently detected with the [Sec-Fetch-Site] +// header, available in all browsers since 2023, or by comparing the hostname of +// the [Origin] header with the Host header. +// +// The GET, HEAD, and OPTIONS methods are [safe methods] and are always allowed. +// It's important that applications do not perform any state changing actions +// due to requests with safe methods. +// +// Requests without Sec-Fetch-Site or Origin headers are currently assumed to be +// either same-origin or non-browser requests, and are allowed. +// +// [Sec-Fetch-Site]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Site +// [Origin]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin +// [Cross-Site Request Forgery (CSRF)]: https://developer.mozilla.org/en-US/docs/Web/Security/Attacks/CSRF +// [safe methods]: https://developer.mozilla.org/en-US/docs/Glossary/Safe/HTTP +type CrossOriginProtection struct { + bypass *ServeMux + trustedMu sync.RWMutex + trusted map[string]bool + deny atomic.Pointer[Handler] +} + +// NewCrossOriginProtection returns a new [CrossOriginProtection] value. +func NewCrossOriginProtection() *CrossOriginProtection { + return &CrossOriginProtection{ + bypass: NewServeMux(), + trusted: make(map[string]bool), + } +} + +// AddTrustedOrigin allows all requests with an [Origin] header +// which exactly matches the given value. +// +// Origin header values are of the form "scheme://host[:port]". +// +// AddTrustedOrigin can be called concurrently with other methods +// or request handling, and applies to future requests. +// +// [Origin]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin +func (c *CrossOriginProtection) AddTrustedOrigin(origin string) error { + u, err := url.Parse(origin) + if err != nil { + return fmt.Errorf("invalid origin %q: %w", origin, err) + } + if u.Scheme == "" { + return fmt.Errorf("invalid origin %q: scheme is required", origin) + } + if u.Host == "" { + return fmt.Errorf("invalid origin %q: host is required", origin) + } + if u.Path != "" || u.RawQuery != "" || u.Fragment != "" { + return fmt.Errorf("invalid origin %q: path, query, and fragment are not allowed", origin) + } + c.trustedMu.Lock() + defer c.trustedMu.Unlock() + c.trusted[origin] = true + return nil +} + +var noopHandler = HandlerFunc(func(w ResponseWriter, r *Request) {}) + +// AddInsecureBypassPattern permits all requests that match the given pattern. +// The pattern syntax and precedence rules are the same as [ServeMux]. +// +// AddInsecureBypassPattern can be called concurrently with other methods +// or request handling, and applies to future requests. +func (c *CrossOriginProtection) AddInsecureBypassPattern(pattern string) { + c.bypass.Handle(pattern, noopHandler) +} + +// SetDenyHandler sets a handler to invoke when a request is rejected. +// The default error handler responds with a 403 Forbidden status. +// +// SetDenyHandler can be called concurrently with other methods +// or request handling, and applies to future requests. +// +// Check does not call the error handler. +func (c *CrossOriginProtection) SetDenyHandler(h Handler) { + if h == nil { + c.deny.Store(nil) + return + } + c.deny.Store(&h) +} + +// Check applies cross-origin checks to a request. +// It returns an error if the request should be rejected. +func (c *CrossOriginProtection) Check(req *Request) error { + switch req.Method { + case "GET", "HEAD", "OPTIONS": + // Safe methods are always allowed. + return nil + } + + switch req.Header.Get("Sec-Fetch-Site") { + case "": + // No Sec-Fetch-Site header is present. + // Fallthrough to check the Origin header. + case "same-origin", "none": + return nil + default: + if c.isRequestExempt(req) { + return nil + } + return errors.New("cross-origin request detected from Sec-Fetch-Site header") + } + + origin := req.Header.Get("Origin") + if origin == "" { + // Neither Sec-Fetch-Site nor Origin headers are present. + // Either the request is same-origin or not a browser request. + return nil + } + + if o, err := url.Parse(origin); err == nil && o.Host == req.Host { + // The Origin header matches the Host header. Note that the Host header + // doesn't include the scheme, so we don't know if this might be an + // HTTP→HTTPS cross-origin request. We fail open, since all modern + // browsers support Sec-Fetch-Site since 2023, and running an older + // browser makes a clear security trade-off already. Sites can mitigate + // this with HTTP Strict Transport Security (HSTS). + return nil + } + + if c.isRequestExempt(req) { + return nil + } + return errors.New("cross-origin request detected, and/or browser is out of date: " + + "Sec-Fetch-Site is missing, and Origin does not match Host") +} + +// isRequestExempt checks the bypasses which require taking a lock, and should +// be deferred until the last moment. +func (c *CrossOriginProtection) isRequestExempt(req *Request) bool { + if _, pattern := c.bypass.Handler(req); pattern != "" { + // The request matches a bypass pattern. + return true + } + + c.trustedMu.RLock() + defer c.trustedMu.RUnlock() + origin := req.Header.Get("Origin") + // The request matches a trusted origin. + return origin != "" && c.trusted[origin] +} + +// Handler returns a handler that applies cross-origin checks +// before invoking the handler h. +// +// If a request fails cross-origin checks, the request is rejected +// with a 403 Forbidden status or handled with the handler passed +// to [CrossOriginProtection.SetDenyHandler]. +func (c *CrossOriginProtection) Handler(h Handler) Handler { + return HandlerFunc(func(w ResponseWriter, r *Request) { + if err := c.Check(r); err != nil { + if deny := c.deny.Load(); deny != nil { + (*deny).ServeHTTP(w, r) + return + } + Error(w, err.Error(), StatusForbidden) + return + } + h.ServeHTTP(w, r) + }) +} diff --git a/src/net/http/csrf_test.go b/src/net/http/csrf_test.go new file mode 100644 index 0000000000..30986a43b9 --- /dev/null +++ b/src/net/http/csrf_test.go @@ -0,0 +1,330 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http_test + +import ( + "io" + "net/http" + "net/http/httptest" + "strings" + "testing" +) + +// httptestNewRequest works around https://go.dev/issue/73151. +func httptestNewRequest(method, target string) *http.Request { + req := httptest.NewRequest(method, target, nil) + req.URL.Scheme = "" + req.URL.Host = "" + return req +} + +var okHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) +}) + +func TestCrossOriginProtectionSecFetchSite(t *testing.T) { + protection := http.NewCrossOriginProtection() + handler := protection.Handler(okHandler) + + tests := []struct { + name string + method string + secFetchSite string + origin string + expectedStatus int + }{ + {"same-origin allowed", "POST", "same-origin", "", http.StatusOK}, + {"none allowed", "POST", "none", "", http.StatusOK}, + {"cross-site blocked", "POST", "cross-site", "", http.StatusForbidden}, + {"same-site blocked", "POST", "same-site", "", http.StatusForbidden}, + + {"no header with no origin", "POST", "", "", http.StatusOK}, + {"no header with matching origin", "POST", "", "https://example.com", http.StatusOK}, + {"no header with mismatched origin", "POST", "", "https://attacker.example", http.StatusForbidden}, + {"no header with null origin", "POST", "", "null", http.StatusForbidden}, + + {"GET allowed", "GET", "cross-site", "", http.StatusOK}, + {"HEAD allowed", "HEAD", "cross-site", "", http.StatusOK}, + {"OPTIONS allowed", "OPTIONS", "cross-site", "", http.StatusOK}, + {"PUT blocked", "PUT", "cross-site", "", http.StatusForbidden}, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + req := httptestNewRequest(tc.method, "https://example.com/") + if tc.secFetchSite != "" { + req.Header.Set("Sec-Fetch-Site", tc.secFetchSite) + } + if tc.origin != "" { + req.Header.Set("Origin", tc.origin) + } + + w := httptest.NewRecorder() + handler.ServeHTTP(w, req) + + if w.Code != tc.expectedStatus { + t.Errorf("got status %d, want %d", w.Code, tc.expectedStatus) + } + }) + } +} + +func TestCrossOriginProtectionTrustedOriginBypass(t *testing.T) { + protection := http.NewCrossOriginProtection() + err := protection.AddTrustedOrigin("https://trusted.example") + if err != nil { + t.Fatalf("AddTrustedOrigin: %v", err) + } + handler := protection.Handler(okHandler) + + tests := []struct { + name string + origin string + secFetchSite string + expectedStatus int + }{ + {"trusted origin without sec-fetch-site", "https://trusted.example", "", http.StatusOK}, + {"trusted origin with cross-site", "https://trusted.example", "cross-site", http.StatusOK}, + {"untrusted origin without sec-fetch-site", "https://attacker.example", "", http.StatusForbidden}, + {"untrusted origin with cross-site", "https://attacker.example", "cross-site", http.StatusForbidden}, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + req := httptestNewRequest("POST", "https://example.com/") + req.Header.Set("Origin", tc.origin) + if tc.secFetchSite != "" { + req.Header.Set("Sec-Fetch-Site", tc.secFetchSite) + } + + w := httptest.NewRecorder() + handler.ServeHTTP(w, req) + + if w.Code != tc.expectedStatus { + t.Errorf("got status %d, want %d", w.Code, tc.expectedStatus) + } + }) + } +} + +func TestCrossOriginProtectionPatternBypass(t *testing.T) { + protection := http.NewCrossOriginProtection() + protection.AddInsecureBypassPattern("/bypass/") + protection.AddInsecureBypassPattern("/only/{foo}") + handler := protection.Handler(okHandler) + + tests := []struct { + name string + path string + secFetchSite string + expectedStatus int + }{ + {"bypass path without sec-fetch-site", "/bypass/", "", http.StatusOK}, + {"bypass path with cross-site", "/bypass/", "cross-site", http.StatusOK}, + {"non-bypass path without sec-fetch-site", "/api/", "", http.StatusForbidden}, + {"non-bypass path with cross-site", "/api/", "cross-site", http.StatusForbidden}, + + {"redirect to bypass path without ..", "/foo/../bypass/bar", "", http.StatusOK}, + {"redirect to bypass path with trailing slash", "/bypass", "", http.StatusOK}, + {"redirect to non-bypass path with ..", "/foo/../api/bar", "", http.StatusForbidden}, + {"redirect to non-bypass path with trailing slash", "/api", "", http.StatusForbidden}, + + {"wildcard bypass", "/only/123", "", http.StatusOK}, + {"non-wildcard", "/only/123/foo", "", http.StatusForbidden}, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + req := httptestNewRequest("POST", "https://example.com"+tc.path) + req.Header.Set("Origin", "https://attacker.example") + if tc.secFetchSite != "" { + req.Header.Set("Sec-Fetch-Site", tc.secFetchSite) + } + + w := httptest.NewRecorder() + handler.ServeHTTP(w, req) + + if w.Code != tc.expectedStatus { + t.Errorf("got status %d, want %d", w.Code, tc.expectedStatus) + } + }) + } +} + +func TestCrossOriginProtectionSetDenyHandler(t *testing.T) { + protection := http.NewCrossOriginProtection() + + handler := protection.Handler(okHandler) + + req := httptestNewRequest("POST", "https://example.com/") + req.Header.Set("Sec-Fetch-Site", "cross-site") + + w := httptest.NewRecorder() + handler.ServeHTTP(w, req) + + if w.Code != http.StatusForbidden { + t.Errorf("got status %d, want %d", w.Code, http.StatusForbidden) + } + + customErrHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusTeapot) + io.WriteString(w, "custom error") + }) + protection.SetDenyHandler(customErrHandler) + + w = httptest.NewRecorder() + handler.ServeHTTP(w, req) + + if w.Code != http.StatusTeapot { + t.Errorf("got status %d, want %d", w.Code, http.StatusTeapot) + } + + if !strings.Contains(w.Body.String(), "custom error") { + t.Errorf("expected custom error message, got: %q", w.Body.String()) + } + + req = httptestNewRequest("GET", "https://example.com/") + + w = httptest.NewRecorder() + handler.ServeHTTP(w, req) + + if w.Code != http.StatusOK { + t.Errorf("got status %d, want %d", w.Code, http.StatusOK) + } + + protection.SetDenyHandler(nil) + + req = httptestNewRequest("POST", "https://example.com/") + req.Header.Set("Sec-Fetch-Site", "cross-site") + + w = httptest.NewRecorder() + handler.ServeHTTP(w, req) + + if w.Code != http.StatusForbidden { + t.Errorf("got status %d, want %d", w.Code, http.StatusForbidden) + } +} + +func TestCrossOriginProtectionAddTrustedOriginErrors(t *testing.T) { + protection := http.NewCrossOriginProtection() + + tests := []struct { + name string + origin string + wantErr bool + }{ + {"valid origin", "https://example.com", false}, + {"valid origin with port", "https://example.com:8080", false}, + {"http origin", "http://example.com", false}, + {"missing scheme", "example.com", true}, + {"missing host", "https://", true}, + {"trailing slash", "https://example.com/", true}, + {"with path", "https://example.com/path", true}, + {"with query", "https://example.com?query=value", true}, + {"with fragment", "https://example.com#fragment", true}, + {"invalid url", "https://ex ample.com", true}, + {"empty string", "", true}, + {"null", "null", true}, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + err := protection.AddTrustedOrigin(tc.origin) + if (err != nil) != tc.wantErr { + t.Errorf("AddTrustedOrigin(%q) error = %v, wantErr %v", tc.origin, err, tc.wantErr) + } + }) + } +} + +func TestCrossOriginProtectionAddingBypassesConcurrently(t *testing.T) { + protection := http.NewCrossOriginProtection() + handler := protection.Handler(okHandler) + + req := httptestNewRequest("POST", "https://example.com/") + req.Header.Set("Origin", "https://concurrent.example") + req.Header.Set("Sec-Fetch-Site", "cross-site") + + w := httptest.NewRecorder() + handler.ServeHTTP(w, req) + + if w.Code != http.StatusForbidden { + t.Errorf("got status %d, want %d", w.Code, http.StatusForbidden) + } + + start := make(chan struct{}) + done := make(chan struct{}) + go func() { + close(start) + defer close(done) + for range 10 { + w := httptest.NewRecorder() + handler.ServeHTTP(w, req) + } + }() + + // Add bypasses while the requests are in flight. + <-start + protection.AddTrustedOrigin("https://concurrent.example") + protection.AddInsecureBypassPattern("/foo/") + <-done + + w = httptest.NewRecorder() + handler.ServeHTTP(w, req) + + if w.Code != http.StatusOK { + t.Errorf("After concurrent bypass addition, got status %d, want %d", w.Code, http.StatusOK) + } +} + +func TestCrossOriginProtectionServer(t *testing.T) { + protection := http.NewCrossOriginProtection() + protection.AddTrustedOrigin("https://trusted.example") + protection.AddInsecureBypassPattern("/bypass/") + handler := protection.Handler(okHandler) + + ts := httptest.NewServer(handler) + defer ts.Close() + + tests := []struct { + name string + method string + url string + origin string + secFetchSite string + expectedStatus int + }{ + {"cross-site", "POST", ts.URL, "https://attacker.example", "cross-site", http.StatusForbidden}, + {"same-origin", "POST", ts.URL, "", "same-origin", http.StatusOK}, + {"origin matches host", "POST", ts.URL, ts.URL, "", http.StatusOK}, + {"trusted origin", "POST", ts.URL, "https://trusted.example", "", http.StatusOK}, + {"untrusted origin", "POST", ts.URL, "https://attacker.example", "", http.StatusForbidden}, + {"bypass path", "POST", ts.URL + "/bypass/", "https://attacker.example", "", http.StatusOK}, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + req, err := http.NewRequest(tc.method, tc.url, nil) + if err != nil { + t.Fatalf("NewRequest: %v", err) + } + if tc.origin != "" { + req.Header.Set("Origin", tc.origin) + } + if tc.secFetchSite != "" { + req.Header.Set("Sec-Fetch-Site", tc.secFetchSite) + } + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + t.Fatalf("Do: %v", err) + } + defer resp.Body.Close() + if resp.StatusCode != tc.expectedStatus { + t.Errorf("got status %d, want %d", resp.StatusCode, tc.expectedStatus) + } + }) + } +} diff --git a/src/net/http/serve_test.go b/src/net/http/serve_test.go index 84d383ccfa..7e3e490af3 100644 --- a/src/net/http/serve_test.go +++ b/src/net/http/serve_test.go @@ -5855,7 +5855,7 @@ func testServerShutdown(t *testing.T, mode testMode) { } func TestServerShutdownStateNew(t *testing.T) { runSynctest(t, testServerShutdownStateNew) } -func testServerShutdownStateNew(t testing.TB, mode testMode) { +func testServerShutdownStateNew(t *testing.T, mode testMode) { if testing.Short() { t.Skip("test takes 5-6 seconds; skipping in short mode") } diff --git a/src/net/http/server.go b/src/net/http/server.go index ca7383f5e6..1ca5a227ef 100644 --- a/src/net/http/server.go +++ b/src/net/http/server.go @@ -2674,7 +2674,8 @@ func stripHostPort(h string) string { // the path that will match after following the redirect. // // If there is no registered handler that applies to the request, -// Handler returns a “page not found” handler and an empty pattern. +// Handler returns a “page not found” or “method not supported” +// handler and an empty pattern. // // Handler does not modify its argument. In particular, it does not // populate named path wildcards, so r.PathValue will always return @@ -2864,7 +2865,7 @@ func (mux *ServeMux) ServeHTTP(w ResponseWriter, r *Request) { // always refers to user code. // Handle registers the handler for the given pattern. -// If the given pattern conflicts, with one that is already registered, Handle +// If the given pattern conflicts with one that is already registered, Handle // panics. func (mux *ServeMux) Handle(pattern string, handler Handler) { if use121 { @@ -2875,7 +2876,7 @@ func (mux *ServeMux) Handle(pattern string, handler Handler) { } // HandleFunc registers the handler function for the given pattern. -// If the given pattern conflicts, with one that is already registered, HandleFunc +// If the given pattern conflicts with one that is already registered, HandleFunc // panics. func (mux *ServeMux) HandleFunc(pattern string, handler func(ResponseWriter, *Request)) { if use121 { diff --git a/src/net/http/transport_test.go b/src/net/http/transport_test.go index 431dc4ee20..9762f05886 100644 --- a/src/net/http/transport_test.go +++ b/src/net/http/transport_test.go @@ -4230,7 +4230,7 @@ func TestTransportIdleConnRacesRequest(t *testing.T) { // block the connection closing. runSynctest(t, testTransportIdleConnRacesRequest, []testMode{http1Mode, http2UnencryptedMode}) } -func testTransportIdleConnRacesRequest(t testing.TB, mode testMode) { +func testTransportIdleConnRacesRequest(t *testing.T, mode testMode) { if mode == http2UnencryptedMode { t.Skip("remove skip when #70515 is fixed") } @@ -4305,7 +4305,7 @@ func testTransportIdleConnRacesRequest(t testing.TB, mode testMode) { func TestTransportRemovesConnsAfterIdle(t *testing.T) { runSynctest(t, testTransportRemovesConnsAfterIdle) } -func testTransportRemovesConnsAfterIdle(t testing.TB, mode testMode) { +func testTransportRemovesConnsAfterIdle(t *testing.T, mode testMode) { if testing.Short() { t.Skip("skipping in short mode") } @@ -4351,7 +4351,7 @@ func testTransportRemovesConnsAfterIdle(t testing.TB, mode testMode) { func TestTransportRemovesConnsAfterBroken(t *testing.T) { runSynctest(t, testTransportRemovesConnsAfterBroken) } -func testTransportRemovesConnsAfterBroken(t testing.TB, mode testMode) { +func testTransportRemovesConnsAfterBroken(t *testing.T, mode testMode) { if testing.Short() { t.Skip("skipping in short mode") } diff --git a/src/os/path_test.go b/src/os/path_test.go index 2a4e9565dc..563f7753bd 100644 --- a/src/os/path_test.go +++ b/src/os/path_test.go @@ -16,63 +16,84 @@ import ( var isReadonlyError = func(error) bool { return false } func TestMkdirAll(t *testing.T) { - t.Parallel() + testMaybeRooted(t, func(t *testing.T, r *Root) { + mkdirAll := MkdirAll + create := Create + if r != nil { + mkdirAll = r.MkdirAll + create = r.Create + } - tmpDir := TempDir() - path := tmpDir + "/_TestMkdirAll_/dir/./dir2" - err := MkdirAll(path, 0777) - if err != nil { - t.Fatalf("MkdirAll %q: %s", path, err) - } - defer RemoveAll(tmpDir + "/_TestMkdirAll_") - - // Already exists, should succeed. - err = MkdirAll(path, 0777) - if err != nil { - t.Fatalf("MkdirAll %q (second time): %s", path, err) - } - - // Make file. - fpath := path + "/file" - f, err := Create(fpath) - if err != nil { - t.Fatalf("create %q: %s", fpath, err) - } - defer f.Close() - - // Can't make directory named after file. - err = MkdirAll(fpath, 0777) - if err == nil { - t.Fatalf("MkdirAll %q: no error", fpath) - } - perr, ok := err.(*PathError) - if !ok { - t.Fatalf("MkdirAll %q returned %T, not *PathError", fpath, err) - } - if filepath.Clean(perr.Path) != filepath.Clean(fpath) { - t.Fatalf("MkdirAll %q returned wrong error path: %q not %q", fpath, filepath.Clean(perr.Path), filepath.Clean(fpath)) - } - - // Can't make subdirectory of file. - ffpath := fpath + "/subdir" - err = MkdirAll(ffpath, 0777) - if err == nil { - t.Fatalf("MkdirAll %q: no error", ffpath) - } - perr, ok = err.(*PathError) - if !ok { - t.Fatalf("MkdirAll %q returned %T, not *PathError", ffpath, err) - } - if filepath.Clean(perr.Path) != filepath.Clean(fpath) { - t.Fatalf("MkdirAll %q returned wrong error path: %q not %q", ffpath, filepath.Clean(perr.Path), filepath.Clean(fpath)) - } - - if runtime.GOOS == "windows" { - path := tmpDir + `\_TestMkdirAll_\dir\.\dir2\` - err := MkdirAll(path, 0777) + path := "_TestMkdirAll_/dir/./dir2" + err := mkdirAll(path, 0777) if err != nil { t.Fatalf("MkdirAll %q: %s", path, err) } + + // Already exists, should succeed. + err = mkdirAll(path, 0777) + if err != nil { + t.Fatalf("MkdirAll %q (second time): %s", path, err) + } + + // Make file. + fpath := path + "/file" + f, err := create(fpath) + if err != nil { + t.Fatalf("create %q: %s", fpath, err) + } + defer f.Close() + + // Can't make directory named after file. + err = mkdirAll(fpath, 0777) + if err == nil { + t.Fatalf("MkdirAll %q: no error", fpath) + } + perr, ok := err.(*PathError) + if !ok { + t.Fatalf("MkdirAll %q returned %T, not *PathError", fpath, err) + } + if filepath.Clean(perr.Path) != filepath.Clean(fpath) { + t.Fatalf("MkdirAll %q returned wrong error path: %q not %q", fpath, filepath.Clean(perr.Path), filepath.Clean(fpath)) + } + + // Can't make subdirectory of file. + ffpath := fpath + "/subdir" + err = mkdirAll(ffpath, 0777) + if err == nil { + t.Fatalf("MkdirAll %q: no error", ffpath) + } + perr, ok = err.(*PathError) + if !ok { + t.Fatalf("MkdirAll %q returned %T, not *PathError", ffpath, err) + } + if filepath.Clean(perr.Path) != filepath.Clean(fpath) { + t.Fatalf("MkdirAll %q returned wrong error path: %q not %q", ffpath, filepath.Clean(perr.Path), filepath.Clean(fpath)) + } + + if runtime.GOOS == "windows" { + path := `_TestMkdirAll_\dir\.\dir2\` + err := mkdirAll(path, 0777) + if err != nil { + t.Fatalf("MkdirAll %q: %s", path, err) + } + } + }) +} + +func TestMkdirAllAbsPath(t *testing.T) { + t.Parallel() + tmpDir := t.TempDir() + path := filepath.Join(tmpDir, "/a/b/c") + if err := MkdirAll(path, 0o777); err != nil { + t.Fatal(err) + } + st, err := Stat(path) + if err != nil { + t.Fatal(err) + } + if !st.IsDir() { + t.Fatalf("after MkdirAll(%q, 0o777), %q is not a directory", path, path) } } diff --git a/src/os/pidfd_linux.go b/src/os/pidfd_linux.go index 5d89c9d39d..59911e8824 100644 --- a/src/os/pidfd_linux.go +++ b/src/os/pidfd_linux.go @@ -170,7 +170,10 @@ func checkPidfd() error { // Check waitid(P_PIDFD) works. err = ignoringEINTR(func() error { - return unix.Waitid(unix.P_PIDFD, int(fd), nil, syscall.WEXITED, nil) + var info unix.SiginfoChild + // We don't actually care about the info, but passing a nil pointer + // makes valgrind complain because 0x0 is unaddressable. + return unix.Waitid(unix.P_PIDFD, int(fd), &info, syscall.WEXITED, nil) }) // Expect ECHILD from waitid since we're not our own parent. if err != syscall.ECHILD { diff --git a/src/os/removeall_at.go b/src/os/removeall_at.go index 0d9ebd2e4f..a613aeeb91 100644 --- a/src/os/removeall_at.go +++ b/src/os/removeall_at.go @@ -44,7 +44,7 @@ func removeAll(path string) error { } defer parent.Close() - if err := removeAllFrom(parent, base); err != nil { + if err := removeAllFrom(sysfdType(parent.Fd()), base); err != nil { if pathErr, ok := err.(*PathError); ok { pathErr.Path = parentDir + string(PathSeparator) + pathErr.Path err = pathErr @@ -54,9 +54,7 @@ func removeAll(path string) error { return nil } -func removeAllFrom(parent *File, base string) error { - parentFd := sysfdType(parent.Fd()) - +func removeAllFrom(parentFd sysfdType, base string) error { // Simple case: if Unlink (aka remove) works, we're done. err := removefileat(parentFd, base) if err == nil || IsNotExist(err) { @@ -109,7 +107,7 @@ func removeAllFrom(parent *File, base string) error { respSize = len(names) for _, name := range names { - err := removeAllFrom(file, name) + err := removeAllFrom(sysfdType(file.Fd()), name) if err != nil { if pathErr, ok := err.(*PathError); ok { pathErr.Path = base + string(PathSeparator) + pathErr.Path diff --git a/src/os/root.go b/src/os/root.go index fb2bb8350a..953cd6b9b9 100644 --- a/src/os/root.go +++ b/src/os/root.go @@ -145,7 +145,7 @@ func (r *Root) Chmod(name string, mode FileMode) error { // See [Mkdir] for more details. // // If perm contains bits other than the nine least-significant bits (0o777), -// OpenFile returns an error. +// Mkdir returns an error. func (r *Root) Mkdir(name string, perm FileMode) error { if perm&0o777 != perm { return &PathError{Op: "mkdirat", Path: name, Err: errors.New("unsupported file mode")} @@ -153,6 +153,18 @@ func (r *Root) Mkdir(name string, perm FileMode) error { return rootMkdir(r, name, perm) } +// MkdirAll creates a new directory in the root, along with any necessary parents. +// See [MkdirAll] for more details. +// +// If perm contains bits other than the nine least-significant bits (0o777), +// MkdirAll returns an error. +func (r *Root) MkdirAll(name string, perm FileMode) error { + if perm&0o777 != perm { + return &PathError{Op: "mkdirat", Path: name, Err: errors.New("unsupported file mode")} + } + return rootMkdirAll(r, name, perm) +} + // Chown changes the numeric uid and gid of the named file in the root. // See [Chown] for more details. func (r *Root) Chown(name string, uid, gid int) error { @@ -177,6 +189,12 @@ func (r *Root) Remove(name string) error { return rootRemove(r, name) } +// RemoveAll removes the named file or directory and any children that it contains. +// See [RemoveAll] for more details. +func (r *Root) RemoveAll(name string) error { + return rootRemoveAll(r, name) +} + // Stat returns a [FileInfo] describing the named file in the root. // See [Stat] for more details. func (r *Root) Stat(name string) (FileInfo, error) { @@ -230,6 +248,31 @@ func (r *Root) Symlink(oldname, newname string) error { return rootSymlink(r, oldname, newname) } +// ReadFile reads the named file in the root and returns its contents. +// See [ReadFile] for more details. +func (r *Root) ReadFile(name string) ([]byte, error) { + f, err := r.Open(name) + if err != nil { + return nil, err + } + defer f.Close() + return readFileContents(statOrZero(f), f.Read) +} + +// WriteFile writes data to the named file in the root, creating it if necessary. +// See [WriteFile] for more details. +func (r *Root) WriteFile(name string, data []byte, perm FileMode) error { + f, err := r.OpenFile(name, O_WRONLY|O_CREATE|O_TRUNC, perm) + if err != nil { + return err + } + _, err = f.Write(data) + if err1 := f.Close(); err == nil { + err = err1 + } + return err +} + func (r *Root) logOpen(name string) { if log := testlog.Logger(); log != nil { // This won't be right if r's name has changed since it was opened, diff --git a/src/os/root_noopenat.go b/src/os/root_noopenat.go index 47d6ebfa82..c4929623c4 100644 --- a/src/os/root_noopenat.go +++ b/src/os/root_noopenat.go @@ -8,7 +8,9 @@ package os import ( "errors" + "internal/stringslite" "sync/atomic" + "syscall" "time" ) @@ -146,6 +148,27 @@ func rootMkdir(r *Root, name string, perm FileMode) error { return nil } +func rootMkdirAll(r *Root, name string, perm FileMode) error { + // We only check for errPathEscapes here. + // For errors such as ENOTDIR (a non-directory file appeared somewhere along the path), + // we let MkdirAll generate the error. + // MkdirAll will return a PathError referencing the exact location of the error, + // and we want to preserve that property. + if err := checkPathEscapes(r, name); err == errPathEscapes { + return &PathError{Op: "mkdirat", Path: name, Err: err} + } + prefix := r.root.name + string(PathSeparator) + if err := MkdirAll(prefix+name, perm); err != nil { + if pe, ok := err.(*PathError); ok { + pe.Op = "mkdirat" + pe.Path = stringslite.TrimPrefix(pe.Path, prefix) + return pe + } + return &PathError{Op: "mkdirat", Path: name, Err: underlyingError(err)} + } + return nil +} + func rootRemove(r *Root, name string) error { if err := checkPathEscapesLstat(r, name); err != nil { return &PathError{Op: "removeat", Path: name, Err: err} @@ -156,6 +179,25 @@ func rootRemove(r *Root, name string) error { return nil } +func rootRemoveAll(r *Root, name string) error { + if endsWithDot(name) { + // Consistency with os.RemoveAll: Return EINVAL when trying to remove . + return &PathError{Op: "RemoveAll", Path: name, Err: syscall.EINVAL} + } + if err := checkPathEscapesLstat(r, name); err != nil { + if err == syscall.ENOTDIR { + // Some intermediate path component is not a directory. + // RemoveAll treats this as success (since the target doesn't exist). + return nil + } + return &PathError{Op: "RemoveAll", Path: name, Err: err} + } + if err := RemoveAll(joinPath(r.root.name, name)); err != nil { + return &PathError{Op: "RemoveAll", Path: name, Err: underlyingError(err)} + } + return nil +} + func rootReadlink(r *Root, name string) (string, error) { if err := checkPathEscapesLstat(r, name); err != nil { return "", &PathError{Op: "readlinkat", Path: name, Err: err} diff --git a/src/os/root_openat.go b/src/os/root_openat.go index db2ae2295f..192c29e319 100644 --- a/src/os/root_openat.go +++ b/src/os/root_openat.go @@ -69,7 +69,7 @@ func (r *root) Name() string { } func rootChmod(r *Root, name string, mode FileMode) error { - _, err := doInRoot(r, name, func(parent sysfdType, name string) (struct{}, error) { + _, err := doInRoot(r, name, nil, func(parent sysfdType, name string) (struct{}, error) { return struct{}{}, chmodat(parent, name, mode) }) if err != nil { @@ -79,7 +79,7 @@ func rootChmod(r *Root, name string, mode FileMode) error { } func rootChown(r *Root, name string, uid, gid int) error { - _, err := doInRoot(r, name, func(parent sysfdType, name string) (struct{}, error) { + _, err := doInRoot(r, name, nil, func(parent sysfdType, name string) (struct{}, error) { return struct{}{}, chownat(parent, name, uid, gid) }) if err != nil { @@ -89,7 +89,7 @@ func rootChown(r *Root, name string, uid, gid int) error { } func rootLchown(r *Root, name string, uid, gid int) error { - _, err := doInRoot(r, name, func(parent sysfdType, name string) (struct{}, error) { + _, err := doInRoot(r, name, nil, func(parent sysfdType, name string) (struct{}, error) { return struct{}{}, lchownat(parent, name, uid, gid) }) if err != nil { @@ -99,7 +99,7 @@ func rootLchown(r *Root, name string, uid, gid int) error { } func rootChtimes(r *Root, name string, atime time.Time, mtime time.Time) error { - _, err := doInRoot(r, name, func(parent sysfdType, name string) (struct{}, error) { + _, err := doInRoot(r, name, nil, func(parent sysfdType, name string) (struct{}, error) { return struct{}{}, chtimesat(parent, name, atime, mtime) }) if err != nil { @@ -109,7 +109,7 @@ func rootChtimes(r *Root, name string, atime time.Time, mtime time.Time) error { } func rootMkdir(r *Root, name string, perm FileMode) error { - _, err := doInRoot(r, name, func(parent sysfdType, name string) (struct{}, error) { + _, err := doInRoot(r, name, nil, func(parent sysfdType, name string) (struct{}, error) { return struct{}{}, mkdirat(parent, name, perm) }) if err != nil { @@ -118,8 +118,67 @@ func rootMkdir(r *Root, name string, perm FileMode) error { return nil } +func rootMkdirAll(r *Root, fullname string, perm FileMode) error { + // doInRoot opens each path element in turn. + // + // openDirFunc opens all but the last path component. + // The usual default openDirFunc just opens directories with O_DIRECTORY. + // We replace it here with one that creates missing directories along the way. + openDirFunc := func(parent sysfdType, name string) (sysfdType, error) { + for try := range 2 { + fd, err := rootOpenDir(parent, name) + switch err.(type) { + case nil, errSymlink: + return fd, err + } + if try > 0 || !IsNotExist(err) { + return 0, &PathError{Op: "openat", Err: err} + } + if err := mkdirat(parent, name, perm); err != nil { + return 0, &PathError{Op: "mkdirat", Err: err} + } + } + panic("unreachable") + } + // openLastComponentFunc opens the last path component. + openLastComponentFunc := func(parent sysfdType, name string) (struct{}, error) { + err := mkdirat(parent, name, perm) + if err == syscall.EEXIST { + mode, e := modeAt(parent, name) + if e == nil { + if mode.IsDir() { + // The target of MkdirAll is an existing directory. + err = nil + } else if mode&ModeSymlink != 0 { + // The target of MkdirAll is a symlink. + // For consistency with os.MkdirAll, + // succeed if the link resolves to a directory. + // We don't return errSymlink here, because we don't + // want to create the link target if it doesn't exist. + fi, e := r.Stat(fullname) + if e == nil && fi.Mode().IsDir() { + err = nil + } + } + } + } + switch err.(type) { + case nil, errSymlink: + return struct{}{}, err + } + return struct{}{}, &PathError{Op: "mkdirat", Err: err} + } + _, err := doInRoot(r, fullname, openDirFunc, openLastComponentFunc) + if err != nil { + if _, ok := err.(*PathError); !ok { + err = &PathError{Op: "mkdirat", Path: fullname, Err: err} + } + } + return err +} + func rootReadlink(r *Root, name string) (string, error) { - target, err := doInRoot(r, name, func(parent sysfdType, name string) (string, error) { + target, err := doInRoot(r, name, nil, func(parent sysfdType, name string) (string, error) { return readlinkat(parent, name) }) if err != nil { @@ -129,7 +188,7 @@ func rootReadlink(r *Root, name string) (string, error) { } func rootRemove(r *Root, name string) error { - _, err := doInRoot(r, name, func(parent sysfdType, name string) (struct{}, error) { + _, err := doInRoot(r, name, nil, func(parent sysfdType, name string) (struct{}, error) { return struct{}{}, removeat(parent, name) }) if err != nil { @@ -138,9 +197,31 @@ func rootRemove(r *Root, name string) error { return nil } +func rootRemoveAll(r *Root, name string) error { + // Consistency with os.RemoveAll: Strip trailing /s from the name, + // so RemoveAll("not_a_directory/") succeeds. + for len(name) > 0 && IsPathSeparator(name[len(name)-1]) { + name = name[:len(name)-1] + } + if endsWithDot(name) { + // Consistency with os.RemoveAll: Return EINVAL when trying to remove . + return &PathError{Op: "RemoveAll", Path: name, Err: syscall.EINVAL} + } + _, err := doInRoot(r, name, nil, func(parent sysfdType, name string) (struct{}, error) { + return struct{}{}, removeAllFrom(parent, name) + }) + if IsNotExist(err) { + return nil + } + if err != nil { + return &PathError{Op: "RemoveAll", Path: name, Err: underlyingError(err)} + } + return err +} + func rootRename(r *Root, oldname, newname string) error { - _, err := doInRoot(r, oldname, func(oldparent sysfdType, oldname string) (struct{}, error) { - _, err := doInRoot(r, newname, func(newparent sysfdType, newname string) (struct{}, error) { + _, err := doInRoot(r, oldname, nil, func(oldparent sysfdType, oldname string) (struct{}, error) { + _, err := doInRoot(r, newname, nil, func(newparent sysfdType, newname string) (struct{}, error) { return struct{}{}, renameat(oldparent, oldname, newparent, newname) }) return struct{}{}, err @@ -152,8 +233,8 @@ func rootRename(r *Root, oldname, newname string) error { } func rootLink(r *Root, oldname, newname string) error { - _, err := doInRoot(r, oldname, func(oldparent sysfdType, oldname string) (struct{}, error) { - _, err := doInRoot(r, newname, func(newparent sysfdType, newname string) (struct{}, error) { + _, err := doInRoot(r, oldname, nil, func(oldparent sysfdType, oldname string) (struct{}, error) { + _, err := doInRoot(r, newname, nil, func(newparent sysfdType, newname string) (struct{}, error) { return struct{}{}, linkat(oldparent, oldname, newparent, newname) }) return struct{}{}, err @@ -166,13 +247,23 @@ func rootLink(r *Root, oldname, newname string) error { // doInRoot performs an operation on a path in a Root. // -// It opens the directory containing the final element of the path, -// and calls f with the directory FD and name of the final element. +// It calls f with the FD or handle for the directory containing the last +// path element, and the name of the last path element. // -// If the path refers to a symlink which should be followed, -// then f must return errSymlink. -// doInRoot will follow the symlink and call f again. -func doInRoot[T any](r *Root, name string, f func(parent sysfdType, name string) (T, error)) (ret T, err error) { +// For example, given the path a/b/c it calls f with the FD for a/b and the name "c". +// +// If openDirFunc is non-nil, it is called to open intermediate path elements. +// For example, given the path a/b/c openDirFunc will be called to open a and a/b in turn. +// +// f or openDirFunc may return errSymlink to indicate that the path element is a symlink +// which should be followed. Note that this can result in f being called multiple times +// with different names. For example, give the path "link" which is a symlink to "target", +// f is called with the path "link", returns errSymlink("target"), and is called again with +// the path "target". +// +// If f or openDirFunc return a *PathError, doInRoot will set PathError.Path to the +// full path which caused the error. +func doInRoot[T any](r *Root, name string, openDirFunc func(parent sysfdType, name string) (sysfdType, error), f func(parent sysfdType, name string) (T, error)) (ret T, err error) { if err := r.root.incref(); err != nil { return ret, err } @@ -182,6 +273,9 @@ func doInRoot[T any](r *Root, name string, f func(parent sysfdType, name string) if err != nil { return ret, err } + if openDirFunc == nil { + openDirFunc = rootOpenDir + } rootfd := r.root.fd dirfd := rootfd @@ -204,6 +298,7 @@ func doInRoot[T any](r *Root, name string, f func(parent sysfdType, name string) steps := 0 restarts := 0 symlinks := 0 +Loop: for { steps++ if steps > maxSteps && restarts > maxRestarts { @@ -245,23 +340,23 @@ func doInRoot[T any](r *Root, name string, f func(parent sysfdType, name string) // suffixSep contains any trailing separator characters // which we rejoin to the final part at this time. ret, err = f(dirfd, parts[i]+suffixSep) - if _, ok := err.(errSymlink); !ok { - return ret, err + if err == nil { + return } } else { var fd sysfdType - fd, err = rootOpenDir(dirfd, parts[i]) + fd, err = openDirFunc(dirfd, parts[i]) if err == nil { if dirfd != rootfd { syscall.Close(dirfd) } dirfd = fd - } else if _, ok := err.(errSymlink); !ok { - return ret, err } } - if e, ok := err.(errSymlink); ok { + switch e := err.(type) { + case nil: + case errSymlink: symlinks++ if symlinks > rootMaxSymlinks { return ret, syscall.ELOOP @@ -289,7 +384,16 @@ func doInRoot[T any](r *Root, name string, f func(parent sysfdType, name string) dirfd = rootfd } parts = newparts - continue + continue Loop + case *PathError: + // This is strings.Join(parts[:i+1], PathSeparator). + e.Path = parts[0] + for _, part := range parts[1 : i+1] { + e.Path += string(PathSeparator) + part + } + return ret, e + default: + return ret, err } i++ diff --git a/src/os/root_test.go b/src/os/root_test.go index 530d5abda6..effcdeab43 100644 --- a/src/os/root_test.go +++ b/src/os/root_test.go @@ -551,6 +551,40 @@ func TestRootMkdir(t *testing.T) { } } +func TestRootMkdirAll(t *testing.T) { + for _, test := range rootTestCases { + test.run(t, func(t *testing.T, target string, root *os.Root) { + wantError := test.wantError + if !wantError { + fi, err := os.Lstat(filepath.Join(root.Name(), test.open)) + if err == nil && fi.Mode().Type() == fs.ModeSymlink { + // This case is trying to mkdir("some symlink"), + // which is an error. + wantError = true + } + } + + err := root.Mkdir(test.open, 0o777) + if errEndsTest(t, err, wantError, "root.MkdirAll(%q)", test.open) { + return + } + fi, err := os.Lstat(target) + if err != nil { + t.Fatalf(`stat file created with Root.MkdirAll(%q): %v`, test.open, err) + } + if !fi.IsDir() { + t.Fatalf(`stat file created with Root.MkdirAll(%q): not a directory`, test.open) + } + if mode := fi.Mode(); mode&0o777 == 0 { + // Issue #73559: We're not going to worry about the exact + // mode bits (which will have been modified by umask), + // but there should be mode bits. + t.Fatalf(`stat file created with Root.MkdirAll(%q): mode=%v, want non-zero`, test.open, mode) + } + }) + } +} + func TestRootOpenRoot(t *testing.T) { for _, test := range rootTestCases { test.run(t, func(t *testing.T, target string, root *os.Root) { @@ -630,6 +664,46 @@ func TestRootRemoveDirectory(t *testing.T) { } } +func TestRootRemoveAll(t *testing.T) { + for _, test := range rootTestCases { + test.run(t, func(t *testing.T, target string, root *os.Root) { + wantError := test.wantError + if test.ltarget != "" { + // Remove doesn't follow symlinks in the final path component, + // so it will successfully remove ltarget. + wantError = false + target = filepath.Join(root.Name(), test.ltarget) + } else if target != "" { + if err := os.Mkdir(target, 0o777); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(filepath.Join(target, "file"), nil, 0o666); err != nil { + t.Fatal(err) + } + } + targetExists := true + if _, err := root.Lstat(test.open); errors.Is(err, os.ErrNotExist) { + // If the target doesn't exist, RemoveAll succeeds rather + // than returning ErrNotExist. + targetExists = false + wantError = false + } + + err := root.RemoveAll(test.open) + if errEndsTest(t, err, wantError, "root.RemoveAll(%q)", test.open) { + return + } + if !targetExists { + return + } + _, err = os.Lstat(target) + if !errors.Is(err, os.ErrNotExist) { + t.Fatalf(`stat file removed with Root.Remove(%q): %v, want ErrNotExist`, test.open, err) + } + }) + } +} + func TestRootOpenFileAsRoot(t *testing.T) { dir := t.TempDir() target := filepath.Join(dir, "target") @@ -958,6 +1032,9 @@ type rootConsistencyTest struct { // detailedErrorMismatch indicates that os.Root and the corresponding non-Root // function return different errors for this test. detailedErrorMismatch func(t *testing.T) bool + + // check is called before the test starts, and may t.Skip if necessary. + check func(t *testing.T) } var rootConsistencyTestCases = []rootConsistencyTest{{ @@ -1072,7 +1149,7 @@ var rootConsistencyTestCases = []rootConsistencyTest{{ name: "symlink to dir ends in slash", fs: []string{ "dir/", - "link => dir", + "link => dir/", }, open: "link", }, { @@ -1115,6 +1192,16 @@ var rootConsistencyTestCases = []rootConsistencyTest{{ // and os.Open returns "The file cannot be accessed by the system.". return runtime.GOOS == "windows" }, + check: func(t *testing.T) { + if runtime.GOOS == "windows" && strings.HasPrefix(t.Name(), "TestRootConsistencyRemoveAll/") { + // Root.RemoveAll notices that a/ is not a directory, + // and returns success. + // os.RemoveAll tries to open a/ and fails because + // it is not a regular file. + // The inconsistency here isn't worth fixing, so just skip this test. + t.Skip("known inconsistency on windows") + } + }, }, { name: "question mark", open: "?", @@ -1156,6 +1243,10 @@ func (test rootConsistencyTest) run(t *testing.T, f func(t *testing.T, path stri } t.Run(test.name, func(t *testing.T) { + if test.check != nil { + test.check(t) + } + dir1 := makefs(t, test.fs) dir2 := makefs(t, test.fs) if test.fsFunc != nil { @@ -1304,6 +1395,20 @@ func TestRootConsistencyMkdir(t *testing.T) { } } +func TestRootConsistencyMkdirAll(t *testing.T) { + for _, test := range rootConsistencyTestCases { + test.run(t, func(t *testing.T, path string, r *os.Root) (string, error) { + var err error + if r == nil { + err = os.MkdirAll(path, 0o777) + } else { + err = r.MkdirAll(path, 0o777) + } + return "", err + }) + } +} + func TestRootConsistencyRemove(t *testing.T) { for _, test := range rootConsistencyTestCases { if test.open == "." || test.open == "./" { @@ -1321,6 +1426,23 @@ func TestRootConsistencyRemove(t *testing.T) { } } +func TestRootConsistencyRemoveAll(t *testing.T) { + for _, test := range rootConsistencyTestCases { + if test.open == "." || test.open == "./" { + continue // can't remove the root itself + } + test.run(t, func(t *testing.T, path string, r *os.Root) (string, error) { + var err error + if r == nil { + err = os.RemoveAll(path) + } else { + err = r.RemoveAll(path) + } + return "", err + }) + } +} + func TestRootConsistencyStat(t *testing.T) { for _, test := range rootConsistencyTestCases { test.run(t, func(t *testing.T, path string, r *os.Root) (string, error) { @@ -1759,3 +1881,41 @@ func TestOpenInRoot(t *testing.T) { } } } + +func TestRootRemoveDot(t *testing.T) { + dir := t.TempDir() + root, err := os.OpenRoot(dir) + if err != nil { + t.Fatal(err) + } + defer root.Close() + if err := root.Remove("."); err == nil { + t.Errorf(`root.Remove(".") = %v, want error`, err) + } + if err := root.RemoveAll("."); err == nil { + t.Errorf(`root.RemoveAll(".") = %v, want error`, err) + } + if _, err := os.Stat(dir); err != nil { + t.Error(`root.Remove(All)?(".") removed the root`) + } +} + +func TestRootWriteReadFile(t *testing.T) { + dir := t.TempDir() + root, err := os.OpenRoot(dir) + if err != nil { + t.Fatal(err) + } + defer root.Close() + + name := "filename" + want := []byte("file contents") + if err := root.WriteFile(name, want, 0o666); err != nil { + t.Fatalf("root.WriteFile(%q, %q, 0o666) = %v; want nil", name, want, err) + } + + got, err := root.ReadFile(name) + if err != nil { + t.Fatalf("root.ReadFile(%q) = %q, %v; want %q, nil", name, got, err, want) + } +} diff --git a/src/os/root_unix.go b/src/os/root_unix.go index 74320451d5..af963f472d 100644 --- a/src/os/root_unix.go +++ b/src/os/root_unix.go @@ -14,6 +14,9 @@ import ( "time" ) +// sysfdType is the native type of a file handle +// (int on Unix, syscall.Handle on Windows), +// permitting helper functions to be written portably. type sysfdType = int // openRootNolog is OpenRoot. @@ -59,7 +62,7 @@ func newRoot(fd int, name string) (*Root, error) { // openRootInRoot is Root.OpenRoot. func openRootInRoot(r *Root, name string) (*Root, error) { - fd, err := doInRoot(r, name, func(parent int, name string) (fd int, err error) { + fd, err := doInRoot(r, name, nil, func(parent int, name string) (fd int, err error) { ignoringEINTR(func() error { fd, err = unix.Openat(parent, name, syscall.O_NOFOLLOW|syscall.O_CLOEXEC, 0) if isNoFollowErr(err) { @@ -77,7 +80,7 @@ func openRootInRoot(r *Root, name string) (*Root, error) { // rootOpenFileNolog is Root.OpenFile. func rootOpenFileNolog(root *Root, name string, flag int, perm FileMode) (*File, error) { - fd, err := doInRoot(root, name, func(parent int, name string) (fd int, err error) { + fd, err := doInRoot(root, name, nil, func(parent int, name string) (fd int, err error) { ignoringEINTR(func() error { fd, err = unix.Openat(parent, name, syscall.O_NOFOLLOW|syscall.O_CLOEXEC|flag, uint32(perm)) if isNoFollowErr(err) || err == syscall.ENOTDIR { @@ -115,7 +118,7 @@ func rootOpenDir(parent int, name string) (int, error) { } func rootStat(r *Root, name string, lstat bool) (FileInfo, error) { - fi, err := doInRoot(r, name, func(parent sysfdType, n string) (FileInfo, error) { + fi, err := doInRoot(r, name, nil, func(parent sysfdType, n string) (FileInfo, error) { var fs fileStat if err := unix.Fstatat(parent, n, &fs.sys, unix.AT_SYMLINK_NOFOLLOW); err != nil { return nil, err @@ -133,7 +136,7 @@ func rootStat(r *Root, name string, lstat bool) (FileInfo, error) { } func rootSymlink(r *Root, oldname, newname string) error { - _, err := doInRoot(r, newname, func(parent sysfdType, name string) (struct{}, error) { + _, err := doInRoot(r, newname, nil, func(parent sysfdType, name string) (struct{}, error) { return struct{}{}, symlinkat(oldname, parent, name) }) if err != nil { @@ -243,6 +246,15 @@ func symlinkat(oldname string, newfd int, newname string) error { return unix.Symlinkat(oldname, newfd, newname) } +func modeAt(parent int, name string) (FileMode, error) { + var fs fileStat + if err := unix.Fstatat(parent, name, &fs.sys, unix.AT_SYMLINK_NOFOLLOW); err != nil { + return 0, err + } + fillFileStatFromSys(&fs, name) + return fs.mode, nil +} + // checkSymlink resolves the symlink name in parent, // and returns errSymlink with the link contents. // diff --git a/src/os/root_windows.go b/src/os/root_windows.go index b096d78b68..a918606806 100644 --- a/src/os/root_windows.go +++ b/src/os/root_windows.go @@ -77,6 +77,9 @@ func rootCleanPath(s string, prefix, suffix []string) (string, error) { return s, nil } +// sysfdType is the native type of a file handle +// (int on Unix, syscall.Handle on Windows), +// permitting helper functions to be written portably. type sysfdType = syscall.Handle // openRootNolog is OpenRoot. @@ -116,7 +119,7 @@ func newRoot(fd syscall.Handle, name string) (*Root, error) { // openRootInRoot is Root.OpenRoot. func openRootInRoot(r *Root, name string) (*Root, error) { - fd, err := doInRoot(r, name, rootOpenDir) + fd, err := doInRoot(r, name, nil, rootOpenDir) if err != nil { return nil, &PathError{Op: "openat", Path: name, Err: err} } @@ -125,7 +128,7 @@ func openRootInRoot(r *Root, name string) (*Root, error) { // rootOpenFileNolog is Root.OpenFile. func rootOpenFileNolog(root *Root, name string, flag int, perm FileMode) (*File, error) { - fd, err := doInRoot(root, name, func(parent syscall.Handle, name string) (syscall.Handle, error) { + fd, err := doInRoot(root, name, nil, func(parent syscall.Handle, name string) (syscall.Handle, error) { return openat(parent, name, flag, perm) }) if err != nil { @@ -209,7 +212,7 @@ func rootStat(r *Root, name string, lstat bool) (FileInfo, error) { // merely the empirical evidence that Lstat behaves this way. lstat = false } - fi, err := doInRoot(r, name, func(parent syscall.Handle, n string) (FileInfo, error) { + fi, err := doInRoot(r, name, nil, func(parent syscall.Handle, n string) (FileInfo, error) { fd, err := openat(parent, n, windows.O_OPEN_REPARSE, 0) if err != nil { return nil, err @@ -271,7 +274,7 @@ func rootSymlink(r *Root, oldname, newname string) error { flags |= windows.SYMLINKAT_RELATIVE } - _, err := doInRoot(r, newname, func(parent sysfdType, name string) (struct{}, error) { + _, err := doInRoot(r, newname, nil, func(parent sysfdType, name string) (struct{}, error) { return struct{}{}, windows.Symlinkat(oldname, parent, name, flags) }) if err != nil { @@ -386,3 +389,16 @@ func readlinkat(dirfd syscall.Handle, name string) (string, error) { defer syscall.CloseHandle(fd) return readReparseLinkHandle(fd) } + +func modeAt(parent syscall.Handle, name string) (FileMode, error) { + fd, err := openat(parent, name, windows.O_OPEN_REPARSE|windows.O_DIRECTORY, 0) + if err != nil { + return 0, err + } + defer syscall.CloseHandle(fd) + fi, err := statHandle(name, fd) + if err != nil { + return 0, err + } + return fi.Mode(), nil +} diff --git a/src/reflect/benchmark_test.go b/src/reflect/benchmark_test.go index 2e701b062e..6b2f9ce7a0 100644 --- a/src/reflect/benchmark_test.go +++ b/src/reflect/benchmark_test.go @@ -9,6 +9,7 @@ import ( . "reflect" "strconv" "testing" + "time" ) var sourceAll = struct { @@ -196,6 +197,57 @@ func BenchmarkSetZero(b *testing.B) { } } +// BenchmarkZero overlaps some with BenchmarkSetZero, +// but the inputs are set up differently to exercise +// different optimizations. +func BenchmarkZero(b *testing.B) { + type bm struct { + name string + zero Value + nonZero Value + size int + } + type Small struct { + A int64 + B, C bool + } + type Big struct { + A int64 + B, C bool + D [1008]byte + } + entry := func(name string, zero any, nonZero any) bm { + return bm{name, ValueOf(zero), ValueOf(nonZero).Elem(), int(TypeOf(zero).Size())} + } + nonZeroTime := func() *time.Time { t := time.Now(); return &t } + + bms := []bm{ + entry("ByteArray", [16]byte{}, &[16]byte{1}), + entry("ByteArray", [64]byte{}, &[64]byte{1}), + entry("ByteArray", [1024]byte{}, &[1024]byte{1}), + entry("BigStruct", Big{}, &Big{A: 1}), + entry("SmallStruct", Small{}, &Small{A: 1}), + entry("SmallStructArray", [4]Small{}, &[4]Small{0: {A: 1}}), + entry("SmallStructArray", [64]Small{}, &[64]Small{0: {A: 1}}), + entry("Time", time.Time{}, nonZeroTime()), + } + + for _, bm := range bms { + b.Run(fmt.Sprintf("IsZero/%s/size=%d", bm.name, bm.size), func(b *testing.B) { + for i := 0; i < b.N; i++ { + bm.zero.IsZero() + } + }) + } + for _, bm := range bms { + b.Run(fmt.Sprintf("SetZero/%s/size=%d", bm.name, bm.size), func(b *testing.B) { + for i := 0; i < b.N; i++ { + bm.nonZero.Set(bm.zero) + } + }) + } +} + func BenchmarkSelect(b *testing.B) { channel := make(chan int) close(channel) diff --git a/src/reflect/value.go b/src/reflect/value.go index 05ecfa1a5b..68b97e9229 100644 --- a/src/reflect/value.go +++ b/src/reflect/value.go @@ -121,8 +121,8 @@ func (v Value) pointer() unsafe.Pointer { // packEface converts v to the empty interface. func packEface(v Value) any { t := v.typ() - var i any - e := (*abi.EmptyInterface)(unsafe.Pointer(&i)) + // Declare e as a struct (and not pointer to struct) to help escape analysis. + e := abi.EmptyInterface{} // First, fill in the data portion of the interface. switch { case t.IfaceIndir(): @@ -145,12 +145,9 @@ func packEface(v Value) any { // Value is direct, and so is the interface. e.Data = v.ptr } - // Now, fill in the type portion. We're very careful here not - // to have any operation between the e.word and e.typ assignments - // that would let the garbage collector observe the partially-built - // interface value. + // Now, fill in the type portion. e.Type = t - return i + return *(*any)(unsafe.Pointer(&e)) } // unpackEface converts the empty interface i to a Value. @@ -1652,6 +1649,9 @@ func (v Value) IsZero() bool { if v.flag&flagIndir == 0 { return v.ptr == nil } + if v.ptr == unsafe.Pointer(&zeroVal[0]) { + return true + } typ := (*abi.ArrayType)(unsafe.Pointer(v.typ())) // If the type is comparable, then compare directly with zero. if typ.Equal != nil && typ.Size() <= abi.ZeroValSize { @@ -1680,6 +1680,9 @@ func (v Value) IsZero() bool { if v.flag&flagIndir == 0 { return v.ptr == nil } + if v.ptr == unsafe.Pointer(&zeroVal[0]) { + return true + } typ := (*abi.StructType)(unsafe.Pointer(v.typ())) // If the type is comparable, then compare directly with zero. if typ.Equal != nil && typ.Size() <= abi.ZeroValSize { diff --git a/src/runtime/arena.go b/src/runtime/arena.go index 59b1bb3ba1..627c7cfdce 100644 --- a/src/runtime/arena.go +++ b/src/runtime/arena.go @@ -950,6 +950,9 @@ func freeUserArenaChunk(s *mspan, x unsafe.Pointer) { if asanenabled { asanpoison(unsafe.Pointer(s.base()), s.elemsize) } + if valgrindenabled { + valgrindFree(unsafe.Pointer(s.base())) + } // Make ourselves non-preemptible as we manipulate state and statistics. // diff --git a/src/runtime/cgroup_linux.go b/src/runtime/cgroup_linux.go new file mode 100644 index 0000000000..73e7363eb4 --- /dev/null +++ b/src/runtime/cgroup_linux.go @@ -0,0 +1,119 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package runtime + +import ( + "internal/runtime/cgroup" +) + +// cgroup-aware GOMAXPROCS default +// +// At startup (defaultGOMAXPROCSInit), we read /proc/self/cgroup and /proc/self/mountinfo +// to find our current CPU cgroup and open its limit file(s), which remain open +// for the entire process lifetime. We periodically read the current limit by +// rereading the limit file(s) from the beginning. +// +// This makes reading updated limits simple, but has a few downsides: +// +// 1. We only read the limit from the leaf cgroup that actually contains this +// process. But a parent cgroup may have a tighter limit. That tighter limit +// would be our effective limit. That said, container runtimes tend to hide +// parent cgroups from the container anyway. +// +// 2. If the process is migrated to another cgroup while it is running it will +// not notice, as we only check which cgroup we are in once at startup. +var ( + // We can't allocate during early initialization when we need to find + // the cgroup. Simply use a fixed global as a scratch parsing buffer. + cgroupScratch [cgroup.ScratchSize]byte + + cgroupOK bool + cgroupCPU cgroup.CPU + + // defaultGOMAXPROCSInit runs before internal/godebug init, so we can't + // directly update the GODEBUG counter. Store the result until after + // init runs. + containermaxprocsNonDefault bool + containermaxprocs = &godebugInc{name: "containermaxprocs"} +) + +// Prepare for defaultGOMAXPROCS. +// +// Must run after parsedebugvars. +func defaultGOMAXPROCSInit() { + c, err := cgroup.OpenCPU(cgroupScratch[:]) + if err != nil { + // Likely cgroup.ErrNoCgroup. + return + } + + if debug.containermaxprocs > 0 { + // Normal operation. + cgroupCPU = c + cgroupOK = true + return + } + + // cgroup-aware GOMAXPROCS is disabled. We still check the cgroup once + // at startup to see if enabling the GODEBUG would result in a + // different default GOMAXPROCS. If so, we increment runtime/metrics + // /godebug/non-default-behavior/cgroupgomaxprocs:events. + procs := getCPUCount() + cgroupProcs := adjustCgroupGOMAXPROCS(procs, c) + if procs != cgroupProcs { + containermaxprocsNonDefault = true + } + + // Don't need the cgroup for remaining execution. + c.Close() +} + +// defaultGOMAXPROCSUpdateGODEBUG updates the internal/godebug counter for +// container GOMAXPROCS, once internal/godebug is initialized. +func defaultGOMAXPROCSUpdateGODEBUG() { + if containermaxprocsNonDefault { + containermaxprocs.IncNonDefault() + } +} + +// Return the default value for GOMAXPROCS when it has not been set explicitly. +// +// ncpu is the optional precomputed value of getCPUCount. If passed as 0, +// defaultGOMAXPROCS will call getCPUCount. +func defaultGOMAXPROCS(ncpu int32) int32 { + // GOMAXPROCS is the minimum of: + // + // 1. Total number of logical CPUs available from sched_getaffinity. + // + // 2. The average CPU cgroup throughput limit (average throughput = + // quota/period). A limit less than 2 is rounded up to 2, and any + // fractional component is rounded up. + // + // TODO: add rationale. + + procs := ncpu + if procs <= 0 { + procs = getCPUCount() + } + if !cgroupOK { + // No cgroup, or disabled by debug.containermaxprocs. + return procs + } + + return adjustCgroupGOMAXPROCS(procs, cgroupCPU) +} + +// Lower procs as necessary for the current cgroup CPU limit. +func adjustCgroupGOMAXPROCS(procs int32, cpu cgroup.CPU) int32 { + limit, ok, err := cgroup.ReadCPULimit(cpu) + if err == nil && ok { + limit = ceil(limit) + limit = max(limit, 2) + if int32(limit) < procs { + procs = int32(limit) + } + } + return procs +} diff --git a/src/runtime/cgroup_linux_test.go b/src/runtime/cgroup_linux_test.go new file mode 100644 index 0000000000..0b060572b6 --- /dev/null +++ b/src/runtime/cgroup_linux_test.go @@ -0,0 +1,325 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package runtime_test + +import ( + "fmt" + "internal/cgrouptest" + "runtime" + "strings" + "syscall" + "testing" + "unsafe" +) + +func mustHaveFourCPUs(t *testing.T) { + // If NumCPU is lower than the cgroup limit, GOMAXPROCS will use + // NumCPU. + // + // cgroup GOMAXPROCS also have a minimum of 2. We need some room above + // that to test interesting properies. + if runtime.NumCPU() < 4 { + t.Helper() + t.Skip("skipping test: fewer than 4 CPUs") + } +} + +func TestCgroupGOMAXPROCS(t *testing.T) { + mustHaveFourCPUs(t) + + exe, err := buildTestProg(t, "testprog") + if err != nil { + t.Fatal(err) + } + + tests := []struct { + godebug int + want int + }{ + // With containermaxprocs=1, GOMAXPROCS should use the cgroup + // limit. + { + godebug: 1, + want: 3, + }, + // With containermaxprocs=0, it should be ignored. + { + godebug: 0, + want: runtime.NumCPU(), + }, + } + for _, tc := range tests { + t.Run(fmt.Sprintf("containermaxprocs=%d", tc.godebug), func(t *testing.T) { + cgrouptest.InCgroupV2(t, func(c *cgrouptest.CgroupV2) { + if err := c.SetCPUMax(300000, 100000); err != nil { + t.Fatalf("unable to set CPU limit: %v", err) + } + + got := runBuiltTestProg(t, exe, "PrintGOMAXPROCS", fmt.Sprintf("GODEBUG=containermaxprocs=%d", tc.godebug)) + want := fmt.Sprintf("%d\n", tc.want) + if got != want { + t.Fatalf("output got %q want %q", got, want) + } + }) + }) + } +} + +// Without a cgroup limit, GOMAXPROCS uses NumCPU. +func TestCgroupGOMAXPROCSNoLimit(t *testing.T) { + exe, err := buildTestProg(t, "testprog") + if err != nil { + t.Fatal(err) + } + + cgrouptest.InCgroupV2(t, func(c *cgrouptest.CgroupV2) { + if err := c.SetCPUMax(-1, 100000); err != nil { + t.Fatalf("unable to set CPU limit: %v", err) + } + + got := runBuiltTestProg(t, exe, "PrintGOMAXPROCS") + want := fmt.Sprintf("%d\n", runtime.NumCPU()) + if got != want { + t.Fatalf("output got %q want %q", got, want) + } + }) +} + +// If the cgroup limit is higher than NumCPU, GOMAXPROCS uses NumCPU. +func TestCgroupGOMAXPROCSHigherThanNumCPU(t *testing.T) { + exe, err := buildTestProg(t, "testprog") + if err != nil { + t.Fatal(err) + } + + cgrouptest.InCgroupV2(t, func(c *cgrouptest.CgroupV2) { + if err := c.SetCPUMax(2*int64(runtime.NumCPU())*100000, 100000); err != nil { + t.Fatalf("unable to set CPU limit: %v", err) + } + + got := runBuiltTestProg(t, exe, "PrintGOMAXPROCS") + want := fmt.Sprintf("%d\n", runtime.NumCPU()) + if got != want { + t.Fatalf("output got %q want %q", got, want) + } + }) +} + +func TestCgroupGOMAXPROCSRound(t *testing.T) { + mustHaveFourCPUs(t) + + exe, err := buildTestProg(t, "testprog") + if err != nil { + t.Fatal(err) + } + + tests := []struct { + quota int64 + want int + }{ + // We always round the fractional component up. + { + quota: 200001, + want: 3, + }, + { + quota: 250000, + want: 3, + }, + { + quota: 299999, + want: 3, + }, + // Anything less than two rounds up to a minimum of 2. + { + quota: 50000, // 0.5 + want: 2, + }, + { + quota: 100000, + want: 2, + }, + { + quota: 150000, + want: 2, + }, + } + for _, tc := range tests { + t.Run(fmt.Sprintf("%d", tc.quota), func(t *testing.T) { + cgrouptest.InCgroupV2(t, func(c *cgrouptest.CgroupV2) { + if err := c.SetCPUMax(tc.quota, 100000); err != nil { + t.Fatalf("unable to set CPU limit: %v", err) + } + + got := runBuiltTestProg(t, exe, "PrintGOMAXPROCS") + want := fmt.Sprintf("%d\n", tc.want) + if got != want { + t.Fatalf("output got %q want %q", got, want) + } + }) + }) + } +} + +// Environment variable takes precedence over defaults. +func TestCgroupGOMAXPROCSEnvironment(t *testing.T) { + mustHaveFourCPUs(t) + + exe, err := buildTestProg(t, "testprog") + if err != nil { + t.Fatal(err) + } + + cgrouptest.InCgroupV2(t, func(c *cgrouptest.CgroupV2) { + if err := c.SetCPUMax(200000, 100000); err != nil { + t.Fatalf("unable to set CPU limit: %v", err) + } + + got := runBuiltTestProg(t, exe, "PrintGOMAXPROCS", "GOMAXPROCS=3") + want := "3\n" + if got != want { + t.Fatalf("output got %q want %q", got, want) + } + }) +} + +// CPU affinity takes priority if lower than cgroup limit. +func TestCgroupGOMAXPROCSSchedAffinity(t *testing.T) { + exe, err := buildTestProg(t, "testprog") + if err != nil { + t.Fatal(err) + } + + cgrouptest.InCgroupV2(t, func(c *cgrouptest.CgroupV2) { + if err := c.SetCPUMax(300000, 100000); err != nil { + t.Fatalf("unable to set CPU limit: %v", err) + } + + // CPU affinity is actually a per-thread attribute. + runtime.LockOSThread() + defer runtime.UnlockOSThread() + + const maxCPUs = 64 * 1024 + var orig [maxCPUs / 8]byte + _, _, errno := syscall.Syscall6(syscall.SYS_SCHED_GETAFFINITY, 0, unsafe.Sizeof(orig), uintptr(unsafe.Pointer(&orig[0])), 0, 0, 0) + if errno != 0 { + t.Fatalf("unable to get CPU affinity: %v", errno) + } + + // We're going to restrict to CPUs 0 and 1. Make sure those are already available. + if orig[0]&0b11 != 0b11 { + t.Skipf("skipping test: CPUs 0 and 1 not available") + } + + var mask [maxCPUs / 8]byte + mask[0] = 0b11 + _, _, errno = syscall.Syscall6(syscall.SYS_SCHED_SETAFFINITY, 0, unsafe.Sizeof(mask), uintptr(unsafe.Pointer(&mask[0])), 0, 0, 0) + if errno != 0 { + t.Fatalf("unable to set CPU affinity: %v", errno) + } + defer func() { + _, _, errno = syscall.Syscall6(syscall.SYS_SCHED_SETAFFINITY, 0, unsafe.Sizeof(orig), uintptr(unsafe.Pointer(&orig[0])), 0, 0, 0) + if errno != 0 { + t.Fatalf("unable to restore CPU affinity: %v", errno) + } + }() + + got := runBuiltTestProg(t, exe, "PrintGOMAXPROCS") + want := "2\n" + if got != want { + t.Fatalf("output got %q want %q", got, want) + } + }) +} + +func TestCgroupGOMAXPROCSSetDefault(t *testing.T) { + mustHaveFourCPUs(t) + + exe, err := buildTestProg(t, "testprog") + if err != nil { + t.Fatal(err) + } + + tests := []struct { + godebug int + want int + }{ + // With containermaxprocs=1, SetDefaultGOMAXPROCS should observe + // the cgroup limit. + { + godebug: 1, + want: 3, + }, + // With containermaxprocs=0, it should be ignored. + { + godebug: 0, + want: runtime.NumCPU(), + }, + } + for _, tc := range tests { + t.Run(fmt.Sprintf("containermaxprocs=%d", tc.godebug), func(t *testing.T) { + cgrouptest.InCgroupV2(t, func(c *cgrouptest.CgroupV2) { + env := []string{ + fmt.Sprintf("GO_TEST_CPU_MAX_PATH=%s", c.CPUMaxPath()), + "GO_TEST_CPU_MAX_QUOTA=300000", + fmt.Sprintf("GODEBUG=containermaxprocs=%d", tc.godebug), + } + got := runBuiltTestProg(t, exe, "SetLimitThenDefaultGOMAXPROCS", env...) + want := fmt.Sprintf("%d\n", tc.want) + if got != want { + t.Fatalf("output got %q want %q", got, want) + } + }) + }) + } +} + +func TestCgroupGOMAXPROCSUpdate(t *testing.T) { + mustHaveFourCPUs(t) + + if testing.Short() { + t.Skip("skipping test: long sleeps") + } + + exe, err := buildTestProg(t, "testprog") + if err != nil { + t.Fatal(err) + } + + cgrouptest.InCgroupV2(t, func(c *cgrouptest.CgroupV2) { + got := runBuiltTestProg(t, exe, "UpdateGOMAXPROCS", fmt.Sprintf("GO_TEST_CPU_MAX_PATH=%s", c.CPUMaxPath())) + if !strings.Contains(got, "OK") { + t.Fatalf("output got %q want OK", got) + } + }) +} + +func TestCgroupGOMAXPROCSDontUpdate(t *testing.T) { + mustHaveFourCPUs(t) + + if testing.Short() { + t.Skip("skipping test: long sleeps") + } + + exe, err := buildTestProg(t, "testprog") + if err != nil { + t.Fatal(err) + } + + // Two ways to disable updates: explicit GOMAXPROCS or GODEBUG for + // update feature. + for _, v := range []string{"GOMAXPROCS=4", "GODEBUG=updatemaxprocs=0"} { + t.Run(v, func(t *testing.T) { + cgrouptest.InCgroupV2(t, func(c *cgrouptest.CgroupV2) { + got := runBuiltTestProg(t, exe, "DontUpdateGOMAXPROCS", + fmt.Sprintf("GO_TEST_CPU_MAX_PATH=%s", c.CPUMaxPath()), + v) + if !strings.Contains(got, "OK") { + t.Fatalf("output got %q want OK", got) + } + }) + }) + } +} diff --git a/src/runtime/cgroup_stubs.go b/src/runtime/cgroup_stubs.go new file mode 100644 index 0000000000..1f37b1783b --- /dev/null +++ b/src/runtime/cgroup_stubs.go @@ -0,0 +1,24 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !linux + +package runtime + +func defaultGOMAXPROCSInit() {} +func defaultGOMAXPROCSUpdateGODEBUG() {} + +func defaultGOMAXPROCS(ncpu int32) int32 { + // Use the total number of logical CPUs available now, as CPU affinity + // may change after start. + // + // TODO(prattmic): On some GOOS getCPUCount can never change. Don't + // bother calling over and over. + + procs := ncpu + if procs <= 0 { + procs = getCPUCount() + } + return procs +} diff --git a/src/runtime/crash_cgo_test.go b/src/runtime/crash_cgo_test.go index 34e33169d5..c5d7303261 100644 --- a/src/runtime/crash_cgo_test.go +++ b/src/runtime/crash_cgo_test.go @@ -597,6 +597,9 @@ func TestWindowsStackMemoryCgo(t *testing.T) { if runtime.GOOS != "windows" { t.Skip("skipping windows specific test") } + if race.Enabled { + t.Skip("skipping test: race mode uses more stack memory") + } testenv.SkipFlaky(t, 22575) o := runTestProg(t, "testprogcgo", "StackMemory") stackUsage, err := strconv.Atoi(o) diff --git a/src/runtime/crash_test.go b/src/runtime/crash_test.go index 63c4426806..221a9a95cc 100644 --- a/src/runtime/crash_test.go +++ b/src/runtime/crash_test.go @@ -854,6 +854,9 @@ func TestTimePprof(t *testing.T) { case "aix", "darwin", "illumos", "openbsd", "solaris": t.Skipf("skipping on %s because nanotime calls libc", runtime.GOOS) } + if race.Enabled || asan.Enabled || msan.Enabled { + t.Skip("skipping on sanitizers because the sanitizer runtime is external code") + } // Pass GOTRACEBACK for issue #41120 to try to get more // information on timeout. diff --git a/src/runtime/debug.go b/src/runtime/debug.go index 57e9ba8d7d..94d1dab34d 100644 --- a/src/runtime/debug.go +++ b/src/runtime/debug.go @@ -10,9 +10,28 @@ import ( ) // GOMAXPROCS sets the maximum number of CPUs that can be executing -// simultaneously and returns the previous setting. It defaults to -// the value of [runtime.NumCPU]. If n < 1, it does not change the current setting. -// This call will go away when the scheduler improves. +// simultaneously and returns the previous setting. If n < 1, it does not change +// the current setting. +// +// If the GOMAXPROCS environment variable is set to a positive whole number, +// GOMAXPROCS defaults to that value. +// +// Otherwise, the Go runtime selects an appropriate default value based on the +// number of logical CPUs on the machine, the process’s CPU affinity mask, and, +// on Linux, the process’s average CPU throughput limit based on cgroup CPU +// quota, if any. +// +// The Go runtime periodically updates the default value based on changes to +// the total logical CPU count, the CPU affinity mask, or cgroup quota. Setting +// a custom value with the GOMAXPROCS environment variable or by calling +// GOMAXPROCS disables automatic updates. The default value and automatic +// updates can be restored by calling [SetDefaultGOMAXPROCS]. +// +// If GODEBUG=containermaxprocs=0 is set, GOMAXPROCS defaults to the value of +// [runtime.NumCPU]. If GODEBUG=updatemaxprocs=0 is set, the Go runtime does +// not perform automatic GOMAXPROCS updating. +// +// The default GOMAXPROCS behavior may change as the scheduler improves. func GOMAXPROCS(n int) int { if GOARCH == "wasm" && n > 1 { n = 1 // WebAssembly has no threads yet, so only one CPU is possible. @@ -28,12 +47,55 @@ func GOMAXPROCS(n int) int { stw := stopTheWorldGC(stwGOMAXPROCS) // newprocs will be processed by startTheWorld + // + // TODO(prattmic): this could use a nicer API. Perhaps add it to the + // stw parameter? newprocs = int32(n) + newprocsCustom = true startTheWorldGC(stw) return ret } +// SetDefaultGOMAXPROCS updates the GOMAXPROCS setting to the runtime +// default, as described by [GOMAXPROCS], ignoring the GOMAXPROCS +// environment variable. +// +// SetDefaultGOMAXPROCS can be used to enable the default automatic updating +// GOMAXPROCS behavior if it has been disabled by the GOMAXPROCS +// environment variable or a prior call to [GOMAXPROCS], or to force an immediate +// update if the caller is aware of a change to the total logical CPU count, CPU +// affinity mask or cgroup quota. +func SetDefaultGOMAXPROCS() { + // SetDefaultGOMAXPROCS conceptually means "[re]do what the runtime + // would do at startup if the GOMAXPROCS environment variable were + // unset." It still respects GODEBUG. + + procs := defaultGOMAXPROCS(0) + + lock(&sched.lock) + curr := gomaxprocs + custom := sched.customGOMAXPROCS + unlock(&sched.lock) + + if !custom && procs == curr { + // Nothing to do if we're already using automatic GOMAXPROCS + // and the limit is unchanged. + return + } + + stw := stopTheWorldGC(stwGOMAXPROCS) + + // newprocs will be processed by startTheWorld + // + // TODO(prattmic): this could use a nicer API. Perhaps add it to the + // stw parameter? + newprocs = procs + newprocsCustom = false + + startTheWorldGC(stw) +} + // NumCPU returns the number of logical CPUs usable by the current process. // // The set of available CPUs is checked by querying the operating system diff --git a/src/runtime/float.go b/src/runtime/float.go index 9f281c4045..d8573c103b 100644 --- a/src/runtime/float.go +++ b/src/runtime/float.go @@ -6,6 +6,12 @@ package runtime import "unsafe" +const ( + float64Mask = 0x7FF + float64Shift = 64 - 11 - 1 + float64Bias = 1023 +) + var inf = float64frombits(0x7FF0000000000000) // isNaN reports whether f is an IEEE 754 “not-a-number” value. @@ -52,3 +58,76 @@ func float64bits(f float64) uint64 { func float64frombits(b uint64) float64 { return *(*float64)(unsafe.Pointer(&b)) } + +// floor returns the greatest integer value less than or equal to x. +// +// Special cases are: +// +// floor(±0) = ±0 +// floor(±Inf) = ±Inf +// floor(NaN) = NaN +// +// N.B. Portable floor copied from math. math also has optimized arch-specific +// implementations. +func floor(x float64) float64 { + if x == 0 || isNaN(x) || isInf(x) { + return x + } + if x < 0 { + d, fract := modf(-x) + if fract != 0.0 { + d = d + 1 + } + return -d + } + d, _ := modf(x) + return d +} + +// ceil returns the least integer value greater than or equal to x. +// +// Special cases are: +// +// Ceil(±0) = ±0 +// Ceil(±Inf) = ±Inf +// Ceil(NaN) = NaN +// +// N.B. Portable ceil copied from math. math also has optimized arch-specific +// implementations. +func ceil(x float64) float64 { + return -floor(-x) +} + +// modf returns integer and fractional floating-point numbers +// that sum to f. Both values have the same sign as f. +// +// Special cases are: +// +// Modf(±Inf) = ±Inf, NaN +// Modf(NaN) = NaN, NaN +// +// N.B. Portable modf copied from math. math also has optimized arch-specific +// implementations. +func modf(f float64) (int float64, frac float64) { + if f < 1 { + switch { + case f < 0: + int, frac = modf(-f) + return -int, -frac + case f == 0: + return f, f // Return -0, -0 when f == -0 + } + return 0, f + } + + x := float64bits(f) + e := uint(x>>float64Shift)&float64Mask - float64Bias + + // Keep the top 12+e bits, the integer part; clear the rest. + if e < 64-12 { + x &^= 1<<(64-12-e) - 1 + } + int = float64frombits(x) + frac = f - int + return +} diff --git a/src/runtime/gomaxprocs_windows_test.go b/src/runtime/gomaxprocs_windows_test.go new file mode 100644 index 0000000000..34e6ba5840 --- /dev/null +++ b/src/runtime/gomaxprocs_windows_test.go @@ -0,0 +1,44 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package runtime_test + +import ( + "strings" + "testing" +) + +func TestGOMAXPROCSUpdate(t *testing.T) { + if testing.Short() { + t.Skip("skipping test: long sleeps") + } + + got := runTestProg(t, "testprog", "WindowsUpdateGOMAXPROCS") + if strings.Contains(got, "SKIP") { + t.Skip(got) + } + if !strings.Contains(got, "OK") { + t.Fatalf("output got %q want OK", got) + } +} + +func TestCgroupGOMAXPROCSDontUpdate(t *testing.T) { + if testing.Short() { + t.Skip("skipping test: long sleeps") + } + + // Two ways to disable updates: explicit GOMAXPROCS or GODEBUG for + // update feature. + for _, v := range []string{"GOMAXPROCS=4", "GODEBUG=updatemaxprocs=0"} { + t.Run(v, func(t *testing.T) { + got := runTestProg(t, "testprog", "WindowsDontUpdateGOMAXPROCS", v) + if strings.Contains(got, "SKIP") { + t.Skip(got) + } + if !strings.Contains(got, "OK") { + t.Fatalf("output got %q want OK", got) + } + }) + } +} diff --git a/src/runtime/lockrank.go b/src/runtime/lockrank.go index 024fc1ebf4..456f2b75e6 100644 --- a/src/runtime/lockrank.go +++ b/src/runtime/lockrank.go @@ -14,6 +14,7 @@ const ( lockRankSysmon lockRankScavenge lockRankForcegc + lockRankUpdateGOMAXPROCS lockRankDefer lockRankSweepWaiters lockRankAssistQueue @@ -90,6 +91,7 @@ var lockNames = []string{ lockRankSysmon: "sysmon", lockRankScavenge: "scavenge", lockRankForcegc: "forcegc", + lockRankUpdateGOMAXPROCS: "updateGOMAXPROCS", lockRankDefer: "defer", lockRankSweepWaiters: "sweepWaiters", lockRankAssistQueue: "assistQueue", @@ -172,6 +174,7 @@ var lockPartialOrder [][]lockRank = [][]lockRank{ lockRankSysmon: {}, lockRankScavenge: {lockRankSysmon}, lockRankForcegc: {lockRankSysmon}, + lockRankUpdateGOMAXPROCS: {lockRankSysmon}, lockRankDefer: {}, lockRankSweepWaiters: {}, lockRankAssistQueue: {}, @@ -188,11 +191,11 @@ var lockPartialOrder [][]lockRank = [][]lockRank{ lockRankPollDesc: {}, lockRankWakeableSleep: {}, lockRankHchan: {lockRankSysmon, lockRankScavenge, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankWakeableSleep, lockRankHchan}, - lockRankAllocmR: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan}, - lockRankExecR: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan}, - lockRankSched: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR}, - lockRankAllg: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched}, - lockRankAllp: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched}, + lockRankAllocmR: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan}, + lockRankExecR: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan}, + lockRankSched: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR}, + lockRankAllg: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched}, + lockRankAllp: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched}, lockRankNotifyList: {}, lockRankSudog: {lockRankSysmon, lockRankScavenge, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankWakeableSleep, lockRankHchan, lockRankNotifyList}, lockRankTimers: {lockRankSysmon, lockRankScavenge, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankTimers}, @@ -205,29 +208,29 @@ var lockPartialOrder [][]lockRank = [][]lockRank{ lockRankUserArenaState: {}, lockRankTraceBuf: {lockRankSysmon, lockRankScavenge}, lockRankTraceStrings: {lockRankSysmon, lockRankScavenge, lockRankTraceBuf}, - lockRankFin: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankItab, lockRankReflectOffs, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings}, - lockRankSpanSetSpine: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankItab, lockRankReflectOffs, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings}, - lockRankMspanSpecial: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankItab, lockRankReflectOffs, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings}, - lockRankTraceTypeTab: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankItab, lockRankReflectOffs, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings}, - lockRankGcBitsArenas: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankItab, lockRankReflectOffs, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankMspanSpecial}, - lockRankProfInsert: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankItab, lockRankReflectOffs, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings}, - lockRankProfBlock: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankItab, lockRankReflectOffs, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings}, - lockRankProfMemActive: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankItab, lockRankReflectOffs, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings}, - lockRankProfMemFuture: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankItab, lockRankReflectOffs, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankProfMemActive}, - lockRankGscan: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture}, - lockRankStackpool: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGscan}, - lockRankStackLarge: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGscan}, - lockRankHchanLeaf: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGscan, lockRankHchanLeaf}, - lockRankWbufSpans: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankDefer, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollCache, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankSudog, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGscan}, - lockRankMheap: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankDefer, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollCache, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankSudog, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGscan, lockRankStackpool, lockRankStackLarge, lockRankWbufSpans}, - lockRankMheapSpecial: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankDefer, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollCache, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankSudog, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGscan, lockRankStackpool, lockRankStackLarge, lockRankWbufSpans, lockRankMheap}, - lockRankGlobalAlloc: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankDefer, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollCache, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankSudog, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGscan, lockRankStackpool, lockRankStackLarge, lockRankWbufSpans, lockRankMheap, lockRankMheapSpecial}, - lockRankTrace: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankDefer, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollCache, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankSudog, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGscan, lockRankStackpool, lockRankStackLarge, lockRankWbufSpans, lockRankMheap}, - lockRankTraceStackTab: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankDefer, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollCache, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankSudog, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGscan, lockRankStackpool, lockRankStackLarge, lockRankWbufSpans, lockRankMheap, lockRankTrace}, + lockRankFin: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankItab, lockRankReflectOffs, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings}, + lockRankSpanSetSpine: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankItab, lockRankReflectOffs, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings}, + lockRankMspanSpecial: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankItab, lockRankReflectOffs, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings}, + lockRankTraceTypeTab: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankItab, lockRankReflectOffs, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings}, + lockRankGcBitsArenas: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankItab, lockRankReflectOffs, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankMspanSpecial}, + lockRankProfInsert: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankItab, lockRankReflectOffs, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings}, + lockRankProfBlock: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankItab, lockRankReflectOffs, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings}, + lockRankProfMemActive: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankItab, lockRankReflectOffs, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings}, + lockRankProfMemFuture: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankItab, lockRankReflectOffs, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankProfMemActive}, + lockRankGscan: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture}, + lockRankStackpool: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGscan}, + lockRankStackLarge: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGscan}, + lockRankHchanLeaf: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGscan, lockRankHchanLeaf}, + lockRankWbufSpans: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankDefer, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollCache, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankSudog, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGscan}, + lockRankMheap: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankDefer, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollCache, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankSudog, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGscan, lockRankStackpool, lockRankStackLarge, lockRankWbufSpans}, + lockRankMheapSpecial: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankDefer, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollCache, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankSudog, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGscan, lockRankStackpool, lockRankStackLarge, lockRankWbufSpans, lockRankMheap}, + lockRankGlobalAlloc: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankDefer, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollCache, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankSudog, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGscan, lockRankStackpool, lockRankStackLarge, lockRankWbufSpans, lockRankMheap, lockRankMheapSpecial}, + lockRankTrace: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankDefer, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollCache, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankSudog, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGscan, lockRankStackpool, lockRankStackLarge, lockRankWbufSpans, lockRankMheap}, + lockRankTraceStackTab: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankDefer, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollCache, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR, lockRankExecR, lockRankSched, lockRankAllg, lockRankAllp, lockRankNotifyList, lockRankSudog, lockRankTimers, lockRankTimer, lockRankNetpollInit, lockRankRoot, lockRankItab, lockRankReflectOffs, lockRankSynctest, lockRankUserArenaState, lockRankTraceBuf, lockRankTraceStrings, lockRankFin, lockRankSpanSetSpine, lockRankMspanSpecial, lockRankGcBitsArenas, lockRankProfInsert, lockRankProfBlock, lockRankProfMemActive, lockRankProfMemFuture, lockRankGscan, lockRankStackpool, lockRankStackLarge, lockRankWbufSpans, lockRankMheap, lockRankTrace}, lockRankPanic: {}, lockRankDeadlock: {lockRankPanic, lockRankDeadlock}, lockRankRaceFini: {lockRankPanic}, - lockRankAllocmRInternal: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankAllocmW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR}, - lockRankExecRInternal: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankExecR}, + lockRankAllocmRInternal: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankAllocmW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankAllocmR}, + lockRankExecRInternal: {lockRankSysmon, lockRankScavenge, lockRankForcegc, lockRankUpdateGOMAXPROCS, lockRankSweepWaiters, lockRankAssistQueue, lockRankStrongFromWeakQueue, lockRankCleanupQueue, lockRankSweep, lockRankTestR, lockRankTimerSend, lockRankExecW, lockRankCpuprof, lockRankPollDesc, lockRankWakeableSleep, lockRankHchan, lockRankExecR}, lockRankTestRInternal: {lockRankTestR, lockRankTestW}, } diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index 25caf0625b..bc7dab9d20 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -754,6 +754,11 @@ func (h *mheap) sysAlloc(n uintptr, hintList **arenaHint, arenaList *[]arenaIdx) } mapped: + if valgrindenabled { + valgrindCreateMempool(v) + valgrindMakeMemNoAccess(v, size) + } + // Create arena metadata. for ri := arenaIndex(uintptr(v)); ri <= arenaIndex(uintptr(v)+size-1); ri++ { l2 := h.arenas[ri.l1()] @@ -1084,6 +1089,9 @@ func mallocgc(size uintptr, typ *_type, needzero bool) unsafe.Pointer { asanpoison(unsafe.Add(x, size-asanRZ), asanRZ) asanunpoison(x, size-asanRZ) } + if valgrindenabled { + valgrindMalloc(x, size-asanRZ) + } // Adjust our GC assist debt to account for internal fragmentation. if gcBlackenEnabled != 0 && elemsize != 0 { @@ -1672,7 +1680,10 @@ func postMallocgcDebug(x unsafe.Pointer, elemsize uintptr, typ *_type) { } // N.B. elemsize == 0 indicates a tiny allocation, since no new slot was - // allocated to fulfill this call to mallocgc. + // allocated to fulfill this call to mallocgc. This means checkfinalizer + // will only flag an error if there is actually any risk. If an allocation + // has the tiny block to itself, it will not get flagged, because we won't + // mark the block as a tiny block. if debug.checkfinalizers != 0 && elemsize == 0 { setTinyBlockContext(unsafe.Pointer(alignDown(uintptr(x), maxTinySize))) } diff --git a/src/runtime/metrics/doc.go b/src/runtime/metrics/doc.go index 0d35314e06..32fc436e1a 100644 --- a/src/runtime/metrics/doc.go +++ b/src/runtime/metrics/doc.go @@ -234,6 +234,11 @@ Below is the full list of supported metrics, ordered lexicographically. The number of non-default behaviors executed by the time package due to a non-default GODEBUG=asynctimerchan=... setting. + /godebug/non-default-behavior/containermaxprocs:events + The number of non-default behaviors executed by the runtime + package due to a non-default GODEBUG=containermaxprocs=... + setting. + /godebug/non-default-behavior/embedfollowsymlinks:events The number of non-default behaviors executed by the cmd/go package due to a non-default GODEBUG=embedfollowsymlinks=... @@ -345,10 +350,18 @@ Below is the full list of supported metrics, ordered lexicographically. The number of non-default behaviors executed by the crypto/tls package due to a non-default GODEBUG=tlsrsakex=... setting. + /godebug/non-default-behavior/tlssha1:events + The number of non-default behaviors executed by the crypto/tls + package due to a non-default GODEBUG=tlssha1=... setting. + /godebug/non-default-behavior/tlsunsafeekm:events The number of non-default behaviors executed by the crypto/tls package due to a non-default GODEBUG=tlsunsafeekm=... setting. + /godebug/non-default-behavior/updatemaxprocs:events + The number of non-default behaviors executed by the runtime + package due to a non-default GODEBUG=updatemaxprocs=... setting. + /godebug/non-default-behavior/winreadlinkvolume:events The number of non-default behaviors executed by the os package due to a non-default GODEBUG=winreadlinkvolume=... setting. @@ -371,6 +384,10 @@ Below is the full list of supported metrics, ordered lexicographically. The number of non-default behaviors executed by the crypto/x509 package due to a non-default GODEBUG=x509rsacrt=... setting. + /godebug/non-default-behavior/x509sha256skid:events + The number of non-default behaviors executed by the crypto/x509 + package due to a non-default GODEBUG=x509sha256skid=... setting. + /godebug/non-default-behavior/x509usefallbackroots:events The number of non-default behaviors executed by the crypto/x509 package due to a non-default GODEBUG=x509usefallbackroots=... diff --git a/src/runtime/mgcmark.go b/src/runtime/mgcmark.go index b5318e56f8..507aac7482 100644 --- a/src/runtime/mgcmark.go +++ b/src/runtime/mgcmark.go @@ -315,6 +315,10 @@ func markrootFreeGStacks() { stackfree(gp.stack) gp.stack.lo = 0 gp.stack.hi = 0 + if valgrindenabled { + valgrindDeregisterStack(gp.valgrindStackID) + gp.valgrindStackID = 0 + } } q := gQueue{list.head, tail.guintptr(), list.size} diff --git a/src/runtime/mgcsweep.go b/src/runtime/mgcsweep.go index f4d43e73f2..a3bf2989df 100644 --- a/src/runtime/mgcsweep.go +++ b/src/runtime/mgcsweep.go @@ -641,6 +641,9 @@ func (sl *sweepLocked) sweep(preserve bool) bool { if asanenabled && !s.isUserArenaChunk { asanpoison(unsafe.Pointer(x), size) } + if valgrindenabled && !s.isUserArenaChunk { + valgrindFree(unsafe.Pointer(x)) + } } mbits.advance() abits.advance() diff --git a/src/runtime/mheap.go b/src/runtime/mheap.go index b5cfd113d0..3612d71e66 100644 --- a/src/runtime/mheap.go +++ b/src/runtime/mheap.go @@ -1388,6 +1388,10 @@ HaveSpan: // Initialize the span. h.initSpan(s, typ, spanclass, base, npages) + if valgrindenabled { + valgrindMempoolMalloc(unsafe.Pointer(arenaBase(arenaIndex(base))), unsafe.Pointer(base), npages*pageSize) + } + // Commit and account for any scavenged memory that the span now owns. nbytes := npages * pageSize if scav != 0 { @@ -1643,6 +1647,10 @@ func (h *mheap) freeSpan(s *mspan) { bytes := s.npages << gc.PageShift asanpoison(base, bytes) } + if valgrindenabled { + base := s.base() + valgrindMempoolFree(unsafe.Pointer(arenaBase(arenaIndex(base))), unsafe.Pointer(base)) + } h.freeSpanLocked(s, spanAllocHeap) unlock(&h.lock) }) @@ -1671,6 +1679,10 @@ func (h *mheap) freeManual(s *mspan, typ spanAllocType) { s.needzero = 1 lock(&h.lock) + if valgrindenabled { + base := s.base() + valgrindMempoolFree(unsafe.Pointer(arenaBase(arenaIndex(base))), unsafe.Pointer(base)) + } h.freeSpanLocked(s, typ) unlock(&h.lock) } @@ -2533,6 +2545,16 @@ func gcWakeAllStrongFromWeak() { // Retrieves or creates a weak pointer handle for the object p. func getOrAddWeakHandle(p unsafe.Pointer) *atomic.Uintptr { + if debug.sbrk != 0 { + // debug.sbrk never frees memory, so it'll never go nil. However, we do still + // need a weak handle that's specific to p. Use the immortal weak handle map. + // Keep p alive across the call to getOrAdd defensively, though it doesn't + // really matter in this particular case. + handle := mheap_.immortalWeakHandles.getOrAdd(uintptr(p)) + KeepAlive(p) + return handle + } + // First try to retrieve without allocating. if handle := getWeakHandle(p); handle != nil { // Keep p alive for the duration of the function to ensure diff --git a/src/runtime/mklockrank.go b/src/runtime/mklockrank.go index dd30541211..6cccece9b5 100644 --- a/src/runtime/mklockrank.go +++ b/src/runtime/mklockrank.go @@ -41,7 +41,7 @@ const ranks = ` # Sysmon NONE < sysmon -< scavenge, forcegc; +< scavenge, forcegc, updateGOMAXPROCS; # Defer NONE < defer; @@ -66,6 +66,7 @@ assistQueue, cleanupQueue, cpuprof, forcegc, + updateGOMAXPROCS, hchan, pollDesc, # pollDesc can interact with timers, which can lock sched. scavenge, diff --git a/src/runtime/panic.go b/src/runtime/panic.go index b8f23cc3c2..95305b84bc 100644 --- a/src/runtime/panic.go +++ b/src/runtime/panic.go @@ -1056,6 +1056,11 @@ func internal_sync_fatal(s string) { fatal(s) } +//go:linkname cgroup_throw internal/runtime/cgroup.throw +func cgroup_throw(s string) { + throw(s) +} + // throw triggers a fatal error that dumps a stack trace and exits. // // throw should be used for runtime-internal fatal errors where Go itself, diff --git a/src/runtime/proc.go b/src/runtime/proc.go index 89cd70ee88..4925528783 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -210,6 +210,7 @@ func main() { }() gcenable() + defaultGOMAXPROCSUpdateEnable() // don't STW before runtime initialized. main_init_done = make(chan bool) if iscgo { @@ -897,12 +898,24 @@ func schedinit() { // mcommoninit runs before parsedebugvars, so init profstacks again. mProfStackInit(gp.m) + defaultGOMAXPROCSInit() lock(&sched.lock) sched.lastpoll.Store(nanotime()) - procs := numCPUStartup + var procs int32 if n, ok := strconv.Atoi32(gogetenv("GOMAXPROCS")); ok && n > 0 { procs = n + sched.customGOMAXPROCS = true + } else { + // Use numCPUStartup for initial GOMAXPROCS for two reasons: + // + // 1. We just computed it in osinit, recomputing is (minorly) wasteful. + // + // 2. More importantly, if debug.containermaxprocs == 0 && + // debug.updatemaxprocs == 0, we want to guarantee that + // runtime.GOMAXPROCS(0) always equals runtime.NumCPU (which is + // just numCPUStartup). + procs = defaultGOMAXPROCS(numCPUStartup) } if procresize(procs) != nil { throw("unknown runnable goroutine during bootstrap") @@ -1714,6 +1727,7 @@ func startTheWorldWithSema(now int64, w worldStop) int64 { procs := gomaxprocs if newprocs != 0 { procs = newprocs + sched.customGOMAXPROCS = newprocsCustom newprocs = 0 } p1 := procresize(procs) @@ -1955,6 +1969,10 @@ func mexit(osStack bool) { // Free the gsignal stack. if mp.gsignal != nil { stackfree(mp.gsignal.stack) + if valgrindenabled { + valgrindDeregisterStack(mp.gsignal.valgrindStackID) + mp.gsignal.valgrindStackID = 0 + } // On some platforms, when calling into VDSO (e.g. nanotime) // we store our g on the gsignal stack, if there is one. // Now the stack is freed, unlink it from the m, so we @@ -2252,6 +2270,10 @@ func allocm(pp *p, fn func(), id int64) *m { // startm. systemstack(func() { stackfree(freem.g0.stack) + if valgrindenabled { + valgrindDeregisterStack(freem.g0.valgrindStackID) + freem.g0.valgrindStackID = 0 + } }) } freem = freem.freelink @@ -5046,6 +5068,9 @@ func malg(stacksize int32) *g { stacksize = round2(stackSystem + stacksize) systemstack(func() { newg.stack = stackalloc(uint32(stacksize)) + if valgrindenabled { + newg.valgrindStackID = valgrindRegisterStack(unsafe.Pointer(newg.stack.lo), unsafe.Pointer(newg.stack.hi)) + } }) newg.stackguard0 = newg.stack.lo + stackGuard newg.stackguard1 = ^uintptr(0) @@ -5234,6 +5259,10 @@ func gfput(pp *p, gp *g) { gp.stack.lo = 0 gp.stack.hi = 0 gp.stackguard0 = 0 + if valgrindenabled { + valgrindDeregisterStack(gp.valgrindStackID) + gp.valgrindStackID = 0 + } } pp.gFree.push(gp) @@ -5291,12 +5320,19 @@ retry: gp.stack.lo = 0 gp.stack.hi = 0 gp.stackguard0 = 0 + if valgrindenabled { + valgrindDeregisterStack(gp.valgrindStackID) + gp.valgrindStackID = 0 + } }) } if gp.stack.lo == 0 { // Stack was deallocated in gfput or just above. Allocate a new one. systemstack(func() { gp.stack = stackalloc(startingStackSize) + if valgrindenabled { + gp.valgrindStackID = valgrindRegisterStack(unsafe.Pointer(gp.stack.lo), unsafe.Pointer(gp.stack.hi)) + } }) gp.stackguard0 = gp.stack.lo + stackGuard } else { @@ -6124,6 +6160,7 @@ func sysmon() { checkdead() unlock(&sched.lock) + lastgomaxprocs := int64(0) lasttrace := int64(0) idle := 0 // how many cycles in succession we had not wokeup somebody delay := uint32(0) @@ -6237,6 +6274,11 @@ func sysmon() { startm(nil, false, false) } } + // Check if we need to update GOMAXPROCS at most once per second. + if debug.updatemaxprocs != 0 && lastgomaxprocs+1e9 <= now { + sysmonUpdateGOMAXPROCS() + lastgomaxprocs = now + } if scavenger.sysmonWake.Load() != 0 { // Kick the scavenger awake if someone requested it. scavenger.wake() @@ -6504,6 +6546,97 @@ func schedtrace(detailed bool) { unlock(&sched.lock) } +type updateGOMAXPROCSState struct { + lock mutex + g *g + idle atomic.Bool + + // Readable when idle == false, writable when idle == true. + procs int32 // new GOMAXPROCS value +} + +var ( + updateGOMAXPROCS updateGOMAXPROCSState + + updatemaxprocs = &godebugInc{name: "updatemaxprocs"} +) + +// Start GOMAXPROCS update helper goroutine. +// +// This is based on forcegchelper. +func defaultGOMAXPROCSUpdateEnable() { + go updateGOMAXPROCSHelper() +} + +func updateGOMAXPROCSHelper() { + updateGOMAXPROCS.g = getg() + lockInit(&updateGOMAXPROCS.lock, lockRankUpdateGOMAXPROCS) + for { + lock(&updateGOMAXPROCS.lock) + if updateGOMAXPROCS.idle.Load() { + throw("updateGOMAXPROCS: phase error") + } + updateGOMAXPROCS.idle.Store(true) + goparkunlock(&updateGOMAXPROCS.lock, waitReasonUpdateGOMAXPROCSIdle, traceBlockSystemGoroutine, 1) + // This goroutine is explicitly resumed by sysmon. + + stw := stopTheWorldGC(stwGOMAXPROCS) + + // Still OK to update? + lock(&sched.lock) + custom := sched.customGOMAXPROCS + unlock(&sched.lock) + if custom { + startTheWorldGC(stw) + return + } + + // newprocs will be processed by startTheWorld + // + // TODO(prattmic): this could use a nicer API. Perhaps add it to the + // stw parameter? + newprocs = updateGOMAXPROCS.procs + newprocsCustom = false + + startTheWorldGC(stw) + + // We actually changed something. + updatemaxprocs.IncNonDefault() + } +} + +func sysmonUpdateGOMAXPROCS() { + // No update if GOMAXPROCS was set manually. + lock(&sched.lock) + custom := sched.customGOMAXPROCS + curr := gomaxprocs + unlock(&sched.lock) + if custom { + return + } + + // Don't hold sched.lock while we read the filesystem. + procs := defaultGOMAXPROCS(0) + + if procs == curr { + // Nothing to do. + return + } + + // Sysmon can't directly stop the world. Run the helper to do so on our + // behalf. If updateGOMAXPROCS.idle is false, then a previous update is + // still pending. + if updateGOMAXPROCS.idle.Load() { + lock(&updateGOMAXPROCS.lock) + updateGOMAXPROCS.procs = procs + updateGOMAXPROCS.idle.Store(false) + var list gList + list.push(updateGOMAXPROCS.g) + injectglist(&list) + unlock(&updateGOMAXPROCS.lock) + } +} + // schedEnableUser enables or disables the scheduling of user // goroutines. // diff --git a/src/runtime/race_s390x.s b/src/runtime/race_s390x.s index a12bf8416b..3dfda9e733 100644 --- a/src/runtime/race_s390x.s +++ b/src/runtime/race_s390x.s @@ -412,13 +412,13 @@ TEXT racecall<>(SB), NOSPLIT, $0-0 MOVD g_m(g), R8 // R8 = thread. // Switch to g0 stack if we aren't already on g0 or gsignal. - MOVD m_gsignal(R8), R8 - CMPBEQ R8, g, call + MOVD m_gsignal(R8), R9 + CMPBEQ R9, g, call - MOVD m_g0(R8), R8 - CMPBEQ R8, g, call + MOVD m_g0(R8), R9 + CMPBEQ R9, g, call - MOVD (g_sched+gobuf_sp)(R8), R15 // Switch SP to g0. + MOVD (g_sched+gobuf_sp)(R9), R15 // Switch SP to g0. call: SUB $160, R15 // Allocate C frame. BL R1 // Call C code. diff --git a/src/runtime/runtime.go b/src/runtime/runtime.go index 3afb6558b0..016cbdae58 100644 --- a/src/runtime/runtime.go +++ b/src/runtime/runtime.go @@ -151,6 +151,7 @@ func godebug_setNewIncNonDefault(newIncNonDefault func(string) func()) { p := new(func(string) func()) *p = newIncNonDefault godebugNewIncNonDefault.Store(p) + defaultGOMAXPROCSUpdateGODEBUG() } // A godebugInc provides access to internal/godebug's IncNonDefault function diff --git a/src/runtime/runtime1.go b/src/runtime/runtime1.go index 975d401694..424745d235 100644 --- a/src/runtime/runtime1.go +++ b/src/runtime/runtime1.go @@ -310,6 +310,7 @@ type dbgVar struct { var debug struct { cgocheck int32 clobberfree int32 + containermaxprocs int32 decoratemappings int32 disablethp int32 dontfreezetheworld int32 @@ -325,6 +326,7 @@ var debug struct { scheddetail int32 schedtrace int32 tracebackancestors int32 + updatemaxprocs int32 asyncpreemptoff int32 harddecommit int32 adaptivestackstart int32 @@ -370,6 +372,7 @@ var dbgvars = []*dbgVar{ {name: "asynctimerchan", atomic: &debug.asynctimerchan}, {name: "cgocheck", value: &debug.cgocheck}, {name: "clobberfree", value: &debug.clobberfree}, + {name: "containermaxprocs", value: &debug.containermaxprocs, def: 1}, {name: "dataindependenttiming", value: &debug.dataindependenttiming}, {name: "decoratemappings", value: &debug.decoratemappings, def: 1}, {name: "disablethp", value: &debug.disablethp}, @@ -396,6 +399,7 @@ var dbgvars = []*dbgVar{ {name: "tracecheckstackownership", value: &debug.traceCheckStackOwnership}, {name: "tracebackancestors", value: &debug.tracebackancestors}, {name: "tracefpunwindoff", value: &debug.tracefpunwindoff}, + {name: "updatemaxprocs", value: &debug.updatemaxprocs, def: 1}, } func parsedebugvars() { diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go index c8c7c233a6..94ab87f6db 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go @@ -504,6 +504,10 @@ type g struct { // and check for debt in the malloc hot path. The assist ratio // determines how this corresponds to scan work debt. gcAssistBytes int64 + + // valgrindStackID is used to track what memory is used for stacks when a program is + // built with the "valgrind" build tag, otherwise it is unused. + valgrindStackID uintptr } // gTrackingPeriod is the number of transitions out of _Grunning between @@ -836,6 +840,8 @@ type schedt struct { procresizetime int64 // nanotime() of last change to gomaxprocs totaltime int64 // ∫gomaxprocs dt up to procresizetime + customGOMAXPROCS bool // GOMAXPROCS was manually set from the environment or runtime.GOMAXPROCS + // sysmonlock protects sysmon's actions on the runtime. // // Acquire and hold this mutex to block sysmon from interacting @@ -1063,6 +1069,7 @@ const ( waitReasonChanSend // "chan send" waitReasonFinalizerWait // "finalizer wait" waitReasonForceGCIdle // "force gc (idle)" + waitReasonUpdateGOMAXPROCSIdle // "GOMAXPROCS updater (idle)" waitReasonSemacquire // "semacquire" waitReasonSleep // "sleep" waitReasonSyncCondWait // "sync.Cond.Wait" @@ -1111,6 +1118,7 @@ var waitReasonStrings = [...]string{ waitReasonChanSend: "chan send", waitReasonFinalizerWait: "finalizer wait", waitReasonForceGCIdle: "force gc (idle)", + waitReasonUpdateGOMAXPROCSIdle: "GOMAXPROCS updater (idle)", waitReasonSemacquire: "semacquire", waitReasonSleep: "sleep", waitReasonSyncCondWait: "sync.Cond.Wait", @@ -1197,12 +1205,13 @@ var isIdleInSynctest = [len(waitReasonStrings)]bool{ } var ( - allm *m - gomaxprocs int32 - numCPUStartup int32 - forcegc forcegcstate - sched schedt - newprocs int32 + allm *m + gomaxprocs int32 + numCPUStartup int32 + forcegc forcegcstate + sched schedt + newprocs int32 + newprocsCustom bool // newprocs value is manually set via runtime.GOMAXPROCS. ) var ( diff --git a/src/runtime/sizeof_test.go b/src/runtime/sizeof_test.go index c1b201caf1..a5dc8aed34 100644 --- a/src/runtime/sizeof_test.go +++ b/src/runtime/sizeof_test.go @@ -20,7 +20,7 @@ func TestSizeof(t *testing.T) { _32bit uintptr // size on 32bit platforms _64bit uintptr // size on 64bit platforms }{ - {runtime.G{}, 276, 432}, // g, but exported for testing + {runtime.G{}, 280, 440}, // g, but exported for testing {runtime.Sudog{}, 56, 88}, // sudog, but exported for testing } diff --git a/src/runtime/stack.go b/src/runtime/stack.go index 2fedaa9421..7e69d65fbb 100644 --- a/src/runtime/stack.go +++ b/src/runtime/stack.go @@ -211,6 +211,13 @@ func stackpoolalloc(order uint8) gclinkptr { s.elemsize = fixedStack << order for i := uintptr(0); i < _StackCacheSize; i += s.elemsize { x := gclinkptr(s.base() + i) + if valgrindenabled { + // The address of x.ptr() becomes the base of stacks. We need to + // mark it allocated here and in stackfree and stackpoolfree, and free'd in + // stackalloc in order to avoid overlapping allocations and + // uninitialized memory errors in valgrind. + valgrindMalloc(unsafe.Pointer(x.ptr()), unsafe.Sizeof(x.ptr())) + } x.ptr().next = s.manualFreeList s.manualFreeList = x } @@ -388,6 +395,12 @@ func stackalloc(n uint32) stack { c.stackcache[order].list = x.ptr().next c.stackcache[order].size -= uintptr(n) } + if valgrindenabled { + // We're about to allocate the stack region starting at x.ptr(). + // To prevent valgrind from complaining about overlapping allocations, + // we need to mark the (previously allocated) memory as free'd. + valgrindFree(unsafe.Pointer(x.ptr())) + } v = unsafe.Pointer(x) } else { var s *mspan @@ -432,6 +445,9 @@ func stackalloc(n uint32) stack { if asanenabled { asanunpoison(v, uintptr(n)) } + if valgrindenabled { + valgrindMalloc(v, uintptr(n)) + } if stackDebug >= 1 { print(" allocated ", v, "\n") } @@ -479,6 +495,9 @@ func stackfree(stk stack) { if asanenabled { asanpoison(v, n) } + if valgrindenabled { + valgrindFree(v) + } if n < fixedStack<<_NumStackOrders && n < _StackCacheSize { order := uint8(0) n2 := n @@ -489,6 +508,11 @@ func stackfree(stk stack) { x := gclinkptr(v) if stackNoCache != 0 || gp.m.p == 0 || gp.m.preemptoff != "" { lock(&stackpool[order].item.mu) + if valgrindenabled { + // x.ptr() is the head of the list of free stacks, and will be used + // when allocating a new stack, so it has to be marked allocated. + valgrindMalloc(unsafe.Pointer(x.ptr()), unsafe.Sizeof(x.ptr())) + } stackpoolfree(x, order) unlock(&stackpool[order].item.mu) } else { @@ -496,6 +520,12 @@ func stackfree(stk stack) { if c.stackcache[order].size >= _StackCacheSize { stackcacherelease(c, order) } + if valgrindenabled { + // x.ptr() is the head of the list of free stacks, and will + // be used when allocating a new stack, so it has to be + // marked allocated. + valgrindMalloc(unsafe.Pointer(x.ptr()), unsafe.Sizeof(x.ptr())) + } x.ptr().next = c.stackcache[order].list c.stackcache[order].list = x c.stackcache[order].size += n @@ -583,6 +613,16 @@ func adjustpointer(adjinfo *adjustinfo, vpp unsafe.Pointer) { if stackDebug >= 4 { print(" ", pp, ":", hex(p), "\n") } + if valgrindenabled { + // p is a pointer on a stack, it is inherently initialized, as + // everything on the stack is, but valgrind for _some unknown reason_ + // sometimes thinks it's uninitialized, and flags operations on p below + // as uninitialized. We just initialize it if valgrind thinks its + // uninitialized. + // + // See go.dev/issues/73801. + valgrindMakeMemDefined(unsafe.Pointer(&p), unsafe.Sizeof(&p)) + } if adjinfo.old.lo <= p && p < adjinfo.old.hi { *pp = p + adjinfo.delta if stackDebug >= 3 { @@ -936,6 +976,14 @@ func copystack(gp *g, newsize uintptr) { adjustframe(&u.frame, &adjinfo) } + if valgrindenabled { + if gp.valgrindStackID == 0 { + gp.valgrindStackID = valgrindRegisterStack(unsafe.Pointer(new.lo), unsafe.Pointer(new.hi)) + } else { + valgrindChangeStack(gp.valgrindStackID, unsafe.Pointer(new.lo), unsafe.Pointer(new.hi)) + } + } + // free old stack if stackPoisonCopy != 0 { fillstack(old, 0xfc) diff --git a/src/runtime/syscall_windows_test.go b/src/runtime/syscall_windows_test.go index 6709267403..ad9bfb464b 100644 --- a/src/runtime/syscall_windows_test.go +++ b/src/runtime/syscall_windows_test.go @@ -7,6 +7,7 @@ package runtime_test import ( "fmt" "internal/abi" + "internal/race" "internal/syscall/windows/sysdll" "internal/testenv" "io" @@ -668,6 +669,9 @@ func TestWERDialogue(t *testing.T) { } func TestWindowsStackMemory(t *testing.T) { + if race.Enabled { + t.Skip("skipping test: race mode uses more stack memory") + } o := runTestProg(t, "testprog", "StackMemory") stackUsage, err := strconv.Atoi(o) if err != nil { diff --git a/src/runtime/testdata/testprog/checkfinalizers.go b/src/runtime/testdata/testprog/checkfinalizers.go index b542f575fe..ea352a4e3e 100644 --- a/src/runtime/testdata/testprog/checkfinalizers.go +++ b/src/runtime/testdata/testprog/checkfinalizers.go @@ -5,8 +5,11 @@ package main import ( + "internal/asan" + "internal/race" "runtime" "runtime/debug" + "unsafe" ) func init() { @@ -38,14 +41,25 @@ func DetectFinalizerAndCleanupLeaks() { **cNoLeak = x }, int(0)).Stop() - // Ensure we create an allocation into a tiny block that shares space among several values. - var ctLeak *tiny - for i := 0; i < 18; i++ { - tinySink = ctLeak - ctLeak = new(tiny) - *ctLeak = tiny(i) + if !asan.Enabled && !race.Enabled { + // Ensure we create an allocation into a tiny block that shares space among several values. + // + // Don't do this with ASAN and in race mode, where the tiny allocator is disabled. + // We might just loop forever here in that case. + var ctLeak *tiny + for { + tinySink = ctLeak + ctLeak = new(tiny) + *ctLeak = tiny(55) + // Make sure the address is an odd value. This is sufficient to + // be certain that we're sharing a block with another value and + // trip the detector. + if uintptr(unsafe.Pointer(ctLeak))%2 != 0 { + break + } + } + runtime.AddCleanup(ctLeak, func(_ struct{}) {}, struct{}{}) } - runtime.AddCleanup(ctLeak, func(_ struct{}) {}, struct{}{}) // Leak a finalizer. fLeak := new(T) diff --git a/src/runtime/testdata/testprog/gomaxprocs.go b/src/runtime/testdata/testprog/gomaxprocs.go new file mode 100644 index 0000000000..915e3c4dad --- /dev/null +++ b/src/runtime/testdata/testprog/gomaxprocs.go @@ -0,0 +1,152 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + "fmt" + "os" + "runtime" + "strconv" + "time" +) + +func init() { + register("PrintGOMAXPROCS", PrintGOMAXPROCS) + register("SetLimitThenDefaultGOMAXPROCS", SetLimitThenDefaultGOMAXPROCS) + register("UpdateGOMAXPROCS", UpdateGOMAXPROCS) + register("DontUpdateGOMAXPROCS", DontUpdateGOMAXPROCS) +} + +func PrintGOMAXPROCS() { + println(runtime.GOMAXPROCS(0)) +} + +func mustSetCPUMax(path string, quota int64) { + q := "max" + if quota >= 0 { + q = strconv.FormatInt(quota, 10) + } + buf := fmt.Sprintf("%s 100000", q) + if err := os.WriteFile(path, []byte(buf), 0); err != nil { + panic(fmt.Sprintf("error setting cpu.max: %v", err)) + } +} + +func mustParseInt64(s string) int64 { + v, err := strconv.ParseInt(s, 10, 64) + if err != nil { + panic(err) + } + return v +} + +// Inputs: +// GO_TEST_CPU_MAX_PATH: Path to cgroup v2 cpu.max file. +// GO_TEST_CPU_MAX_QUOTA: CPU quota to set. +func SetLimitThenDefaultGOMAXPROCS() { + path := os.Getenv("GO_TEST_CPU_MAX_PATH") + quota := mustParseInt64(os.Getenv("GO_TEST_CPU_MAX_QUOTA")) + + mustSetCPUMax(path, quota) + + runtime.SetDefaultGOMAXPROCS() + println(runtime.GOMAXPROCS(0)) +} + +// Wait for GOMAXPROCS to change from from to to. Times out after 10s. +func waitForMaxProcsChange(from, to int) { + start := time.Now() + for { + if time.Since(start) > 10*time.Second { + panic("no update for >10s") + } + + procs := runtime.GOMAXPROCS(0) + println("GOMAXPROCS:", procs) + if procs == to { + return + } + if procs != from { + panic(fmt.Sprintf("GOMAXPROCS change got %d want %d", procs, to)) + } + + time.Sleep(100*time.Millisecond) + } +} + +// Make sure that GOMAXPROCS does not change from curr. +// +// It is impossible to assert that it never changes, so this just makes sure it +// stays for 5s. +func mustNotChangeMaxProcs(curr int) { + start := time.Now() + for { + if time.Since(start) > 5*time.Second { + return + } + + procs := runtime.GOMAXPROCS(0) + println("GOMAXPROCS:", procs) + if procs != curr { + panic(fmt.Sprintf("GOMAXPROCS change got %d want %d", procs, curr)) + } + + time.Sleep(100*time.Millisecond) + } +} + +// Inputs: +// GO_TEST_CPU_MAX_PATH: Path to cgroup v2 cpu.max file. +func UpdateGOMAXPROCS() { + // We start with no limit. + + ncpu := runtime.NumCPU() + + procs := runtime.GOMAXPROCS(0) + println("GOMAXPROCS:", procs) + if procs != ncpu { + panic(fmt.Sprintf("GOMAXPROCS got %d want %d", procs, ncpu)) + } + + path := os.Getenv("GO_TEST_CPU_MAX_PATH") + + // Drop down to 3 CPU. + mustSetCPUMax(path, 300000) + waitForMaxProcsChange(ncpu, 3) + + // Drop even further. Now we hit the minimum GOMAXPROCS=2. + mustSetCPUMax(path, 100000) + waitForMaxProcsChange(3, 2) + + // Increase back up. + mustSetCPUMax(path, 300000) + waitForMaxProcsChange(2, 3) + + // Remove limit entirely. + mustSetCPUMax(path, -1) + waitForMaxProcsChange(3, ncpu) + + // Setting GOMAXPROCS explicitly disables updates. + runtime.GOMAXPROCS(3) + mustSetCPUMax(path, 200000) + mustNotChangeMaxProcs(3) + + println("OK") +} + +// Inputs: +// GO_TEST_CPU_MAX_PATH: Path to cgroup v2 cpu.max file. +func DontUpdateGOMAXPROCS() { + // The caller has disabled updates. Make sure they don't happen. + + curr := runtime.GOMAXPROCS(0) + println("GOMAXPROCS:", curr) + + path := os.Getenv("GO_TEST_CPU_MAX_PATH") + mustSetCPUMax(path, 300000) + mustNotChangeMaxProcs(curr) + + println("OK") +} diff --git a/src/runtime/testdata/testprog/gomaxprocs_windows.go b/src/runtime/testdata/testprog/gomaxprocs_windows.go new file mode 100644 index 0000000000..cae9dba8b3 --- /dev/null +++ b/src/runtime/testdata/testprog/gomaxprocs_windows.go @@ -0,0 +1,63 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + "os" + "runtime" + "syscall" + "unsafe" +) + +func init() { + register("WindowsUpdateGOMAXPROCS", WindowsUpdateGOMAXPROCS) + register("WindowsDontUpdateGOMAXPROCS", WindowsDontUpdateGOMAXPROCS) +} + +// Set CPU affinity mask to only two CPUs. +// +// Skips the test if CPUs 0 and 1 are not available. +func setAffinity2() { + kernel32 := syscall.MustLoadDLL("kernel32.dll") + _GetProcessAffinityMask := kernel32.MustFindProc("GetProcessAffinityMask") + _SetProcessAffinityMask := kernel32.MustFindProc("SetProcessAffinityMask") + + h, err := syscall.GetCurrentProcess() + if err != nil { + panic(err) + } + + var mask, sysmask uintptr + ret, _, err := _GetProcessAffinityMask.Call(uintptr(h), uintptr(unsafe.Pointer(&mask)), uintptr(unsafe.Pointer(&sysmask))) + if ret == 0 { + panic(err) + } + + // We're going to restrict to CPUs 0 and 1. Make sure those are already available. + if mask & 0b11 != 0b11 { + println("SKIP: CPUs 0 and 1 not available") + os.Exit(0) + } + + mask = 0b11 + ret, _, err = _SetProcessAffinityMask.Call(uintptr(h), mask) + if ret == 0 { + panic(err) + } +} + +func WindowsUpdateGOMAXPROCS() { + ncpu := runtime.NumCPU() + setAffinity2() + waitForMaxProcsChange(ncpu, 2) + println("OK") +} + +func WindowsDontUpdateGOMAXPROCS() { + procs := runtime.GOMAXPROCS(0) + setAffinity2() + mustNotChangeMaxProcs(procs) + println("OK") +} diff --git a/src/runtime/trace.go b/src/runtime/trace.go index bc2978bb4b..139cbba6a9 100644 --- a/src/runtime/trace.go +++ b/src/runtime/trace.go @@ -21,6 +21,7 @@ package runtime import ( "internal/runtime/atomic" + "internal/trace/tracev2" "unsafe" ) @@ -51,9 +52,10 @@ var trace struct { // State for the trace reader goroutine. // // Protected by trace.lock. - readerGen atomic.Uintptr // the generation the reader is currently reading for - flushedGen atomic.Uintptr // the last completed generation - headerWritten bool // whether ReadTrace has emitted trace header + readerGen atomic.Uintptr // the generation the reader is currently reading for + flushedGen atomic.Uintptr // the last completed generation + headerWritten bool // whether ReadTrace has emitted trace header + endOfGenerationWritten bool // whether readTrace has emitted the end of the generation signal // doneSema is used to synchronize the reader and traceAdvance. Specifically, // it notifies traceAdvance that the reader is done with a generation. @@ -184,6 +186,10 @@ func StartTrace() error { // Register some basic strings in the string tables. traceRegisterLabelsAndReasons(firstGen) + // N.B. This may block for quite a while to get a frequency estimate. Do it + // here to minimize the time that the world is stopped. + frequency := traceClockUnitsPerSecond() + // Stop the world. // // The purpose of stopping the world is to make sure that no goroutine is in a @@ -280,8 +286,9 @@ func StartTrace() error { // // N.B. This will also emit a status event for this goroutine. tl := traceAcquire() - tl.Gomaxprocs(gomaxprocs) // Get this as early in the trace as possible. See comment in traceAdvance. - tl.STWStart(stwStartTrace) // We didn't trace this above, so trace it now. + traceSyncBatch(firstGen, frequency) // Get this as early in the trace as possible. See comment in traceAdvance. + tl.Gomaxprocs(gomaxprocs) // Get this as early in the trace as possible. See comment in traceAdvance. + tl.STWStart(stwStartTrace) // We didn't trace this above, so trace it now. // Record the fact that a GC is active, if applicable. if gcphase == _GCmark || gcphase == _GCmarktermination { @@ -340,12 +347,6 @@ func traceAdvance(stopTrace bool) { return } - // Write an EvFrequency event for this generation. - // - // N.B. This may block for quite a while to get a good frequency estimate, so make sure we do - // this here and not e.g. on the trace reader. - traceFrequency(gen) - // Collect all the untraced Gs. type untracedG struct { gp *g @@ -410,6 +411,10 @@ func traceAdvance(stopTrace bool) { traceRegisterLabelsAndReasons(traceNextGen(gen)) } + // N.B. This may block for quite a while to get a frequency estimate. Do it + // here to minimize the time that we prevent the world from stopping. + frequency := traceClockUnitsPerSecond() + // Now that we've done some of the heavy stuff, prevent the world from stopping. // This is necessary to ensure the consistency of the STW events. If we're feeling // adventurous we could lift this restriction and add a STWActive event, but the @@ -441,14 +446,16 @@ func traceAdvance(stopTrace bool) { trace.gen.Store(traceNextGen(gen)) } - // Emit a ProcsChange event so we have one on record for each generation. - // Let's emit it as soon as possible so that downstream tools can rely on the value - // being there fairly soon in a generation. + // Emit a sync batch which contains a ClockSnapshot. Also emit a ProcsChange + // event so we have one on record for each generation. Let's emit it as soon + // as possible so that downstream tools can rely on the value being there + // fairly soon in a generation. // // It's important that we do this before allowing stop-the-worlds again, // because the procs count could change. if !stopTrace { tl := traceAcquire() + traceSyncBatch(tl.gen, frequency) tl.Gomaxprocs(gomaxprocs) traceRelease(tl) } @@ -748,8 +755,24 @@ func traceRegisterLabelsAndReasons(gen uintptr) { // returned data before calling ReadTrace again. // ReadTrace must be called from one goroutine at a time. func ReadTrace() []byte { + for { + buf := readTrace() + + // Skip over the end-of-generation signal which must not appear + // in the final trace. + if len(buf) == 1 && tracev2.EventType(buf[0]) == tracev2.EvEndOfGeneration { + continue + } + return buf + } +} + +// readTrace is the implementation of ReadTrace, except with an additional +// in-band signal as to when the buffer is for a new generation. +// +//go:linkname readTrace runtime/trace.runtime_readTrace +func readTrace() (buf []byte) { top: - var buf []byte var park bool systemstack(func() { buf, park = readTrace0() @@ -777,7 +800,6 @@ top: }, nil, waitReasonTraceReaderBlocked, traceBlockSystemGoroutine, 2) goto top } - return buf } @@ -820,7 +842,7 @@ func readTrace0() (buf []byte, park bool) { if !trace.headerWritten { trace.headerWritten = true unlock(&trace.lock) - return []byte("go 1.23 trace\x00\x00\x00"), false + return []byte("go 1.25 trace\x00\x00\x00"), false } // Read the next buffer. @@ -844,6 +866,17 @@ func readTrace0() (buf []byte, park bool) { // is waiting on the reader to finish flushing the last generation so that it // can continue to advance. if trace.flushedGen.Load() == gen { + // Write out the internal in-band end-of-generation signal. + if !trace.endOfGenerationWritten { + trace.endOfGenerationWritten = true + unlock(&trace.lock) + return []byte{byte(tracev2.EvEndOfGeneration)}, false + } + + // Reset the flag. + trace.endOfGenerationWritten = false + + // Handle shutdown. if trace.shutdown.Load() { unlock(&trace.lock) @@ -863,6 +896,8 @@ func readTrace0() (buf []byte, park bool) { // read. We're done. return nil, false } + // Handle advancing to the next generation. + // The previous gen has had all of its buffers flushed, and // there's nothing else for us to read. Advance the generation // we're reading from and try again. diff --git a/src/runtime/trace/batch.go b/src/runtime/trace/batch.go new file mode 100644 index 0000000000..d726a3d375 --- /dev/null +++ b/src/runtime/trace/batch.go @@ -0,0 +1,83 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package trace + +import ( + "fmt" + "internal/trace/tracev2" +) + +// timestamp is an unprocessed timestamp. +type timestamp uint64 + +// batch represents a batch of trace events. +// It is unparsed except for its header. +type batch struct { + m threadID + time timestamp + data []byte +} + +// threadID is the runtime-internal M structure's ID. This is unique +// for each OS thread. +type threadID int64 + +// readBatch copies b and parses the trace batch header inside. +// Returns the batch, the generation, bytes read, and an error. +func readBatch(b []byte) (batch, uint64, uint64, error) { + if len(b) == 0 { + return batch{}, 0, 0, fmt.Errorf("batch is empty") + } + data := make([]byte, len(b)) + if nw := copy(data, b); nw != len(b) { + return batch{}, 0, 0, fmt.Errorf("unexpected error copying batch") + } + // Read batch header byte. + if typ := tracev2.EventType(b[0]); typ != tracev2.EvEventBatch && typ != tracev2.EvExperimentalBatch { + return batch{}, 0, 1, fmt.Errorf("expected batch event, got event %d", typ) + } + + // Read the batch header: gen (generation), thread (M) ID, base timestamp + // for the batch. + total := 1 + b = b[1:] + gen, n, err := readUvarint(b) + if err != nil { + return batch{}, gen, uint64(total + n), fmt.Errorf("error reading batch gen: %w", err) + } + total += n + b = b[n:] + m, n, err := readUvarint(b) + if err != nil { + return batch{}, gen, uint64(total + n), fmt.Errorf("error reading batch M ID: %w", err) + } + total += n + b = b[n:] + ts, n, err := readUvarint(b) + if err != nil { + return batch{}, gen, uint64(total + n), fmt.Errorf("error reading batch timestamp: %w", err) + } + total += n + b = b[n:] + + // Read in the size of the batch to follow. + size, n, err := readUvarint(b) + if err != nil { + return batch{}, gen, uint64(total + n), fmt.Errorf("error reading batch size: %w", err) + } + if size > tracev2.MaxBatchSize { + return batch{}, gen, uint64(total + n), fmt.Errorf("invalid batch size %d, maximum is %d", size, tracev2.MaxBatchSize) + } + total += n + total += int(size) + data = data[:total] + + // Return the batch. + return batch{ + m: threadID(m), + time: timestamp(ts), + data: data, + }, gen, uint64(total), nil +} diff --git a/src/runtime/trace/encoding.go b/src/runtime/trace/encoding.go new file mode 100644 index 0000000000..46990c658c --- /dev/null +++ b/src/runtime/trace/encoding.go @@ -0,0 +1,50 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package trace + +import ( + "errors" +) + +// maxVarintLenN is the maximum length of a varint-encoded N-bit integer. +const maxVarintLen64 = 10 + +var ( + errOverflow = errors.New("binary: varint overflows a 64-bit integer") + errEOB = errors.New("binary: end of buffer") +) + +// TODO deduplicate this function. +func readUvarint(b []byte) (uint64, int, error) { + var x uint64 + var s uint + var byt byte + for i := 0; i < maxVarintLen64 && i < len(b); i++ { + byt = b[i] + if byt < 0x80 { + if i == maxVarintLen64-1 && byt > 1 { + return x, i, errOverflow + } + return x | uint64(byt)<= 0x80 { + buf[i] = byte(x) | 0x80 + x >>= 7 + i++ + } + buf[i] = byte(x) + return i + 1 +} diff --git a/src/runtime/trace/flightrecorder.go b/src/runtime/trace/flightrecorder.go new file mode 100644 index 0000000000..24163f32b2 --- /dev/null +++ b/src/runtime/trace/flightrecorder.go @@ -0,0 +1,182 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package trace + +import ( + "fmt" + "io" + "sync" + "time" + _ "unsafe" // added for go linkname usage +) + +// FlightRecorder represents a single consumer of a Go execution +// trace. +// It tracks a moving window over the execution trace produced by +// the runtime, always containing the most recent trace data. +// +// At most one flight recorder may be active at any given time, +// though flight recording is allowed to be concurrently active +// with a trace consumer using trace.Start. +// This restriction of only a single flight recorder may be removed +// in the future. +type FlightRecorder struct { + err error + + // State specific to the recorder. + header [16]byte + active rawGeneration + ringMu sync.Mutex + ring []rawGeneration + freq frequency // timestamp conversion factor, from the runtime + + // Externally-set options. + targetSize uint64 + targetPeriod time.Duration + + enabled bool // whether the flight recorder is enabled. + writing sync.Mutex // protects concurrent calls to WriteTo + + // The values of targetSize and targetPeriod we've committed to since the last Start. + wantSize uint64 + wantDur time.Duration +} + +// NewFlightRecorder creates a new flight recorder from the provided configuration. +func NewFlightRecorder(cfg FlightRecorderConfig) *FlightRecorder { + fr := new(FlightRecorder) + if cfg.MaxBytes != 0 { + fr.targetSize = cfg.MaxBytes + } else { + fr.targetSize = 10 << 20 // 10 MiB. + } + + if cfg.MinAge != 0 { + fr.targetPeriod = cfg.MinAge + } else { + fr.targetPeriod = 10 * time.Second + } + return fr +} + +// Start activates the flight recorder and begins recording trace data. +// Only one call to trace.Start may be active at any given time. +// In addition, currently only one flight recorder may be active in the program. +// Returns an error if the flight recorder cannot be started or is already started. +func (fr *FlightRecorder) Start() error { + if fr.enabled { + return fmt.Errorf("cannot enable a enabled flight recorder") + } + fr.wantSize = fr.targetSize + fr.wantDur = fr.targetPeriod + fr.err = nil + fr.freq = frequency(1.0 / (float64(runtime_traceClockUnitsPerSecond()) / 1e9)) + + // Start tracing, data is sent to a recorder which forwards it to our own + // storage. + if err := tracing.subscribeFlightRecorder(&recorder{r: fr}); err != nil { + return err + } + + fr.enabled = true + return nil +} + +// Stop ends recording of trace data. It blocks until any concurrent WriteTo calls complete. +func (fr *FlightRecorder) Stop() { + if !fr.enabled { + return + } + fr.enabled = false + tracing.unsubscribeFlightRecorder() + + // Reset all state. No need to lock because the reader has already exited. + fr.active = rawGeneration{} + fr.ring = nil +} + +// Enabled returns true if the flight recorder is active. +// Specifically, it will return true if Start did not return an error, and Stop has not yet been called. +// It is safe to call from multiple goroutines simultaneously. +func (fr *FlightRecorder) Enabled() bool { return fr.enabled } + +// WriteTo snapshots the moving window tracked by the flight recorder. +// The snapshot is expected to contain data that is up-to-date as of when WriteTo is called, +// though this is not a hard guarantee. +// Only one goroutine may execute WriteTo at a time. +// An error is returned upon failure to write to w, if another WriteTo call is already in-progress, +// or if the flight recorder is inactive. +func (fr *FlightRecorder) WriteTo(w io.Writer) (n int64, err error) { + if !fr.enabled { + return 0, fmt.Errorf("cannot snapshot a disabled flight recorder") + } + if !fr.writing.TryLock() { + // Indicates that a call to WriteTo was made while one was already in progress. + // If the caller of WriteTo sees this error, they should use the result from the other call to WriteTo. + return 0, fmt.Errorf("call to WriteTo for trace.FlightRecorder already in progress") + } + defer fr.writing.Unlock() + + // Force a global buffer flush. + runtime_traceAdvance(false) + + // Now that everything has been flushed and written, grab whatever we have. + // + // N.B. traceAdvance blocks until the tracer goroutine has actually written everything + // out, which means the generation we just flushed must have been already been observed + // by the recorder goroutine. Because we flushed twice, the first flush is guaranteed to + // have been both completed *and* processed by the recorder goroutine. + fr.ringMu.Lock() + gens := fr.ring + fr.ringMu.Unlock() + + // Write the header. + nw, err := w.Write(fr.header[:]) + if err != nil { + return int64(nw), err + } + n += int64(nw) + + // Write all the data. + for _, gen := range gens { + for _, batch := range gen.batches { + // Write batch data. + nw, err = w.Write(batch.data) + n += int64(nw) + if err != nil { + return n, err + } + } + } + return n, nil +} + +type FlightRecorderConfig struct { + // MinAge is a lower bound on the age of an event in the flight recorder's window. + // + // The flight recorder will strive to promptly discard events older than the minimum age, + // but older events may appear in the window snapshot. The age setting will always be + // overridden by MaxSize. + // + // If this is 0, the minimum age is implementation defined, but can be assumed to be on the order + // of seconds. + MinAge time.Duration + + // MaxBytes is an upper bound on the size of the window in bytes. + // + // This setting takes precedence over MinAge. + // However, it does not make any guarantees on the size of the data WriteTo will write, + // nor does it guarantee memory overheads will always stay below MaxBytes. Treat it + // as a hint. + // + // If this is 0, the maximum size is implementation defined. + MaxBytes uint64 +} + +//go:linkname runtime_traceClockUnitsPerSecond +func runtime_traceClockUnitsPerSecond() uint64 + +//go:linkname runtime_traceAdvance runtime.traceAdvance +func runtime_traceAdvance(stopTrace bool) diff --git a/src/runtime/trace/flightrecorder_test.go b/src/runtime/trace/flightrecorder_test.go new file mode 100644 index 0000000000..61cb03dcf6 --- /dev/null +++ b/src/runtime/trace/flightrecorder_test.go @@ -0,0 +1,313 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package trace_test + +import ( + "bytes" + "context" + inttrace "internal/trace" + "internal/trace/testtrace" + "io" + "runtime/trace" + "slices" + "sync" + "sync/atomic" + "testing" + "time" +) + +func TestFlightRecorderDoubleStart(t *testing.T) { + fr := trace.NewFlightRecorder(trace.FlightRecorderConfig{}) + if err := fr.Start(); err != nil { + t.Fatalf("unexpected error on Start: %v", err) + } + if err := fr.Start(); err == nil { + t.Fatalf("expected error from double Start: %v", err) + } + fr.Stop() +} + +func TestFlightRecorderEnabled(t *testing.T) { + fr := trace.NewFlightRecorder(trace.FlightRecorderConfig{}) + + if fr.Enabled() { + t.Fatal("flight recorder is enabled, but never started") + } + if err := fr.Start(); err != nil { + t.Fatalf("unexpected error on Start: %v", err) + } + if !fr.Enabled() { + t.Fatal("flight recorder is not enabled, but started") + } + fr.Stop() + if fr.Enabled() { + t.Fatal("flight recorder is enabled, but stopped") + } +} + +func TestFlightRecorderWriteToDisabled(t *testing.T) { + var buf bytes.Buffer + + fr := trace.NewFlightRecorder(trace.FlightRecorderConfig{}) + if n, err := fr.WriteTo(&buf); err == nil { + t.Fatalf("successfully wrote %d bytes from disabled flight recorder", n) + } + if err := fr.Start(); err != nil { + t.Fatalf("unexpected error on Start: %v", err) + } + fr.Stop() + if n, err := fr.WriteTo(&buf); err == nil { + t.Fatalf("successfully wrote %d bytes from disabled flight recorder", n) + } +} + +func TestFlightRecorderConcurrentWriteTo(t *testing.T) { + fr := trace.NewFlightRecorder(trace.FlightRecorderConfig{}) + if err := fr.Start(); err != nil { + t.Fatalf("unexpected error on Start: %v", err) + } + + // Start two goroutines to write snapshots. + // + // Most of the time one will fail and one will succeed, but we don't require this. + // Due to a variety of factors, it's definitely possible for them both to succeed. + // However, at least one should succeed. + var bufs [2]bytes.Buffer + var wg sync.WaitGroup + var successes atomic.Uint32 + for i := range bufs { + wg.Add(1) + go func() { + defer wg.Done() + + n, err := fr.WriteTo(&bufs[i]) + // TODO(go.dev/issue/63185) was an exported error. Consider refactoring. + if err != nil && err.Error() == "call to WriteTo for trace.FlightRecorder already in progress" { + if n != 0 { + t.Errorf("(goroutine %d) WriteTo bytes written is non-zero for early bail out: %d", i, n) + } + return + } + if err != nil { + t.Errorf("(goroutine %d) failed to write snapshot for unexpected reason: %v", i, err) + } + successes.Add(1) + + if n == 0 { + t.Errorf("(goroutine %d) wrote invalid trace of zero bytes in size", i) + } + if n != int64(bufs[i].Len()) { + t.Errorf("(goroutine %d) trace length doesn't match WriteTo result: got %d, want %d", i, n, int64(bufs[i].Len())) + } + }() + } + wg.Wait() + + // Stop tracing. + fr.Stop() + + // Make sure at least one succeeded to write. + if successes.Load() == 0 { + t.Fatal("expected at least one success to write a snapshot, got zero") + } + + // Validate the traces that came out. + for i := range bufs { + buf := &bufs[i] + if buf.Len() == 0 { + continue + } + testReader(t, buf, testtrace.ExpectSuccess()) + } +} + +func TestFlightRecorder(t *testing.T) { + testFlightRecorder(t, trace.NewFlightRecorder(trace.FlightRecorderConfig{}), func(snapshot func()) { + snapshot() + }) +} + +func TestFlightRecorderStartStop(t *testing.T) { + fr := trace.NewFlightRecorder(trace.FlightRecorderConfig{}) + for i := 0; i < 5; i++ { + testFlightRecorder(t, fr, func(snapshot func()) { + snapshot() + }) + } +} + +func TestFlightRecorderLog(t *testing.T) { + tr := testFlightRecorder(t, trace.NewFlightRecorder(trace.FlightRecorderConfig{}), func(snapshot func()) { + trace.Log(context.Background(), "message", "hello") + snapshot() + }) + + // Prepare to read the trace snapshot. + r, err := inttrace.NewReader(bytes.NewReader(tr)) + if err != nil { + t.Fatalf("unexpected error creating trace reader: %v", err) + } + + // Find the log message in the trace. + found := false + for { + ev, err := r.ReadEvent() + if err == io.EOF { + break + } + if err != nil { + t.Fatalf("unexpected error reading trace: %v", err) + } + if !found && ev.Kind() == inttrace.EventLog { + log := ev.Log() + found = log.Category == "message" && log.Message == "hello" + } + } + if !found { + t.Errorf("failed to find expected log message (%q, %q) in snapshot", "message", "hello") + } +} + +func TestFlightRecorderGenerationCount(t *testing.T) { + test := func(t *testing.T, fr *trace.FlightRecorder) { + tr := testFlightRecorder(t, fr, func(snapshot func()) { + // Sleep to let a few generations pass. + time.Sleep(3 * time.Second) + snapshot() + }) + + // Prepare to read the trace snapshot. + r, err := inttrace.NewReader(bytes.NewReader(tr)) + if err != nil { + t.Fatalf("unexpected error creating trace reader: %v", err) + } + + // Make sure there are Sync events: at the start and end. + var syncs []int + evs := 0 + for { + ev, err := r.ReadEvent() + if err == io.EOF { + break + } + if err != nil { + t.Fatalf("unexpected error reading trace: %v", err) + } + if ev.Kind() == inttrace.EventSync { + syncs = append(syncs, evs) + } + evs++ + } + const wantMaxSyncs = 3 + if len(syncs) > wantMaxSyncs { + t.Errorf("expected at most %d sync events, found %d at %d", + wantMaxSyncs, len(syncs), syncs) + } + ends := []int{syncs[0], syncs[len(syncs)-1]} + if wantEnds := []int{0, evs - 1}; !slices.Equal(wantEnds, ends) { + t.Errorf("expected a sync event at each end of the trace, found sync events at %d instead of %d", + ends, wantEnds) + } + } + t.Run("MinAge", func(t *testing.T) { + fr := trace.NewFlightRecorder(trace.FlightRecorderConfig{MinAge: time.Millisecond}) + test(t, fr) + }) + t.Run("MaxBytes", func(t *testing.T) { + fr := trace.NewFlightRecorder(trace.FlightRecorderConfig{MaxBytes: 16}) + test(t, fr) + }) +} + +type flightRecorderTestFunc func(snapshot func()) + +func testFlightRecorder(t *testing.T, fr *trace.FlightRecorder, f flightRecorderTestFunc) []byte { + if trace.IsEnabled() { + t.Skip("cannot run flight recorder tests when tracing is enabled") + } + + // Start the flight recorder. + if err := fr.Start(); err != nil { + t.Fatalf("unexpected error on Start: %v", err) + } + + // Set up snapshot callback. + var buf bytes.Buffer + callback := func() { + n, err := fr.WriteTo(&buf) + if err != nil { + t.Errorf("unexpected failure during flight recording: %v", err) + return + } + if n < 16 { + t.Errorf("expected a trace size of at least 16 bytes, got %d", n) + } + if n != int64(buf.Len()) { + t.Errorf("WriteTo result doesn't match trace size: got %d, want %d", n, int64(buf.Len())) + } + } + + // Call the test function. + f(callback) + + // Stop the flight recorder. + fr.Stop() + + // Get the trace bytes; we don't want to use the Buffer as a Reader directly + // since we may want to consume this data more than once. + traceBytes := buf.Bytes() + + // Parse the trace to make sure it's not broken. + testReader(t, bytes.NewReader(traceBytes), testtrace.ExpectSuccess()) + return traceBytes +} + +func testReader(t *testing.T, tr io.Reader, exp *testtrace.Expectation) { + r, err := inttrace.NewReader(tr) + if err != nil { + if err := exp.Check(err); err != nil { + t.Error(err) + } + return + } + v := testtrace.NewValidator() + v.SkipClockSnapshotChecks() + for { + ev, err := r.ReadEvent() + if err == io.EOF { + break + } + if err != nil { + if err := exp.Check(err); err != nil { + t.Error(err) + } + return + } + if err := v.Event(ev); err != nil { + t.Error(err) + } + } + if err := exp.Check(nil); err != nil { + t.Error(err) + } +} + +func TestTraceAndFlightRecorder(t *testing.T) { + var tBuf, frBuf bytes.Buffer + if err := trace.Start(&tBuf); err != nil { + t.Errorf("unable to start execution tracer: %s", err) + } + fr := trace.NewFlightRecorder(trace.FlightRecorderConfig{MaxBytes: 16}) + fr.Start() + fr.WriteTo(&frBuf) + fr.Stop() + trace.Stop() + if tBuf.Len() == 0 || frBuf.Len() == 0 { + t.Errorf("None of these should be equal to zero: %d %d", tBuf.Len(), frBuf.Len()) + } + if tBuf.Len() <= frBuf.Len() { + t.Errorf("trace should be longer than the flight recorder: trace=%d flight record=%d", tBuf.Len(), frBuf.Len()) + } +} diff --git a/src/runtime/trace/recorder.go b/src/runtime/trace/recorder.go new file mode 100644 index 0000000000..bf8d7ce647 --- /dev/null +++ b/src/runtime/trace/recorder.go @@ -0,0 +1,144 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package trace + +import ( + "fmt" + "slices" + "time" + _ "unsafe" // added for go linkname usage +) + +// A recorder receives bytes from the runtime tracer, processes it. +type recorder struct { + r *FlightRecorder + + headerReceived bool +} + +func (w *recorder) Write(b []byte) (n int, err error) { + r := w.r + + defer func() { + if err != nil { + // Propagate errors to the flightrecorder. + if r.err == nil { + r.err = err + } + } + }() + + if !w.headerReceived { + if len(b) < len(r.header) { + return 0, fmt.Errorf("expected at least %d bytes in the first write", len(r.header)) + } + r.header = ([16]byte)(b[:16]) + n += 16 + w.headerReceived = true + } + if len(b) == n { + return 0, nil + } + ba, gen, nb, err := readBatch(b[n:]) // Every write from the runtime is guaranteed to be a complete batch. + if err != nil { + return len(b) - int(nb) - n, err + } + n += int(nb) + + // Append the batch to the current generation. + if r.active.gen == 0 { + r.active.gen = gen + } + if r.active.minTime == 0 || r.active.minTime > r.freq.mul(ba.time) { + r.active.minTime = r.freq.mul(ba.time) + } + r.active.size += len(ba.data) + r.active.batches = append(r.active.batches, ba) + + return len(b), nil +} + +func (w *recorder) endGeneration() { + r := w.r + + // Check if we're entering a new generation. + r.ringMu.Lock() + + // Get the current trace clock time. + now := traceTimeNow(r.freq) + + // Add the current generation to the ring. Make sure we always have at least one + // complete generation by putting the active generation onto the new list, regardless + // of whatever our settings are. + // + // N.B. Let's completely replace the ring here, so that WriteTo can just make a copy + // and not worry about aliasing. This creates allocations, but at a very low rate. + newRing := []rawGeneration{r.active} + size := r.active.size + for i := len(r.ring) - 1; i >= 0; i-- { + // Stop adding older generations if the new ring already exceeds the thresholds. + // This ensures we keep generations that cross a threshold, but not any that lie + // entirely outside it. + if uint64(size) > r.wantSize || now.Sub(newRing[len(newRing)-1].minTime) > r.wantDur { + break + } + size += r.ring[i].size + newRing = append(newRing, r.ring[i]) + } + slices.Reverse(newRing) + r.ring = newRing + r.ringMu.Unlock() + + // Start a new active generation. + r.active = rawGeneration{} +} + +type rawGeneration struct { + gen uint64 + size int + minTime eventTime + batches []batch +} + +func traceTimeNow(freq frequency) eventTime { + return freq.mul(timestamp(runtime_traceClockNow())) +} + +//go:linkname runtime_traceClockNow runtime.traceClockNow +func runtime_traceClockNow() uint64 + +// frequency is nanoseconds per timestamp unit. +type frequency float64 + +// mul multiplies an unprocessed to produce a time in nanoseconds. +func (f frequency) mul(t timestamp) eventTime { + return eventTime(float64(t) * float64(f)) +} + +// eventTime is a timestamp in nanoseconds. +// +// It corresponds to the monotonic clock on the platform that the +// trace was taken, and so is possible to correlate with timestamps +// for other traces taken on the same machine using the same clock +// (i.e. no reboots in between). +// +// The actual absolute value of the timestamp is only meaningful in +// relation to other timestamps from the same clock. +// +// BUG: Timestamps coming from traces on Windows platforms are +// only comparable with timestamps from the same trace. Timestamps +// across traces cannot be compared, because the system clock is +// not used as of Go 1.22. +// +// BUG: Traces produced by Go versions 1.21 and earlier cannot be +// compared with timestamps from other traces taken on the same +// machine. This is because the system clock was not used at all +// to collect those timestamps. +type eventTime int64 + +// Sub subtracts t0 from t, returning the duration in nanoseconds. +func (t eventTime) Sub(t0 eventTime) time.Duration { + return time.Duration(int64(t) - int64(t0)) +} diff --git a/src/runtime/trace/subscribe.go b/src/runtime/trace/subscribe.go new file mode 100644 index 0000000000..45320cee36 --- /dev/null +++ b/src/runtime/trace/subscribe.go @@ -0,0 +1,188 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package trace + +import ( + "fmt" + "internal/trace/tracev2" + "io" + "runtime" + "sync" + "sync/atomic" + _ "unsafe" +) + +var tracing traceMultiplexer + +type traceMultiplexer struct { + sync.Mutex + enabled atomic.Bool + subscribers int + + subscribersMu sync.Mutex + traceStartWriter io.Writer + flightRecorder *recorder +} + +func (t *traceMultiplexer) subscribeFlightRecorder(r *recorder) error { + t.Lock() + defer t.Unlock() + + t.subscribersMu.Lock() + if t.flightRecorder != nil { + t.subscribersMu.Unlock() + return fmt.Errorf("flight recorder already enabled") + } + t.flightRecorder = r + t.subscribersMu.Unlock() + + if err := t.addedSubscriber(); err != nil { + t.subscribersMu.Lock() + t.flightRecorder = nil + t.subscribersMu.Unlock() + return err + } + return nil +} + +func (t *traceMultiplexer) unsubscribeFlightRecorder() error { + t.Lock() + defer t.Unlock() + + t.removingSubscriber() + + t.subscribersMu.Lock() + if t.flightRecorder == nil { + t.subscribersMu.Unlock() + return fmt.Errorf("attempt to unsubscribe missing flight recorder") + } + t.flightRecorder = nil + t.subscribersMu.Unlock() + + t.removedSubscriber() + return nil +} + +func (t *traceMultiplexer) subscribeTraceStartWriter(w io.Writer) error { + t.Lock() + defer t.Unlock() + + t.subscribersMu.Lock() + if t.traceStartWriter != nil { + t.subscribersMu.Unlock() + return fmt.Errorf("execution tracer already enabled") + } + t.traceStartWriter = w + t.subscribersMu.Unlock() + + if err := t.addedSubscriber(); err != nil { + t.subscribersMu.Lock() + t.traceStartWriter = nil + t.subscribersMu.Unlock() + return err + } + return nil +} + +func (t *traceMultiplexer) unsubscribeTraceStartWriter() { + t.Lock() + defer t.Unlock() + + t.removingSubscriber() + + t.subscribersMu.Lock() + if t.traceStartWriter == nil { + t.subscribersMu.Unlock() + return + } + t.traceStartWriter = nil + t.subscribersMu.Unlock() + + t.removedSubscriber() + return +} + +func (t *traceMultiplexer) addedSubscriber() error { + if t.enabled.Load() { + // This is necessary for the trace reader goroutine to pick up on the new subscriber. + runtime_traceAdvance(false) + } else { + if err := t.startLocked(); err != nil { + return err + } + } + t.subscribers++ + return nil +} + +func (t *traceMultiplexer) removingSubscriber() { + if t.subscribers == 0 { + return + } + t.subscribers-- + if t.subscribers == 0 { + runtime.StopTrace() + t.enabled.Store(false) + } else { + // This is necessary to avoid missing trace data when the system is under high load. + runtime_traceAdvance(false) + } +} + +func (t *traceMultiplexer) removedSubscriber() { + if t.subscribers > 0 { + // This is necessary for the trace reader goroutine to pick up on the new subscriber. + runtime_traceAdvance(false) + } +} + +func (t *traceMultiplexer) startLocked() error { + if err := runtime.StartTrace(); err != nil { + return err + } + + // Grab the trace reader goroutine's subscribers. + // + // We only update our subscribers if we see an end-of-generation + // signal from the runtime after this, so any new subscriptions + // or unsubscriptions must call traceAdvance to ensure the reader + // goroutine sees an end-of-generation signal. + t.subscribersMu.Lock() + flightRecorder := t.flightRecorder + traceStartWriter := t.traceStartWriter + t.subscribersMu.Unlock() + + go func() { + for { + data := runtime_readTrace() + if data == nil { + break + } + if len(data) == 1 && tracev2.EventType(data[0]) == tracev2.EvEndOfGeneration { + if flightRecorder != nil { + flightRecorder.endGeneration() + } + + // Pick up any changes. + t.subscribersMu.Lock() + flightRecorder = t.flightRecorder + traceStartWriter = t.traceStartWriter + t.subscribersMu.Unlock() + } else { + if traceStartWriter != nil { + traceStartWriter.Write(data) + } + if flightRecorder != nil { + flightRecorder.Write(data) + } + } + } + }() + t.enabled.Store(true) + return nil +} + +//go:linkname runtime_readTrace +func runtime_readTrace() (buf []byte) diff --git a/src/runtime/trace/trace.go b/src/runtime/trace/trace.go index 935d222f02..a858d1b101 100644 --- a/src/runtime/trace/trace.go +++ b/src/runtime/trace/trace.go @@ -110,45 +110,17 @@ package trace import ( "io" - "runtime" - "sync" - "sync/atomic" ) // Start enables tracing for the current program. // While tracing, the trace will be buffered and written to w. // Start returns an error if tracing is already enabled. func Start(w io.Writer) error { - tracing.Lock() - defer tracing.Unlock() - - if err := runtime.StartTrace(); err != nil { - return err - } - go func() { - for { - data := runtime.ReadTrace() - if data == nil { - break - } - w.Write(data) - } - }() - tracing.enabled.Store(true) - return nil + return tracing.subscribeTraceStartWriter(w) } // Stop stops the current tracing, if any. // Stop only returns after all the writes for the trace have completed. func Stop() { - tracing.Lock() - defer tracing.Unlock() - tracing.enabled.Store(false) - - runtime.StopTrace() -} - -var tracing struct { - sync.Mutex // gate mutators (Start, Stop) - enabled atomic.Bool + tracing.unsubscribeTraceStartWriter() } diff --git a/src/runtime/traceregion.go b/src/runtime/traceregion.go index 2fb27e6e01..eb19294f1b 100644 --- a/src/runtime/traceregion.go +++ b/src/runtime/traceregion.go @@ -59,37 +59,43 @@ func (a *traceRegionAlloc) alloc(n uintptr) *notInHeap { } // Try to install a new block. - lock(&a.lock) + var x *notInHeap + systemstack(func() { + // Acquire a.lock on the systemstack to avoid stack growth + // and accidentally entering the tracer again. + lock(&a.lock) - // Check block again under the lock. Someone may - // have gotten here first. - block = (*traceRegionAllocBlock)(a.current.Load()) - if block != nil { - r := block.off.Add(n) - if r <= uintptr(len(block.data)) { - unlock(&a.lock) - return (*notInHeap)(unsafe.Pointer(&block.data[r-n])) + // Check block again under the lock. Someone may + // have gotten here first. + block = (*traceRegionAllocBlock)(a.current.Load()) + if block != nil { + r := block.off.Add(n) + if r <= uintptr(len(block.data)) { + unlock(&a.lock) + x = (*notInHeap)(unsafe.Pointer(&block.data[r-n])) + return + } + + // Add the existing block to the full list. + block.next = a.full + a.full = block } - // Add the existing block to the full list. - block.next = a.full - a.full = block - } + // Allocate a new block. + block = (*traceRegionAllocBlock)(sysAlloc(unsafe.Sizeof(traceRegionAllocBlock{}), &memstats.other_sys, "trace arena alloc")) + if block == nil { + throw("traceRegion: out of memory") + } - // Allocate a new block. - block = (*traceRegionAllocBlock)(sysAlloc(unsafe.Sizeof(traceRegionAllocBlock{}), &memstats.other_sys, "trace arena alloc")) - if block == nil { - throw("traceRegion: out of memory") - } + // Allocate space for our current request, so we always make + // progress. + block.off.Store(n) + x = (*notInHeap)(unsafe.Pointer(&block.data[0])) - // Allocate space for our current request, so we always make - // progress. - block.off.Store(n) - x := (*notInHeap)(unsafe.Pointer(&block.data[0])) - - // Publish the new block. - a.current.Store(unsafe.Pointer(block)) - unlock(&a.lock) + // Publish the new block. + a.current.Store(unsafe.Pointer(block)) + unlock(&a.lock) + }) return x } diff --git a/src/runtime/tracetime.go b/src/runtime/tracetime.go index bfda0aac9a..7ffab79bad 100644 --- a/src/runtime/tracetime.go +++ b/src/runtime/tracetime.go @@ -64,6 +64,8 @@ func traceClockNow() traceTime { // traceClockUnitsPerSecond estimates the number of trace clock units per // second that elapse. +// +//go:linkname traceClockUnitsPerSecond runtime/trace.runtime_traceClockUnitsPerSecond func traceClockUnitsPerSecond() uint64 { if osHasLowResClock { // We're using cputicks as our clock, so we need a real estimate. @@ -74,18 +76,32 @@ func traceClockUnitsPerSecond() uint64 { return uint64(1.0 / float64(traceTimeDiv) * 1e9) } -// traceFrequency writes a batch with a single EvFrequency event. -// -// freq is the number of trace clock units per second. -func traceFrequency(gen uintptr) { +func traceSyncBatch(gen uintptr, frequency uint64) { w := unsafeTraceWriter(gen, nil) // Ensure we have a place to write to. - w, _ = w.ensure(1 + traceBytesPerNumber /* tracev2.EvFrequency + frequency */) + w, _ = w.ensure(3 /* EvSync + EvFrequency + EvClockSnapshot */ + 5*traceBytesPerNumber /* frequency, timestamp, mono, sec, nsec */) - // Write out the string. + // Write out the sync batch event. + w.byte(byte(tracev2.EvSync)) + + // Write out the frequency event. w.byte(byte(tracev2.EvFrequency)) - w.varint(traceClockUnitsPerSecond()) + w.varint(frequency) + + // Write out the clock snapshot event. + sec, nsec, mono := time_now() + ts := traceClockNow() + if ts <= w.traceBuf.lastTime { + ts = w.traceBuf.lastTime + 1 + } + tsDiff := uint64(ts - w.traceBuf.lastTime) + w.traceBuf.lastTime = ts + w.byte(byte(tracev2.EvClockSnapshot)) + w.varint(tsDiff) + w.varint(uint64(mono)) + w.varint(uint64(sec)) + w.varint(uint64(nsec)) // Immediately flush the buffer. systemstack(func() { diff --git a/src/runtime/valgrind.go b/src/runtime/valgrind.go new file mode 100644 index 0000000000..3933d63e6b --- /dev/null +++ b/src/runtime/valgrind.go @@ -0,0 +1,138 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build valgrind && linux && (arm64 || amd64) + +package runtime + +import "unsafe" + +const valgrindenabled = true + +// Valgrind provides a mechanism to allow programs under test to modify +// Valgrinds behavior in certain ways, referred to as client requests [0]. These +// requests are triggered putting the address of a series of uints in a specific +// register and emitting a very specific sequence of assembly instructions. The +// result of the request (if there is one) is then put in another register for +// the program to retrieve. Each request is identified by a unique uint, which +// is passed as the first "argument". +// +// Valgrind provides headers (valgrind/valgrind.h, valgrind/memcheck.h) with +// macros that emit the correct assembly for these requests. Instead of copying +// these headers into the tree and using cgo to call the macros, we implement +// the client request assembly ourselves. Since both the magic instruction +// sequences, and the request uint's are stable, it is safe for us to implement. +// +// The client requests we add are used to describe our memory allocator to +// Valgrind, per [1]. We describe the allocator using the two-level mempool +// structure a We also add annotations which allow Valgrind to track which +// memory we use for stacks, which seems necessary to let it properly function. +// +// We describe the memory model to Valgrind as follows: we treat heap arenas as +// "pools" created with VALGRIND_CREATE_MEMPOOL_EXT (so that we can use +// VALGRIND_MEMPOOL_METAPOOL and VALGRIND_MEMPOOL_AUTO_FREE). Within the pool we +// treat spans as "superblocks", annotated with VALGRIND_MEMPOOL_ALLOC. We then +// allocate individual objects within spans with VALGRIND_MALLOCLIKE_BLOCK. +// +// [0] https://valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.clientreq +// [1] https://valgrind.org/docs/manual/mc-manual.html#mc-manual.mempools + +const ( + // Valgrind request IDs, copied from valgrind/valgrind.h. + vg_userreq__malloclike_block = 0x1301 + vg_userreq__freelike_block = 0x1302 + vg_userreq__create_mempool = 0x1303 + vg_userreq__mempool_alloc = 0x1305 + vg_userreq__mempool_free = 0x1306 + vg_userreq__stack_register = 0x1501 + vg_userreq__stack_deregister = 0x1502 + vg_userreq__stack_change = 0x1503 +) + +const ( + // Memcheck request IDs are offset from ('M'&0xff) << 24 | ('C'&0xff) << 16, or 0x4d430000, + // copied from valgrind/memcheck.h. + vg_userreq__make_mem_noaccess = iota + ('M'&0xff)<<24 | ('C'&0xff)<<16 + vg_userreq__make_mem_undefined + vg_userreq__make_mem_defined +) + +const ( + // VALGRIND_CREATE_MEMPOOL_EXT flags, copied from valgrind/valgrind.h. + valgrind_mempool_auto_free = 1 + valgrind_mempool_metapool = 2 +) + +// + +//go:noescape +func valgrindClientRequest(uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) uintptr + +//go:nosplit +func valgrindRegisterStack(start, end unsafe.Pointer) uintptr { + // VALGRIND_STACK_REGISTER + return valgrindClientRequest(vg_userreq__stack_register, uintptr(start), uintptr(end), 0, 0, 0) +} + +//go:nosplit +func valgrindDeregisterStack(id uintptr) { + // VALGRIND_STACK_DEREGISTER + valgrindClientRequest(vg_userreq__stack_deregister, id, 0, 0, 0, 0) +} + +//go:nosplit +func valgrindChangeStack(id uintptr, start, end unsafe.Pointer) { + // VALGRIND_STACK_CHANGE + valgrindClientRequest(vg_userreq__stack_change, id, uintptr(start), uintptr(end), 0, 0) +} + +//go:nosplit +func valgrindMalloc(addr unsafe.Pointer, size uintptr) { + // VALGRIND_MALLOCLIKE_BLOCK + valgrindClientRequest(vg_userreq__malloclike_block, uintptr(addr), size, 0, 1, 0) +} + +//go:nosplit +func valgrindFree(addr unsafe.Pointer) { + // VALGRIND_FREELIKE_BLOCK + valgrindClientRequest(vg_userreq__freelike_block, uintptr(addr), 0, 0, 0, 0) +} + +//go:nosplit +func valgrindCreateMempool(addr unsafe.Pointer) { + // VALGRIND_CREATE_MEMPOOL_EXT + valgrindClientRequest(vg_userreq__create_mempool, uintptr(addr), 0, 1, valgrind_mempool_auto_free|valgrind_mempool_metapool, 0) +} + +//go:nosplit +func valgrindMempoolMalloc(pool, addr unsafe.Pointer, size uintptr) { + // VALGRIND_MEMPOOL_ALLOC + valgrindClientRequest(vg_userreq__mempool_alloc, uintptr(pool), uintptr(addr), size, 0, 0) +} + +//go:nosplit +func valgrindMempoolFree(pool, addr unsafe.Pointer) { + // VALGRIND_MEMPOOL_FREE + valgrindClientRequest(vg_userreq__mempool_free, uintptr(pool), uintptr(addr), 0, 0, 0) +} + +// Memcheck client requests, copied from valgrind/memcheck.h + +//go:nosplit +func valgrindMakeMemUndefined(addr unsafe.Pointer, size uintptr) { + // VALGRIND_MAKE_MEM_UNDEFINED + valgrindClientRequest(vg_userreq__make_mem_undefined, uintptr(addr), size, 0, 0, 0) +} + +//go:nosplit +func valgrindMakeMemDefined(addr unsafe.Pointer, size uintptr) { + // VALGRIND_MAKE_MEM_DEFINED + valgrindClientRequest(vg_userreq__make_mem_defined, uintptr(addr), size, 0, 0, 0) +} + +//go:nosplit +func valgrindMakeMemNoAccess(addr unsafe.Pointer, size uintptr) { + // VALGRIND_MAKE_MEM_NOACCESS + valgrindClientRequest(vg_userreq__make_mem_noaccess, uintptr(addr), size, 0, 0, 0) +} diff --git a/src/runtime/valgrind0.go b/src/runtime/valgrind0.go new file mode 100644 index 0000000000..adafa3001a --- /dev/null +++ b/src/runtime/valgrind0.go @@ -0,0 +1,25 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Valgrind instrumentation is only available on linux amd64 and arm64. + +//go:build !valgrind || !linux || (!amd64 && !arm64) + +package runtime + +import "unsafe" + +const valgrindenabled = false + +func valgrindRegisterStack(start, end unsafe.Pointer) uintptr { return 0 } +func valgrindDeregisterStack(id uintptr) {} +func valgrindChangeStack(id uintptr, start, end unsafe.Pointer) {} +func valgrindMalloc(addr unsafe.Pointer, size uintptr) {} +func valgrindFree(addr unsafe.Pointer) {} +func valgrindCreateMempool(addr unsafe.Pointer) {} +func valgrindMempoolMalloc(pool, addr unsafe.Pointer, size uintptr) {} +func valgrindMempoolFree(pool, addr unsafe.Pointer) {} +func valgrindMakeMemUndefined(addr unsafe.Pointer, size uintptr) {} +func valgrindMakeMemDefined(addr unsafe.Pointer, size uintptr) {} +func valgrindMakeMemNoAccess(addr unsafe.Pointer, size uintptr) {} diff --git a/src/runtime/valgrind_amd64.s b/src/runtime/valgrind_amd64.s new file mode 100644 index 0000000000..1c53d4f4e5 --- /dev/null +++ b/src/runtime/valgrind_amd64.s @@ -0,0 +1,37 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build valgrind && linux + +#include "textflag.h" + +// Instead of using cgo and using the Valgrind macros, we just emit the special client request +// assembly ourselves. The client request mechanism is basically the same across all architectures, +// with the notable difference being the special preamble that lets Valgrind know we want to do +// a client request. +// +// The form of the VALGRIND_DO_CLIENT_REQUEST macro assembly can be found in the valgrind/valgrind.h +// header file [0]. +// +// [0] https://sourceware.org/git/?p=valgrind.git;a=blob;f=include/valgrind.h.in;h=f1710924aa7372e7b7e2abfbf7366a2286e33d2d;hb=HEAD + +// func valgrindClientRequest(uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) (ret uintptr) +TEXT runtime·valgrindClientRequest(SB), NOSPLIT, $0-56 + // Load the address of the first of the (contiguous) arguments into AX. + LEAQ args+0(FP), AX + + // Zero DX, since some requests may not populate it. + XORL DX, DX + + // Emit the special preabmle. + ROLQ $3, DI; ROLQ $13, DI + ROLQ $61, DI; ROLQ $51, DI + + // "Execute" the client request. + XCHGQ BX, BX + + // Copy the result out of DX. + MOVQ DX, ret+48(FP) + + RET diff --git a/src/runtime/valgrind_arm64.s b/src/runtime/valgrind_arm64.s new file mode 100644 index 0000000000..a46c3d4b9b --- /dev/null +++ b/src/runtime/valgrind_arm64.s @@ -0,0 +1,29 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build valgrind && linux + +#include "textflag.h" + +// See valgrind_amd64.s for notes about this assembly. + +// func valgrindClientRequest(uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) (ret uintptr) +TEXT runtime·valgrindClientRequest(SB), NOSPLIT, $0-56 + // Load the address of the first of the (contiguous) arguments into x4. + MOVD $args+0(FP), R4 + + // Zero x3, since some requests may not populate it. + MOVD ZR, R3 + + // Emit the special preamble. + ROR $3, R12; ROR $13, R12 + ROR $51, R12; ROR $61, R12 + + // "Execute" the client request. + ORR R10, R10 + + // Copy the result out of x3. + MOVD R3, ret+48(FP) + + RET diff --git a/src/syscall/exec_linux.go b/src/syscall/exec_linux.go index 678bc84796..abae9d14eb 100644 --- a/src/syscall/exec_linux.go +++ b/src/syscall/exec_linux.go @@ -800,9 +800,34 @@ func os_checkClonePidfd() error { // pidfd. defer Close(int(pidfd)) + // TODO(roland): this is necessary to prevent valgrind from complaining + // about passing 0x0 to waitid, which is doesn't like. This is clearly not + // ideal. The structures are copied (mostly) verbatim from syscall/unix, + // which we obviously cannot import because of an import loop. + + const is64bit = ^uint(0) >> 63 // 0 for 32-bit hosts, 1 for 64-bit ones. + type sigInfo struct { + Signo int32 + _ struct { + Errno int32 + Code int32 + } // Two int32 fields, swapped on MIPS. + _ [is64bit]int32 // Extra padding for 64-bit hosts only. + + // End of common part. Beginning of signal-specific part. + + Pid int32 + Uid uint32 + Status int32 + + // Pad to 128 bytes. + _ [128 - (6+is64bit)*4]byte + } + for { const _P_PIDFD = 3 - _, _, errno = Syscall6(SYS_WAITID, _P_PIDFD, uintptr(pidfd), 0, WEXITED|WCLONE, 0, 0) + var info sigInfo + _, _, errno = Syscall6(SYS_WAITID, _P_PIDFD, uintptr(pidfd), uintptr(unsafe.Pointer(&info)), WEXITED|WCLONE, 0, 0) if errno != EINTR { break } diff --git a/src/testing/synctest/synctest.go b/src/testing/synctest/synctest.go index 73fb0a3251..aeac8c4b43 100644 --- a/src/testing/synctest/synctest.go +++ b/src/testing/synctest/synctest.go @@ -24,11 +24,11 @@ // synctest.Test(t, func(t *testing.T) { // start := time.Now() // always midnight UTC 2001-01-01 // go func() { -// time.Sleep(1 * time.Nanosecond) -// t.Log(time.Since(start)) // always logs "1ns" +// time.Sleep(1 * time.Second) +// t.Log(time.Since(start)) // always logs "1s" // }() -// time.Sleep(2 * time.Nanosecond) // the goroutine above will run before this Sleep returns -// t.Log(time.Since(start)) // always logs "2ns" +// time.Sleep(2 * time.Second) // the goroutine above will run before this Sleep returns +// t.Log(time.Since(start)) // always logs "2s" // }) // } // diff --git a/src/testing/testing.go b/src/testing/testing.go index 13f19a2a22..85ac1aeb32 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -879,6 +879,7 @@ func fmtDuration(d time.Duration) string { // TB is the interface common to [T], [B], and [F]. type TB interface { + Attr(key, value string) Cleanup(func()) Error(args ...any) Errorf(format string, args ...any) @@ -1491,6 +1492,31 @@ func (c *common) Context() context.Context { return c.ctx } +// Attr emits a test attribute associated with this test. +// +// The key must not contain whitespace. +// The value must not contain newlines or carriage returns. +// +// The meaning of different attribute keys is left up to +// continuous integration systems and test frameworks. +// +// Test attributes are emitted immediately in the test log, +// but they are intended to be treated as unordered. +func (c *common) Attr(key, value string) { + if strings.ContainsFunc(key, unicode.IsSpace) { + c.Errorf("disallowed whitespace in attribute key %q", key) + return + } + if strings.ContainsAny(value, "\r\n") { + c.Errorf("disallowed newline in attribute value %q", value) + return + } + if c.chatty == nil { + return + } + c.chatty.Updatef(c.name, "=== ATTR %s %v %v\n", c.name, key, value) +} + // panicHandling controls the panic handling used by runCleanup. type panicHandling int diff --git a/src/testing/testing_test.go b/src/testing/testing_test.go index 209291d322..f4f5817a37 100644 --- a/src/testing/testing_test.go +++ b/src/testing/testing_test.go @@ -975,6 +975,53 @@ func TestContext(t *testing.T) { }) } +// TestAttrExample is used by TestAttrSet, +// and also serves as a convenient test to run that sets an attribute. +func TestAttrExample(t *testing.T) { + t.Attr("key", "value") +} + +func TestAttrSet(t *testing.T) { + out := string(runTest(t, "TestAttrExample")) + + want := "=== ATTR TestAttrExample key value\n" + if !strings.Contains(out, want) { + t.Errorf("expected output containing %q, got:\n%q", want, out) + } +} + +func TestAttrInvalid(t *testing.T) { + tests := []struct { + key string + value string + }{ + {"k ey", "value"}, + {"k\tey", "value"}, + {"k\rey", "value"}, + {"k\ney", "value"}, + {"key", "val\rue"}, + {"key", "val\nue"}, + } + + if os.Getenv("GO_WANT_HELPER_PROCESS") == "1" { + for i, test := range tests { + t.Run(fmt.Sprint(i), func(t *testing.T) { + t.Attr(test.key, test.value) + }) + } + return + } + + out := string(runTest(t, "TestAttrInvalid")) + + for i := range tests { + want := fmt.Sprintf("--- FAIL: TestAttrInvalid/%v ", i) + if !strings.Contains(out, want) { + t.Errorf("expected output containing %q, got:\n%q", want, out) + } + } +} + func TestBenchmarkBLoopIterationCorrect(t *testing.T) { out := runTest(t, "BenchmarkBLoopPrint") c := bytes.Count(out, []byte("Printing from BenchmarkBLoopPrint")) diff --git a/src/unique/clone.go b/src/unique/clone.go index 36ced14ece..b67029b654 100644 --- a/src/unique/clone.go +++ b/src/unique/clone.go @@ -23,7 +23,7 @@ func clone[T comparable](value T, seq *cloneSeq) T { ps := (*string)(unsafe.Pointer(uintptr(unsafe.Pointer(&value)) + offset)) *ps = stringslite.Clone(*ps) } - return value + return abi.EscapeToResultNonString(value) } // singleStringClone describes how to clone a single string. diff --git a/src/unique/handle_test.go b/src/unique/handle_test.go index 20ab93b68d..4c7f1f9752 100644 --- a/src/unique/handle_test.go +++ b/src/unique/handle_test.go @@ -227,21 +227,21 @@ func TestMakeAllocs(t *testing.T) { stringHandle = Make(heapString) }}, - {name: "stack string", allocs: 1, f: func() { + {name: "stack string", allocs: 0, f: func() { var b [16]byte b[8] = 'a' stringHandle = Make(string(b[:])) }}, - {name: "bytes", allocs: 1, f: func() { + {name: "bytes", allocs: 0, f: func() { stringHandle = Make(string(heapBytes)) }}, - {name: "bytes truncated short", allocs: 1, f: func() { + {name: "bytes truncated short", allocs: 0, f: func() { stringHandle = Make(string(heapBytes[:16])) }}, - {name: "bytes truncated long", allocs: 1, f: func() { + {name: "bytes truncated long", allocs: 0, f: func() { stringHandle = Make(string(heapBytes[:40])) }}, @@ -261,7 +261,7 @@ func TestMakeAllocs(t *testing.T) { pairHandle = Make([2]string{heapString, heapString}) }}, - {name: "pair from stack", allocs: 2, f: func() { + {name: "pair from stack", allocs: 0, f: func() { var b [16]byte b[8] = 'a' pairHandle = Make([2]string{string(b[:]), string(b[:])}) diff --git a/test/codegen/bits.go b/test/codegen/bits.go index 95e0ed85e4..7974f471fc 100644 --- a/test/codegen/bits.go +++ b/test/codegen/bits.go @@ -332,6 +332,7 @@ func op_eon(x, y, z uint32, a []uint32, n, m uint64) uint64 { func op_orn(x, y uint32) uint32 { // arm64:`ORN\t`,-`ORR` + // loong64:"ORN"\t,-"OR\t" return x | ^y } @@ -344,6 +345,11 @@ func op_nor(x int64, a []int64) { a[2] = ^(0x12 | 0x34) } +func op_andn(x, y uint32) uint32 { + // loong64:"ANDN\t",-"AND\t" + return x &^ y +} + // check bitsets func bitSetPowerOf2Test(x int) bool { // amd64:"BTL\t[$]3" diff --git a/test/codegen/issue72832.go b/test/codegen/issue72832.go index a7f6ca8c5c..392b41b173 100644 --- a/test/codegen/issue72832.go +++ b/test/codegen/issue72832.go @@ -35,7 +35,16 @@ type tile3 struct { func store_shifted(t *tile3, x uint32) { // amd64:`MOVL` + // ppc64:`MOVHBR` t.a = uint8(x) t.b = uint8(x >> 8) t.c = uint16(x >> 16) } + +func store_const(t *tile3) { + // 0x00030201 + // amd64:`MOVL\s\$197121` + // 0x01020003 + // ppc64:`MOVD\s\$16908291` + t.a, t.b, t.c = 1, 2, 3 +} diff --git a/test/codegen/unique.go b/test/codegen/unique.go new file mode 100644 index 0000000000..8ddc986c26 --- /dev/null +++ b/test/codegen/unique.go @@ -0,0 +1,24 @@ +// asmcheck + +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package codegen + +import "unique" + +func BytesToHandle(b []byte) unique.Handle[string] { + // amd64:-`.*runtime\.slicebytetostring\(` + return unique.Make(string(b)) +} + +type Pair struct { + S1 string + S2 string +} + +func BytesPairToHandle(b1, b2 []byte) unique.Handle[Pair] { + // TODO: should not copy b1 and b2. + return unique.Make(Pair{string(b1), string(b2)}) +} diff --git a/test/codegen/zerosize.go b/test/codegen/zerosize.go index ecf3305461..86c4819400 100644 --- a/test/codegen/zerosize.go +++ b/test/codegen/zerosize.go @@ -18,8 +18,27 @@ func zeroSize() { g(&s, 1, 2, 3, 4, 5) // amd64:`LEAQ\tcommand-line-arguments\..*\+55\(SP\)` + c <- noliteral(struct{}{}) +} + +// Like zeroSize, but without hiding the zero-sized struct. +func zeroSize2() { + c := make(chan struct{}) + // amd64:`MOVQ\t\$0, command-line-arguments\.s\+48\(SP\)` + var s *int + // force s to be a stack object, also use some (fixed) stack space + g(&s, 1, 2, 3, 4, 5) + + // amd64:`LEAQ\tcommand-line-arguments\..*stmp_\d+\(SB\)` c <- struct{}{} } //go:noinline func g(**int, int, int, int, int, int) {} + +// noliteral prevents the compiler from recognizing a literal value. +// +//go:noinline +func noliteral[T any](t T) T { + return t +} diff --git a/test/escape5.go b/test/escape5.go index 133d973ba5..2ed8b5789d 100644 --- a/test/escape5.go +++ b/test/escape5.go @@ -252,7 +252,7 @@ func f29000(_ int, x interface{}) { // ERROR "leaking param: x" func g29000() { x := 1 - f29000(2, x) // ERROR "x escapes to heap" + f29000(2, x) // ERROR "1 escapes to heap" } // Issue 28369: taking an address of a parameter and converting it into a uintptr causes an diff --git a/test/escape_iface.go b/test/escape_iface.go index d822cca2f8..78b5209a62 100644 --- a/test/escape_iface.go +++ b/test/escape_iface.go @@ -228,8 +228,8 @@ func dotTypeEscape2() { // #13805, #15796 j := 0 var v int var ok bool - var x interface{} = i // ERROR "i does not escape" - var y interface{} = j // ERROR "j does not escape" + var x interface{} = i // ERROR "0 does not escape" + var y interface{} = j // ERROR "0 does not escape" *(&v) = x.(int) *(&v), *(&ok) = y.(int) @@ -238,8 +238,8 @@ func dotTypeEscape2() { // #13805, #15796 i := 0 j := 0 var ok bool - var x interface{} = i // ERROR "i does not escape" - var y interface{} = j // ERROR "j does not escape" + var x interface{} = i // ERROR "0 does not escape" + var y interface{} = j // ERROR "0 does not escape" sink = x.(int) // ERROR "x.\(int\) escapes to heap" sink, *(&ok) = y.(int) // ERROR "autotmp_.* escapes to heap" diff --git a/test/escape_iface_data.go b/test/escape_iface_data.go index 556be2067c..b42974c486 100644 --- a/test/escape_iface_data.go +++ b/test/escape_iface_data.go @@ -17,7 +17,7 @@ func string1() { func string2() { v := "abc" - sink = v + sink = v // ERROR "using global for interface value" } func string3() { @@ -26,7 +26,7 @@ func string3() { func string4() { v := "" - sink = v + sink = v // ERROR "using global for interface value" } func string5() { @@ -36,8 +36,8 @@ func string5() { func string6() { var a any - v := "abc" // ERROR "using stack temporary for interface value" - a = v + v := "abc" + a = v // ERROR "using global for interface value" _ = a } @@ -49,7 +49,7 @@ func string7(v string) { func string8() { v0 := "abc" v := v0 - string7(v) + string7(v) // ERROR "using global for interface value" } func string9() { @@ -58,7 +58,7 @@ func string9() { f := func() { string7(v) } - f() + f() // ERROR "using global for interface value" } func string10() { @@ -70,14 +70,14 @@ func string10() { } f2() } - f() + f() // ERROR "using global for interface value" } func string11() { v0 := "abc" v := v0 defer func() { - string7(v) + string7(v) // ERROR "using global for interface value" }() } @@ -87,7 +87,7 @@ func integer1() { func integer2() { v := 42 - sink = v + sink = v // ERROR "using global for interface value" } func integer3() { @@ -96,7 +96,7 @@ func integer3() { func integer4a() { v := 0 - sink = v + sink = v // ERROR "using global for interface value" } func integer4b() { @@ -111,8 +111,8 @@ func integer5() { func integer6() { var a any - v := 42 // ERROR "using stack temporary for interface value" - a = v + v := 42 + a = v // ERROR "using global for interface value" _ = a } @@ -140,24 +140,22 @@ func named1b() { func named2a() { v := MyInt(0) - sink = v + sink = v // ERROR "using global for interface value" } func named2b() { v := MyInt(42) - escapes(v) + escapes(v) // ERROR "using global for interface value" } -// Unfortunate: we currently require matching types, which we could relax. func named2c() { v := 42 - sink = MyInt(v) + sink = MyInt(v) // ERROR "using global for interface value" } -// Unfortunate: we currently require matching types, which we could relax. func named2d() { v := 42 - escapes(MyInt(v)) + escapes(MyInt(v)) // ERROR "using global for interface value" } func named3a() { sink = MyInt(42) // ERROR "using global for interface value" @@ -169,22 +167,22 @@ func named3b() { func named4a() { v := MyInt(0) - sink = v + sink = v // ERROR "using global for interface value" } func named4b() { v := MyInt(0) - escapes(v) + escapes(v) // ERROR "using global for interface value" } func named4c() { v := 0 - sink = MyInt(v) + sink = MyInt(v) // ERROR "using global for interface value" } func named4d() { v := 0 - escapes(MyInt(v)) + escapes(MyInt(v)) // ERROR "using global for interface value" } func named5() { @@ -194,8 +192,8 @@ func named5() { func named6() { var a any - v := MyInt(42) // ERROR "using stack temporary for interface value" - a = v + v := MyInt(42) + a = v // ERROR "using global for interface value" _ = a } @@ -210,32 +208,32 @@ func named7b(v MyInt) { type S struct{ a, b int64 } func struct1() { - sink = S{1, 1} + sink = S{1, 1} // ERROR "using global for interface value" } func struct2() { v := S{1, 1} - sink = v + sink = v // ERROR "using global for interface value" } func struct3() { - sink = S{} + sink = S{} // ERROR "using global for zero value interface value" } func struct4() { v := S{} - sink = v + sink = v // ERROR "using global for zero value interface value" } func struct5() { - var a any = S{1, 1} // ERROR "using stack temporary for interface value" + var a any = S{1, 1} // ERROR "using global for interface value" _ = a } func struct6() { var a any v := S{1, 1} - a = v // ERROR "using stack temporary for interface value" + a = v // ERROR "using global for interface value" _ = a } @@ -255,3 +253,45 @@ func emptyStruct2() { func emptyStruct3(v struct{}) { // ERROR "using global for zero-sized interface value" sink = v } + +// Some light emulation of conditional debug printing (such as in #53465). + +func Printf(format string, args ...any) { + for _, arg := range args { + sink = arg + } +} + +var enabled = true + +func debugf(format string, args ...interface{}) { + if enabled { + Printf(format, args...) + } +} + +//go:noinline +func debugf2(format string, args ...interface{}) { + if enabled { + Printf(format, args...) + } +} + +func f1() { + v := 1000 + debugf("hello %d", v) // ERROR "using global for interface value" +} + +func f2() { + v := 1000 + debugf2("hello %d", v) // ERROR "using global for interface value" +} + +//go:noinline +func f3(i int) { + debugf("hello %d", i) +} + +func f4() { + f3(1000) +} diff --git a/test/escape_unique.go b/test/escape_unique.go new file mode 100644 index 0000000000..78d6eeb777 --- /dev/null +++ b/test/escape_unique.go @@ -0,0 +1,62 @@ +// errorcheck -0 -m -l + +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Test escape analysis for unique. + +package escape + +import "unique" + +type T string + +func f1(s string) unique.Handle[string] { // ERROR "s does not escape$" + return unique.Make(s) +} + +func f1a(s []byte) unique.Handle[string] { // ERROR "s does not escape$" + return unique.Make(string(s)) // ERROR "string\(s\) does not escape$" +} + +func gen[S ~string](s S) unique.Handle[S] { + return unique.Make(s) +} + +func f2(s T) unique.Handle[T] { // ERROR "s does not escape$" + return unique.Make(s) +} + +func f3(s T) unique.Handle[T] { // ERROR "s does not escape$" + return gen(s) +} + +type pair struct { + s1 string + s2 string +} + +func f4(s1 string, s2 string) unique.Handle[pair] { // ERROR "s1 does not escape$" "s2 does not escape$" + return unique.Make(pair{s1, s2}) +} + +type viaInterface struct { + s any +} + +func f5(s string) unique.Handle[viaInterface] { // ERROR "leaking param: s$" + return unique.Make(viaInterface{s}) // ERROR "s escapes to heap$" +} + +var sink any + +func f6(s string) unique.Handle[string] { // ERROR "leaking param: s$" + sink = s // ERROR "s escapes to heap$" + return unique.Make(s) +} + +func f6a(s []byte) unique.Handle[string] { // ERROR "leaking param: s$" + sink = s // ERROR "s escapes to heap$" + return unique.Make(string(s)) // ERROR "string\(s\) does not escape$" +} diff --git a/test/fixedbugs/issue12006.go b/test/fixedbugs/issue12006.go index 045ed043bb..94ff52442c 100644 --- a/test/fixedbugs/issue12006.go +++ b/test/fixedbugs/issue12006.go @@ -84,7 +84,7 @@ func TFooI() { a := int32(1) // ERROR "moved to heap: a" b := "cat" c := &a - FooI(a, b, c) // ERROR "a escapes to heap" "b escapes to heap" "... argument does not escape" + FooI(a, b, c) // ERROR "a escapes to heap" ".cat. escapes to heap" "... argument does not escape" } func FooJ(args ...interface{}) *int32 { // ERROR "leaking param: args to result ~r0 level=1" @@ -108,14 +108,14 @@ func TFooJ1() { a := int32(1) b := "cat" c := &a - FooJ(a, b, c) // ERROR "a does not escape" "b does not escape" "... argument does not escape" + FooJ(a, b, c) // ERROR "a does not escape" ".cat. does not escape" "... argument does not escape" } func TFooJ2() { a := int32(1) // ERROR "moved to heap: a" b := "cat" c := &a - isink = FooJ(a, b, c) // ERROR "a escapes to heap" "b escapes to heap" "... argument does not escape" + isink = FooJ(a, b, c) // ERROR "a escapes to heap" ".cat. escapes to heap" "... argument does not escape" } type fakeSlice struct { @@ -144,7 +144,7 @@ func TFooK2() { a := int32(1) // ERROR "moved to heap: a" b := "cat" c := &a - fs := fakeSlice{3, &[4]interface{}{a, b, c, nil}} // ERROR "a escapes to heap" "b escapes to heap" "&\[4\]interface {}{...} does not escape" + fs := fakeSlice{3, &[4]interface{}{a, b, c, nil}} // ERROR "a escapes to heap" ".cat. escapes to heap" "&\[4\]interface {}{...} does not escape" isink = FooK(fs) } @@ -169,6 +169,6 @@ func TFooL2() { a := int32(1) // ERROR "moved to heap: a" b := "cat" c := &a - s := []interface{}{a, b, c} // ERROR "a escapes to heap" "b escapes to heap" "\[\]interface {}{...} does not escape" + s := []interface{}{a, b, c} // ERROR "a escapes to heap" ".cat. escapes to heap" "\[\]interface {}{...} does not escape" isink = FooL(s) } diff --git a/test/fixedbugs/issue30898.go b/test/fixedbugs/issue30898.go index c7f6f2d371..38358949e2 100644 --- a/test/fixedbugs/issue30898.go +++ b/test/fixedbugs/issue30898.go @@ -15,5 +15,5 @@ func debugf(format string, args ...interface{}) { // ERROR "can inline debugf" " func bar() { // ERROR "can inline bar" value := 10 - debugf("value is %d", value) // ERROR "inlining call to debugf" "value does not escape" "\.\.\. argument does not escape" + debugf("value is %d", value) // ERROR "inlining call to debugf" "10 does not escape" "\.\.\. argument does not escape" } diff --git a/test/fixedbugs/issue71184.go b/test/fixedbugs/issue71184.go new file mode 100644 index 0000000000..74afc53f8a --- /dev/null +++ b/test/fixedbugs/issue71184.go @@ -0,0 +1,17 @@ +// compile + +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package x + +func F[T int32]() { + _ = G[*[0]T]()[:] +} + +func G[T any]() (v T) { + return +} + +var _ = F[int32] diff --git a/test/fixedbugs/issue73309.go b/test/fixedbugs/issue73309.go new file mode 100644 index 0000000000..5e96e6513b --- /dev/null +++ b/test/fixedbugs/issue73309.go @@ -0,0 +1,18 @@ +// compile + +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +type B[T any] struct { + a A[T] +} + +type A[T any] = func(B[T]) bool + +func main() { + var s A[int] + println(s) +} diff --git a/test/fixedbugs/issue73823.go b/test/fixedbugs/issue73823.go new file mode 100644 index 0000000000..2f66266254 --- /dev/null +++ b/test/fixedbugs/issue73823.go @@ -0,0 +1,58 @@ +// compile + +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package p + +type Backend interface { + Hash(ignores func(bucketName, keyName []byte) bool) (uint32, error) +} + +type backend struct { +} + +func first() (key []byte, value []byte) { + return +} + +func (b *backend) View(fn func() error) error { + return nil +} + +func (b *backend) Hash(ignores func(bucketName, keyName []byte) bool) (uint32, error) { + err := b.View(func() error { + for next, _ := first(); next != nil; next, _ = first() { + _ = next + } + return nil + }) + return 0, err +} + +func defragdb() error { + for next, _ := first(); next != nil; next, _ = first() { + _ = f(next) + ForEach(func(k, v []byte) error { + _ = next + return nil + }) + } + + return nil +} + +func ForEach(fn func(k, v []byte) error) error { + for k, v := first(); k != nil; k, v = first() { + if err := fn(k, v); err != nil { + return err + } + } + return nil +} + +//go:noinline +func f(any) string { + return "" +} diff --git a/test/live.go b/test/live.go index c0b0fcd274..46e5e3e757 100644 --- a/test/live.go +++ b/test/live.go @@ -337,23 +337,34 @@ func f20() { ch <- byteptr() } -func f21() { +func f21(x, y string) { // ERROR "live at entry to f21: x y" // key temporary for mapaccess using array literal key. var z *byte if b { - z = m2[[2]string{"x", "y"}] // ERROR "stack object .autotmp_[0-9]+ \[2\]string$" + z = m2[[2]string{x, y}] // ERROR "stack object .autotmp_[0-9]+ \[2\]string$" } z = m2[[2]string{"x", "y"}] z = m2[[2]string{"x", "y"}] printbytepointer(z) } -func f23() { +func f21b() { + // key temporary for mapaccess using array literal key. + var z *byte + if b { + z = m2[[2]string{"x", "y"}] + } + z = m2[[2]string{"x", "y"}] + z = m2[[2]string{"x", "y"}] + printbytepointer(z) +} + +func f23(x, y string) { // ERROR "live at entry to f23: x y" // key temporary for two-result map access using array literal key. var z *byte var ok bool if b { - z, ok = m2[[2]string{"x", "y"}] // ERROR "stack object .autotmp_[0-9]+ \[2\]string$" + z, ok = m2[[2]string{x, y}] // ERROR "stack object .autotmp_[0-9]+ \[2\]string$" } z, ok = m2[[2]string{"x", "y"}] z, ok = m2[[2]string{"x", "y"}] @@ -361,11 +372,34 @@ func f23() { print(ok) } -func f24() { +func f23b() { + // key temporary for two-result map access using array literal key. + var z *byte + var ok bool + if b { + z, ok = m2[[2]string{"x", "y"}] + } + z, ok = m2[[2]string{"x", "y"}] + z, ok = m2[[2]string{"x", "y"}] + printbytepointer(z) + print(ok) +} + +func f24(x, y string) { // ERROR "live at entry to f24: x y" // key temporary for map access using array literal key. // value temporary too. if b { - m2[[2]string{"x", "y"}] = nil // ERROR "stack object .autotmp_[0-9]+ \[2\]string$" + m2[[2]string{x, y}] = nil // ERROR "stack object .autotmp_[0-9]+ \[2\]string$" + } + m2[[2]string{"x", "y"}] = nil + m2[[2]string{"x", "y"}] = nil +} + +func f24b() { + // key temporary for map access using array literal key. + // value temporary too. + if b { + m2[[2]string{"x", "y"}] = nil } m2[[2]string{"x", "y"}] = nil m2[[2]string{"x", "y"}] = nil diff --git a/test/live_regabi.go b/test/live_regabi.go index 35f874ecc3..ddb4caed1a 100644 --- a/test/live_regabi.go +++ b/test/live_regabi.go @@ -335,23 +335,34 @@ func f20() { ch <- byteptr() } -func f21() { +func f21(x, y string) { // ERROR "live at entry to f21: x y" // key temporary for mapaccess using array literal key. var z *byte if b { - z = m2[[2]string{"x", "y"}] // ERROR "stack object .autotmp_[0-9]+ \[2\]string$" + z = m2[[2]string{x, y}] // ERROR "stack object .autotmp_[0-9]+ \[2\]string$" } z = m2[[2]string{"x", "y"}] z = m2[[2]string{"x", "y"}] printbytepointer(z) } -func f23() { +func f21b() { + // key temporary for mapaccess using array literal key. + var z *byte + if b { + z = m2[[2]string{"x", "y"}] + } + z = m2[[2]string{"x", "y"}] + z = m2[[2]string{"x", "y"}] + printbytepointer(z) +} + +func f23(x, y string) { // ERROR "live at entry to f23: x y" // key temporary for two-result map access using array literal key. var z *byte var ok bool if b { - z, ok = m2[[2]string{"x", "y"}] // ERROR "stack object .autotmp_[0-9]+ \[2\]string$" + z, ok = m2[[2]string{x, y}] // ERROR "stack object .autotmp_[0-9]+ \[2\]string$" } z, ok = m2[[2]string{"x", "y"}] z, ok = m2[[2]string{"x", "y"}] @@ -359,11 +370,34 @@ func f23() { print(ok) } -func f24() { +func f23b() { + // key temporary for two-result map access using array literal key. + var z *byte + var ok bool + if b { + z, ok = m2[[2]string{"x", "y"}] + } + z, ok = m2[[2]string{"x", "y"}] + z, ok = m2[[2]string{"x", "y"}] + printbytepointer(z) + print(ok) +} + +func f24(x, y string) { // ERROR "live at entry to f24: x y" + // key temporary for map access using array lit3ral key. + // value temporary too. + if b { + m2[[2]string{x, y}] = nil // ERROR "stack object .autotmp_[0-9]+ \[2\]string$" + } + m2[[2]string{"x", "y"}] = nil + m2[[2]string{"x", "y"}] = nil +} + +func f24b() { // key temporary for map access using array literal key. // value temporary too. if b { - m2[[2]string{"x", "y"}] = nil // ERROR "stack object .autotmp_[0-9]+ \[2\]string$" + m2[[2]string{"x", "y"}] = nil } m2[[2]string{"x", "y"}] = nil m2[[2]string{"x", "y"}] = nil