libgo: Update to Go 1.3 release.

From-SVN: r212837
This commit is contained in:
Ian Lance Taylor 2014-07-19 08:53:52 +00:00
parent bcf2fc6ee0
commit 00d86ac99f
456 changed files with 15275 additions and 4847 deletions

View File

@ -1,4 +1,4 @@
63484e8b6b76
9895f9e36435
The first line of this file holds the Mercurial revision number of the
last merge done from the master library sources.

View File

@ -196,7 +196,6 @@ toolexeclibgodebugdir = $(toolexeclibgodir)/debug
toolexeclibgodebug_DATA = \
debug/dwarf.gox \
debug/elf.gox \
debug/goobj.gox \
debug/gosym.gox \
debug/macho.gox \
debug/pe.gox \
@ -492,6 +491,7 @@ runtime_files = \
runtime/go-unwind.c \
runtime/go-varargs.c \
runtime/env_posix.c \
runtime/heapdump.c \
$(runtime_lock_files) \
runtime/mcache.c \
runtime/mcentral.c \
@ -689,8 +689,8 @@ else
if LIBGO_IS_SOLARIS
go_net_cgo_file = go/net/cgo_linux.go
go_net_sock_file = go/net/sock_solaris.go
go_net_sockopt_file = go/net/sockopt_bsd.go
go_net_sockoptip_file = go/net/sockoptip_bsd.go go/net/sockoptip_posix.go
go_net_sockopt_file = go/net/sockopt_solaris.go
go_net_sockoptip_file = go/net/sockoptip_stub.go
else
if LIBGO_IS_FREEBSD
go_net_cgo_file = go/net/cgo_bsd.go
@ -755,9 +755,13 @@ if LIBGO_IS_DARWIN
go_net_tcpsockopt_file = go/net/tcpsockopt_darwin.go
else
if LIBGO_IS_SOLARIS
go_net_tcpsockopt_file = go/net/tcpsockopt_darwin.go
go_net_tcpsockopt_file = go/net/tcpsockopt_solaris.go
else
go_net_tcpsockopt_file = go/net/tcpsockopt_unix.go
if LIBGO_IS_DRAGONFLY
go_net_tcpsockopt_file = go/net/tcpsockopt_dragonfly.go
else
go_net_tcpsockopt_file = go/net/tcpsockopt_unix.go
endif
endif
endif
endif
@ -850,6 +854,16 @@ endif
endif
endif
if LIBGO_IS_FREEBSD
go_os_cloexec_file = go/os/sys_freebsd.go
else
if LIBGO_IS_DARWIN
go_os_cloexec_file = go/os/sys_darwin.go
else
go_os_cloexec_file = go/os/sys_unix.go
endif
endif
if LIBGO_IS_SOLARIS
go_os_stat_file = go/os/stat_solaris.go
else
@ -908,6 +922,7 @@ go_os_files = \
$(go_os_stat_file) \
go/os/str.go \
$(go_os_sys_file) \
$(go_os_cloexec_file) \
go/os/types.go \
go/os/types_notwin.go
@ -942,6 +957,7 @@ go_reflect_files = \
go_regexp_files = \
go/regexp/exec.go \
go/regexp/onepass.go \
go/regexp/regexp.go
go_net_rpc_files = \
@ -1214,8 +1230,6 @@ go_debug_dwarf_files = \
go_debug_elf_files = \
go/debug/elf/elf.go \
go/debug/elf/file.go
go_debug_goobj_files = \
go/debug/goobj/read.go
go_debug_gosym_files = \
go/debug/gosym/pclntab.go \
go/debug/gosym/symtab.go
@ -1744,7 +1758,9 @@ go_syscall_c_files = \
go_syscall_test_files = \
$(syscall_creds_test_file) \
go/syscall/passfd_test.go
go/syscall/mmap_unix_test.go \
go/syscall/syscall_test.go \
go/syscall/syscall_unix_test.go
libcalls.go: s-libcalls; @true
s-libcalls: libcalls-list go/syscall/mksyscall.awk $(go_base_syscall_files)
@ -1879,7 +1895,6 @@ libgo_go_objs = \
database/sql/driver.lo \
debug/dwarf.lo \
debug/elf.lo \
debug/goobj.lo \
debug/gosym.lo \
debug/macho.lo \
debug/pe.lo \
@ -2611,15 +2626,6 @@ debug/elf/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: debug/elf/check
@go_include@ debug/goobj.lo.dep
debug/goobj.lo.dep: $(go_debug_goobj_files)
$(BUILDDEPS)
debug/goobj.lo: $(go_debug_goobj_files)
$(BUILDPACKAGE)
debug/goobj/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: debug/goobj/check
@go_include@ debug/gosym.lo.dep
debug/gosym.lo.dep: $(go_debug_gosym_files)
$(BUILDDEPS)
@ -3447,8 +3453,6 @@ debug/dwarf.gox: debug/dwarf.lo
$(BUILDGOX)
debug/elf.gox: debug/elf.lo
$(BUILDGOX)
debug/goobj.gox: debug/goobj.lo
$(BUILDGOX)
debug/gosym.gox: debug/gosym.lo
$(BUILDGOX)
debug/macho.gox: debug/macho.lo

View File

@ -147,22 +147,22 @@ am__DEPENDENCIES_2 = bufio.lo bytes.lo bytes/index.lo crypto.lo \
crypto/rc4.lo crypto/rsa.lo crypto/sha1.lo crypto/sha256.lo \
crypto/sha512.lo crypto/subtle.lo crypto/tls.lo crypto/x509.lo \
crypto/x509/pkix.lo database/sql.lo database/sql/driver.lo \
debug/dwarf.lo debug/elf.lo debug/goobj.lo debug/gosym.lo \
debug/macho.lo debug/pe.lo debug/plan9obj.lo \
encoding/ascii85.lo encoding/asn1.lo encoding/base32.lo \
encoding/base64.lo encoding/binary.lo encoding/csv.lo \
encoding/gob.lo encoding/hex.lo encoding/json.lo \
encoding/pem.lo encoding/xml.lo exp/proxy.lo exp/terminal.lo \
html/template.lo go/ast.lo go/build.lo go/doc.lo go/format.lo \
go/parser.lo go/printer.lo go/scanner.lo go/token.lo \
hash/adler32.lo hash/crc32.lo hash/crc64.lo hash/fnv.lo \
net/http/cgi.lo net/http/cookiejar.lo net/http/fcgi.lo \
net/http/httptest.lo net/http/httputil.lo net/http/pprof.lo \
image/color.lo image/color/palette.lo image/draw.lo \
image/gif.lo image/jpeg.lo image/png.lo index/suffixarray.lo \
io/ioutil.lo log/syslog.lo log/syslog/syslog_c.lo math/big.lo \
math/cmplx.lo math/rand.lo mime/multipart.lo net/http.lo \
net/mail.lo net/rpc.lo net/smtp.lo net/textproto.lo net/url.lo \
debug/dwarf.lo debug/elf.lo debug/gosym.lo debug/macho.lo \
debug/pe.lo debug/plan9obj.lo encoding/ascii85.lo \
encoding/asn1.lo encoding/base32.lo encoding/base64.lo \
encoding/binary.lo encoding/csv.lo encoding/gob.lo \
encoding/hex.lo encoding/json.lo encoding/pem.lo \
encoding/xml.lo exp/proxy.lo exp/terminal.lo html/template.lo \
go/ast.lo go/build.lo go/doc.lo go/format.lo go/parser.lo \
go/printer.lo go/scanner.lo go/token.lo hash/adler32.lo \
hash/crc32.lo hash/crc64.lo hash/fnv.lo net/http/cgi.lo \
net/http/cookiejar.lo net/http/fcgi.lo net/http/httptest.lo \
net/http/httputil.lo net/http/pprof.lo image/color.lo \
image/color/palette.lo image/draw.lo image/gif.lo \
image/jpeg.lo image/png.lo index/suffixarray.lo io/ioutil.lo \
log/syslog.lo log/syslog/syslog_c.lo math/big.lo math/cmplx.lo \
math/rand.lo mime/multipart.lo net/http.lo net/mail.lo \
net/rpc.lo net/smtp.lo net/textproto.lo net/url.lo \
old/regexp.lo old/template.lo os/exec.lo $(am__DEPENDENCIES_1) \
os/signal.lo os/user.lo path/filepath.lo regexp/syntax.lo \
net/rpc/jsonrpc.lo runtime/debug.lo runtime/pprof.lo \
@ -211,13 +211,14 @@ am__objects_6 = go-append.lo go-assert.lo go-assert-interface.lo \
go-type-float.lo go-type-identity.lo go-type-interface.lo \
go-type-string.lo go-typedesc-equal.lo go-unsafe-new.lo \
go-unsafe-newarray.lo go-unsafe-pointer.lo go-unwind.lo \
go-varargs.lo env_posix.lo $(am__objects_1) mcache.lo \
mcentral.lo $(am__objects_2) mfixalloc.lo mgc0.lo mheap.lo \
msize.lo $(am__objects_3) panic.lo parfor.lo print.lo proc.lo \
runtime.lo signal_unix.lo thread.lo yield.lo $(am__objects_4) \
chan.lo cpuprof.lo go-iface.lo lfstack.lo malloc.lo map.lo \
mprof.lo netpoll.lo rdebug.lo reflect.lo runtime1.lo sema.lo \
sigqueue.lo string.lo time.lo $(am__objects_5)
go-varargs.lo env_posix.lo heapdump.lo $(am__objects_1) \
mcache.lo mcentral.lo $(am__objects_2) mfixalloc.lo mgc0.lo \
mheap.lo msize.lo $(am__objects_3) panic.lo parfor.lo print.lo \
proc.lo runtime.lo signal_unix.lo thread.lo yield.lo \
$(am__objects_4) chan.lo cpuprof.lo go-iface.lo lfstack.lo \
malloc.lo map.lo mprof.lo netpoll.lo rdebug.lo reflect.lo \
runtime1.lo sema.lo sigqueue.lo string.lo time.lo \
$(am__objects_5)
am_libgo_la_OBJECTS = $(am__objects_6)
libgo_la_OBJECTS = $(am_libgo_la_OBJECTS)
libgo_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
@ -587,7 +588,6 @@ toolexeclibgodebugdir = $(toolexeclibgodir)/debug
toolexeclibgodebug_DATA = \
debug/dwarf.gox \
debug/elf.gox \
debug/goobj.gox \
debug/gosym.gox \
debug/macho.gox \
debug/pe.gox \
@ -820,6 +820,7 @@ runtime_files = \
runtime/go-unwind.c \
runtime/go-varargs.c \
runtime/env_posix.c \
runtime/heapdump.c \
$(runtime_lock_files) \
runtime/mcache.c \
runtime/mcentral.c \
@ -976,13 +977,13 @@ go_mime_files = \
@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@go_net_sockopt_file = go/net/sockopt_bsd.go
@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_TRUE@@LIBGO_IS_SOLARIS_FALSE@go_net_sockopt_file = go/net/sockopt_bsd.go
@LIBGO_IS_FREEBSD_TRUE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_FALSE@go_net_sockopt_file = go/net/sockopt_bsd.go
@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_TRUE@go_net_sockopt_file = go/net/sockopt_bsd.go
@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_TRUE@go_net_sockopt_file = go/net/sockopt_solaris.go
@LIBGO_IS_IRIX_TRUE@@LIBGO_IS_LINUX_FALSE@go_net_sockopt_file = go/net/sockopt_linux.go
@LIBGO_IS_LINUX_TRUE@go_net_sockopt_file = go/net/sockopt_linux.go
@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@go_net_sockoptip_file = go/net/sockoptip_bsd.go go/net/sockoptip_posix.go
@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_TRUE@@LIBGO_IS_SOLARIS_FALSE@go_net_sockoptip_file = go/net/sockoptip_bsd.go go/net/sockoptip_posix.go
@LIBGO_IS_FREEBSD_TRUE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_FALSE@go_net_sockoptip_file = go/net/sockoptip_bsd.go go/net/sockoptip_posix.go
@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_TRUE@go_net_sockoptip_file = go/net/sockoptip_bsd.go go/net/sockoptip_posix.go
@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_TRUE@go_net_sockoptip_file = go/net/sockoptip_stub.go
@LIBGO_IS_IRIX_TRUE@@LIBGO_IS_LINUX_FALSE@go_net_sockoptip_file = go/net/sockoptip_linux.go go/net/sockoptip_posix.go
@LIBGO_IS_LINUX_TRUE@go_net_sockoptip_file = go/net/sockoptip_linux.go go/net/sockoptip_posix.go
@LIBGO_IS_DRAGONFLY_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_LINUX_FALSE@go_net_sendfile_file = go/net/sendfile_stub.go
@ -995,8 +996,9 @@ go_mime_files = \
@LIBGO_IS_LINUX_TRUE@go_net_interface_file = go/net/interface_linux.go
@LIBGO_IS_LINUX_FALSE@go_net_cloexec_file = go/net/sys_cloexec.go
@LIBGO_IS_LINUX_TRUE@go_net_cloexec_file = go/net/sock_cloexec.go
@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_OPENBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@go_net_tcpsockopt_file = go/net/tcpsockopt_unix.go
@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_OPENBSD_FALSE@@LIBGO_IS_SOLARIS_TRUE@go_net_tcpsockopt_file = go/net/tcpsockopt_darwin.go
@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_DRAGONFLY_FALSE@@LIBGO_IS_OPENBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@go_net_tcpsockopt_file = go/net/tcpsockopt_unix.go
@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_DRAGONFLY_TRUE@@LIBGO_IS_OPENBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@go_net_tcpsockopt_file = go/net/tcpsockopt_dragonfly.go
@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_OPENBSD_FALSE@@LIBGO_IS_SOLARIS_TRUE@go_net_tcpsockopt_file = go/net/tcpsockopt_solaris.go
@LIBGO_IS_DARWIN_TRUE@@LIBGO_IS_OPENBSD_FALSE@go_net_tcpsockopt_file = go/net/tcpsockopt_darwin.go
@LIBGO_IS_OPENBSD_TRUE@go_net_tcpsockopt_file = go/net/tcpsockopt_openbsd.go
go_net_files = \
@ -1057,6 +1059,9 @@ go_net_files = \
@LIBGO_IS_IRIX_TRUE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_FALSE@go_os_sys_file = go/os/sys_uname.go
@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_TRUE@go_os_sys_file = go/os/sys_uname.go
@LIBGO_IS_LINUX_TRUE@go_os_sys_file = go/os/sys_linux.go
@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@go_os_cloexec_file = go/os/sys_unix.go
@LIBGO_IS_DARWIN_TRUE@@LIBGO_IS_FREEBSD_FALSE@go_os_cloexec_file = go/os/sys_darwin.go
@LIBGO_IS_FREEBSD_TRUE@go_os_cloexec_file = go/os/sys_freebsd.go
@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_DRAGONFLY_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_OPENBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@go_os_stat_file = go/os/stat.go
@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_DRAGONFLY_TRUE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_OPENBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@go_os_stat_file = go/os/stat_dragonfly.go
@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_TRUE@@LIBGO_IS_OPENBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@go_os_stat_file = go/os/stat_atimespec.go
@ -1089,6 +1094,7 @@ go_os_files = \
$(go_os_stat_file) \
go/os/str.go \
$(go_os_sys_file) \
$(go_os_cloexec_file) \
go/os/types.go \
go/os/types_notwin.go
@ -1121,6 +1127,7 @@ go_reflect_files = \
go_regexp_files = \
go/regexp/exec.go \
go/regexp/onepass.go \
go/regexp/regexp.go
go_net_rpc_files = \
@ -1382,9 +1389,6 @@ go_debug_elf_files = \
go/debug/elf/elf.go \
go/debug/elf/file.go
go_debug_goobj_files = \
go/debug/goobj/read.go
go_debug_gosym_files = \
go/debug/gosym/pclntab.go \
go/debug/gosym/symtab.go
@ -1876,7 +1880,9 @@ go_syscall_c_files = \
go_syscall_test_files = \
$(syscall_creds_test_file) \
go/syscall/passfd_test.go
go/syscall/mmap_unix_test.go \
go/syscall/syscall_test.go \
go/syscall/syscall_unix_test.go
@LIBGO_IS_LINUX_FALSE@os_lib_inotify_lo =
@ -1950,7 +1956,6 @@ libgo_go_objs = \
database/sql/driver.lo \
debug/dwarf.lo \
debug/elf.lo \
debug/goobj.lo \
debug/gosym.lo \
debug/macho.lo \
debug/pe.lo \
@ -2473,6 +2478,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-unsafe-pointer.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-unwind.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-varargs.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/heapdump.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lfstack.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lock_futex.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lock_sema.Plo@am__quote@
@ -3000,6 +3006,13 @@ env_posix.lo: runtime/env_posix.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o env_posix.lo `test -f 'runtime/env_posix.c' || echo '$(srcdir)/'`runtime/env_posix.c
heapdump.lo: runtime/heapdump.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT heapdump.lo -MD -MP -MF $(DEPDIR)/heapdump.Tpo -c -o heapdump.lo `test -f 'runtime/heapdump.c' || echo '$(srcdir)/'`runtime/heapdump.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/heapdump.Tpo $(DEPDIR)/heapdump.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/heapdump.c' object='heapdump.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o heapdump.lo `test -f 'runtime/heapdump.c' || echo '$(srcdir)/'`runtime/heapdump.c
lock_sema.lo: runtime/lock_sema.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lock_sema.lo -MD -MP -MF $(DEPDIR)/lock_sema.Tpo -c -o lock_sema.lo `test -f 'runtime/lock_sema.c' || echo '$(srcdir)/'`runtime/lock_sema.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lock_sema.Tpo $(DEPDIR)/lock_sema.Plo
@ -4946,15 +4959,6 @@ debug/elf/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: debug/elf/check
@go_include@ debug/goobj.lo.dep
debug/goobj.lo.dep: $(go_debug_goobj_files)
$(BUILDDEPS)
debug/goobj.lo: $(go_debug_goobj_files)
$(BUILDPACKAGE)
debug/goobj/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: debug/goobj/check
@go_include@ debug/gosym.lo.dep
debug/gosym.lo.dep: $(go_debug_gosym_files)
$(BUILDDEPS)
@ -5774,8 +5778,6 @@ debug/dwarf.gox: debug/dwarf.lo
$(BUILDGOX)
debug/elf.gox: debug/elf.lo
$(BUILDGOX)
debug/goobj.gox: debug/goobj.lo
$(BUILDGOX)
debug/gosym.gox: debug/gosym.lo
$(BUILDGOX)
debug/macho.gox: debug/macho.lo

View File

@ -38,6 +38,7 @@ const (
TypeXGlobalHeader = 'g' // global extended header
TypeGNULongName = 'L' // Next file has a long name
TypeGNULongLink = 'K' // Next file symlinks to a file w/ a long name
TypeGNUSparse = 'S' // sparse file
)
// A Header represents a single header in a tar archive.

View File

@ -29,12 +29,57 @@ const maxNanoSecondIntSize = 9
// The Next method advances to the next file in the archive (including the first),
// and then it can be treated as an io.Reader to access the file's data.
type Reader struct {
r io.Reader
err error
nb int64 // number of unread bytes for current file entry
pad int64 // amount of padding (ignored) after current file entry
r io.Reader
err error
pad int64 // amount of padding (ignored) after current file entry
curr numBytesReader // reader for current file entry
}
// A numBytesReader is an io.Reader with a numBytes method, returning the number
// of bytes remaining in the underlying encoded data.
type numBytesReader interface {
io.Reader
numBytes() int64
}
// A regFileReader is a numBytesReader for reading file data from a tar archive.
type regFileReader struct {
r io.Reader // underlying reader
nb int64 // number of unread bytes for current file entry
}
// A sparseFileReader is a numBytesReader for reading sparse file data from a tar archive.
type sparseFileReader struct {
rfr *regFileReader // reads the sparse-encoded file data
sp []sparseEntry // the sparse map for the file
pos int64 // keeps track of file position
tot int64 // total size of the file
}
// Keywords for GNU sparse files in a PAX extended header
const (
paxGNUSparseNumBlocks = "GNU.sparse.numblocks"
paxGNUSparseOffset = "GNU.sparse.offset"
paxGNUSparseNumBytes = "GNU.sparse.numbytes"
paxGNUSparseMap = "GNU.sparse.map"
paxGNUSparseName = "GNU.sparse.name"
paxGNUSparseMajor = "GNU.sparse.major"
paxGNUSparseMinor = "GNU.sparse.minor"
paxGNUSparseSize = "GNU.sparse.size"
paxGNUSparseRealSize = "GNU.sparse.realsize"
)
// Keywords for old GNU sparse headers
const (
oldGNUSparseMainHeaderOffset = 386
oldGNUSparseMainHeaderIsExtendedOffset = 482
oldGNUSparseMainHeaderNumEntries = 4
oldGNUSparseExtendedHeaderIsExtendedOffset = 504
oldGNUSparseExtendedHeaderNumEntries = 21
oldGNUSparseOffsetSize = 12
oldGNUSparseNumBytesSize = 12
)
// NewReader creates a new Reader reading from r.
func NewReader(r io.Reader) *Reader { return &Reader{r: r} }
@ -64,6 +109,18 @@ func (tr *Reader) Next() (*Header, error) {
tr.skipUnread()
hdr = tr.readHeader()
mergePAX(hdr, headers)
// Check for a PAX format sparse file
sp, err := tr.checkForGNUSparsePAXHeaders(hdr, headers)
if err != nil {
tr.err = err
return nil, err
}
if sp != nil {
// Current file is a PAX format GNU sparse file.
// Set the current file reader to a sparse file reader.
tr.curr = &sparseFileReader{rfr: tr.curr.(*regFileReader), sp: sp, tot: hdr.Size}
}
return hdr, nil
case TypeGNULongName:
// We have a GNU long name header. Its contents are the real file name.
@ -87,6 +144,67 @@ func (tr *Reader) Next() (*Header, error) {
return hdr, tr.err
}
// checkForGNUSparsePAXHeaders checks the PAX headers for GNU sparse headers. If they are found, then
// this function reads the sparse map and returns it. Unknown sparse formats are ignored, causing the file to
// be treated as a regular file.
func (tr *Reader) checkForGNUSparsePAXHeaders(hdr *Header, headers map[string]string) ([]sparseEntry, error) {
var sparseFormat string
// Check for sparse format indicators
major, majorOk := headers[paxGNUSparseMajor]
minor, minorOk := headers[paxGNUSparseMinor]
sparseName, sparseNameOk := headers[paxGNUSparseName]
_, sparseMapOk := headers[paxGNUSparseMap]
sparseSize, sparseSizeOk := headers[paxGNUSparseSize]
sparseRealSize, sparseRealSizeOk := headers[paxGNUSparseRealSize]
// Identify which, if any, sparse format applies from which PAX headers are set
if majorOk && minorOk {
sparseFormat = major + "." + minor
} else if sparseNameOk && sparseMapOk {
sparseFormat = "0.1"
} else if sparseSizeOk {
sparseFormat = "0.0"
} else {
// Not a PAX format GNU sparse file.
return nil, nil
}
// Check for unknown sparse format
if sparseFormat != "0.0" && sparseFormat != "0.1" && sparseFormat != "1.0" {
return nil, nil
}
// Update hdr from GNU sparse PAX headers
if sparseNameOk {
hdr.Name = sparseName
}
if sparseSizeOk {
realSize, err := strconv.ParseInt(sparseSize, 10, 0)
if err != nil {
return nil, ErrHeader
}
hdr.Size = realSize
} else if sparseRealSizeOk {
realSize, err := strconv.ParseInt(sparseRealSize, 10, 0)
if err != nil {
return nil, ErrHeader
}
hdr.Size = realSize
}
// Set up the sparse map, according to the particular sparse format in use
var sp []sparseEntry
var err error
switch sparseFormat {
case "0.0", "0.1":
sp, err = readGNUSparseMap0x1(headers)
case "1.0":
sp, err = readGNUSparseMap1x0(tr.curr)
}
return sp, err
}
// mergePAX merges well known headers according to PAX standard.
// In general headers with the same name as those found
// in the header struct overwrite those found in the header
@ -194,6 +312,11 @@ func parsePAX(r io.Reader) (map[string]string, error) {
if err != nil {
return nil, err
}
// For GNU PAX sparse format 0.0 support.
// This function transforms the sparse format 0.0 headers into sparse format 0.1 headers.
var sparseMap bytes.Buffer
headers := make(map[string]string)
// Each record is constructed as
// "%d %s=%s\n", length, keyword, value
@ -211,7 +334,7 @@ func parsePAX(r io.Reader) (map[string]string, error) {
return nil, ErrHeader
}
// Extract everything between the decimal and the n -1 on the
// beginning to to eat the ' ', -1 on the end to skip the newline.
// beginning to eat the ' ', -1 on the end to skip the newline.
var record []byte
record, buf = buf[sp+1:n-1], buf[n:]
// The first equals is guaranteed to mark the end of the key.
@ -221,7 +344,21 @@ func parsePAX(r io.Reader) (map[string]string, error) {
return nil, ErrHeader
}
key, value := record[:eq], record[eq+1:]
headers[string(key)] = string(value)
keyStr := string(key)
if keyStr == paxGNUSparseOffset || keyStr == paxGNUSparseNumBytes {
// GNU sparse format 0.0 special key. Write to sparseMap instead of using the headers map.
sparseMap.Write(value)
sparseMap.Write([]byte{','})
} else {
// Normal key. Set the value in the headers map.
headers[keyStr] = string(value)
}
}
if sparseMap.Len() != 0 {
// Add sparse info to headers, chopping off the extra comma
sparseMap.Truncate(sparseMap.Len() - 1)
headers[paxGNUSparseMap] = sparseMap.String()
}
return headers, nil
}
@ -268,8 +405,8 @@ func (tr *Reader) octal(b []byte) int64 {
// skipUnread skips any unread bytes in the existing file entry, as well as any alignment padding.
func (tr *Reader) skipUnread() {
nr := tr.nb + tr.pad // number of bytes to skip
tr.nb, tr.pad = 0, 0
nr := tr.numBytes() + tr.pad // number of bytes to skip
tr.curr, tr.pad = nil, 0
if sr, ok := tr.r.(io.Seeker); ok {
if _, err := sr.Seek(nr, os.SEEK_CUR); err == nil {
return
@ -331,14 +468,14 @@ func (tr *Reader) readHeader() *Header {
// so its magic bytes, like the rest of the block, are NULs.
magic := string(s.next(8)) // contains version field as well.
var format string
switch magic {
case "ustar\x0000": // POSIX tar (1003.1-1988)
switch {
case magic[:6] == "ustar\x00": // POSIX tar (1003.1-1988)
if string(header[508:512]) == "tar\x00" {
format = "star"
} else {
format = "posix"
}
case "ustar \x00": // old GNU tar
case magic == "ustar \x00": // old GNU tar
format = "gnu"
}
@ -373,30 +510,308 @@ func (tr *Reader) readHeader() *Header {
// Maximum value of hdr.Size is 64 GB (12 octal digits),
// so there's no risk of int64 overflowing.
tr.nb = int64(hdr.Size)
tr.pad = -tr.nb & (blockSize - 1) // blockSize is a power of two
nb := int64(hdr.Size)
tr.pad = -nb & (blockSize - 1) // blockSize is a power of two
// Set the current file reader.
tr.curr = &regFileReader{r: tr.r, nb: nb}
// Check for old GNU sparse format entry.
if hdr.Typeflag == TypeGNUSparse {
// Get the real size of the file.
hdr.Size = tr.octal(header[483:495])
// Read the sparse map.
sp := tr.readOldGNUSparseMap(header)
if tr.err != nil {
return nil
}
// Current file is a GNU sparse file. Update the current file reader.
tr.curr = &sparseFileReader{rfr: tr.curr.(*regFileReader), sp: sp, tot: hdr.Size}
}
return hdr
}
// A sparseEntry holds a single entry in a sparse file's sparse map.
// A sparse entry indicates the offset and size in a sparse file of a
// block of data.
type sparseEntry struct {
offset int64
numBytes int64
}
// readOldGNUSparseMap reads the sparse map as stored in the old GNU sparse format.
// The sparse map is stored in the tar header if it's small enough. If it's larger than four entries,
// then one or more extension headers are used to store the rest of the sparse map.
func (tr *Reader) readOldGNUSparseMap(header []byte) []sparseEntry {
isExtended := header[oldGNUSparseMainHeaderIsExtendedOffset] != 0
spCap := oldGNUSparseMainHeaderNumEntries
if isExtended {
spCap += oldGNUSparseExtendedHeaderNumEntries
}
sp := make([]sparseEntry, 0, spCap)
s := slicer(header[oldGNUSparseMainHeaderOffset:])
// Read the four entries from the main tar header
for i := 0; i < oldGNUSparseMainHeaderNumEntries; i++ {
offset := tr.octal(s.next(oldGNUSparseOffsetSize))
numBytes := tr.octal(s.next(oldGNUSparseNumBytesSize))
if tr.err != nil {
tr.err = ErrHeader
return nil
}
if offset == 0 && numBytes == 0 {
break
}
sp = append(sp, sparseEntry{offset: offset, numBytes: numBytes})
}
for isExtended {
// There are more entries. Read an extension header and parse its entries.
sparseHeader := make([]byte, blockSize)
if _, tr.err = io.ReadFull(tr.r, sparseHeader); tr.err != nil {
return nil
}
isExtended = sparseHeader[oldGNUSparseExtendedHeaderIsExtendedOffset] != 0
s = slicer(sparseHeader)
for i := 0; i < oldGNUSparseExtendedHeaderNumEntries; i++ {
offset := tr.octal(s.next(oldGNUSparseOffsetSize))
numBytes := tr.octal(s.next(oldGNUSparseNumBytesSize))
if tr.err != nil {
tr.err = ErrHeader
return nil
}
if offset == 0 && numBytes == 0 {
break
}
sp = append(sp, sparseEntry{offset: offset, numBytes: numBytes})
}
}
return sp
}
// readGNUSparseMap1x0 reads the sparse map as stored in GNU's PAX sparse format version 1.0.
// The sparse map is stored just before the file data and padded out to the nearest block boundary.
func readGNUSparseMap1x0(r io.Reader) ([]sparseEntry, error) {
buf := make([]byte, 2*blockSize)
sparseHeader := buf[:blockSize]
// readDecimal is a helper function to read a decimal integer from the sparse map
// while making sure to read from the file in blocks of size blockSize
readDecimal := func() (int64, error) {
// Look for newline
nl := bytes.IndexByte(sparseHeader, '\n')
if nl == -1 {
if len(sparseHeader) >= blockSize {
// This is an error
return 0, ErrHeader
}
oldLen := len(sparseHeader)
newLen := oldLen + blockSize
if cap(sparseHeader) < newLen {
// There's more header, but we need to make room for the next block
copy(buf, sparseHeader)
sparseHeader = buf[:newLen]
} else {
// There's more header, and we can just reslice
sparseHeader = sparseHeader[:newLen]
}
// Now that sparseHeader is large enough, read next block
if _, err := io.ReadFull(r, sparseHeader[oldLen:newLen]); err != nil {
return 0, err
}
// Look for a newline in the new data
nl = bytes.IndexByte(sparseHeader[oldLen:newLen], '\n')
if nl == -1 {
// This is an error
return 0, ErrHeader
}
nl += oldLen // We want the position from the beginning
}
// Now that we've found a newline, read a number
n, err := strconv.ParseInt(string(sparseHeader[:nl]), 10, 0)
if err != nil {
return 0, ErrHeader
}
// Update sparseHeader to consume this number
sparseHeader = sparseHeader[nl+1:]
return n, nil
}
// Read the first block
if _, err := io.ReadFull(r, sparseHeader); err != nil {
return nil, err
}
// The first line contains the number of entries
numEntries, err := readDecimal()
if err != nil {
return nil, err
}
// Read all the entries
sp := make([]sparseEntry, 0, numEntries)
for i := int64(0); i < numEntries; i++ {
// Read the offset
offset, err := readDecimal()
if err != nil {
return nil, err
}
// Read numBytes
numBytes, err := readDecimal()
if err != nil {
return nil, err
}
sp = append(sp, sparseEntry{offset: offset, numBytes: numBytes})
}
return sp, nil
}
// readGNUSparseMap0x1 reads the sparse map as stored in GNU's PAX sparse format version 0.1.
// The sparse map is stored in the PAX headers.
func readGNUSparseMap0x1(headers map[string]string) ([]sparseEntry, error) {
// Get number of entries
numEntriesStr, ok := headers[paxGNUSparseNumBlocks]
if !ok {
return nil, ErrHeader
}
numEntries, err := strconv.ParseInt(numEntriesStr, 10, 0)
if err != nil {
return nil, ErrHeader
}
sparseMap := strings.Split(headers[paxGNUSparseMap], ",")
// There should be two numbers in sparseMap for each entry
if int64(len(sparseMap)) != 2*numEntries {
return nil, ErrHeader
}
// Loop through the entries in the sparse map
sp := make([]sparseEntry, 0, numEntries)
for i := int64(0); i < numEntries; i++ {
offset, err := strconv.ParseInt(sparseMap[2*i], 10, 0)
if err != nil {
return nil, ErrHeader
}
numBytes, err := strconv.ParseInt(sparseMap[2*i+1], 10, 0)
if err != nil {
return nil, ErrHeader
}
sp = append(sp, sparseEntry{offset: offset, numBytes: numBytes})
}
return sp, nil
}
// numBytes returns the number of bytes left to read in the current file's entry
// in the tar archive, or 0 if there is no current file.
func (tr *Reader) numBytes() int64 {
if tr.curr == nil {
// No current file, so no bytes
return 0
}
return tr.curr.numBytes()
}
// Read reads from the current entry in the tar archive.
// It returns 0, io.EOF when it reaches the end of that entry,
// until Next is called to advance to the next entry.
func (tr *Reader) Read(b []byte) (n int, err error) {
if tr.nb == 0 {
if tr.curr == nil {
return 0, io.EOF
}
n, err = tr.curr.Read(b)
if err != nil && err != io.EOF {
tr.err = err
}
return
}
func (rfr *regFileReader) Read(b []byte) (n int, err error) {
if rfr.nb == 0 {
// file consumed
return 0, io.EOF
}
if int64(len(b)) > tr.nb {
b = b[0:tr.nb]
if int64(len(b)) > rfr.nb {
b = b[0:rfr.nb]
}
n, err = tr.r.Read(b)
tr.nb -= int64(n)
n, err = rfr.r.Read(b)
rfr.nb -= int64(n)
if err == io.EOF && tr.nb > 0 {
if err == io.EOF && rfr.nb > 0 {
err = io.ErrUnexpectedEOF
}
tr.err = err
return
}
// numBytes returns the number of bytes left to read in the file's data in the tar archive.
func (rfr *regFileReader) numBytes() int64 {
return rfr.nb
}
// readHole reads a sparse file hole ending at offset toOffset
func (sfr *sparseFileReader) readHole(b []byte, toOffset int64) int {
n64 := toOffset - sfr.pos
if n64 > int64(len(b)) {
n64 = int64(len(b))
}
n := int(n64)
for i := 0; i < n; i++ {
b[i] = 0
}
sfr.pos += n64
return n
}
// Read reads the sparse file data in expanded form.
func (sfr *sparseFileReader) Read(b []byte) (n int, err error) {
if len(sfr.sp) == 0 {
// No more data fragments to read from.
if sfr.pos < sfr.tot {
// We're in the last hole
n = sfr.readHole(b, sfr.tot)
return
}
// Otherwise, we're at the end of the file
return 0, io.EOF
}
if sfr.pos < sfr.sp[0].offset {
// We're in a hole
n = sfr.readHole(b, sfr.sp[0].offset)
return
}
// We're not in a hole, so we'll read from the next data fragment
posInFragment := sfr.pos - sfr.sp[0].offset
bytesLeft := sfr.sp[0].numBytes - posInFragment
if int64(len(b)) > bytesLeft {
b = b[0:bytesLeft]
}
n, err = sfr.rfr.Read(b)
sfr.pos += int64(n)
if int64(n) == bytesLeft {
// We're done with this fragment
sfr.sp = sfr.sp[1:]
}
if err == io.EOF && sfr.pos < sfr.tot {
// We reached the end of the last fragment's data, but there's a final hole
err = nil
}
return
}
// numBytes returns the number of bytes left to read in the sparse file's
// sparse-encoded data in the tar archive.
func (sfr *sparseFileReader) numBytes() int64 {
return sfr.rfr.nb
}

View File

@ -9,6 +9,7 @@ import (
"crypto/md5"
"fmt"
"io"
"io/ioutil"
"os"
"reflect"
"strings"
@ -54,8 +55,92 @@ var gnuTarTest = &untarTest{
},
}
var sparseTarTest = &untarTest{
file: "testdata/sparse-formats.tar",
headers: []*Header{
{
Name: "sparse-gnu",
Mode: 420,
Uid: 1000,
Gid: 1000,
Size: 200,
ModTime: time.Unix(1392395740, 0),
Typeflag: 0x53,
Linkname: "",
Uname: "david",
Gname: "david",
Devmajor: 0,
Devminor: 0,
},
{
Name: "sparse-posix-0.0",
Mode: 420,
Uid: 1000,
Gid: 1000,
Size: 200,
ModTime: time.Unix(1392342187, 0),
Typeflag: 0x30,
Linkname: "",
Uname: "david",
Gname: "david",
Devmajor: 0,
Devminor: 0,
},
{
Name: "sparse-posix-0.1",
Mode: 420,
Uid: 1000,
Gid: 1000,
Size: 200,
ModTime: time.Unix(1392340456, 0),
Typeflag: 0x30,
Linkname: "",
Uname: "david",
Gname: "david",
Devmajor: 0,
Devminor: 0,
},
{
Name: "sparse-posix-1.0",
Mode: 420,
Uid: 1000,
Gid: 1000,
Size: 200,
ModTime: time.Unix(1392337404, 0),
Typeflag: 0x30,
Linkname: "",
Uname: "david",
Gname: "david",
Devmajor: 0,
Devminor: 0,
},
{
Name: "end",
Mode: 420,
Uid: 1000,
Gid: 1000,
Size: 4,
ModTime: time.Unix(1392398319, 0),
Typeflag: 0x30,
Linkname: "",
Uname: "david",
Gname: "david",
Devmajor: 0,
Devminor: 0,
},
},
cksums: []string{
"6f53234398c2449fe67c1812d993012f",
"6f53234398c2449fe67c1812d993012f",
"6f53234398c2449fe67c1812d993012f",
"6f53234398c2449fe67c1812d993012f",
"b0061974914468de549a2af8ced10316",
},
}
var untarTests = []*untarTest{
gnuTarTest,
sparseTarTest,
{
file: "testdata/star.tar",
headers: []*Header{
@ -386,7 +471,7 @@ func TestParsePAXHeader(t *testing.T) {
func TestParsePAXTime(t *testing.T) {
// Some valid PAX time values
timestamps := map[string]time.Time{
"1350244992.023960108": time.Unix(1350244992, 23960108), // The commoon case
"1350244992.023960108": time.Unix(1350244992, 23960108), // The common case
"1350244992.02396010": time.Unix(1350244992, 23960100), // Lower precision value
"1350244992.0239601089": time.Unix(1350244992, 23960108), // Higher precision value
"1350244992": time.Unix(1350244992, 0), // Low precision value
@ -423,3 +508,236 @@ func TestMergePAX(t *testing.T) {
t.Errorf("incorrect merge: got %+v, want %+v", hdr, want)
}
}
func TestSparseEndToEnd(t *testing.T) {
test := sparseTarTest
f, err := os.Open(test.file)
if err != nil {
t.Fatalf("Unexpected error: %v", err)
}
defer f.Close()
tr := NewReader(f)
headers := test.headers
cksums := test.cksums
nread := 0
// loop over all files
for ; ; nread++ {
hdr, err := tr.Next()
if hdr == nil || err == io.EOF {
break
}
// check the header
if !reflect.DeepEqual(*hdr, *headers[nread]) {
t.Errorf("Incorrect header:\nhave %+v\nwant %+v",
*hdr, headers[nread])
}
// read and checksum the file data
h := md5.New()
_, err = io.Copy(h, tr)
if err != nil {
t.Fatalf("Unexpected error: %v", err)
}
// verify checksum
have := fmt.Sprintf("%x", h.Sum(nil))
want := cksums[nread]
if want != have {
t.Errorf("Bad checksum on file %s:\nhave %+v\nwant %+v", hdr.Name, have, want)
}
}
if nread != len(headers) {
t.Errorf("Didn't process all files\nexpected: %d\nprocessed %d\n", len(headers), nread)
}
}
type sparseFileReadTest struct {
sparseData []byte
sparseMap []sparseEntry
realSize int64
expected []byte
}
var sparseFileReadTests = []sparseFileReadTest{
{
sparseData: []byte("abcde"),
sparseMap: []sparseEntry{
{offset: 0, numBytes: 2},
{offset: 5, numBytes: 3},
},
realSize: 8,
expected: []byte("ab\x00\x00\x00cde"),
},
{
sparseData: []byte("abcde"),
sparseMap: []sparseEntry{
{offset: 0, numBytes: 2},
{offset: 5, numBytes: 3},
},
realSize: 10,
expected: []byte("ab\x00\x00\x00cde\x00\x00"),
},
{
sparseData: []byte("abcde"),
sparseMap: []sparseEntry{
{offset: 1, numBytes: 3},
{offset: 6, numBytes: 2},
},
realSize: 8,
expected: []byte("\x00abc\x00\x00de"),
},
{
sparseData: []byte("abcde"),
sparseMap: []sparseEntry{
{offset: 1, numBytes: 3},
{offset: 6, numBytes: 2},
},
realSize: 10,
expected: []byte("\x00abc\x00\x00de\x00\x00"),
},
{
sparseData: []byte(""),
sparseMap: nil,
realSize: 2,
expected: []byte("\x00\x00"),
},
}
func TestSparseFileReader(t *testing.T) {
for i, test := range sparseFileReadTests {
r := bytes.NewReader(test.sparseData)
nb := int64(r.Len())
sfr := &sparseFileReader{
rfr: &regFileReader{r: r, nb: nb},
sp: test.sparseMap,
pos: 0,
tot: test.realSize,
}
if sfr.numBytes() != nb {
t.Errorf("test %d: Before reading, sfr.numBytes() = %d, want %d", i, sfr.numBytes(), nb)
}
buf, err := ioutil.ReadAll(sfr)
if err != nil {
t.Errorf("test %d: Unexpected error: %v", i, err)
}
if e := test.expected; !bytes.Equal(buf, e) {
t.Errorf("test %d: Contents = %v, want %v", i, buf, e)
}
if sfr.numBytes() != 0 {
t.Errorf("test %d: After draining the reader, numBytes() was nonzero", i)
}
}
}
func TestSparseIncrementalRead(t *testing.T) {
sparseMap := []sparseEntry{{10, 2}}
sparseData := []byte("Go")
expected := "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00Go\x00\x00\x00\x00\x00\x00\x00\x00"
r := bytes.NewReader(sparseData)
nb := int64(r.Len())
sfr := &sparseFileReader{
rfr: &regFileReader{r: r, nb: nb},
sp: sparseMap,
pos: 0,
tot: int64(len(expected)),
}
// We'll read the data 6 bytes at a time, with a hole of size 10 at
// the beginning and one of size 8 at the end.
var outputBuf bytes.Buffer
buf := make([]byte, 6)
for {
n, err := sfr.Read(buf)
if err == io.EOF {
break
}
if err != nil {
t.Errorf("Read: unexpected error %v\n", err)
}
if n > 0 {
_, err := outputBuf.Write(buf[:n])
if err != nil {
t.Errorf("Write: unexpected error %v\n", err)
}
}
}
got := outputBuf.String()
if got != expected {
t.Errorf("Contents = %v, want %v", got, expected)
}
}
func TestReadGNUSparseMap0x1(t *testing.T) {
headers := map[string]string{
paxGNUSparseNumBlocks: "4",
paxGNUSparseMap: "0,5,10,5,20,5,30,5",
}
expected := []sparseEntry{
{offset: 0, numBytes: 5},
{offset: 10, numBytes: 5},
{offset: 20, numBytes: 5},
{offset: 30, numBytes: 5},
}
sp, err := readGNUSparseMap0x1(headers)
if err != nil {
t.Errorf("Unexpected error: %v", err)
}
if !reflect.DeepEqual(sp, expected) {
t.Errorf("Incorrect sparse map: got %v, wanted %v", sp, expected)
}
}
func TestReadGNUSparseMap1x0(t *testing.T) {
// This test uses lots of holes so the sparse header takes up more than two blocks
numEntries := 100
expected := make([]sparseEntry, 0, numEntries)
sparseMap := new(bytes.Buffer)
fmt.Fprintf(sparseMap, "%d\n", numEntries)
for i := 0; i < numEntries; i++ {
offset := int64(2048 * i)
numBytes := int64(1024)
expected = append(expected, sparseEntry{offset: offset, numBytes: numBytes})
fmt.Fprintf(sparseMap, "%d\n%d\n", offset, numBytes)
}
// Make the header the smallest multiple of blockSize that fits the sparseMap
headerBlocks := (sparseMap.Len() + blockSize - 1) / blockSize
bufLen := blockSize * headerBlocks
buf := make([]byte, bufLen)
copy(buf, sparseMap.Bytes())
// Get an reader to read the sparse map
r := bytes.NewReader(buf)
// Read the sparse map
sp, err := readGNUSparseMap1x0(r)
if err != nil {
t.Errorf("Unexpected error: %v", err)
}
if !reflect.DeepEqual(sp, expected) {
t.Errorf("Incorrect sparse map: got %v, wanted %v", sp, expected)
}
}
func TestUninitializedRead(t *testing.T) {
test := gnuTarTest
f, err := os.Open(test.file)
if err != nil {
t.Fatalf("Unexpected error: %v", err)
}
defer f.Close()
tr := NewReader(f)
_, err = tr.Read([]byte{})
if err == nil || err != io.EOF {
t.Errorf("Unexpected error: %v, wanted %v", err, io.EOF)
}
}

Binary file not shown.

Binary file not shown.

View File

@ -218,8 +218,8 @@ func (tw *Writer) writeHeader(hdr *Header, allowPax bool) error {
tw.cString(prefixHeaderBytes, prefix, false, paxNone, nil)
// Use the ustar magic if we used ustar long names.
if len(prefix) > 0 {
copy(header[257:265], []byte("ustar\000"))
if len(prefix) > 0 && !tw.usedBinary {
copy(header[257:265], []byte("ustar\x00"))
}
}
}

View File

@ -103,6 +103,29 @@ var writerTests = []*writerTest{
},
},
},
// The truncated test file was produced using these commands:
// dd if=/dev/zero bs=1048576 count=16384 > (longname/)*15 /16gig.txt
// tar -b 1 -c -f- (longname/)*15 /16gig.txt | dd bs=512 count=8 > writer-big-long.tar
{
file: "testdata/writer-big-long.tar",
entries: []*writerTestEntry{
{
header: &Header{
Name: strings.Repeat("longname/", 15) + "16gig.txt",
Mode: 0644,
Uid: 1000,
Gid: 1000,
Size: 16 << 30,
ModTime: time.Unix(1399583047, 0),
Typeflag: '0',
Uname: "guillaume",
Gname: "guillaume",
},
// fake contents
contents: strings.Repeat("\x00", 4<<10),
},
},
},
// This file was produced using gnu tar 1.17
// gnutar -b 4 --format=ustar (longname/)*15 + file.txt
{

View File

@ -174,13 +174,13 @@ func timeToMsDosTime(t time.Time) (fDate uint16, fTime uint16) {
return
}
// ModTime returns the modification time.
// ModTime returns the modification time in UTC.
// The resolution is 2s.
func (h *FileHeader) ModTime() time.Time {
return msDosTimeToTime(h.ModifiedDate, h.ModifiedTime)
}
// SetModTime sets the ModifiedTime and ModifiedDate fields to the given time.
// SetModTime sets the ModifiedTime and ModifiedDate fields to the given time in UTC.
// The resolution is 2s.
func (h *FileHeader) SetModTime(t time.Time) {
h.ModifiedDate, h.ModifiedTime = timeToMsDosTime(t)

View File

@ -38,6 +38,7 @@ type Reader struct {
}
const minReadBufferSize = 16
const maxConsecutiveEmptyReads = 100
// NewReaderSize returns a new Reader whose buffer has at least the specified
// size. If the argument io.Reader is already a Reader with large enough
@ -87,15 +88,26 @@ func (b *Reader) fill() {
b.r = 0
}
// Read new data.
n, err := b.rd.Read(b.buf[b.w:])
if n < 0 {
panic(errNegativeRead)
if b.w >= len(b.buf) {
panic("bufio: tried to fill full buffer")
}
b.w += n
if err != nil {
b.err = err
// Read new data: try a limited number of times.
for i := maxConsecutiveEmptyReads; i > 0; i-- {
n, err := b.rd.Read(b.buf[b.w:])
if n < 0 {
panic(errNegativeRead)
}
b.w += n
if err != nil {
b.err = err
return
}
if n > 0 {
return
}
}
b.err = io.ErrNoProgress
}
func (b *Reader) readErr() error {
@ -115,8 +127,9 @@ func (b *Reader) Peek(n int) ([]byte, error) {
if n > len(b.buf) {
return nil, ErrBufferFull
}
// 0 <= n <= len(b.buf)
for b.w-b.r < n && b.err == nil {
b.fill()
b.fill() // b.w-b.r < len(b.buf) => buffer is not full
}
m := b.w - b.r
if m > n {
@ -142,7 +155,7 @@ func (b *Reader) Read(p []byte) (n int, err error) {
if n == 0 {
return 0, b.readErr()
}
if b.w == b.r {
if b.r == b.w {
if b.err != nil {
return 0, b.readErr()
}
@ -150,13 +163,16 @@ func (b *Reader) Read(p []byte) (n int, err error) {
// Large read, empty buffer.
// Read directly into p to avoid copy.
n, b.err = b.rd.Read(p)
if n < 0 {
panic(errNegativeRead)
}
if n > 0 {
b.lastByte = int(p[n-1])
b.lastRuneSize = -1
}
return n, b.readErr()
}
b.fill()
b.fill() // buffer is empty
if b.w == b.r {
return 0, b.readErr()
}
@ -176,11 +192,11 @@ func (b *Reader) Read(p []byte) (n int, err error) {
// If no byte is available, returns an error.
func (b *Reader) ReadByte() (c byte, err error) {
b.lastRuneSize = -1
for b.w == b.r {
for b.r == b.w {
if b.err != nil {
return 0, b.readErr()
}
b.fill()
b.fill() // buffer is empty
}
c = b.buf[b.r]
b.r++
@ -190,19 +206,19 @@ func (b *Reader) ReadByte() (c byte, err error) {
// UnreadByte unreads the last byte. Only the most recently read byte can be unread.
func (b *Reader) UnreadByte() error {
b.lastRuneSize = -1
if b.r == b.w && b.lastByte >= 0 {
b.w = 1
b.r = 0
b.buf[0] = byte(b.lastByte)
b.lastByte = -1
return nil
}
if b.r <= 0 {
if b.lastByte < 0 || b.r == 0 && b.w > 0 {
return ErrInvalidUnreadByte
}
b.r--
// b.r > 0 || b.w == 0
if b.r > 0 {
b.r--
} else {
// b.r == 0 && b.w == 0
b.w = 1
}
b.buf[b.r] = byte(b.lastByte)
b.lastByte = -1
b.lastRuneSize = -1
return nil
}
@ -210,8 +226,8 @@ func (b *Reader) UnreadByte() error {
// rune and its size in bytes. If the encoded rune is invalid, it consumes one byte
// and returns unicode.ReplacementChar (U+FFFD) with a size of 1.
func (b *Reader) ReadRune() (r rune, size int, err error) {
for b.r+utf8.UTFMax > b.w && !utf8.FullRune(b.buf[b.r:b.w]) && b.err == nil {
b.fill()
for b.r+utf8.UTFMax > b.w && !utf8.FullRune(b.buf[b.r:b.w]) && b.err == nil && b.w-b.r < len(b.buf) {
b.fill() // b.w-b.r < len(buf) => buffer is not full
}
b.lastRuneSize = -1
if b.r == b.w {
@ -232,7 +248,7 @@ func (b *Reader) ReadRune() (r rune, size int, err error) {
// regard it is stricter than UnreadByte, which will unread the last byte
// from any read operation.)
func (b *Reader) UnreadRune() error {
if b.lastRuneSize < 0 || b.r == 0 {
if b.lastRuneSize < 0 || b.r < b.lastRuneSize {
return ErrInvalidUnreadRune
}
b.r -= b.lastRuneSize
@ -255,37 +271,39 @@ func (b *Reader) Buffered() int { return b.w - b.r }
// ReadBytes or ReadString instead.
// ReadSlice returns err != nil if and only if line does not end in delim.
func (b *Reader) ReadSlice(delim byte) (line []byte, err error) {
// Look in buffer.
if i := bytes.IndexByte(b.buf[b.r:b.w], delim); i >= 0 {
line1 := b.buf[b.r : b.r+i+1]
b.r += i + 1
return line1, nil
}
// Read more into buffer, until buffer fills or we find delim.
for {
// Search buffer.
if i := bytes.IndexByte(b.buf[b.r:b.w], delim); i >= 0 {
line = b.buf[b.r : b.r+i+1]
b.r += i + 1
break
}
// Pending error?
if b.err != nil {
line := b.buf[b.r:b.w]
line = b.buf[b.r:b.w]
b.r = b.w
return line, b.readErr()
err = b.readErr()
break
}
n := b.Buffered()
b.fill()
// Search new part of buffer
if i := bytes.IndexByte(b.buf[n:b.w], delim); i >= 0 {
line := b.buf[0 : n+i+1]
b.r = n + i + 1
return line, nil
}
// Buffer is full?
if b.Buffered() >= len(b.buf) {
// Buffer full?
if n := b.Buffered(); n >= len(b.buf) {
b.r = b.w
return b.buf, ErrBufferFull
line = b.buf
err = ErrBufferFull
break
}
b.fill() // buffer is not full
}
// Handle last byte, if any.
if i := len(line) - 1; i >= 0 {
b.lastByte = int(line[i])
}
return
}
// ReadLine is a low-level line-reading primitive. Most callers should use
@ -301,6 +319,9 @@ func (b *Reader) ReadSlice(delim byte) (line []byte, err error) {
//
// The text returned from ReadLine does not include the line end ("\r\n" or "\n").
// No indication or error is given if the input ends without a final line end.
// Calling UnreadByte after ReadLine will always unread the last byte read
// (possibly a character belonging to the line end) even if that byte is not
// part of the line returned by ReadLine.
func (b *Reader) ReadLine() (line []byte, isPrefix bool, err error) {
line, err = b.ReadSlice('\n')
if err == ErrBufferFull {
@ -410,12 +431,24 @@ func (b *Reader) WriteTo(w io.Writer) (n int64, err error) {
return n, err
}
for b.fill(); b.r < b.w; b.fill() {
if w, ok := w.(io.ReaderFrom); ok {
m, err := w.ReadFrom(b.rd)
n += m
return n, err
}
if b.w-b.r < len(b.buf) {
b.fill() // buffer not full
}
for b.r < b.w {
// b.r < b.w => buffer is not empty
m, err := b.writeBuf(w)
n += m
if err != nil {
return n, err
}
b.fill() // buffer is empty
}
if b.err == io.EOF {
@ -428,6 +461,9 @@ func (b *Reader) WriteTo(w io.Writer) (n int64, err error) {
// writeBuf writes the Reader's buffer to the writer.
func (b *Reader) writeBuf(w io.Writer) (int64, error) {
n, err := w.Write(b.buf[b.r:b.w])
if n < b.r-b.w {
panic(errors.New("bufio: writer did not write all data"))
}
b.r += n
return int64(n), err
}
@ -619,9 +655,16 @@ func (b *Writer) ReadFrom(r io.Reader) (n int64, err error) {
return n, err1
}
}
m, err = r.Read(b.buf[b.n:])
if m == 0 {
break
nr := 0
for nr < maxConsecutiveEmptyReads {
m, err = r.Read(b.buf[b.n:])
if m != 0 || err != nil {
break
}
nr++
}
if nr == maxConsecutiveEmptyReads {
return n, io.ErrNoProgress
}
b.n += m
n += int64(m)

View File

@ -14,6 +14,7 @@ import (
"strings"
"testing"
"testing/iotest"
"time"
"unicode/utf8"
)
@ -174,6 +175,34 @@ func TestReader(t *testing.T) {
}
}
type zeroReader struct{}
func (zeroReader) Read(p []byte) (int, error) {
return 0, nil
}
func TestZeroReader(t *testing.T) {
var z zeroReader
r := NewReader(z)
c := make(chan error)
go func() {
_, err := r.ReadByte()
c <- err
}()
select {
case err := <-c:
if err == nil {
t.Error("error expected")
} else if err != io.ErrNoProgress {
t.Error("unexpected error:", err)
}
case <-time.After(time.Second):
t.Error("test timed out (endless loop in ReadByte?)")
}
}
// A StringReader delivers its data one string segment at a time via Read.
type StringReader struct {
data []string
@ -228,66 +257,150 @@ func TestReadRune(t *testing.T) {
}
func TestUnreadRune(t *testing.T) {
got := ""
segments := []string{"Hello, world:", "日本語"}
data := strings.Join(segments, "")
r := NewReader(&StringReader{data: segments})
got := ""
want := strings.Join(segments, "")
// Normal execution.
for {
r1, _, err := r.ReadRune()
if err != nil {
if err != io.EOF {
t.Error("unexpected EOF")
t.Error("unexpected error on ReadRune:", err)
}
break
}
got += string(r1)
// Put it back and read it again
// Put it back and read it again.
if err = r.UnreadRune(); err != nil {
t.Error("unexpected error on UnreadRune:", err)
t.Fatal("unexpected error on UnreadRune:", err)
}
r2, _, err := r.ReadRune()
if err != nil {
t.Error("unexpected error reading after unreading:", err)
t.Fatal("unexpected error reading after unreading:", err)
}
if r1 != r2 {
t.Errorf("incorrect rune after unread: got %c wanted %c", r1, r2)
t.Fatalf("incorrect rune after unread: got %c, want %c", r1, r2)
}
}
if got != data {
t.Errorf("want=%q got=%q", data, got)
if got != want {
t.Errorf("got %q, want %q", got, want)
}
}
func TestUnreadByte(t *testing.T) {
want := "Hello, world"
got := ""
segments := []string{"Hello, ", "world"}
r := NewReader(&StringReader{data: segments})
got := ""
want := strings.Join(segments, "")
// Normal execution.
for {
b1, err := r.ReadByte()
if err != nil {
if err != io.EOF {
t.Fatal("unexpected EOF")
t.Error("unexpected error on ReadByte:", err)
}
break
}
got += string(b1)
// Put it back and read it again
// Put it back and read it again.
if err = r.UnreadByte(); err != nil {
t.Fatalf("unexpected error on UnreadByte: %v", err)
t.Fatal("unexpected error on UnreadByte:", err)
}
b2, err := r.ReadByte()
if err != nil {
t.Fatalf("unexpected error reading after unreading: %v", err)
t.Fatal("unexpected error reading after unreading:", err)
}
if b1 != b2 {
t.Fatalf("incorrect byte after unread: got %c wanted %c", b1, b2)
t.Fatalf("incorrect byte after unread: got %q, want %q", b1, b2)
}
}
if got != want {
t.Errorf("got=%q want=%q", got, want)
t.Errorf("got %q, want %q", got, want)
}
}
func TestUnreadByteMultiple(t *testing.T) {
segments := []string{"Hello, ", "world"}
data := strings.Join(segments, "")
for n := 0; n <= len(data); n++ {
r := NewReader(&StringReader{data: segments})
// Read n bytes.
for i := 0; i < n; i++ {
b, err := r.ReadByte()
if err != nil {
t.Fatalf("n = %d: unexpected error on ReadByte: %v", n, err)
}
if b != data[i] {
t.Fatalf("n = %d: incorrect byte returned from ReadByte: got %q, want %q", n, b, data[i])
}
}
// Unread one byte if there is one.
if n > 0 {
if err := r.UnreadByte(); err != nil {
t.Errorf("n = %d: unexpected error on UnreadByte: %v", n, err)
}
}
// Test that we cannot unread any further.
if err := r.UnreadByte(); err == nil {
t.Errorf("n = %d: expected error on UnreadByte", n)
}
}
}
func TestUnreadByteOthers(t *testing.T) {
// A list of readers to use in conjunction with UnreadByte.
var readers = []func(*Reader, byte) ([]byte, error){
(*Reader).ReadBytes,
(*Reader).ReadSlice,
func(r *Reader, delim byte) ([]byte, error) {
data, err := r.ReadString(delim)
return []byte(data), err
},
// ReadLine doesn't fit the data/pattern easily
// so we leave it out. It should be covered via
// the ReadSlice test since ReadLine simply calls
// ReadSlice, and it's that function that handles
// the last byte.
}
// Try all readers with UnreadByte.
for rno, read := range readers {
// Some input data that is longer than the minimum reader buffer size.
const n = 10
var buf bytes.Buffer
for i := 0; i < n; i++ {
buf.WriteString("abcdefg")
}
r := NewReaderSize(&buf, minReadBufferSize)
readTo := func(delim byte, want string) {
data, err := read(r, delim)
if err != nil {
t.Fatalf("#%d: unexpected error reading to %c: %v", rno, delim, err)
}
if got := string(data); got != want {
t.Fatalf("#%d: got %q, want %q", rno, got, want)
}
}
// Read the data with occasional UnreadByte calls.
for i := 0; i < n; i++ {
readTo('d', "abcd")
for j := 0; j < 3; j++ {
if err := r.UnreadByte(); err != nil {
t.Fatalf("#%d: unexpected error on UnreadByte: %v", rno, err)
}
readTo('d', "d")
}
readTo('g', "efg")
}
// All data should have been read.
_, err := r.ReadByte()
if err != io.EOF {
t.Errorf("#%d: got error %v; want EOF", rno, err)
}
}
}
@ -1056,7 +1169,61 @@ func TestWriterReadFromWhileFull(t *testing.T) {
// Use ReadFrom to read in some data.
n2, err := w.ReadFrom(strings.NewReader("abcdef"))
if n2 != 6 || err != nil {
t.Fatalf("ReadFrom returned (%v, %v), want (6, nil)", n, err)
t.Fatalf("ReadFrom returned (%v, %v), want (6, nil)", n2, err)
}
}
type emptyThenNonEmptyReader struct {
r io.Reader
n int
}
func (r *emptyThenNonEmptyReader) Read(p []byte) (int, error) {
if r.n <= 0 {
return r.r.Read(p)
}
r.n--
return 0, nil
}
// Test for golang.org/issue/7611
func TestWriterReadFromUntilEOF(t *testing.T) {
buf := new(bytes.Buffer)
w := NewWriterSize(buf, 5)
// Partially fill buffer
n, err := w.Write([]byte("0123"))
if n != 4 || err != nil {
t.Fatalf("Write returned (%v, %v), want (4, nil)", n, err)
}
// Use ReadFrom to read in some data.
r := &emptyThenNonEmptyReader{r: strings.NewReader("abcd"), n: 3}
n2, err := w.ReadFrom(r)
if n2 != 4 || err != nil {
t.Fatalf("ReadFrom returned (%v, %v), want (4, nil)", n2, err)
}
w.Flush()
if got, want := string(buf.Bytes()), "0123abcd"; got != want {
t.Fatalf("buf.Bytes() returned %q, want %q", got, want)
}
}
func TestWriterReadFromErrNoProgress(t *testing.T) {
buf := new(bytes.Buffer)
w := NewWriterSize(buf, 5)
// Partially fill buffer
n, err := w.Write([]byte("0123"))
if n != 4 || err != nil {
t.Fatalf("Write returned (%v, %v), want (4, nil)", n, err)
}
// Use ReadFrom to read in some data.
r := &emptyThenNonEmptyReader{r: strings.NewReader("abcd"), n: 100}
n2, err := w.ReadFrom(r)
if n2 != 0 || err != io.ErrNoProgress {
t.Fatalf("buf.Bytes() returned (%v, %v), want (0, io.ErrNoProgress)", n2, err)
}
}
@ -1094,20 +1261,12 @@ func TestWriterReset(t *testing.T) {
// An onlyReader only implements io.Reader, no matter what other methods the underlying implementation may have.
type onlyReader struct {
r io.Reader
}
func (r onlyReader) Read(b []byte) (int, error) {
return r.r.Read(b)
io.Reader
}
// An onlyWriter only implements io.Writer, no matter what other methods the underlying implementation may have.
type onlyWriter struct {
w io.Writer
}
func (w onlyWriter) Write(b []byte) (int, error) {
return w.w.Write(b)
io.Writer
}
func BenchmarkReaderCopyOptimal(b *testing.B) {
@ -1152,6 +1311,27 @@ func BenchmarkReaderCopyNoWriteTo(b *testing.B) {
}
}
func BenchmarkReaderWriteToOptimal(b *testing.B) {
const bufSize = 16 << 10
buf := make([]byte, bufSize)
r := bytes.NewReader(buf)
srcReader := NewReaderSize(onlyReader{r}, 1<<10)
if _, ok := ioutil.Discard.(io.ReaderFrom); !ok {
b.Fatal("ioutil.Discard doesn't support ReaderFrom")
}
for i := 0; i < b.N; i++ {
r.Seek(0, 0)
srcReader.Reset(onlyReader{r})
n, err := srcReader.WriteTo(ioutil.Discard)
if err != nil {
b.Fatal(err)
}
if n != bufSize {
b.Fatalf("n = %d; want %d", n, bufSize)
}
}
}
func BenchmarkWriterCopyOptimal(b *testing.B) {
// Optimal case is where the underlying writer implements io.ReaderFrom
srcBuf := bytes.NewBuffer(make([]byte, 8192))

View File

@ -135,7 +135,7 @@ func (s *Scanner) Scan() bool {
}
// Must read more data.
// First, shift data to beginning of buffer if there's lots of empty space
// or space is neded.
// or space is needed.
if s.start > 0 && (s.end == len(s.buf) || s.start > len(s.buf)/2) {
copy(s.buf, s.buf[s.start:s.end])
s.end -= s.start
@ -172,7 +172,7 @@ func (s *Scanner) Scan() bool {
break
}
loop++
if loop > 100 {
if loop > maxConsecutiveEmptyReads {
s.setErr(io.ErrNoProgress)
break
}

View File

@ -277,7 +277,7 @@ func TestScanLineNoNewline(t *testing.T) {
testNoNewline(text, lines, t)
}
// Test that the line splitter handles a final line with a carriage return but nonewline.
// Test that the line splitter handles a final line with a carriage return but no newline.
func TestScanLineReturnButNoNewline(t *testing.T) {
const text = "abcdefghijklmn\nopqrstuvwxyz\r"
lines := []string{

View File

@ -356,7 +356,11 @@ func Map(mapping func(r rune) rune, s []byte) []byte {
}
r = mapping(r)
if r >= 0 {
if nbytes+utf8.RuneLen(r) > maxbytes {
rl := utf8.RuneLen(r)
if rl < 0 {
rl = len(string(utf8.RuneError))
}
if nbytes+rl > maxbytes {
// Grow the buffer.
maxbytes = maxbytes*2 + utf8.UTFMax
nb := make([]byte, maxbytes)

View File

@ -785,6 +785,16 @@ func TestMap(t *testing.T) {
if string(m) != expect {
t.Errorf("drop: expected %q got %q", expect, m)
}
// 6. Invalid rune
invalidRune := func(r rune) rune {
return utf8.MaxRune + 1
}
m = Map(invalidRune, []byte("x"))
expect = "\uFFFD"
if string(m) != expect {
t.Errorf("invalidRune: expected %q got %q", expect, m)
}
}
func TestToUpper(t *testing.T) { runStringTests(t, ToUpper, "ToUpper", upperTests) }
@ -1134,7 +1144,7 @@ func TestEqualFold(t *testing.T) {
func TestBufferGrowNegative(t *testing.T) {
defer func() {
if err := recover(); err == nil {
t.Fatal("Grow(-1) should have paniced")
t.Fatal("Grow(-1) should have panicked")
}
}()
var b Buffer
@ -1144,7 +1154,7 @@ func TestBufferGrowNegative(t *testing.T) {
func TestBufferTruncateNegative(t *testing.T) {
defer func() {
if err := recover(); err == nil {
t.Fatal("Truncate(-1) should have paniced")
t.Fatal("Truncate(-1) should have panicked")
}
}()
var b Buffer
@ -1154,7 +1164,7 @@ func TestBufferTruncateNegative(t *testing.T) {
func TestBufferTruncateOutOfRange(t *testing.T) {
defer func() {
if err := recover(); err == nil {
t.Fatal("Truncate(20) should have paniced")
t.Fatal("Truncate(20) should have panicked")
}
}()
var b Buffer

View File

@ -16,40 +16,41 @@ import (
// Unlike a Buffer, a Reader is read-only and supports seeking.
type Reader struct {
s []byte
i int // current reading index
prevRune int // index of previous rune; or < 0
i int64 // current reading index
prevRune int // index of previous rune; or < 0
}
// Len returns the number of bytes of the unread portion of the
// slice.
func (r *Reader) Len() int {
if r.i >= len(r.s) {
if r.i >= int64(len(r.s)) {
return 0
}
return len(r.s) - r.i
return int(int64(len(r.s)) - r.i)
}
func (r *Reader) Read(b []byte) (n int, err error) {
if len(b) == 0 {
return 0, nil
}
if r.i >= len(r.s) {
if r.i >= int64(len(r.s)) {
return 0, io.EOF
}
n = copy(b, r.s[r.i:])
r.i += n
r.prevRune = -1
n = copy(b, r.s[r.i:])
r.i += int64(n)
return
}
func (r *Reader) ReadAt(b []byte, off int64) (n int, err error) {
// cannot modify state - see io.ReaderAt
if off < 0 {
return 0, errors.New("bytes: invalid offset")
return 0, errors.New("bytes.Reader.ReadAt: negative offset")
}
if off >= int64(len(r.s)) {
return 0, io.EOF
}
n = copy(b, r.s[int(off):])
n = copy(b, r.s[off:])
if n < len(b) {
err = io.EOF
}
@ -57,49 +58,51 @@ func (r *Reader) ReadAt(b []byte, off int64) (n int, err error) {
}
func (r *Reader) ReadByte() (b byte, err error) {
if r.i >= len(r.s) {
r.prevRune = -1
if r.i >= int64(len(r.s)) {
return 0, io.EOF
}
b = r.s[r.i]
r.i++
r.prevRune = -1
return
}
func (r *Reader) UnreadByte() error {
r.prevRune = -1
if r.i <= 0 {
return errors.New("bytes.Reader: at beginning of slice")
return errors.New("bytes.Reader.UnreadByte: at beginning of slice")
}
r.i--
r.prevRune = -1
return nil
}
func (r *Reader) ReadRune() (ch rune, size int, err error) {
if r.i >= len(r.s) {
if r.i >= int64(len(r.s)) {
r.prevRune = -1
return 0, 0, io.EOF
}
r.prevRune = r.i
r.prevRune = int(r.i)
if c := r.s[r.i]; c < utf8.RuneSelf {
r.i++
return rune(c), 1, nil
}
ch, size = utf8.DecodeRune(r.s[r.i:])
r.i += size
r.i += int64(size)
return
}
func (r *Reader) UnreadRune() error {
if r.prevRune < 0 {
return errors.New("bytes.Reader: previous operation was not ReadRune")
return errors.New("bytes.Reader.UnreadRune: previous operation was not ReadRune")
}
r.i = r.prevRune
r.i = int64(r.prevRune)
r.prevRune = -1
return nil
}
// Seek implements the io.Seeker interface.
func (r *Reader) Seek(offset int64, whence int) (int64, error) {
r.prevRune = -1
var abs int64
switch whence {
case 0:
@ -109,22 +112,19 @@ func (r *Reader) Seek(offset int64, whence int) (int64, error) {
case 2:
abs = int64(len(r.s)) + offset
default:
return 0, errors.New("bytes: invalid whence")
return 0, errors.New("bytes.Reader.Seek: invalid whence")
}
if abs < 0 {
return 0, errors.New("bytes: negative position")
return 0, errors.New("bytes.Reader.Seek: negative position")
}
if abs >= 1<<31 {
return 0, errors.New("bytes: position out of range")
}
r.i = int(abs)
r.i = abs
return abs, nil
}
// WriteTo implements the io.WriterTo interface.
func (r *Reader) WriteTo(w io.Writer) (n int64, err error) {
r.prevRune = -1
if r.i >= len(r.s) {
if r.i >= int64(len(r.s)) {
return 0, nil
}
b := r.s[r.i:]
@ -132,7 +132,7 @@ func (r *Reader) WriteTo(w io.Writer) (n int64, err error) {
if m > len(b) {
panic("bytes.Reader.WriteTo: invalid Write count")
}
r.i += m
r.i += int64(m)
n = int64(m)
if m != len(b) && err == nil {
err = io.ErrShortWrite

View File

@ -10,6 +10,7 @@ import (
"io"
"io/ioutil"
"os"
"sync"
"testing"
)
@ -26,9 +27,9 @@ func TestReader(t *testing.T) {
{seek: os.SEEK_SET, off: 0, n: 20, want: "0123456789"},
{seek: os.SEEK_SET, off: 1, n: 1, want: "1"},
{seek: os.SEEK_CUR, off: 1, wantpos: 3, n: 2, want: "34"},
{seek: os.SEEK_SET, off: -1, seekerr: "bytes: negative position"},
{seek: os.SEEK_SET, off: 1<<31 - 1},
{seek: os.SEEK_CUR, off: 1, seekerr: "bytes: position out of range"},
{seek: os.SEEK_SET, off: -1, seekerr: "bytes.Reader.Seek: negative position"},
{seek: os.SEEK_SET, off: 1 << 33, wantpos: 1 << 33},
{seek: os.SEEK_CUR, off: 1, wantpos: 1<<33 + 1},
{seek: os.SEEK_SET, n: 5, want: "01234"},
{seek: os.SEEK_CUR, n: 5, want: "56789"},
{seek: os.SEEK_END, off: -1, n: 1, wantpos: 9, want: "9"},
@ -60,6 +61,16 @@ func TestReader(t *testing.T) {
}
}
func TestReadAfterBigSeek(t *testing.T) {
r := NewReader([]byte("0123456789"))
if _, err := r.Seek(1<<31+5, os.SEEK_SET); err != nil {
t.Fatal(err)
}
if n, err := r.Read(make([]byte, 10)); n != 0 || err != io.EOF {
t.Errorf("Read = %d, %v; want 0, EOF", n, err)
}
}
func TestReaderAt(t *testing.T) {
r := NewReader([]byte("0123456789"))
tests := []struct {
@ -73,7 +84,7 @@ func TestReaderAt(t *testing.T) {
{1, 9, "123456789", nil},
{11, 10, "", io.EOF},
{0, 0, "", nil},
{-1, 0, "", "bytes: invalid offset"},
{-1, 0, "", "bytes.Reader.ReadAt: negative offset"},
}
for i, tt := range tests {
b := make([]byte, tt.n)
@ -88,6 +99,43 @@ func TestReaderAt(t *testing.T) {
}
}
func TestReaderAtConcurrent(t *testing.T) {
// Test for the race detector, to verify ReadAt doesn't mutate
// any state.
r := NewReader([]byte("0123456789"))
var wg sync.WaitGroup
for i := 0; i < 5; i++ {
wg.Add(1)
go func(i int) {
defer wg.Done()
var buf [1]byte
r.ReadAt(buf[:], int64(i))
}(i)
}
wg.Wait()
}
func TestEmptyReaderConcurrent(t *testing.T) {
// Test for the race detector, to verify a Read that doesn't yield any bytes
// is okay to use from multiple goroutines. This was our historic behavior.
// See golang.org/issue/7856
r := NewReader([]byte{})
var wg sync.WaitGroup
for i := 0; i < 5; i++ {
wg.Add(2)
go func() {
defer wg.Done()
var buf [1]byte
r.Read(buf[:])
}()
go func() {
defer wg.Done()
r.Read(nil)
}()
}
wg.Wait()
}
func TestReaderWriteTo(t *testing.T) {
for i := 0; i < 30; i += 3 {
var l int
@ -133,6 +181,32 @@ func TestReaderLen(t *testing.T) {
}
}
var UnreadRuneErrorTests = []struct {
name string
f func(*Reader)
}{
{"Read", func(r *Reader) { r.Read([]byte{0}) }},
{"ReadByte", func(r *Reader) { r.ReadByte() }},
{"UnreadRune", func(r *Reader) { r.UnreadRune() }},
{"Seek", func(r *Reader) { r.Seek(0, 1) }},
{"WriteTo", func(r *Reader) { r.WriteTo(&Buffer{}) }},
}
func TestUnreadRuneError(t *testing.T) {
for _, tt := range UnreadRuneErrorTests {
reader := NewReader([]byte("0123456789"))
if _, _, err := reader.ReadRune(); err != nil {
// should not happen
t.Fatal(err)
}
tt.f(reader)
err := reader.UnreadRune()
if err == nil {
t.Errorf("Unreading after %s: expected error", tt.name)
}
}
}
func TestReaderDoubleUnreadRune(t *testing.T) {
buf := NewBuffer([]byte("groucho"))
if _, _, err := buf.ReadRune(); err != nil {

View File

@ -177,7 +177,7 @@ const (
var testfiles = []string{
// Digits is the digits of the irrational number e. Its decimal representation
// does not repeat, but there are only 10 posible digits, so it should be
// does not repeat, but there are only 10 possible digits, so it should be
// reasonably compressible.
digits: "testdata/e.txt.bz2",
// Twain is Project Gutenberg's edition of Mark Twain's classic English novel.

View File

@ -54,7 +54,7 @@ func (e *WriteError) Error() string {
return "flate: write error at offset " + strconv.FormatInt(e.Offset, 10) + ": " + e.Err.Error()
}
// Note that much of the implemenation of huffmanDecoder is also copied
// Note that much of the implementation of huffmanDecoder is also copied
// into gen.go (in package main) for the purpose of precomputing the
// fixed huffman tables so they can be included statically.

View File

@ -29,7 +29,7 @@ const (
var testfiles = []string{
// Digits is the digits of the irrational number e. Its decimal representation
// does not repeat, but there are only 10 posible digits, so it should be
// does not repeat, but there are only 10 possible digits, so it should be
// reasonably compressible.
digits: "../testdata/e.txt",
// Twain is Project Gutenberg's edition of Mark Twain's classic English novel.

View File

@ -89,6 +89,21 @@ func NewReader(r io.Reader) (*Reader, error) {
return z, nil
}
// Reset discards the Reader z's state and makes it equivalent to the
// result of its original state from NewReader, but reading from r instead.
// This permits reusing a Reader rather than allocating a new one.
func (z *Reader) Reset(r io.Reader) error {
z.r = makeReader(r)
if z.digest == nil {
z.digest = crc32.NewIEEE()
} else {
z.digest.Reset()
}
z.size = 0
z.err = nil
return z.readHeader(true)
}
// GZIP (RFC 1952) is little-endian, unlike ZLIB (RFC 1950).
func get4(p []byte) uint32 {
return uint32(p[0]) | uint32(p[1])<<8 | uint32(p[2])<<16 | uint32(p[3])<<24

View File

@ -303,6 +303,26 @@ func TestDecompressor(t *testing.T) {
if s != tt.raw {
t.Errorf("%s: got %d-byte %q want %d-byte %q", tt.name, n, s, len(tt.raw), tt.raw)
}
// Test Reader Reset.
in = bytes.NewReader(tt.gzip)
err = gzip.Reset(in)
if err != nil {
t.Errorf("%s: Reset: %s", tt.name, err)
continue
}
if tt.name != gzip.Name {
t.Errorf("%s: got name %s", tt.name, gzip.Name)
}
b.Reset()
n, err = io.Copy(b, gzip)
if err != tt.err {
t.Errorf("%s: io.Copy: %v want %v", tt.name, err, tt.err)
}
s = b.String()
if s != tt.raw {
t.Errorf("%s: got %d-byte %q want %d-byte %q", tt.name, n, s, len(tt.raw), tt.raw)
}
}
}
@ -333,3 +353,17 @@ func TestIssue6550(t *testing.T) {
// ok
}
}
func TestInitialReset(t *testing.T) {
var r Reader
if err := r.Reset(bytes.NewReader(gunzipTests[1].gzip)); err != nil {
t.Error(err)
}
var buf bytes.Buffer
if _, err := io.Copy(&buf, &r); err != nil {
t.Error(err)
}
if s := buf.String(); s != gunzipTests[1].raw {
t.Errorf("got %q want %q", s, gunzipTests[1].raw)
}
}

View File

@ -22,8 +22,8 @@ const (
DefaultCompression = flate.DefaultCompression
)
// A Writer is an io.WriteCloser that satisfies writes by compressing data written
// to its wrapped io.Writer.
// A Writer is an io.WriteCloser.
// Writes to a Writer are compressed and written to w.
type Writer struct {
Header
w io.Writer
@ -37,8 +37,8 @@ type Writer struct {
err error
}
// NewWriter creates a new Writer that satisfies writes by compressing data
// written to w.
// NewWriter returns a new Writer.
// Writes to the returned writer are compressed and written to w.
//
// It is the caller's responsibility to call Close on the WriteCloser when done.
// Writes may be buffered and not flushed until Close.

View File

@ -216,8 +216,8 @@ func (d *decoder) Close() error {
return nil
}
// NewReader creates a new io.ReadCloser that satisfies reads by decompressing
// the data read from r.
// NewReader creates a new io.ReadCloser.
// Reads from the returned io.ReadCloser read and decompress data from r.
// It is the caller's responsibility to call Close on the ReadCloser when
// finished reading.
// The number of bits to use for literal codes, litWidth, must be in the

View File

@ -225,8 +225,8 @@ func (e *encoder) Close() error {
return e.w.Flush()
}
// NewWriter creates a new io.WriteCloser that satisfies writes by compressing
// the data and writing it to w.
// NewWriter creates a new io.WriteCloser.
// Writes to the returned io.WriteCloser are compressed and written to w.
// It is the caller's responsibility to call Close on the WriteCloser when
// finished writing.
// The number of bits to use for literal codes, litWidth, must be in the

View File

@ -51,7 +51,8 @@ type reader struct {
scratch [4]byte
}
// NewReader creates a new io.ReadCloser that satisfies reads by decompressing data read from r.
// NewReader creates a new io.ReadCloser.
// Reads from the returned io.ReadCloser read and decompress data from r.
// The implementation buffers input and may read more data than necessary from r.
// It is the caller's responsibility to call Close on the ReadCloser when done.
func NewReader(r io.Reader) (io.ReadCloser, error) {

View File

@ -34,8 +34,8 @@ type Writer struct {
wroteHeader bool
}
// NewWriter creates a new Writer that satisfies writes by compressing data
// written to w.
// NewWriter creates a new Writer.
// Writes to the returned Writer are compressed and written to w.
//
// It is the caller's responsibility to call Close on the WriteCloser when done.
// Writes may be buffered and not flushed until Close.

View File

@ -120,7 +120,7 @@ func testFileLevelDictReset(t *testing.T, fn string, level int, dict []byte) {
}
out := buf.String()
// Reset and comprses again.
// Reset and compress again.
buf2 := new(bytes.Buffer)
zlibw.Reset(buf2)
_, err = zlibw.Write(b0)

View File

@ -78,7 +78,7 @@ func Remove(h Interface, i int) interface{} {
return h.Pop()
}
// Fix reestablishes the heap ordering after the element at index i has changed its value.
// Fix re-establishes the heap ordering after the element at index i has changed its value.
// Changing the value of the element at index i and then calling Fix is equivalent to,
// but less expensive than, calling Remove(h, i) followed by a Push of the new value.
// The complexity is O(log(n)) where n = h.Len().

View File

@ -354,6 +354,34 @@ func TestCipherDecrypt(t *testing.T) {
}
}
// Test short input/output.
// Assembly used to not notice.
// See issue 7928.
func TestShortBlocks(t *testing.T) {
bytes := func(n int) []byte { return make([]byte, n) }
c, _ := NewCipher(bytes(16))
mustPanic(t, "crypto/aes: input not full block", func() { c.Encrypt(bytes(1), bytes(1)) })
mustPanic(t, "crypto/aes: input not full block", func() { c.Decrypt(bytes(1), bytes(1)) })
mustPanic(t, "crypto/aes: input not full block", func() { c.Encrypt(bytes(100), bytes(1)) })
mustPanic(t, "crypto/aes: input not full block", func() { c.Decrypt(bytes(100), bytes(1)) })
mustPanic(t, "crypto/aes: output not full block", func() { c.Encrypt(bytes(1), bytes(100)) })
mustPanic(t, "crypto/aes: output not full block", func() { c.Decrypt(bytes(1), bytes(100)) })
}
func mustPanic(t *testing.T, msg string, f func()) {
defer func() {
err := recover()
if err == nil {
t.Errorf("function did not panic, wanted %q", msg)
} else if err != msg {
t.Errorf("got panic %v, wanted %q", err, msg)
}
}()
f()
}
func BenchmarkEncrypt(b *testing.B) {
tt := encryptTests[0]
c, err := NewCipher(tt.key)

View File

@ -46,9 +46,21 @@ func NewCipher(key []byte) (cipher.Block, error) {
func (c *aesCipher) BlockSize() int { return BlockSize }
func (c *aesCipher) Encrypt(dst, src []byte) {
if len(src) < BlockSize {
panic("crypto/aes: input not full block")
}
if len(dst) < BlockSize {
panic("crypto/aes: output not full block")
}
encryptBlock(c.enc, dst, src)
}
func (c *aesCipher) Decrypt(dst, src []byte) {
if len(src) < BlockSize {
panic("crypto/aes: input not full block")
}
if len(dst) < BlockSize {
panic("crypto/aes: output not full block")
}
decryptBlock(c.dec, dst, src)
}

View File

@ -21,6 +21,7 @@ func encryptBlock(xk []uint32, dst, src []byte) {
encryptBlockGo(xk, dst, src)
}
}
func decryptBlock(xk []uint32, dst, src []byte) {
if useAsm {
decryptBlockAsm(len(xk)/4-1, &xk[0], &dst[0], &src[0])
@ -28,6 +29,7 @@ func decryptBlock(xk []uint32, dst, src []byte) {
decryptBlockGo(xk, dst, src)
}
}
func expandKey(key []byte, enc, dec []uint32) {
if useAsm {
rounds := 10

View File

@ -47,7 +47,7 @@ func BenchmarkAESGCMOpen1K(b *testing.B) {
}
// If we test exactly 1K blocks, we would generate exact multiples of
// the cipher's block size, and and the cipher stream fragments would
// the cipher's block size, and the cipher stream fragments would
// always be wordsize aligned, whereas non-aligned is a more typical
// use-case.
const almost1K = 1024 - 5

View File

@ -30,9 +30,9 @@ type AEAD interface {
// Open decrypts and authenticates ciphertext, authenticates the
// additional data and, if successful, appends the resulting plaintext
// to dst, returning the updated slice and true. On error, nil and
// false is returned. The nonce must be NonceSize() bytes long and both
// it and the additional data must match the value passed to Seal.
// to dst, returning the updated slice. The nonce must be NonceSize()
// bytes long and both it and the additional data must match the
// value passed to Seal.
//
// The ciphertext and dst may alias exactly or not at all.
Open(dst, nonce, ciphertext, data []byte) ([]byte, error)

View File

@ -173,6 +173,16 @@ func GenerateKey(priv *PrivateKey, rand io.Reader) error {
return nil
}
// fermatInverse calculates the inverse of k in GF(P) using Fermat's method.
// This has better constant-time properties than Euclid's method (implemented
// in math/big.Int.ModInverse) although math/big itself isn't strictly
// constant-time so it's not perfect.
func fermatInverse(k, P *big.Int) *big.Int {
two := big.NewInt(2)
pMinus2 := new(big.Int).Sub(P, two)
return new(big.Int).Exp(k, pMinus2, P)
}
// Sign signs an arbitrary length hash (which should be the result of hashing a
// larger message) using the private key, priv. It returns the signature as a
// pair of integers. The security of the private key depends on the entropy of
@ -205,7 +215,7 @@ func Sign(rand io.Reader, priv *PrivateKey, hash []byte) (r, s *big.Int, err err
}
}
kInv := new(big.Int).ModInverse(k, priv.Q)
kInv := fermatInverse(k, priv.Q)
r = new(big.Int).Exp(priv.G, k, priv.P)
r.Mod(r, priv.Q)

View File

@ -84,6 +84,16 @@ func hashToInt(hash []byte, c elliptic.Curve) *big.Int {
return ret
}
// fermatInverse calculates the inverse of k in GF(P) using Fermat's method.
// This has better constant-time properties than Euclid's method (implemented
// in math/big.Int.ModInverse) although math/big itself isn't strictly
// constant-time so it's not perfect.
func fermatInverse(k, N *big.Int) *big.Int {
two := big.NewInt(2)
nMinus2 := new(big.Int).Sub(N, two)
return new(big.Int).Exp(k, nMinus2, N)
}
// Sign signs an arbitrary length hash (which should be the result of hashing a
// larger message) using the private key, priv. It returns the signature as a
// pair of integers. The security of the private key depends on the entropy of
@ -102,7 +112,7 @@ func Sign(rand io.Reader, priv *PrivateKey, hash []byte) (r, s *big.Int, err err
return
}
kInv = new(big.Int).ModInverse(k, N)
kInv = fermatInverse(k, N)
r, _ = priv.Curve.ScalarBaseMult(k.Bytes())
r.Mod(r, N)
if r.Sign() != 0 {

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build amd64 386 arm
// +build amd64 amd64p32 386 arm
package md5

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !amd64,!386,!arm
// +build !amd64,!amd64p32,!386,!arm
package md5

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin dragonfly freebsd linux netbsd openbsd plan9 solaris
// +build darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris
// Unix cryptographically secure pseudorandom number
// generator.

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build amd64 arm 386
// +build amd64 amd64p32 arm 386
package rc4

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !amd64,!arm,!386
// +build !amd64,!amd64p32,!arm,!386
package rc4

View File

@ -214,7 +214,7 @@ func SignPKCS1v15(rand io.Reader, priv *PrivateKey, hash crypto.Hash, hashed []b
// hashed is the result of hashing the input message using the given hash
// function and sig is the signature. A valid signature is indicated by
// returning a nil error. If hash is zero then hashed is used directly. This
// isn't advisable except for interopability.
// isn't advisable except for interoperability.
func VerifyPKCS1v15(pub *PublicKey, hash crypto.Hash, hashed []byte, sig []byte) (err error) {
hashLen, prefix, err := pkcs1v15HashInfo(hash, len(hashed))
if err != nil {

View File

@ -4,7 +4,7 @@
package rsa
// This file implementes the PSS signature scheme [1].
// This file implements the PSS signature scheme [1].
//
// [1] http://www.rsa.com/rsalabs/pkcs/files/h11300-wp-pkcs-1v2-2-rsa-cryptography-standard.pdf
@ -189,7 +189,7 @@ func emsaPSSVerify(mHash, em []byte, emBits, sLen int, hash hash.Hash) error {
// signPSSWithSalt calculates the signature of hashed using PSS [1] with specified salt.
// Note that hashed must be the result of hashing the input message using the
// given hash funcion. salt is a random sequence of bytes whose length will be
// given hash function. salt is a random sequence of bytes whose length will be
// later used to verify the signature.
func signPSSWithSalt(rand io.Reader, priv *PrivateKey, hash crypto.Hash, hashed, salt []byte) (s []byte, err error) {
nBits := priv.N.BitLen()
@ -233,7 +233,7 @@ func (opts *PSSOptions) saltLength() int {
// SignPSS calculates the signature of hashed using RSASSA-PSS [1].
// Note that hashed must be the result of hashing the input message using the
// given hash funcion. The opts argument may be nil, in which case sensible
// given hash function. The opts argument may be nil, in which case sensible
// defaults are used.
func SignPSS(rand io.Reader, priv *PrivateKey, hash crypto.Hash, hashed []byte, opts *PSSOptions) (s []byte, err error) {
saltLength := opts.saltLength()

View File

@ -60,7 +60,7 @@ type PrivateKey struct {
type PrecomputedValues struct {
Dp, Dq *big.Int // D mod (P-1) (or mod Q-1)
Qinv *big.Int // Q^-1 mod Q
Qinv *big.Int // Q^-1 mod P
// CRTValues is used for the 3rd and subsequent primes. Due to a
// historical accident, the CRT for the first two primes is handled

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build amd64 386 arm
// +build amd64 amd64p32 arm 386
package sha1

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !amd64,!386,!arm
// +build !amd64,!amd64p32,!386,!arm
package sha1

View File

@ -82,12 +82,14 @@ const (
scsvRenegotiation uint16 = 0x00ff
)
// TLS Elliptic Curves
// CurveID is the type of a TLS identifier for an elliptic curve. See
// http://www.iana.org/assignments/tls-parameters/tls-parameters.xml#tls-parameters-8
type CurveID uint16
const (
curveP256 uint16 = 23
curveP384 uint16 = 24
curveP521 uint16 = 25
CurveP256 CurveID = 23
CurveP384 CurveID = 24
CurveP521 CurveID = 25
)
// TLS Elliptic Curve Point Formats
@ -153,6 +155,7 @@ var supportedClientCertSignatureAlgorithms = []signatureAndHash{
// ConnectionState records basic TLS details about the connection.
type ConnectionState struct {
Version uint16 // TLS version used by the connection (e.g. VersionTLS12)
HandshakeComplete bool // TLS handshake is complete
DidResume bool // connection resumes a previous TLS connection
CipherSuite uint16 // cipher suite in use (TLS_RSA_WITH_RC4_128_SHA, ...)
@ -198,12 +201,15 @@ type ClientSessionCache interface {
Put(sessionKey string, cs *ClientSessionState)
}
// A Config structure is used to configure a TLS client or server. After one
// has been passed to a TLS function it must not be modified.
// A Config structure is used to configure a TLS client or server.
// After one has been passed to a TLS function it must not be
// modified. A Config may be reused; the tls package will also not
// modify it.
type Config struct {
// Rand provides the source of entropy for nonces and RSA blinding.
// If Rand is nil, TLS uses the cryptographic random reader in package
// crypto/rand.
// The Reader must be safe for use by multiple goroutines.
Rand io.Reader
// Time returns the current time as the number of seconds since the epoch.
@ -290,6 +296,11 @@ type Config struct {
// which is currently TLS 1.2.
MaxVersion uint16
// CurvePreferences contains the elliptic curves that will be used in
// an ECDHE handshake, in preference order. If empty, the default will
// be used.
CurvePreferences []CurveID
serverInitOnce sync.Once // guards calling (*Config).serverInit
}
@ -348,6 +359,15 @@ func (c *Config) maxVersion() uint16 {
return c.MaxVersion
}
var defaultCurvePreferences = []CurveID{CurveP256, CurveP384, CurveP521}
func (c *Config) curvePreferences() []CurveID {
if c == nil || len(c.CurvePreferences) == 0 {
return defaultCurvePreferences
}
return c.CurvePreferences
}
// mutualVersion returns the protocol version to use given the advertised
// version of the peer.
func (c *Config) mutualVersion(vers uint16) (uint16, bool) {

View File

@ -28,6 +28,7 @@ type Conn struct {
// constant after handshake; protected by handshakeMutex
handshakeMutex sync.Mutex // handshakeMutex < in.Mutex, out.Mutex, errMutex
handshakeErr error // error resulting from handshake
vers uint16 // TLS version
haveVers bool // version has been negotiated
config *Config // configuration passed to constructor
@ -45,9 +46,6 @@ type Conn struct {
clientProtocol string
clientProtocolFallback bool
// first permanent error
connErr
// input/output
in, out halfConn // in.Mutex < out.Mutex
rawInput *block // raw input, right off the wire
@ -57,27 +55,6 @@ type Conn struct {
tmp [16]byte
}
type connErr struct {
mu sync.Mutex
value error
}
func (e *connErr) setError(err error) error {
e.mu.Lock()
defer e.mu.Unlock()
if e.value == nil {
e.value = err
}
return err
}
func (e *connErr) error() error {
e.mu.Lock()
defer e.mu.Unlock()
return e.value
}
// Access to net.Conn methods.
// Cannot just embed net.Conn because that would
// export the struct field too.
@ -105,7 +82,7 @@ func (c *Conn) SetReadDeadline(t time.Time) error {
return c.conn.SetReadDeadline(t)
}
// SetWriteDeadline sets the write deadline on the underlying conneciton.
// SetWriteDeadline sets the write deadline on the underlying connection.
// A zero value for t means Write will not time out.
// After a Write has timed out, the TLS state is corrupt and all future writes will return the same error.
func (c *Conn) SetWriteDeadline(t time.Time) error {
@ -116,6 +93,8 @@ func (c *Conn) SetWriteDeadline(t time.Time) error {
// connection, either sending or receiving.
type halfConn struct {
sync.Mutex
err error // first permanent error
version uint16 // protocol version
cipher interface{} // cipher algorithm
mac macFunction
@ -129,6 +108,18 @@ type halfConn struct {
inDigestBuf, outDigestBuf []byte
}
func (hc *halfConn) setErrorLocked(err error) error {
hc.err = err
return err
}
func (hc *halfConn) error() error {
hc.Lock()
err := hc.err
hc.Unlock()
return err
}
// prepareCipherSpec sets the encryption and MAC states
// that a subsequent changeCipherSpec will use.
func (hc *halfConn) prepareCipherSpec(version uint16, cipher interface{}, mac macFunction) {
@ -460,6 +451,8 @@ func (b *block) readFromUntil(r io.Reader, n int) error {
m, err := r.Read(b.data[len(b.data):cap(b.data)])
b.data = b.data[0 : len(b.data)+m]
if len(b.data) >= n {
// TODO(bradfitz,agl): slightly suspicious
// that we're throwing away r.Read's err here.
break
}
if err != nil {
@ -520,16 +513,16 @@ func (c *Conn) readRecord(want recordType) error {
switch want {
default:
c.sendAlert(alertInternalError)
return errors.New("tls: unknown record type requested")
return c.in.setErrorLocked(errors.New("tls: unknown record type requested"))
case recordTypeHandshake, recordTypeChangeCipherSpec:
if c.handshakeComplete {
c.sendAlert(alertInternalError)
return errors.New("tls: handshake or ChangeCipherSpec requested after handshake complete")
return c.in.setErrorLocked(errors.New("tls: handshake or ChangeCipherSpec requested after handshake complete"))
}
case recordTypeApplicationData:
if !c.handshakeComplete {
c.sendAlert(alertInternalError)
return errors.New("tls: application data record requested before handshake complete")
return c.in.setErrorLocked(errors.New("tls: application data record requested before handshake complete"))
}
}
@ -548,7 +541,7 @@ Again:
// err = io.ErrUnexpectedEOF
// }
if e, ok := err.(net.Error); !ok || !e.Temporary() {
c.setError(err)
c.in.setErrorLocked(err)
}
return err
}
@ -560,18 +553,18 @@ Again:
// an SSLv2 client.
if want == recordTypeHandshake && typ == 0x80 {
c.sendAlert(alertProtocolVersion)
return errors.New("tls: unsupported SSLv2 handshake received")
return c.in.setErrorLocked(errors.New("tls: unsupported SSLv2 handshake received"))
}
vers := uint16(b.data[1])<<8 | uint16(b.data[2])
n := int(b.data[3])<<8 | int(b.data[4])
if c.haveVers && vers != c.vers {
c.sendAlert(alertProtocolVersion)
return fmt.Errorf("tls: received record with version %x when expecting version %x", vers, c.vers)
return c.in.setErrorLocked(fmt.Errorf("tls: received record with version %x when expecting version %x", vers, c.vers))
}
if n > maxCiphertext {
c.sendAlert(alertRecordOverflow)
return fmt.Errorf("tls: oversized record received with length %d", n)
return c.in.setErrorLocked(fmt.Errorf("tls: oversized record received with length %d", n))
}
if !c.haveVers {
// First message, be extra suspicious:
@ -584,7 +577,7 @@ Again:
// it's probably not real.
if (typ != recordTypeAlert && typ != want) || vers >= 0x1000 || n >= 0x3000 {
c.sendAlert(alertUnexpectedMessage)
return fmt.Errorf("tls: first record does not look like a TLS handshake")
return c.in.setErrorLocked(fmt.Errorf("tls: first record does not look like a TLS handshake"))
}
}
if err := b.readFromUntil(c.conn, recordHeaderLen+n); err != nil {
@ -592,7 +585,7 @@ Again:
err = io.ErrUnexpectedEOF
}
if e, ok := err.(net.Error); !ok || !e.Temporary() {
c.setError(err)
c.in.setErrorLocked(err)
}
return err
}
@ -601,27 +594,27 @@ Again:
b, c.rawInput = c.in.splitBlock(b, recordHeaderLen+n)
ok, off, err := c.in.decrypt(b)
if !ok {
return c.sendAlert(err)
c.in.setErrorLocked(c.sendAlert(err))
}
b.off = off
data := b.data[b.off:]
if len(data) > maxPlaintext {
c.sendAlert(alertRecordOverflow)
err := c.sendAlert(alertRecordOverflow)
c.in.freeBlock(b)
return c.error()
return c.in.setErrorLocked(err)
}
switch typ {
default:
c.sendAlert(alertUnexpectedMessage)
c.in.setErrorLocked(c.sendAlert(alertUnexpectedMessage))
case recordTypeAlert:
if len(data) != 2 {
c.sendAlert(alertUnexpectedMessage)
c.in.setErrorLocked(c.sendAlert(alertUnexpectedMessage))
break
}
if alert(data[1]) == alertCloseNotify {
c.setError(io.EOF)
c.in.setErrorLocked(io.EOF)
break
}
switch data[0] {
@ -630,24 +623,24 @@ Again:
c.in.freeBlock(b)
goto Again
case alertLevelError:
c.setError(&net.OpError{Op: "remote error", Err: alert(data[1])})
c.in.setErrorLocked(&net.OpError{Op: "remote error", Err: alert(data[1])})
default:
c.sendAlert(alertUnexpectedMessage)
c.in.setErrorLocked(c.sendAlert(alertUnexpectedMessage))
}
case recordTypeChangeCipherSpec:
if typ != want || len(data) != 1 || data[0] != 1 {
c.sendAlert(alertUnexpectedMessage)
c.in.setErrorLocked(c.sendAlert(alertUnexpectedMessage))
break
}
err := c.in.changeCipherSpec()
if err != nil {
c.sendAlert(err.(alert))
c.in.setErrorLocked(c.sendAlert(err.(alert)))
}
case recordTypeApplicationData:
if typ != want {
c.sendAlert(alertUnexpectedMessage)
c.in.setErrorLocked(c.sendAlert(alertUnexpectedMessage))
break
}
c.input = b
@ -656,7 +649,7 @@ Again:
case recordTypeHandshake:
// TODO(rsc): Should at least pick off connection close.
if typ != want {
return c.sendAlert(alertNoRenegotiation)
return c.in.setErrorLocked(c.sendAlert(alertNoRenegotiation))
}
c.hand.Write(data)
}
@ -664,7 +657,7 @@ Again:
if b != nil {
c.in.freeBlock(b)
}
return c.error()
return c.in.err
}
// sendAlert sends a TLS alert message.
@ -680,7 +673,7 @@ func (c *Conn) sendAlertLocked(err alert) error {
c.writeRecord(recordTypeAlert, c.tmp[0:2])
// closeNotify is a special case in that it isn't an error:
if err != alertCloseNotify {
return c.setError(&net.OpError{Op: "local error", Err: err})
return c.out.setErrorLocked(&net.OpError{Op: "local error", Err: err})
}
return nil
}
@ -766,7 +759,7 @@ func (c *Conn) writeRecord(typ recordType, data []byte) (n int, err error) {
c.tmp[0] = alertLevelError
c.tmp[1] = byte(err.(alert))
c.writeRecord(recordTypeAlert, c.tmp[0:2])
return n, c.setError(&net.OpError{Op: "local error", Err: err})
return n, c.out.setErrorLocked(&net.OpError{Op: "local error", Err: err})
}
}
return
@ -777,7 +770,7 @@ func (c *Conn) writeRecord(typ recordType, data []byte) (n int, err error) {
// c.in.Mutex < L; c.out.Mutex < L.
func (c *Conn) readHandshake() (interface{}, error) {
for c.hand.Len() < 4 {
if err := c.error(); err != nil {
if err := c.in.err; err != nil {
return nil, err
}
if err := c.readRecord(recordTypeHandshake); err != nil {
@ -788,11 +781,10 @@ func (c *Conn) readHandshake() (interface{}, error) {
data := c.hand.Bytes()
n := int(data[1])<<16 | int(data[2])<<8 | int(data[3])
if n > maxHandshake {
c.sendAlert(alertInternalError)
return nil, c.error()
return nil, c.in.setErrorLocked(c.sendAlert(alertInternalError))
}
for c.hand.Len() < 4+n {
if err := c.error(); err != nil {
if err := c.in.err; err != nil {
return nil, err
}
if err := c.readRecord(recordTypeHandshake); err != nil {
@ -831,8 +823,7 @@ func (c *Conn) readHandshake() (interface{}, error) {
case typeFinished:
m = new(finishedMsg)
default:
c.sendAlert(alertUnexpectedMessage)
return nil, alertUnexpectedMessage
return nil, c.in.setErrorLocked(c.sendAlert(alertUnexpectedMessage))
}
// The handshake message unmarshallers
@ -841,25 +832,24 @@ func (c *Conn) readHandshake() (interface{}, error) {
data = append([]byte(nil), data...)
if !m.unmarshal(data) {
c.sendAlert(alertUnexpectedMessage)
return nil, alertUnexpectedMessage
return nil, c.in.setErrorLocked(c.sendAlert(alertUnexpectedMessage))
}
return m, nil
}
// Write writes data to the connection.
func (c *Conn) Write(b []byte) (int, error) {
if err := c.error(); err != nil {
return 0, err
}
if err := c.Handshake(); err != nil {
return 0, c.setError(err)
return 0, err
}
c.out.Lock()
defer c.out.Unlock()
if err := c.out.err; err != nil {
return 0, err
}
if !c.handshakeComplete {
return 0, alertInternalError
}
@ -878,14 +868,14 @@ func (c *Conn) Write(b []byte) (int, error) {
if _, ok := c.out.cipher.(cipher.BlockMode); ok {
n, err := c.writeRecord(recordTypeApplicationData, b[:1])
if err != nil {
return n, c.setError(err)
return n, c.out.setErrorLocked(err)
}
m, b = 1, b[1:]
}
}
n, err := c.writeRecord(recordTypeApplicationData, b)
return n + m, c.setError(err)
return n + m, c.out.setErrorLocked(err)
}
// Read can be made to time out and return a net.Error with Timeout() == true
@ -894,6 +884,11 @@ func (c *Conn) Read(b []byte) (n int, err error) {
if err = c.Handshake(); err != nil {
return
}
if len(b) == 0 {
// Put this after Handshake, in case people were calling
// Read(nil) for the side effect of the Handshake.
return
}
c.in.Lock()
defer c.in.Unlock()
@ -902,13 +897,13 @@ func (c *Conn) Read(b []byte) (n int, err error) {
// CBC IV. So this loop ignores a limited number of empty records.
const maxConsecutiveEmptyRecords = 100
for emptyRecordCount := 0; emptyRecordCount <= maxConsecutiveEmptyRecords; emptyRecordCount++ {
for c.input == nil && c.error() == nil {
for c.input == nil && c.in.err == nil {
if err := c.readRecord(recordTypeApplicationData); err != nil {
// Soft error, like EAGAIN
return 0, err
}
}
if err := c.error(); err != nil {
if err := c.in.err; err != nil {
return 0, err
}
@ -918,6 +913,25 @@ func (c *Conn) Read(b []byte) (n int, err error) {
c.input = nil
}
// If a close-notify alert is waiting, read it so that
// we can return (n, EOF) instead of (n, nil), to signal
// to the HTTP response reading goroutine that the
// connection is now closed. This eliminates a race
// where the HTTP response reading goroutine would
// otherwise not observe the EOF until its next read,
// by which time a client goroutine might have already
// tried to reuse the HTTP connection for a new
// request.
// See https://codereview.appspot.com/76400046
// and http://golang.org/issue/3514
if ri := c.rawInput; ri != nil &&
n != 0 && err == nil &&
c.input == nil && len(ri.data) > 0 && recordType(ri.data[0]) == recordTypeAlert {
if recErr := c.readRecord(recordTypeApplicationData); recErr != nil {
err = recErr // will be io.EOF on closeNotify
}
}
if n != 0 || err != nil {
return n, err
}
@ -949,16 +963,19 @@ func (c *Conn) Close() error {
func (c *Conn) Handshake() error {
c.handshakeMutex.Lock()
defer c.handshakeMutex.Unlock()
if err := c.error(); err != nil {
if err := c.handshakeErr; err != nil {
return err
}
if c.handshakeComplete {
return nil
}
if c.isClient {
return c.clientHandshake()
c.handshakeErr = c.clientHandshake()
} else {
c.handshakeErr = c.serverHandshake()
}
return c.serverHandshake()
return c.handshakeErr
}
// ConnectionState returns basic TLS details about the connection.
@ -969,6 +986,7 @@ func (c *Conn) ConnectionState() ConnectionState {
var state ConnectionState
state.HandshakeComplete = c.handshakeComplete
if c.handshakeComplete {
state.Version = c.vers
state.NegotiatedProtocol = c.clientProtocol
state.DidResume = c.didResume
state.NegotiatedProtocolIsMutual = !c.clientProtocolFallback

View File

@ -58,12 +58,6 @@ func main() {
notAfter := notBefore.Add(*validFor)
// end of ASN.1 time
endOfTime := time.Date(2049, 12, 31, 23, 59, 59, 0, time.UTC)
if notAfter.After(endOfTime) {
notAfter = endOfTime
}
serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 128)
serialNumber, err := rand.Int(rand.Reader, serialNumberLimit)
if err != nil {

View File

@ -33,13 +33,17 @@ func (c *Conn) clientHandshake() error {
c.config = defaultConfig()
}
if len(c.config.ServerName) == 0 && !c.config.InsecureSkipVerify {
return errors.New("tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config")
}
hello := &clientHelloMsg{
vers: c.config.maxVersion(),
compressionMethods: []uint8{compressionNone},
random: make([]byte, 32),
ocspStapling: true,
serverName: c.config.ServerName,
supportedCurves: []uint16{curveP256, curveP384, curveP521},
supportedCurves: c.config.curvePreferences(),
supportedPoints: []uint8{pointFormatUncompressed},
nextProtoNeg: len(c.config.NextProtos) > 0,
secureRenegotiation: true,
@ -497,7 +501,7 @@ func (hs *clientHandshakeState) readFinished() error {
c := hs.c
c.readRecord(recordTypeChangeCipherSpec)
if err := c.error(); err != nil {
if err := c.in.error(); err != nil {
return err
}

View File

@ -16,7 +16,7 @@ type clientHelloMsg struct {
nextProtoNeg bool
serverName string
ocspStapling bool
supportedCurves []uint16
supportedCurves []CurveID
supportedPoints []uint8
ticketSupported bool
sessionTicket []uint8
@ -39,7 +39,7 @@ func (m *clientHelloMsg) equal(i interface{}) bool {
m.nextProtoNeg == m1.nextProtoNeg &&
m.serverName == m1.serverName &&
m.ocspStapling == m1.ocspStapling &&
eqUint16s(m.supportedCurves, m1.supportedCurves) &&
eqCurveIDs(m.supportedCurves, m1.supportedCurves) &&
bytes.Equal(m.supportedPoints, m1.supportedPoints) &&
m.ticketSupported == m1.ticketSupported &&
bytes.Equal(m.sessionTicket, m1.sessionTicket) &&
@ -357,10 +357,10 @@ func (m *clientHelloMsg) unmarshal(data []byte) bool {
return false
}
numCurves := l / 2
m.supportedCurves = make([]uint16, numCurves)
m.supportedCurves = make([]CurveID, numCurves)
d := data[2:]
for i := 0; i < numCurves; i++ {
m.supportedCurves[i] = uint16(d[0])<<8 | uint16(d[1])
m.supportedCurves[i] = CurveID(d[0])<<8 | CurveID(d[1])
d = d[2:]
}
case extensionSupportedPoints:
@ -1294,6 +1294,18 @@ func eqUint16s(x, y []uint16) bool {
return true
}
func eqCurveIDs(x, y []CurveID) bool {
if len(x) != len(y) {
return false
}
for i, v := range x {
if y[i] != v {
return false
}
}
return true
}
func eqStrings(x, y []string) bool {
if len(x) != len(y) {
return false

View File

@ -125,9 +125,9 @@ func (*clientHelloMsg) Generate(rand *rand.Rand, size int) reflect.Value {
}
m.ocspStapling = rand.Intn(10) > 5
m.supportedPoints = randomBytes(rand.Intn(5)+1, rand)
m.supportedCurves = make([]uint16, rand.Intn(5)+1)
m.supportedCurves = make([]CurveID, rand.Intn(5)+1)
for i := range m.supportedCurves {
m.supportedCurves[i] = uint16(rand.Intn(30000))
m.supportedCurves[i] = CurveID(rand.Intn(30000))
}
if rand.Intn(10) > 5 {
m.ticketSupported = true

View File

@ -117,12 +117,14 @@ func (hs *serverHandshakeState) readClientHello() (isResume bool, err error) {
hs.hello = new(serverHelloMsg)
supportedCurve := false
preferredCurves := config.curvePreferences()
Curves:
for _, curve := range hs.clientHello.supportedCurves {
switch curve {
case curveP256, curveP384, curveP521:
supportedCurve = true
break Curves
for _, supported := range preferredCurves {
if supported == curve {
supportedCurve = true
break Curves
}
}
}
@ -468,7 +470,7 @@ func (hs *serverHandshakeState) readFinished() error {
c := hs.c
c.readRecord(recordTypeChangeCipherSpec)
if err := c.error(); err != nil {
if err := c.in.error(); err != nil {
return err
}

View File

@ -121,7 +121,7 @@ func TestTLS12OnlyCipherSuites(t *testing.T) {
TLS_RSA_WITH_RC4_128_SHA,
},
compressionMethods: []uint8{compressionNone},
supportedCurves: []uint16{curveP256, curveP384, curveP521},
supportedCurves: []CurveID{CurveP256, CurveP384, CurveP521},
supportedPoints: []uint8{pointFormatUncompressed},
}
@ -195,6 +195,23 @@ func testHandshake(clientConfig, serverConfig *Config) (state ConnectionState, e
return
}
func TestVersion(t *testing.T) {
serverConfig := &Config{
Certificates: testConfig.Certificates,
MaxVersion: VersionTLS11,
}
clientConfig := &Config{
InsecureSkipVerify: true,
}
state, err := testHandshake(clientConfig, serverConfig)
if err != nil {
t.Fatalf("handshake failed: %s", err)
}
if state.Version != VersionTLS11 {
t.Fatalf("Incorrect version %x, should be %x", state.Version, VersionTLS11)
}
}
func TestCipherSuitePreference(t *testing.T) {
serverConfig := &Config{
CipherSuites: []uint16{TLS_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_RC4_128_SHA},

View File

@ -141,7 +141,7 @@ func hashForServerKeyExchange(sigType, hashFunc uint8, version uint16, slices ..
// pickTLS12HashForSignature returns a TLS 1.2 hash identifier for signing a
// ServerKeyExchange given the signature type being used and the client's
// advertized list of supported signature and hash combinations.
// advertised list of supported signature and hash combinations.
func pickTLS12HashForSignature(sigType uint8, clientSignatureAndHashes []signatureAndHash) (uint8, error) {
if len(clientSignatureAndHashes) == 0 {
// If the client didn't specify any signature_algorithms
@ -163,6 +163,20 @@ func pickTLS12HashForSignature(sigType uint8, clientSignatureAndHashes []signatu
return 0, errors.New("tls: client doesn't support any common hash functions")
}
func curveForCurveID(id CurveID) (elliptic.Curve, bool) {
switch id {
case CurveP256:
return elliptic.P256(), true
case CurveP384:
return elliptic.P384(), true
case CurveP521:
return elliptic.P521(), true
default:
return nil, false
}
}
// ecdheRSAKeyAgreement implements a TLS key agreement where the server
// generates a ephemeral EC public/private key pair and signs it. The
// pre-master secret is then calculated using ECDH. The signature may
@ -176,23 +190,16 @@ type ecdheKeyAgreement struct {
}
func (ka *ecdheKeyAgreement) generateServerKeyExchange(config *Config, cert *Certificate, clientHello *clientHelloMsg, hello *serverHelloMsg) (*serverKeyExchangeMsg, error) {
var curveid uint16
var curveid CurveID
preferredCurves := config.curvePreferences()
Curve:
for _, c := range clientHello.supportedCurves {
switch c {
case curveP256:
ka.curve = elliptic.P256()
curveid = c
break Curve
case curveP384:
ka.curve = elliptic.P384()
curveid = c
break Curve
case curveP521:
ka.curve = elliptic.P521()
curveid = c
break Curve
NextCandidate:
for _, candidate := range preferredCurves {
for _, c := range clientHello.supportedCurves {
if candidate == c {
curveid = c
break NextCandidate
}
}
}
@ -200,6 +207,11 @@ Curve:
return nil, errors.New("tls: no supported elliptic curves offered")
}
var ok bool
if ka.curve, ok = curveForCurveID(curveid); !ok {
return nil, errors.New("tls: preferredCurves includes unsupported curve")
}
var x, y *big.Int
var err error
ka.privateKey, x, y, err = elliptic.GenerateKey(ka.curve, config.rand())
@ -293,19 +305,13 @@ func (ka *ecdheKeyAgreement) processServerKeyExchange(config *Config, clientHell
return errServerKeyExchange
}
if skx.key[0] != 3 { // named curve
return errors.New("server selected unsupported curve")
return errors.New("tls: server selected unsupported curve")
}
curveid := uint16(skx.key[1])<<8 | uint16(skx.key[2])
curveid := CurveID(skx.key[1])<<8 | CurveID(skx.key[2])
switch curveid {
case curveP256:
ka.curve = elliptic.P256()
case curveP384:
ka.curve = elliptic.P384()
case curveP521:
ka.curve = elliptic.P521()
default:
return errors.New("server selected unsupported curve")
var ok bool
if ka.curve, ok = curveForCurveID(curveid); !ok {
return errors.New("tls: server selected unsupported curve")
}
publicLen := int(skx.key[3])

View File

@ -8,11 +8,11 @@
00000060 19 00 0b 00 02 01 00 00 0d 00 0a 00 08 04 01 04 |................|
00000070 03 02 01 02 03 ff 01 00 01 00 |..........|
>>> Flow 2 (server to client)
00000000 16 03 01 00 59 02 00 00 55 03 01 52 cc 57 59 e6 |....Y...U..R.WY.|
00000010 12 4c 15 38 e6 b7 2c 9e b5 82 bb b5 9d f5 71 4a |.L.8..,.......qJ|
00000020 66 21 30 c2 44 69 ec 7c 8a 37 8b 20 1e 9c 78 3a |f!0.Di.|.7. ..x:|
00000030 bf d0 e0 37 6b 88 5c 8f 90 a8 92 c3 f6 b7 ad fc |...7k.\.........|
00000040 56 4a 50 34 ce 8f 08 e5 08 40 71 9b c0 09 00 00 |VJP4.....@q.....|
00000000 16 03 01 00 59 02 00 00 55 03 01 53 04 f1 03 46 |....Y...U..S...F|
00000010 0f 84 c4 cb 55 ef 85 f6 4f d7 0e e1 4b 10 d4 bb |....U...O...K...|
00000020 35 87 2d f3 d7 18 ec 4e 95 4b f4 20 28 82 94 d9 |5.-....N.K. (...|
00000030 df c4 fc ee 21 23 c1 e2 76 3e 7b 09 af 2c 39 23 |....!#..v>{..,9#|
00000040 f8 46 6c 31 88 42 f0 79 de 37 2b 00 c0 09 00 00 |.Fl1.B.y.7+.....|
00000050 0d ff 01 00 01 00 00 0b 00 04 03 00 01 02 16 03 |................|
00000060 01 02 0e 0b 00 02 0a 00 02 07 00 02 04 30 82 02 |.............0..|
00000070 00 30 82 01 62 02 09 00 b8 bf 2d 47 a0 d2 eb f4 |.0..b.....-G....|
@ -47,20 +47,20 @@
00000240 13 83 0d 94 06 bb d4 37 7a f6 ec 7a c9 86 2e dd |.......7z..z....|
00000250 d7 11 69 7f 85 7c 56 de fb 31 78 2b e4 c7 78 0d |..i..|V..1x+..x.|
00000260 ae cb be 9e 4e 36 24 31 7b 6a 0f 39 95 12 07 8f |....N6$1{j.9....|
00000270 2a 16 03 01 00 d5 0c 00 00 d1 03 00 17 41 04 00 |*............A..|
00000280 3d 87 12 2c c5 fd db 6e ab 0c 7c 54 85 fc d3 13 |=..,...n..|T....|
00000290 34 1e 13 83 2c 60 05 67 83 f0 3a cc c6 27 84 63 |4...,`.g..:..'.c|
000002a0 90 4e 25 26 0f 03 ca f3 ae 7e 44 c6 94 0d e4 1b |.N%&.....~D.....|
000002b0 4a 53 e2 d7 f0 5c 83 64 37 c0 0f d1 9e 86 de 00 |JS...\.d7.......|
000002c0 8a 30 81 87 02 41 4f 85 6d 11 af d1 27 9c de 21 |.0...AO.m...'..!|
000002d0 d7 e5 96 ad 4f 6a a1 5c 2b 63 22 0e 4f 22 77 16 |....Oj.\+c".O"w.|
000002e0 ec 6e db 38 1a df 28 4e ee 9e a4 c1 e7 d3 02 74 |.n.8..(N.......t|
000002f0 07 3f 58 7f 82 51 2d 9e 78 6b bd 28 77 20 c1 40 |.?X..Q-.xk.(w .@|
00000300 09 71 ba b9 23 c7 82 02 42 01 13 1b 64 c4 1f c6 |.q..#...B...d...|
00000310 1f f3 f4 51 8c 64 92 37 5e f0 5c 11 c9 ee 43 55 |...Q.d.7^.\...CU|
00000320 a0 83 52 8b d9 2d d1 22 2c 2e 2c e0 04 a6 59 b3 |..R..-.",.,...Y.|
00000330 f9 33 d8 e4 9a 0b 2b 95 c6 41 5d 60 a3 d1 9f 31 |.3....+..A]`...1|
00000340 14 5d a3 31 6e 70 f1 e7 35 5a f9 16 03 01 00 0e |.].1np..5Z......|
00000270 2a 16 03 01 00 d5 0c 00 00 d1 03 00 17 41 04 4f |*............A.O|
00000280 47 16 72 98 9e 9f 2e 8e 78 e9 0f fe 95 83 7b aa |G.r.....x.....{.|
00000290 e5 3d c0 7d cf 83 bd 22 0b fd 48 f1 a7 49 a5 7d |.=.}..."..H..I.}|
000002a0 8e 0c 83 7f e1 2d 71 03 cc 90 09 ab f7 35 81 48 |.....-q......5.H|
000002b0 a4 1e 7d 87 21 23 12 58 2c 47 f3 af c7 6c 71 00 |..}.!#.X,G...lq.|
000002c0 8a 30 81 87 02 42 00 b4 03 38 60 43 d9 32 ef 64 |.0...B...8`C.2.d|
000002d0 5a 9c 91 95 0d 10 21 53 c7 78 f8 bf 50 ed 13 5d |Z.....!S.x..P..]|
000002e0 c3 e7 71 d6 11 04 f1 e4 9d ce 17 99 8d 1a 87 1f |..q.............|
000002f0 cb dd f8 1b ae cd bc 4a 77 ab 7c 50 bf 73 c3 ea |.......Jw.|P.s..|
00000300 d6 df 88 56 f6 b1 03 83 02 41 66 3d fb 4e 7e af |...V.....Af=.N~.|
00000310 4e c1 60 fe 09 fa 7e 74 99 66 7f de b4 b2 74 89 |N.`...~t.f....t.|
00000320 1c a4 cf 74 1a 55 a5 be 74 f9 36 21 3d ae c8 c3 |...t.U..t.6!=...|
00000330 24 8e ad db a3 26 67 8f 98 27 e3 93 ee d9 5c fb |$....&g..'....\.|
00000340 85 82 e2 13 c3 50 ab e9 f6 39 2b 16 03 01 00 0e |.....P...9+.....|
00000350 0d 00 00 06 03 01 02 40 00 00 0e 00 00 00 |.......@......|
>>> Flow 3 (client to server)
00000000 16 03 01 02 0a 0b 00 02 06 00 02 03 00 02 00 30 |...............0|
@ -108,22 +108,22 @@
000002a0 85 6a 42 9b f9 7e 7e 31 c2 e5 bd 66 02 41 4b 49 |.jB..~~1...f.AKI|
000002b0 c6 cd 02 e3 83 f7 03 50 18 6d b4 c9 51 02 c0 ab |.......P.m..Q...|
000002c0 87 bc e0 3e 4b 89 53 3a e2 65 89 97 02 c1 87 f1 |...>K.S:.e......|
000002d0 67 d0 f2 06 28 4e 51 4e fd f0 01 c1 1f 1d 1c 32 |g...(NQN.......2|
000002e0 1f 91 5d 06 f5 44 1b a0 1b 61 43 6b de 81 bd 14 |..]..D...aCk....|
000002f0 03 01 00 01 01 16 03 01 00 30 fe bb 82 52 2d 8a |.........0...R-.|
00000300 81 87 ba 2c 18 5b 93 07 78 30 85 f3 5f 4f df 3f |...,.[..x0.._O.?|
00000310 1a fc 01 b9 a5 32 99 d3 40 0b ef c5 b8 32 f4 7e |.....2..@....2.~|
00000320 d2 93 0f 19 24 87 c5 18 e2 8b |....$.....|
000002d0 67 d0 f2 06 28 4e 51 4e fd f0 01 be 41 3c 52 42 |g...(NQN....A<RB|
000002e0 10 44 73 88 3e 44 24 bb 2e 77 01 77 6f a8 ac 14 |.Ds.>D$..w.wo...|
000002f0 03 01 00 01 01 16 03 01 00 30 a3 da 45 22 96 83 |.........0..E"..|
00000300 59 90 e9 6b ec 3b 77 50 05 89 e6 0c 61 d1 1d 2b |Y..k.;wP....a..+|
00000310 da d4 49 bf b9 c6 dd ad c3 9c 82 bd 53 62 e8 57 |..I.........Sb.W|
00000320 a4 6a e7 9f b1 d5 39 77 88 6d |.j....9w.m|
>>> Flow 4 (server to client)
00000000 14 03 01 00 01 01 16 03 01 00 30 84 a0 90 cb 8b |..........0.....|
00000010 43 ad 66 06 ef f1 4b 5c 85 cc 4e 12 60 44 b4 be |C.f...K\..N.`D..|
00000020 ed 94 23 69 bf 7a cc e9 a7 17 db 9a ec d5 9b 15 |..#i.z..........|
00000030 92 62 5e bb ac db 78 50 d1 b2 0c |.b^...xP...|
00000000 14 03 01 00 01 01 16 03 01 00 30 a4 45 dd 99 df |..........0.E...|
00000010 66 ae f5 c7 bd 1a eb 6a ff ac a6 38 14 81 b5 07 |f......j...8....|
00000020 86 24 80 f1 09 59 ad 33 3d 43 ed 9e 43 b1 1e 9f |.$...Y.3=C..C...|
00000030 bd 8c b3 e0 41 83 a1 34 91 c5 a1 |....A..4...|
>>> Flow 5 (client to server)
00000000 17 03 01 00 20 b4 fd 9e 0a 69 49 16 72 52 8b 81 |.... ....iI.rR..|
00000010 50 87 07 77 d4 9a 07 06 88 e0 43 43 32 a0 7c f9 |P..w......CC2.|.|
00000020 13 88 3f 87 36 17 03 01 00 20 6e 96 f6 4c f8 8d |..?.6.... n..L..|
00000030 1b 15 ff 3e 7c 5e fc f0 81 6e 5e 26 3c 42 96 dc |...>|^...n^&<B..|
00000040 69 79 b8 73 9c 1d eb 31 5d 94 15 03 01 00 20 b4 |iy.s...1]..... .|
00000050 68 2c 4d 74 ed a5 bc f4 e3 56 bd 3e 19 78 fc 8a |h,Mt.....V.>.x..|
00000060 1e f0 4c 7e f9 11 de e1 15 38 9b ed 6f 9b 34 |..L~.....8..o.4|
00000000 17 03 01 00 20 ae e3 ae 7f 2d e3 a2 f7 1b 4e 69 |.... ....-....Ni|
00000010 cb 18 c6 68 42 f8 de 61 92 4c fa d6 19 7c 8c 09 |...hB..a.L...|..|
00000020 82 e2 f2 32 19 17 03 01 00 20 2a 77 65 1f c1 fd |...2..... *we...|
00000030 5e 37 b7 15 f6 1f 4c 7f 5f 89 52 b4 32 27 4d 17 |^7....L._.R.2'M.|
00000040 33 c6 e8 50 ac 70 c8 b9 2d 0a 15 03 01 00 20 e0 |3..P.p..-..... .|
00000050 cb ce 07 80 55 a0 46 ca a7 25 4c 5f 9d 7c 73 37 |....U.F..%L_.|s7|
00000060 de 72 6d 36 a8 e4 be fd 2a e7 f8 8d 14 80 b7 |.rm6....*......|

View File

@ -8,11 +8,11 @@
00000060 19 00 0b 00 02 01 00 00 0d 00 0a 00 08 04 01 04 |................|
00000070 03 02 01 02 03 ff 01 00 01 00 |..........|
>>> Flow 2 (server to client)
00000000 16 03 01 00 51 02 00 00 4d 03 01 52 cc 57 59 78 |....Q...M..R.WYx|
00000010 63 f8 d6 ea 32 6f 22 7c 7b fb ab 48 c8 3b d9 ed |c...2o"|{..H.;..|
00000020 5b 01 e0 0a 36 d8 26 57 56 dd e4 20 ed c9 d8 e5 |[...6.&WV.. ....|
00000030 5c 2a 1b b6 d2 bd 32 5d 42 fe 4b d1 89 4c 1f b0 |\*....2]B.K..L..|
00000040 5d fc 1f d4 4a f3 ef 06 28 1a d3 09 00 05 00 00 |]...J...(.......|
00000000 16 03 01 00 51 02 00 00 4d 03 01 53 04 f1 02 ed |....Q...M..S....|
00000010 86 9c 56 84 5a d3 7d d7 f3 4e 6f 2c 69 0d f0 59 |..V.Z.}..No,i..Y|
00000020 a5 d1 de 2d 03 2f dd 63 c3 ab fa 20 30 d6 5a 24 |...-./.c... 0.Z$|
00000030 5c 31 67 36 8d 4c 43 e1 64 c4 8a 2c a5 fd 39 92 |\1g6.LC.d..,..9.|
00000040 c5 6f 58 47 a3 fe 63 14 98 92 11 90 00 05 00 00 |.oXG..c.........|
00000050 05 ff 01 00 01 00 16 03 01 02 be 0b 00 02 ba 00 |................|
00000060 02 b7 00 02 b4 30 82 02 b0 30 82 02 19 a0 03 02 |.....0...0......|
00000070 01 02 02 09 00 85 b0 bb a4 8a 7f b8 ca 30 0d 06 |.............0..|
@ -109,17 +109,17 @@
000002e0 85 6a 42 9b f9 7e 7e 31 c2 e5 bd 66 02 41 4b 49 |.jB..~~1...f.AKI|
000002f0 c6 cd 02 e3 83 f7 03 50 18 6d b4 c9 51 02 c0 ab |.......P.m..Q...|
00000300 87 bc e0 3e 4b 89 53 3a e2 65 89 97 02 c1 87 f1 |...>K.S:.e......|
00000310 67 d0 f2 06 28 4e 51 4e fd f0 01 65 a4 80 ad 7e |g...(NQN...e...~|
00000320 a3 bc 1d 1a 83 3a db 30 c7 67 96 cf e7 aa dc 14 |.....:.0.g......|
00000330 03 01 00 01 01 16 03 01 00 24 d9 38 91 04 a4 ac |.........$.8....|
00000340 eb d7 4c 7a c6 07 25 72 a0 f7 3f 6d 37 cc db 40 |..Lz..%r..?m7..@|
00000350 c0 26 9b be 03 55 2d 24 c5 b3 4f 6d 56 c4 |.&...U-$..OmV.|
00000310 67 d0 f2 06 28 4e 51 4e fd f0 01 47 e7 c9 d9 23 |g...(NQN...G...#|
00000320 21 6b 87 d2 55 e3 c9 f7 eb 86 d5 1e 50 df d5 14 |!k..U.......P...|
00000330 03 01 00 01 01 16 03 01 00 24 95 62 42 be 90 39 |.........$.bB..9|
00000340 68 ae f5 77 47 21 14 b9 ac ee 81 2d e3 9e c7 34 |h..wG!.....-...4|
00000350 3a 00 5c c9 12 1d c0 5a 7c e7 ef e0 cd fd |:.\....Z|.....|
>>> Flow 4 (server to client)
00000000 14 03 01 00 01 01 16 03 01 00 24 b8 8d b1 db 80 |..........$.....|
00000010 1d 26 9e 41 d0 48 40 0d 6a 94 e6 42 93 60 58 d1 |.&.A.H@.j..B.`X.|
00000020 b2 13 7c 6f ec 1c f5 2a 1e 82 14 6f 0f 13 a7 |..|o...*...o...|
00000000 14 03 01 00 01 01 16 03 01 00 24 ea 98 c0 fb 86 |..........$.....|
00000010 87 7a 2e e1 c7 68 61 3e 5b cc da 1f d6 7b ab 5a |.z...ha>[....{.Z|
00000020 a0 ae a2 cf d0 54 44 19 12 db 75 2b 8c 73 8c |.....TD...u+.s.|
>>> Flow 5 (client to server)
00000000 17 03 01 00 1a ea f3 99 a3 b1 7e 9a 29 ad 31 18 |..........~.).1.|
00000010 1b 5b 7c 71 ae 5b c6 ba 8e 8e 36 f6 ab 2c dd 15 |.[|q.[....6..,..|
00000020 03 01 00 16 82 cf f4 83 05 4c 86 e2 47 cc 6f 2c |.........L..G.o,|
00000030 6d 50 c6 09 3b fd a8 5e 12 3c |mP..;..^.<|
00000000 17 03 01 00 1a f3 28 77 31 33 4c b3 7c 4b 75 61 |......(w13L.|Kua|
00000010 38 69 6b ae c9 36 ab 2e 56 16 29 6a 9a 00 2f 15 |8ik..6..V.)j../.|
00000020 03 01 00 16 6b ed 68 18 ed ff 44 39 9b 4a e4 a2 |....k.h...D9.J..|
00000030 cd 79 ef 2a 3e 5a 4d b1 5d 56 |.y.*>ZM.]V|

View File

@ -8,11 +8,11 @@
00000060 19 00 0b 00 02 01 00 00 0d 00 0a 00 08 04 01 04 |................|
00000070 03 02 01 02 03 ff 01 00 01 00 |..........|
>>> Flow 2 (server to client)
00000000 16 03 01 00 59 02 00 00 55 03 01 52 cc 57 58 fc |....Y...U..R.WX.|
00000010 46 e4 45 fc 07 cb ec 16 cc ce 87 96 0e f6 d9 c7 |F.E.............|
00000020 49 2e ec 53 30 07 cd 01 1d 49 2e 20 2b bc 5c 11 |I..S0....I. +.\.|
00000030 90 55 88 3f ec e4 30 b3 58 e7 d2 82 32 15 dd b4 |.U.?..0.X...2...|
00000040 1f e2 4c 1d 08 f9 a0 8d 75 8b 63 c2 c0 09 00 00 |..L.....u.c.....|
00000000 16 03 01 00 59 02 00 00 55 03 01 53 04 f1 02 4f |....Y...U..S...O|
00000010 73 06 2d 72 41 36 a1 b2 d3 50 97 55 8c c5 f1 43 |s.-rA6...P.U...C|
00000020 37 1f 1a 2a fe 51 70 0b 2f 25 9e 20 50 61 86 80 |7..*.Qp./%. Pa..|
00000030 9a 9c 6d 6f c9 ea 5c ce 0c b7 7c ce e3 be d0 e5 |..mo..\...|.....|
00000040 be d0 c4 80 78 c3 c7 17 0c 2d 8e c8 c0 09 00 00 |....x....-......|
00000050 0d ff 01 00 01 00 00 0b 00 04 03 00 01 02 16 03 |................|
00000060 01 02 0e 0b 00 02 0a 00 02 07 00 02 04 30 82 02 |.............0..|
00000070 00 30 82 01 62 02 09 00 b8 bf 2d 47 a0 d2 eb f4 |.0..b.....-G....|
@ -47,21 +47,21 @@
00000240 13 83 0d 94 06 bb d4 37 7a f6 ec 7a c9 86 2e dd |.......7z..z....|
00000250 d7 11 69 7f 85 7c 56 de fb 31 78 2b e4 c7 78 0d |..i..|V..1x+..x.|
00000260 ae cb be 9e 4e 36 24 31 7b 6a 0f 39 95 12 07 8f |....N6$1{j.9....|
00000270 2a 16 03 01 00 d5 0c 00 00 d1 03 00 17 41 04 5e |*............A.^|
00000280 6d f1 9c b6 ec 5b c9 fc 16 b2 75 63 90 82 23 8f |m....[....uc..#.|
00000290 14 6f 53 b1 23 06 fa c7 b9 b4 d2 59 3d 4f 94 a2 |.oS.#......Y=O..|
000002a0 02 af 0a 1e 94 f7 4d 31 c1 b3 a7 c4 67 89 67 da |......M1....g.g.|
000002b0 71 de 5a 1d ca 79 b8 f3 9e 6a 42 f8 60 8b 2a 00 |q.Z..y...jB.`.*.|
000002c0 8a 30 81 87 02 42 00 85 32 00 54 ab af 7a 95 32 |.0...B..2.T..z.2|
000002d0 f9 c7 e3 34 23 ed 1c 5d 7b a2 78 bf f1 a3 3f 53 |...4#..]{.x...?S|
000002e0 ad c4 56 1f f6 98 9e 29 66 ef 52 21 80 d6 21 e7 |..V....)f.R!..!.|
000002f0 61 fd 75 90 37 ec 13 0a f4 c2 47 a4 a7 41 87 24 |a.u.7.....G..A.$|
00000300 0c c6 c0 09 f0 54 c4 df 02 41 30 3e a5 6c a2 5d |.....T...A0>.l.]|
00000310 76 66 fb a2 f5 2d ef ee 63 63 b4 9a db 84 23 db |vf...-..cc....#.|
00000320 e9 0d 5f 43 cc 6b ef 4a 7f a2 1d 6b 6c 7f 1f ba |.._C.k.J...kl...|
00000330 52 5f 6c 3f cc 77 54 ef 75 1f c2 1e da 6f d3 07 |R_l?.wT.u....o..|
00000340 23 7d 54 6d 40 88 0d 6e 72 90 8e 16 03 01 00 0e |#}Tm@..nr.......|
00000350 0d 00 00 06 03 01 02 40 00 00 0e 00 00 00 |.......@......|
00000270 2a 16 03 01 00 d6 0c 00 00 d2 03 00 17 41 04 b1 |*............A..|
00000280 0f 0f 4a 18 ed 25 32 b3 a3 19 ed 4b 61 b6 eb e4 |..J..%2....Ka...|
00000290 d3 f7 77 13 ac 9f 60 c7 8d 6d cb f1 ee 99 1a 71 |..w...`..m.....q|
000002a0 68 aa d3 a7 70 7f 38 d0 f6 23 ab 9a f6 dd 19 4f |h...p.8..#.....O|
000002b0 ce 10 ef d5 cf 64 85 2f 75 f6 20 06 4b f0 b9 00 |.....d./u. .K...|
000002c0 8b 30 81 88 02 42 01 00 b9 6b 80 91 59 0a 48 3f |.0...B...k..Y.H?|
000002d0 72 16 96 8f 21 2c 28 e4 6d 03 74 66 35 16 7d ec |r...!,(.m.tf5.}.|
000002e0 c7 08 9b 52 b5 05 d9 38 d8 b7 51 42 a7 4a 9f 9b |...R...8..QB.J..|
000002f0 1a 37 14 de c5 f5 16 96 83 81 58 d3 a6 1e ce 8a |.7........X.....|
00000300 bc 19 47 30 fe c5 85 55 02 42 01 4f 61 59 68 85 |..G0...U.B.OaYh.|
00000310 c7 64 23 22 f6 83 53 cc 58 38 25 b5 ce 74 c1 68 |.d#"..S.X8%..t.h|
00000320 9f 32 72 33 ea c9 62 e0 26 63 92 e3 5f 34 10 0b |.2r3..b.&c.._4..|
00000330 3c d5 83 fe 9f 67 69 ef 33 6b 19 c1 ec d6 6c 35 |<....gi.3k....l5|
00000340 89 33 17 d3 9d 93 e2 e5 6e 89 9a a1 16 03 01 00 |.3......n.......|
00000350 0e 0d 00 00 06 03 01 02 40 00 00 0e 00 00 00 |........@......|
>>> Flow 3 (client to server)
00000000 16 03 01 01 fb 0b 00 01 f7 00 01 f4 00 01 f1 30 |...............0|
00000010 82 01 ed 30 82 01 58 a0 03 02 01 02 02 01 00 30 |...0..X........0|
@ -100,29 +100,29 @@
00000220 a7 24 20 3e b2 56 1c ce 97 28 5e f8 2b 2d 4f 9e |.$ >.V...(^.+-O.|
00000230 f1 07 9f 6c 4b 5b 83 56 e2 32 42 e9 58 b6 d7 49 |...lK[.V.2B.X..I|
00000240 a6 b5 68 1a 41 03 56 6b dc 5a 89 16 03 01 00 86 |..h.A.Vk.Z......|
00000250 0f 00 00 82 00 80 0d cf 9a c6 5e 57 60 b9 a4 87 |..........^W`...|
00000260 ae 83 25 4a d5 af 02 69 4d a1 0b ac 0c 97 58 30 |..%J...iM.....X0|
00000270 cc 9d 45 6a eb e3 a5 b1 f9 63 9c 05 04 8f 55 b3 |..Ej.....c....U.|
00000280 5b 7c 5b f6 36 2d b1 89 84 21 ce a6 ce be 66 c6 |[|[.6-...!....f.|
00000290 06 4a 07 8a a0 13 ee f1 52 ea 65 71 b7 49 b7 49 |.J......R.eq.I.I|
000002a0 dc 0a d0 c6 c3 69 ef 67 97 6b d8 41 e0 d1 a4 66 |.....i.g.k.A...f|
000002b0 cc 3c ba 4a 63 46 af e1 7f 16 2e 73 5c 69 17 45 |.<.JcF.....s\i.E|
000002c0 b3 2d e2 7c 92 4c de 02 c6 97 d3 9c e0 d5 9c 22 |.-.|.L........."|
000002d0 30 21 11 5e 1c 1a 14 03 01 00 01 01 16 03 01 00 |0!.^............|
000002e0 30 db d7 9e 46 3e 5a 60 5d 21 22 34 ca 9a 3b 3c |0...F>Z`]!"4..;<|
000002f0 a6 41 12 42 b9 78 d7 39 4b 51 d0 d0 3e 7e ba 4c |.A.B.x.9KQ..>~.L|
00000300 7c 8d 4b 03 e5 fe 4c 59 a6 9f a1 5d 46 54 56 61 ||.K...LY...]FTVa|
00000310 33 |3|
00000250 0f 00 00 82 00 80 20 2c 5a 08 3a 00 33 50 19 b2 |...... ,Z.:.3P..|
00000260 0f ba 6c 76 7f 5c 92 e2 78 55 3e 32 32 bb 33 bc |..lv.\..xU>22.3.|
00000270 ab a9 34 e0 83 cf 82 cd 9e 6b 3f 9d e6 49 61 29 |..4......k?..Ia)|
00000280 8b b4 ed e8 12 cd a9 52 86 11 48 64 08 61 72 8d |.......R..Hd.ar.|
00000290 d6 6a ac 42 cc e4 07 5f 08 56 9f 2f c5 35 d3 9b |.j.B..._.V./.5..|
000002a0 e9 0d 91 82 c0 e9 bb 9f a9 8f df 96 85 08 9a 69 |...............i|
000002b0 a4 93 b3 72 37 ba f9 b1 a4 0b b0 9f 43 6a 15 ec |...r7.......Cj..|
000002c0 79 b8 fd 9c 1f 5f 0d 2c 56 33 c7 15 d5 4a b7 82 |y...._.,V3...J..|
000002d0 ea 44 80 20 c5 80 14 03 01 00 01 01 16 03 01 00 |.D. ............|
000002e0 30 c9 c0 7c d7 57 d3 00 ab 87 eb 78 56 6b a1 69 |0..|.W.....xVk.i|
000002f0 1d fa ec ae 38 f3 ef 5d 49 19 0d 4b f0 73 63 af |....8..]I..K.sc.|
00000300 89 b6 cb 76 cf fb b9 c1 99 98 06 0a 54 67 a0 6e |...v........Tg.n|
00000310 e7 |.|
>>> Flow 4 (server to client)
00000000 14 03 01 00 01 01 16 03 01 00 30 72 c2 59 5a f3 |..........0r.YZ.|
00000010 6f db 45 d0 4b 8c b9 49 25 25 cd eb 00 c7 99 6c |o.E.K..I%%.....l|
00000020 a7 4d 5a 4c f3 05 7d b0 fb 97 1a 40 0d 42 ca ad |.MZL..}....@.B..|
00000030 df 57 6c 47 40 13 49 47 09 7c 2e |.WlG@.IG.|.|
00000000 14 03 01 00 01 01 16 03 01 00 30 20 db fd ed ed |..........0 ....|
00000010 7c d5 bf 8f 06 3b 86 1b c1 60 7d a4 74 e9 a6 c9 ||....;...`}.t...|
00000020 f5 7c c7 f4 65 91 06 d5 53 88 d7 57 a4 22 b6 1f |.|..e...S..W."..|
00000030 f1 02 e9 79 36 e6 a1 22 51 3a 4c |...y6.."Q:L|
>>> Flow 5 (client to server)
00000000 17 03 01 00 20 c5 99 ba cc 39 bb db 07 27 3c 05 |.... ....9...'<.|
00000010 fb 79 ce bd ec 8c 67 20 c8 46 3b ad bf 8c 66 fc |.y....g .F;...f.|
00000020 55 de 73 0f 71 17 03 01 00 20 7b 3e 2b 60 c0 df |U.s.q.... {>+`..|
00000030 ca b1 c4 19 28 de 3e 8e 20 8b 4a 4a 07 52 5f 8c |....(.>. .JJ.R_.|
00000040 1b 4f 54 15 69 31 f7 46 03 94 15 03 01 00 20 fc |.OT.i1.F...... .|
00000050 b9 06 b4 6d 60 28 3f 4f b2 9a e8 1c 74 d3 15 a6 |...m`(?O....t...|
00000060 7b 49 85 d0 2f 83 bf 4d 7f 60 6e 18 bf c7 34 |{I../..M.`n...4|
00000000 17 03 01 00 20 00 66 51 6a 14 ca ea e2 21 48 74 |.... .fQj....!Ht|
00000010 c4 c1 6e b9 8b 23 af 7c 33 c9 00 f8 0b ec ab 35 |..n..#.|3......5|
00000020 e7 42 0a d1 ae 17 03 01 00 20 00 1c 6d 60 75 5d |.B....... ..m`u]|
00000030 b3 fb 40 2e e0 b7 0d 48 f4 87 ac d4 bf ea 01 0d |..@....H........|
00000040 fe 10 0d 05 04 43 6b 19 ed f2 15 03 01 00 20 f8 |.....Ck....... .|
00000050 03 ac 62 4b 1f db 2e d2 4e 00 c3 a4 57 3c 0a 62 |..bK....N...W<.b|
00000060 05 a0 ef bd 2b 9b 9a 63 27 72 d7 d8 f1 8d 84 |....+..c'r.....|

View File

@ -8,11 +8,11 @@
00000060 19 00 0b 00 02 01 00 00 0d 00 0a 00 08 04 01 04 |................|
00000070 03 02 01 02 03 ff 01 00 01 00 |..........|
>>> Flow 2 (server to client)
00000000 16 03 01 00 51 02 00 00 4d 03 01 52 cc 57 58 bd |....Q...M..R.WX.|
00000010 25 74 73 5e 31 99 73 f1 c6 a1 9b f0 07 09 97 d7 |%ts^1.s.........|
00000020 b6 b9 65 a3 08 16 0b 4c 4a 06 00 20 ef 0b 97 cb |..e....LJ.. ....|
00000030 3c cf 05 b6 fe 62 d7 15 29 cf c8 56 e0 7e d7 92 |<....b..)..V.~..|
00000040 11 86 86 49 a0 b1 12 2f dc 15 f7 67 00 05 00 00 |...I.../...g....|
00000000 16 03 01 00 51 02 00 00 4d 03 01 53 04 f1 02 73 |....Q...M..S...s|
00000010 ee 5f 70 a4 aa 0d be d7 46 a3 25 3f e3 5d ef 7b |._p.....F.%?.].{|
00000020 73 49 7c b6 82 4d 99 2f 31 fc 8b 20 2d a3 33 7c |sI|..M./1.. -.3||
00000030 a5 c3 85 86 ba 61 4d 05 b0 5e d3 5e 88 6e c3 4b |.....aM..^.^.n.K|
00000040 95 d3 e9 67 f1 96 24 58 7a 6f e6 c5 00 05 00 00 |...g..$Xzo......|
00000050 05 ff 01 00 01 00 16 03 01 02 be 0b 00 02 ba 00 |................|
00000060 02 b7 00 02 b4 30 82 02 b0 30 82 02 19 a0 03 02 |.....0...0......|
00000070 01 02 02 09 00 85 b0 bb a4 8a 7f b8 ca 30 0d 06 |.............0..|
@ -101,24 +101,24 @@
00000260 e6 bd 77 82 6f 23 b6 e0 bd a2 92 b7 3a ac e8 56 |..w.o#......:..V|
00000270 f1 af 54 5e 46 87 e9 3b 33 e7 b8 28 b7 d6 c8 90 |..T^F..;3..(....|
00000280 35 d4 1c 43 d1 30 6f 55 4e 0a 70 16 03 01 00 86 |5..C.0oUN.p.....|
00000290 0f 00 00 82 00 80 41 42 bb be 9d a4 d3 e9 24 f2 |......AB......$.|
000002a0 6c 7d b0 68 10 7a 88 e3 41 5d 24 f9 b2 a6 4c 31 |l}.h.z..A]$...L1|
000002b0 2b 90 51 49 65 3d d4 4b 1f 69 93 91 c0 a2 ec 2c |+.QIe=.K.i.....,|
000002c0 d0 48 e1 64 7f ef 8b da be 8c 0a 19 8b ff c7 37 |.H.d...........7|
000002d0 3d b8 8c 6d 2f 28 bd ba 96 6e c5 ed fa 29 c5 42 |=..m/(...n...).B|
000002e0 f2 24 b9 b5 55 1e 12 46 a5 bb 7c 41 2a b0 02 44 |.$..U..F..|A*..D|
000002f0 68 89 e9 92 e3 ad 50 44 f1 18 e7 e4 ee 2c 74 40 |h.....PD.....,t@|
00000300 82 39 a3 cf 30 54 fb 53 42 f1 18 28 8a f4 ef 65 |.9..0T.SB..(...e|
00000310 f2 33 6a e7 2a 48 14 03 01 00 01 01 16 03 01 00 |.3j.*H..........|
00000320 24 d8 a8 6d 1c 31 f7 cc 06 57 ef cf 7e 9b ac d3 |$..m.1...W..~...|
00000330 6b 50 b2 d8 c6 41 a2 c8 a6 f5 53 b3 d4 af e8 71 |kP...A....S....q|
00000340 88 9e 7e d9 57 |..~.W|
00000290 0f 00 00 82 00 80 0f 4c d2 b2 f0 94 6d 61 d1 2c |.......L....ma.,|
000002a0 db 6f 79 03 bd 40 b2 d2 1d 61 ef 83 1b 4a 0c 7b |.oy..@...a...J.{|
000002b0 c5 73 1e 1a 81 e7 67 0a d6 aa 2d 04 04 cc 0e 4b |.s....g...-....K|
000002c0 2e da 96 7f 15 6c 05 ee c4 53 7e 33 89 28 7d db |.....l...S~3.(}.|
000002d0 a1 77 43 ba a3 51 a9 1c b9 f5 ec 9a 8d eb 2c 46 |.wC..Q........,F|
000002e0 5c 33 59 6b 16 af de f4 9b 80 76 a3 22 30 5d bb |\3Yk......v."0].|
000002f0 02 b9 77 96 8a db 36 9f 54 95 00 d8 58 e1 aa 04 |..w...6.T...X...|
00000300 98 c9 0c 32 ae 62 81 12 0c f6 1b 76 c6 58 a7 8c |...2.b.....v.X..|
00000310 0e d8 b7 8e ed 0f 14 03 01 00 01 01 16 03 01 00 |................|
00000320 24 1d c0 20 02 2d da 69 54 29 8c ff af 5c 56 a8 |$.. .-.iT)...\V.|
00000330 eb d0 09 95 29 8f 52 8c e2 7b 9f 36 3e 47 a0 33 |....).R..{.6>G.3|
00000340 2e 63 a2 24 93 |.c.$.|
>>> Flow 4 (server to client)
00000000 14 03 01 00 01 01 16 03 01 00 24 71 90 c8 76 87 |..........$q..v.|
00000010 7f 07 da de 41 93 59 f4 e9 64 73 49 d3 15 b0 7d |....A.Y..dsI...}|
00000020 d7 86 06 85 62 71 9f 57 db 1a 81 82 ed 9b df |....bq.W.......|
00000000 14 03 01 00 01 01 16 03 01 00 24 99 e8 fb 65 f4 |..........$...e.|
00000010 95 ae 8b 71 cc 5d a4 95 a7 27 98 fd 16 3f 7a 1a |...q.]...'...?z.|
00000020 b6 bd bf 0a 58 72 77 97 1f 8e b1 dd 4b 12 12 |....Xrw.....K..|
>>> Flow 5 (client to server)
00000000 17 03 01 00 1a 35 83 3e 0a 4d 7b 58 4d 6b 9e d7 |.....5.>.M{XMk..|
00000010 77 32 dd b0 93 25 d1 fc e2 08 ad 2c 91 fd ce 15 |w2...%.....,....|
00000020 03 01 00 16 56 9c d9 6e 45 4c 95 8a 2d 75 7e 52 |....V..nEL..-u~R|
00000030 0a 75 0a f0 a1 52 91 c4 d2 b4 |.u...R....|
00000000 17 03 01 00 1a 42 70 c0 89 78 12 5c 91 7e 88 2d |.....Bp..x.\.~.-|
00000010 2f 8f be f2 f2 12 9d 81 ae 78 08 38 5e 6d 1b 15 |/........x.8^m..|
00000020 03 01 00 16 1a 64 b1 6f 8a ff d3 63 6a c7 b8 95 |.....d.o...cj...|
00000030 3d b0 87 bc 62 e9 88 5b 26 bd |=...b..[&.|

View File

@ -8,11 +8,11 @@
00000060 19 00 0b 00 02 01 00 00 0d 00 0a 00 08 04 01 04 |................|
00000070 03 02 01 02 03 ff 01 00 01 00 |..........|
>>> Flow 2 (server to client)
00000000 16 03 01 00 59 02 00 00 55 03 01 52 cc 57 58 a5 |....Y...U..R.WX.|
00000010 0d f3 9c e1 2f 44 99 dc f2 26 bc c2 44 4a 0f ab |..../D...&..DJ..|
00000020 6d 40 3b 5a 98 21 43 9e c0 39 03 20 03 46 6f c2 |m@;Z.!C..9. .Fo.|
00000030 bd 1f bc cc 2d b2 eb 22 91 23 df 20 28 c5 df ea |....-..".#. (...|
00000040 70 1a dc 07 b9 19 a1 d0 03 74 81 a8 c0 09 00 00 |p........t......|
00000000 16 03 01 00 59 02 00 00 55 03 01 53 04 f1 02 b2 |....Y...U..S....|
00000010 e0 f6 f6 b5 c9 5b 28 d0 5d 58 1b 6f 4e 2b 9d 05 |.....[(.]X.oN+..|
00000020 2a b9 b4 da 45 cf f3 10 b2 23 44 20 f8 4d 59 05 |*...E....#D .MY.|
00000030 ad 27 f2 a0 ee 7f ec cc 20 dc e7 a2 1b 07 b3 a5 |.'...... .......|
00000040 37 7e 61 3d d6 5c 03 cf cc f5 9b ca c0 09 00 00 |7~a=.\..........|
00000050 0d ff 01 00 01 00 00 0b 00 04 03 00 01 02 16 03 |................|
00000060 01 02 0e 0b 00 02 0a 00 02 07 00 02 04 30 82 02 |.............0..|
00000070 00 30 82 01 62 02 09 00 b8 bf 2d 47 a0 d2 eb f4 |.0..b.....-G....|
@ -47,20 +47,20 @@
00000240 13 83 0d 94 06 bb d4 37 7a f6 ec 7a c9 86 2e dd |.......7z..z....|
00000250 d7 11 69 7f 85 7c 56 de fb 31 78 2b e4 c7 78 0d |..i..|V..1x+..x.|
00000260 ae cb be 9e 4e 36 24 31 7b 6a 0f 39 95 12 07 8f |....N6$1{j.9....|
00000270 2a 16 03 01 00 d5 0c 00 00 d1 03 00 17 41 04 3c |*............A.<|
00000280 f8 33 94 22 ad fb 45 01 10 5c 8e b1 09 19 da de |.3."..E..\......|
00000290 21 0a 09 72 af 25 6f 2f 63 4d 8c 6b b6 a6 00 02 |!..r.%o/cM.k....|
000002a0 4d 6c fe 71 9e 45 74 13 db b5 7a a1 74 f0 16 35 |Ml.q.Et...z.t..5|
000002b0 50 fd ab 45 4c 64 9f 4d 80 a9 5c 85 ee 20 33 00 |P..ELd.M..\.. 3.|
000002c0 8a 30 81 87 02 42 01 73 bc ac 1a 30 11 5f 93 95 |.0...B.s...0._..|
000002d0 00 03 ba d6 f3 02 cd c9 a0 15 bf 9a 1a 59 24 1e |.............Y$.|
000002e0 3e 99 6b da b1 81 e1 eb da fd 8e 73 d6 94 1e ce |>.k........s....|
000002f0 04 cf 41 33 cd e5 8d f0 e2 50 b9 9b 49 df bc 51 |..A3.....P..I..Q|
00000300 2d 5c 12 5c b3 8b 81 73 02 41 3c bf 11 5c 10 be |-\.\...s.A<..\..|
00000310 f2 e7 59 2f 9a d7 0e 49 a3 17 7d 20 cc bc 17 1f |..Y/...I..} ....|
00000320 2d 1b 19 90 52 c5 16 08 b3 3c b0 33 9d 03 45 75 |-...R....<.3..Eu|
00000330 0c 3f ac 7b 0b b2 69 f4 a5 7c fc 49 a6 54 55 84 |.?.{..i..|.I.TU.|
00000340 2f 19 f1 de 1b 92 3d fb 68 5d ea 16 03 01 00 04 |/.....=.h]......|
00000270 2a 16 03 01 00 d5 0c 00 00 d1 03 00 17 41 04 da |*............A..|
00000280 5a fd 09 e5 d6 c0 70 41 5e 3a 87 eb df 0c ad 90 |Z.....pA^:......|
00000290 22 8a 2f 90 81 0c 24 00 68 92 f3 d5 95 2f 93 43 |"./...$.h..../.C|
000002a0 e9 58 2d 18 28 62 ee 33 5b 21 2e 49 87 21 4d 32 |.X-.(b.3[!.I.!M2|
000002b0 32 19 b3 ba fe 2d 9a 85 12 0e a1 77 08 06 75 00 |2....-.....w..u.|
000002c0 8a 30 81 87 02 42 01 91 14 fc 68 74 95 10 4b d4 |.0...B....ht..K.|
000002d0 67 60 12 46 bb b0 f6 98 77 a3 41 b8 01 5c 49 54 |g`.F....w.A..\IT|
000002e0 9e 3e 81 e7 97 a3 b9 73 6e 15 74 67 be e5 d9 eb |.>.....sn.tg....|
000002f0 8b 87 c5 22 ab ab 58 28 4f d1 b6 80 94 1b f5 f7 |..."..X(O.......|
00000300 12 43 ef 0a c7 3e 1a 76 02 41 7a 00 49 cb 9f 3b |.C...>.v.Az.I..;|
00000310 91 6e 38 58 0a d3 d0 d1 ee 67 f0 b6 5d cd fa 23 |.n8X.....g..]..#|
00000320 b6 98 43 af 9c 71 90 1e 1d 50 a2 6e 61 5b f2 92 |..C..q...P.na[..|
00000330 b4 69 73 f2 3b 54 bf 1c 9d 05 19 97 e4 4e 41 9e |.is.;T.......NA.|
00000340 f2 9a 76 77 9a 86 43 1f 1f 30 a2 16 03 01 00 04 |..vw..C..0......|
00000350 0e 00 00 00 |....|
>>> Flow 3 (client to server)
00000000 16 03 01 00 46 10 00 00 42 41 04 1e 18 37 ef 0d |....F...BA...7..|
@ -68,20 +68,20 @@
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 01 00 01 |..h.A.Vk.Z......|
00000050 01 16 03 01 00 30 c7 cf 21 f8 0c 94 5b 11 ef ee |.....0..!...[...|
00000060 d0 d3 3a d5 ba 2d 19 8b 5b 53 68 94 f1 49 8b 19 |..:..-..[Sh..I..|
00000070 f3 80 d5 55 52 7d 72 af 38 73 35 df 6e 04 4b ca |...UR}r.8s5.n.K.|
00000080 64 b7 ff c3 e1 eb |d.....|
00000050 01 16 03 01 00 30 88 60 65 b2 d7 51 1f ad 96 56 |.....0.`e..Q...V|
00000060 4e 0a 20 eb b5 b0 1a dd 4c f6 1a cf d4 5c 47 c4 |N. .....L....\G.|
00000070 9c 7c a0 36 dd d1 1b 96 91 99 c0 a7 2d 9a 7c 42 |.|.6........-.|B|
00000080 51 d1 de 87 2b a4 |Q...+.|
>>> Flow 4 (server to client)
00000000 14 03 01 00 01 01 16 03 01 00 30 59 2c 4c 03 7f |..........0Y,L..|
00000010 aa a8 ca d8 2a b0 35 71 ea 3a 2b d4 b1 9f 13 f9 |....*.5q.:+.....|
00000020 c2 7b fb 21 52 15 73 e6 71 d4 65 8e 21 25 1a 63 |.{.!R.s.q.e.!%.c|
00000030 03 d3 a5 6b 17 0e e7 18 84 17 d8 |...k.......|
00000000 14 03 01 00 01 01 16 03 01 00 30 86 6c b5 94 69 |..........0.l..i|
00000010 2e e0 55 a2 4d a8 63 f2 5b 1f ae 34 21 c8 21 6a |..U.M.c.[..4!.!j|
00000020 00 b6 56 ed 4e 2a b0 ff 01 2f da ce a1 c0 41 03 |..V.N*.../....A.|
00000030 a9 1b 6e 2e e1 88 50 ba 62 14 88 |..n...P.b..|
>>> Flow 5 (client to server)
00000000 17 03 01 00 20 8d 73 59 92 ce 93 78 e6 63 cf 9d |.... .sY...x.c..|
00000010 bc 44 40 76 c7 66 3f 15 3a 0a 91 9b 94 49 ec cc |.D@v.f?.:....I..|
00000020 7c 1a 6c b2 85 17 03 01 00 20 2e 6a dd 85 be 12 ||.l...... .j....|
00000030 c1 45 e4 04 bf 46 70 19 12 d1 1a 28 f6 22 30 a2 |.E...Fp....(."0.|
00000040 fe 98 a8 11 c2 c4 19 46 c6 7e 15 03 01 00 20 a7 |.......F.~.... .|
00000050 71 3d 87 94 9d 6c c5 dd de 44 54 47 d5 06 37 82 |q=...l...DTG..7.|
00000060 36 e0 c2 e5 91 74 a8 88 28 2f 87 7d a1 a7 e3 |6....t..(/.}...|
00000000 17 03 01 00 20 a6 63 0a 2f a5 dc e1 fb cb 7b 1f |.... .c./.....{.|
00000010 f2 da 74 c3 ff e9 f5 8b 9c 5f 0c d3 f7 1f 44 e6 |..t......_....D.|
00000020 90 13 5c 48 50 17 03 01 00 20 c7 75 b5 ff bc 09 |..\HP.... .u....|
00000030 34 f2 45 db 0d 22 08 8e f1 35 cd b6 0f b0 eb 2a |4.E.."...5.....*|
00000040 b7 1a d0 8e 14 a4 54 84 f9 dc 15 03 01 00 20 e0 |......T....... .|
00000050 36 3d aa b3 a9 b4 20 23 ca 9e 8c 5d fc a8 c8 b7 |6=.... #...]....|
00000060 f5 c2 b6 d0 5a e2 ce a5 7b 68 a0 48 86 95 6a |....Z...{h.H..j|

View File

@ -8,11 +8,11 @@
00000060 19 00 0b 00 02 01 00 00 0d 00 0a 00 08 04 01 04 |................|
00000070 03 02 01 02 03 ff 01 00 01 00 |..........|
>>> Flow 2 (server to client)
00000000 16 03 01 00 59 02 00 00 55 03 01 52 cc 57 58 f3 |....Y...U..R.WX.|
00000010 e4 e3 02 40 35 40 24 91 0a 0b 54 1b 46 0d c1 46 |...@5@$...T.F..F|
00000020 7f 9c dd 08 ec 9c 63 73 13 cd e8 20 3c c2 72 a5 |......cs... <.r.|
00000030 8d 4e 66 14 83 b1 27 c9 51 7e a6 46 7c 38 e1 66 |.Nf...'.Q~.F|8.f|
00000040 3f f6 9c e2 8d e0 51 29 fc 76 ee d0 c0 13 00 00 |?.....Q).v......|
00000000 16 03 01 00 59 02 00 00 55 03 01 53 04 f1 02 21 |....Y...U..S...!|
00000010 67 b5 2b 34 fb 62 d7 36 4f cf 68 2e 29 39 d0 28 |g.+4.b.6O.h.)9.(|
00000020 3a 02 32 82 8f 95 de 62 d6 03 77 20 e6 98 56 cd |:.2....b..w ..V.|
00000030 96 24 d1 b9 4d eb 51 19 bb b7 71 f4 9c 29 32 d4 |.$..M.Q...q..)2.|
00000040 e5 c6 0a 54 e0 4a 20 29 3e bd 06 0d c0 13 00 00 |...T.J )>.......|
00000050 0d ff 01 00 01 00 00 0b 00 04 03 00 01 02 16 03 |................|
00000060 01 02 be 0b 00 02 ba 00 02 b7 00 02 b4 30 82 02 |.............0..|
00000070 b0 30 82 02 19 a0 03 02 01 02 02 09 00 85 b0 bb |.0..............|
@ -58,40 +58,40 @@
000002f0 5f 33 c4 b6 d8 c9 75 90 96 8c 0f 52 98 b5 cd 98 |_3....u....R....|
00000300 1f 89 20 5f f2 a0 1c a3 1b 96 94 dd a9 fd 57 e9 |.. _..........W.|
00000310 70 e8 26 6d 71 99 9b 26 6e 38 50 29 6c 90 a7 bd |p.&mq..&n8P)l...|
00000320 d9 16 03 01 00 cb 0c 00 00 c7 03 00 17 41 04 30 |.............A.0|
00000330 a3 31 3d 66 ce 80 2a fb 1d 11 66 f6 35 cb c9 d2 |.1=f..*...f.5...|
00000340 53 fd 18 37 84 75 7e 00 55 92 0c 6d e5 40 46 77 |S..7.u~.U..m.@Fw|
00000350 d8 17 d4 81 13 74 90 e0 7c 4b 58 25 65 99 8e 18 |.....t..|KX%e...|
00000360 9f d7 af e0 70 f8 c6 99 13 2d 0e 28 32 02 40 00 |....p....-.(2.@.|
00000370 80 b3 34 d4 4a d7 c1 8e 1d f6 23 ef 04 0c d6 bb |..4.J.....#.....|
00000380 40 8c 85 0f ce a6 8e d2 29 3d 81 0f 47 ce 59 dc |@.......)=..G.Y.|
00000390 dc 56 68 b1 11 af 98 3a 07 4b 7a d9 6e 08 c5 ff |.Vh....:.Kz.n...|
000003a0 b2 54 06 72 f3 d2 19 22 df ee 90 fc 8a 4d 76 c1 |.T.r...".....Mv.|
000003b0 c2 d4 af d7 77 82 79 3d 12 0f 9c 56 28 a6 43 ea |....w.y=...V(.C.|
000003c0 a3 71 c2 af bf 52 40 4a fa c7 3e d3 ae 8e 84 42 |.q...R@J..>....B|
000003d0 5f fd 9f a7 0f 94 8c fa 15 86 23 28 be 2b 3a 32 |_.........#(.+:2|
000003e0 cb e5 18 5c 2d d6 d9 94 5f a4 b7 05 d0 a0 ab aa |...\-..._.......|
000003f0 c3 16 03 01 00 04 0e 00 00 00 |..........|
00000320 d9 16 03 01 00 cb 0c 00 00 c7 03 00 17 41 04 05 |.............A..|
00000330 45 33 f8 4b e9 96 0e 4a fd ec 54 76 21 9b 24 8a |E3.K...J..Tv!.$.|
00000340 75 0b 80 84 c7 30 2b 22 f0 85 57 a4 a9 79 d6 f6 |u....0+"..W..y..|
00000350 6d 80 b0 71 d9 66 c9 6c dd 76 fc 32 d0 c6 bc 52 |m..q.f.l.v.2...R|
00000360 2f f1 c9 62 17 53 76 ec be a6 1c 93 f2 b4 5d 00 |/..b.Sv.......].|
00000370 80 72 d9 20 52 70 7c 03 b1 33 fa 51 23 cd 05 97 |.r. Rp|..3.Q#...|
00000380 6f d6 89 2f 8d 2e 3a 17 32 eb f2 ff 6b 39 70 5e |o../..:.2...k9p^|
00000390 21 41 8d 69 02 c8 9a 17 19 e4 48 9b 51 c3 7f 9b |!A.i......H.Q...|
000003a0 8d 4a 83 97 07 0e 30 f1 8b 6b e9 92 12 01 d6 96 |.J....0..k......|
000003b0 f2 1a a2 10 7f 59 87 16 1a fb 55 67 68 fc 78 c6 |.....Y....Ugh.x.|
000003c0 57 ac 05 dd f3 6f 77 84 eb ae b0 33 2d 19 2c ba |W....ow....3-.,.|
000003d0 b8 ae 9f 95 69 85 95 45 5e 37 f4 17 17 9b 03 c1 |....i..E^7......|
000003e0 50 b1 36 42 bd 60 5c 8b d8 b6 f3 c8 34 c8 9d 9d |P.6B.`\.....4...|
000003f0 75 16 03 01 00 04 0e 00 00 00 |u.........|
>>> Flow 3 (client to server)
00000000 16 03 01 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 01 00 01 |..h.A.Vk.Z......|
00000050 01 16 03 01 00 30 34 e6 9a 20 8c 33 d7 85 ae 83 |.....04.. .3....|
00000060 f1 8f 46 68 63 3f a3 23 88 f8 00 9b 01 a7 80 c6 |..Fhc?.#........|
00000070 8b 45 6e 5a c1 2f 62 5f 70 b6 20 1e 58 18 53 6b |.EnZ./b_p. .X.Sk|
00000080 e2 cb ce 2c 97 7c |...,.||
00000050 01 16 03 01 00 30 ca d1 1b 08 27 9b 44 e7 e9 b4 |.....0....'.D...|
00000060 90 16 4d 30 4e 65 5c 0d 47 ba 46 86 cf c9 80 e7 |..M0Ne\.G.F.....|
00000070 64 31 f5 a1 9e dc 39 15 d3 be 16 4f c7 90 b6 62 |d1....9....O...b|
00000080 5d 6d 7f 41 4e 3e |]m.AN>|
>>> Flow 4 (server to client)
00000000 14 03 01 00 01 01 16 03 01 00 30 ff 81 ba a6 cc |..........0.....|
00000010 c5 25 83 eb 65 99 39 4d 19 39 c1 8c cf b5 30 58 |.%..e.9M.9....0X|
00000020 aa 6f e1 f4 f7 da 88 14 39 c0 1b 5a f3 05 bd 8c |.o......9..Z....|
00000030 6b af 52 32 0f 1e 87 0c 7a 39 3a |k.R2....z9:|
00000000 14 03 01 00 01 01 16 03 01 00 30 98 81 24 8e cd |..........0..$..|
00000010 b6 48 2f 80 de 8e 24 3c cd 02 67 80 34 97 d7 92 |.H/...$<..g.4...|
00000020 78 c2 44 3d 5d 05 eb 88 76 79 46 7a c3 fa ca 73 |x.D=]...vyFz...s|
00000030 45 82 ad c1 81 00 ca 40 c1 2f 13 |E......@./.|
>>> Flow 5 (client to server)
00000000 17 03 01 00 20 72 b0 d7 a5 88 02 64 29 65 4b d5 |.... r.....d)eK.|
00000010 f7 0b 74 bd df af ce 2d 02 6b 01 37 fb 44 80 e6 |..t....-.k.7.D..|
00000020 f4 e1 17 e6 7f 17 03 01 00 20 18 8a 94 81 86 56 |......... .....V|
00000030 eb 7e 77 48 03 ce b4 8c 2b 75 b8 06 eb 66 5f 77 |.~wH....+u...f_w|
00000040 df 98 1f cd 6d bd 39 38 06 fc 15 03 01 00 20 d1 |....m.98...... .|
00000050 bd 74 3b eb a2 f6 be ad ab df 5f 99 c2 92 fd 9b |.t;......._.....|
00000060 e7 9a 03 a5 f4 00 99 8c f8 85 34 2d 15 a0 30 |..........4-..0|
00000000 17 03 01 00 20 ee 19 59 67 67 a9 8b db 99 87 50 |.... ..Ygg.....P|
00000010 01 e2 02 c1 d5 6d 36 79 af aa ec 1b 80 0e b6 5e |.....m6y.......^|
00000020 5f fa 03 01 cc 17 03 01 00 20 ec e2 04 b7 3b a5 |_........ ....;.|
00000030 f2 e0 13 1f 17 48 e7 6e d3 eb f0 fa 36 ef 6e 2e |.....H.n....6.n.|
00000040 fb ea c8 39 c4 5f 4b 28 d4 50 15 03 01 00 20 c7 |...9._K(.P.... .|
00000050 45 ff fb c7 07 0c d8 0e 35 a3 c5 31 47 b7 03 0e |E.......5..1G...|
00000060 14 c8 29 fd 53 70 5f 15 ac d2 1c 4c 69 fb d6 |..).Sp_....Li..|

View File

@ -8,11 +8,11 @@
00000060 19 00 0b 00 02 01 00 00 0d 00 0a 00 08 04 01 04 |................|
00000070 03 02 01 02 03 ff 01 00 01 00 |..........|
>>> Flow 2 (server to client)
00000000 16 03 01 00 51 02 00 00 4d 03 01 52 cc 57 58 d1 |....Q...M..R.WX.|
00000010 c7 22 72 55 68 fb 69 12 2d 85 02 b7 66 93 40 d1 |."rUh.i.-...f.@.|
00000020 2d 32 57 a8 f2 06 62 93 a0 39 b6 20 08 37 44 11 |-2W...b..9. .7D.|
00000030 73 db 68 79 6d 98 30 f7 bf a2 9b a3 cb c0 03 cb |s.hym.0.........|
00000040 7f 79 e9 31 08 ce 93 17 25 6d c3 c4 00 05 00 00 |.y.1....%m......|
00000000 16 03 01 00 51 02 00 00 4d 03 01 53 04 f1 02 76 |....Q...M..S...v|
00000010 e8 45 7f 57 f3 42 4b 33 0b 06 fa a6 fa c4 3d 84 |.E.W.BK3......=.|
00000020 5a 45 dc 93 41 a5 8d 79 6e 8f 11 20 e7 c6 29 2b |ZE..A..yn.. ..)+|
00000030 ff 4a 6e 63 67 a6 10 cb 49 19 46 1e 5e 0a d5 70 |.Jncg...I.F.^..p|
00000040 96 88 9a 32 48 ef c3 4a 45 4c 6d e0 00 05 00 00 |...2H..JELm.....|
00000050 05 ff 01 00 01 00 16 03 01 02 be 0b 00 02 ba 00 |................|
00000060 02 b7 00 02 b4 30 82 02 b0 30 82 02 19 a0 03 02 |.....0...0......|
00000070 01 02 02 09 00 85 b0 bb a4 8a 7f b8 ca 30 0d 06 |.............0..|
@ -69,15 +69,15 @@
00000060 e6 bd 77 82 6f 23 b6 e0 bd a2 92 b7 3a ac e8 56 |..w.o#......:..V|
00000070 f1 af 54 5e 46 87 e9 3b 33 e7 b8 28 b7 d6 c8 90 |..T^F..;3..(....|
00000080 35 d4 1c 43 d1 30 6f 55 4e 0a 70 14 03 01 00 01 |5..C.0oUN.p.....|
00000090 01 16 03 01 00 24 54 26 aa 7d 70 99 51 f1 bc d6 |.....$T&.}p.Q...|
000000a0 e9 0b 4b c7 b2 02 8c ed 36 c9 7f b8 f7 82 29 3a |..K.....6.....):|
000000b0 0b 6a c0 b4 ef 38 3f e8 8a bf |.j...8?...|
00000090 01 16 03 01 00 24 cd c0 68 dc 2e 69 cc c7 5b c5 |.....$..h..i..[.|
000000a0 3f bd 40 cf a0 0f 41 34 ce 16 37 10 26 c8 3f d1 |?.@...A4..7.&.?.|
000000b0 46 3b ad 7b b0 31 f3 c5 36 e7 |F;.{.1..6.|
>>> Flow 4 (server to client)
00000000 14 03 01 00 01 01 16 03 01 00 24 9a 52 2f b1 3c |..........$.R/.<|
00000010 71 92 5c 81 68 a8 27 4c b8 a9 4e 69 81 41 01 a2 |q.\.h.'L..Ni.A..|
00000020 99 d4 0c dc 15 7b 52 b5 ee be a6 6f 70 88 91 |.....{R....op..|
00000000 14 03 01 00 01 01 16 03 01 00 24 ea 77 6f 3c 42 |..........$.wo<B|
00000010 12 16 51 de e8 b6 f9 85 06 d9 6d 05 75 50 2b 27 |..Q.......m.uP+'|
00000020 93 b7 6b 65 e9 14 99 48 53 3e be e4 be 03 5d |..ke...HS>....]|
>>> Flow 5 (client to server)
00000000 17 03 01 00 1a b5 06 d1 18 a6 4b 26 21 47 be 14 |..........K&!G..|
00000010 79 2e 63 49 84 1e 83 31 3b cb 97 14 94 5b 09 15 |y.cI...1;....[..|
00000020 03 01 00 16 9d d6 d0 2a 65 f2 7e 31 20 e6 63 89 |.......*e.~1 .c.|
00000030 b3 76 92 20 db b8 e6 25 54 1b |.v. ...%T.|
00000000 17 03 01 00 1a 9e ae ca 55 df c4 d9 47 04 55 dd |........U...G.U.|
00000010 3b 33 e1 a6 16 6f a1 94 b1 9b 4d 0d cb 6c 3b 15 |;3...o....M..l;.|
00000020 03 01 00 16 92 5d 76 07 e9 b7 31 29 09 c5 b1 09 |.....]v...1)....|
00000030 2d 64 3d 85 8d f1 d1 40 54 b8 |-d=....@T.|

View File

@ -8,11 +8,11 @@
00000060 19 00 0b 00 02 01 00 00 0d 00 0a 00 08 04 01 04 |................|
00000070 03 02 01 02 03 ff 01 00 01 00 |..........|
>>> Flow 2 (server to client)
00000000 16 03 02 00 59 02 00 00 55 03 02 52 cc 57 58 b6 |....Y...U..R.WX.|
00000010 e0 47 f9 28 99 af 27 4c 21 20 d6 b1 ae 4e d4 62 |.G.(..'L! ...N.b|
00000020 8a 24 f4 62 47 77 a5 78 4b d0 09 20 5b 17 6b 88 |.$.bGw.xK.. [.k.|
00000030 8a ab 8c 0b 63 d9 c3 06 6d 13 e3 27 22 38 ee 69 |....c...m..'"8.i|
00000040 88 7d e1 18 f8 ef 93 62 f4 06 1f ab c0 09 00 00 |.}.....b........|
00000000 16 03 02 00 59 02 00 00 55 03 02 53 04 f1 02 1c |....Y...U..S....|
00000010 d1 1c 6a 5f 7a 5c 26 69 92 cd ee c3 57 ed 96 90 |..j_z\&i....W...|
00000020 e3 c5 f1 ee 8b ee 99 5f 46 2c e6 20 c8 50 6a a4 |......._F,. .Pj.|
00000030 4b 93 e6 da ba 6d d4 87 f6 75 a8 9d 44 db b5 43 |K....m...u..D..C|
00000040 df 12 57 de a4 f1 bc fb b8 7a 3f 6a c0 09 00 00 |..W......z?j....|
00000050 0d ff 01 00 01 00 00 0b 00 04 03 00 01 02 16 03 |................|
00000060 02 02 0e 0b 00 02 0a 00 02 07 00 02 04 30 82 02 |.............0..|
00000070 00 30 82 01 62 02 09 00 b8 bf 2d 47 a0 d2 eb f4 |.0..b.....-G....|
@ -47,21 +47,21 @@
00000240 13 83 0d 94 06 bb d4 37 7a f6 ec 7a c9 86 2e dd |.......7z..z....|
00000250 d7 11 69 7f 85 7c 56 de fb 31 78 2b e4 c7 78 0d |..i..|V..1x+..x.|
00000260 ae cb be 9e 4e 36 24 31 7b 6a 0f 39 95 12 07 8f |....N6$1{j.9....|
00000270 2a 16 03 02 00 d6 0c 00 00 d2 03 00 17 41 04 79 |*............A.y|
00000280 48 bb 4c 30 4f 5c fe 5e 37 65 dc 65 90 d4 4a 7f |H.L0O\.^7e.e..J.|
00000290 8c fc 45 b6 4f fb 11 2b 7c 20 cf 94 83 79 f6 cc |..E.O..+| ...y..|
000002a0 c6 d6 44 0c ad ae 5c fc fd 87 0f b9 51 03 dc 38 |..D...\.....Q..8|
000002b0 d8 44 a8 75 18 7e d1 c6 3e 9e 0a 45 85 92 4b 00 |.D.u.~..>..E..K.|
000002c0 8b 30 81 88 02 42 01 dd a7 0b d6 69 3c b5 fc 06 |.0...B.....i<...|
000002d0 8b c3 37 1d 12 be 0d 80 4a e4 d5 4e df c0 5c 7d |..7.....J..N..\}|
000002e0 ca 61 f2 3c 87 83 e0 de 22 0f 25 78 f0 21 ec ca |.a.<....".%x.!..|
000002f0 8e 62 28 24 10 3e d9 7d 30 d7 f1 bd dc c6 98 a9 |.b($.>.}0.......|
00000300 c4 3f 85 8f 47 8c 8e b7 02 42 01 3c 61 1e ee e9 |.?..G....B.<a...|
00000310 44 2d ae 57 d1 2f 04 59 16 f0 80 03 3e a1 fe 1f |D-.W./.Y....>...|
00000320 5f 54 b2 e1 b2 c0 07 3c ad d9 9f 95 8d 79 7d 9b |_T.....<.....y}.|
00000330 8e 68 cc b9 7f 08 b3 c9 24 1f a9 37 18 60 52 54 |.h......$..7.`RT|
00000340 5e 55 9c 36 1c 06 29 6b 7b 95 3e 73 16 03 02 00 |^U.6..)k{.>s....|
00000350 04 0e 00 00 00 |.....|
00000270 2a 16 03 02 00 d4 0c 00 00 d0 03 00 17 41 04 7b |*............A.{|
00000280 c4 00 37 35 51 de c3 f2 a4 95 2c 19 21 3e a6 94 |..75Q.....,.!>..|
00000290 7b fd 04 d7 b7 1c 56 e6 af 3c ee 36 cb 55 e6 f0 |{.....V..<.6.U..|
000002a0 e6 24 34 6b 8a 02 66 71 f9 e2 f5 a6 c9 d7 6c dc |.$4k..fq......l.|
000002b0 65 59 ff 1c c9 ec a9 8b 07 d6 52 2c 01 3c c3 00 |eY........R,.<..|
000002c0 89 30 81 86 02 41 74 89 1a 31 72 e6 8b c0 4a ce |.0...At..1r...J.|
000002d0 8f 5a 49 a7 52 2d 6d b9 8b 50 17 62 2a 99 d6 3b |.ZI.R-m..P.b*..;|
000002e0 02 85 41 4d 34 53 b5 09 bd e3 ac 16 c1 9b e9 83 |..AM4S..........|
000002f0 cc 83 e3 9c 23 34 67 71 72 d4 05 a2 34 f7 08 29 |....#4gqr...4..)|
00000300 62 43 2e cc bc 08 01 02 41 59 de 5a d0 dd d7 6b |bC......AY.Z...k|
00000310 db 9c 35 29 79 f8 96 91 56 74 1f 18 7b ee 25 83 |..5)y...Vt..{.%.|
00000320 f2 37 0e 77 ab 38 fb 5e 04 0b 09 d9 b4 1f 3f be |.7.w.8.^......?.|
00000330 2e e3 60 e3 96 f3 29 c1 6d 8f 56 1b fd 62 14 48 |..`...).m.V..b.H|
00000340 e3 d9 2a ea 2f be 93 d0 8b 31 16 03 02 00 04 0e |..*./....1......|
00000350 00 00 00 |...|
>>> Flow 3 (client to server)
00000000 16 03 02 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.|
@ -69,21 +69,21 @@
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 02 00 01 |..h.A.Vk.Z......|
00000050 01 16 03 02 00 40 00 00 00 00 00 00 00 00 00 00 |.....@..........|
00000060 00 00 00 00 00 00 42 9f 9d 29 fc 0e e3 9d 6d 89 |......B..)....m.|
00000070 38 c3 6f d8 0f 0f 41 69 24 b8 44 a8 81 28 56 80 |8.o...Ai$.D..(V.|
00000080 c2 a2 cd b8 27 84 4d f1 f0 5c dc df 94 a7 a4 05 |....'.M..\......|
00000090 84 b9 f6 5c b4 50 |...\.P|
00000060 00 00 00 00 00 00 b6 98 a2 a9 48 34 12 6b 0a 94 |..........H4.k..|
00000070 89 fc 38 04 63 5a 6f 63 36 3e d9 35 12 64 8c 28 |..8.cZoc6>.5.d.(|
00000080 99 a6 cf 2e 57 e3 14 6d 0a 8a ab f0 a6 58 37 7c |....W..m.....X7||
00000090 96 04 d3 71 bc d4 |...q..|
>>> Flow 4 (server to client)
00000000 14 03 02 00 01 01 16 03 02 00 40 5f 24 a7 68 9c |..........@_$.h.|
00000010 cc 93 4c fc a1 25 3d 71 43 88 d9 17 9b c9 99 6b |..L..%=qC......k|
00000020 01 00 24 a8 ca b3 52 3e cf 2f f5 3e 80 16 c9 cb |..$...R>./.>....|
00000030 52 20 c3 f5 e0 8f a2 d9 f9 3d 86 c5 44 f6 52 31 |R .......=..D.R1|
00000040 82 3a f9 fb d1 f6 43 5b b8 28 bc |.:....C[.(.|
00000000 14 03 02 00 01 01 16 03 02 00 40 c5 01 c9 0a b0 |..........@.....|
00000010 d8 ca 5e c1 19 dc 37 6c 2e a0 b3 11 a8 87 65 5a |..^...7l......eZ|
00000020 09 41 b9 fe 53 c4 c9 76 97 6d 7f ac c0 be d2 07 |.A..S..v.m......|
00000030 84 e5 5b 78 37 34 ee da 3b cb 3e 82 52 79 91 44 |..[x74..;.>.Ry.D|
00000040 b4 e4 1c ec 3a c0 c0 9d cd ff 13 |....:......|
>>> 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 18 60 dd b8 15 76 04 ae 8c e9 09 |......`...v.....|
00000020 84 8c c2 04 38 b2 45 3d cb ea 9b cf 11 1a 38 67 |....8.E=......8g|
00000030 cd ff 89 4c 8c 15 03 02 00 30 00 00 00 00 00 00 |...L.....0......|
00000040 00 00 00 00 00 00 00 00 00 00 f3 b4 a0 68 1b 3b |.............h.;|
00000050 5c c7 e7 70 32 5f 19 4f a4 bf 0a 57 bc a0 7d be |\..p2_.O...W..}.|
00000060 91 46 5a 8e 02 25 67 20 d0 c2 |.FZ..%g ..|
00000010 00 00 00 00 00 46 60 13 39 2b 2f 72 95 ed 0e aa |.....F`.9+/r....|
00000020 69 6e b4 64 3e 83 43 d0 f9 7f 37 7c 1d b9 ce 11 |in.d>.C...7|....|
00000030 d9 41 66 60 6d 15 03 02 00 30 00 00 00 00 00 00 |.Af`m....0......|
00000040 00 00 00 00 00 00 00 00 00 00 b1 26 d0 5d 08 98 |...........&.]..|
00000050 eb 28 42 74 31 58 42 95 c5 ad 1a 92 0a f5 5f ed |.(Bt1XB......._.|
00000060 45 98 e0 90 e5 a3 b6 8b 8d 18 |E.........|

View File

@ -8,11 +8,11 @@
00000060 19 00 0b 00 02 01 00 00 0d 00 0a 00 08 04 01 04 |................|
00000070 03 02 01 02 03 ff 01 00 01 00 |..........|
>>> Flow 2 (server to client)
00000000 16 03 02 00 59 02 00 00 55 03 02 52 cc 57 58 39 |....Y...U..R.WX9|
00000010 f8 48 dc e0 ba ad e3 f6 6e bf 6b 9e e0 34 53 4f |.H......n.k..4SO|
00000020 cd 16 7a 31 ac 23 de 31 3c 4b 0d 20 41 92 79 b5 |..z1.#.1<K. A.y.|
00000030 e0 f6 1c 25 da db 35 3b 58 61 04 52 7f ac da 64 |...%..5;Xa.R...d|
00000040 0d 31 f0 52 55 5d ec 37 94 21 aa 6f c0 13 00 00 |.1.RU].7.!.o....|
00000000 16 03 02 00 59 02 00 00 55 03 02 53 04 f1 02 fe |....Y...U..S....|
00000010 17 8b 79 ad 93 2e d3 89 66 9b 5d 9b b4 03 3e ba |..y.....f.]...>.|
00000020 65 2a f1 55 f9 3c 33 de 2c a7 47 20 fa 4f 82 11 |e*.U.<3.,.G .O..|
00000030 96 81 d0 70 2e 65 b3 68 2e 3a 6d d7 6c 74 22 33 |...p.e.h.:m.lt"3|
00000040 d4 ae 6c aa c8 f0 c7 20 8b 10 21 e7 c0 13 00 00 |..l.... ..!.....|
00000050 0d ff 01 00 01 00 00 0b 00 04 03 00 01 02 16 03 |................|
00000060 02 02 be 0b 00 02 ba 00 02 b7 00 02 b4 30 82 02 |.............0..|
00000070 b0 30 82 02 19 a0 03 02 01 02 02 09 00 85 b0 bb |.0..............|
@ -58,20 +58,20 @@
000002f0 5f 33 c4 b6 d8 c9 75 90 96 8c 0f 52 98 b5 cd 98 |_3....u....R....|
00000300 1f 89 20 5f f2 a0 1c a3 1b 96 94 dd a9 fd 57 e9 |.. _..........W.|
00000310 70 e8 26 6d 71 99 9b 26 6e 38 50 29 6c 90 a7 bd |p.&mq..&n8P)l...|
00000320 d9 16 03 02 00 cb 0c 00 00 c7 03 00 17 41 04 0a |.............A..|
00000330 be f8 00 24 e0 50 bf 90 12 25 b9 26 3b 7f 4a a2 |...$.P...%.&;.J.|
00000340 b3 4b b1 76 db 53 0d 83 9b 35 57 2f 64 ad 03 d1 |.K.v.S...5W/d...|
00000350 f9 1b ef cf 48 8a a8 a9 4c df d3 7b 7d e8 a0 68 |....H...L..{}..h|
00000360 2b 20 b4 4f 1c e3 11 1d bf a9 bd 58 e4 4a 3e 00 |+ .O.......X.J>.|
00000370 80 2a 64 fb 5f 8f f5 bb 6d 48 2c 7d a6 c0 f6 b2 |.*d._...mH,}....|
00000380 3d 2b 75 83 07 fd b8 9d 50 a1 ec 1c 09 85 69 4f |=+u.....P.....iO|
00000390 a3 39 8e 2f b4 94 76 b1 8d 03 3f 76 01 7e 22 90 |.9./..v...?v.~".|
000003a0 08 58 40 0d d7 65 c1 49 d5 7e 0d 28 62 ec b6 58 |.X@..e.I.~.(b..X|
000003b0 6f ff 83 21 65 e7 8b f5 51 32 5f 39 e8 9e 85 d4 |o..!e...Q2_9....|
000003c0 65 1c a8 a8 70 82 5e db d7 c6 4a 2d 2e ef c3 b3 |e...p.^...J-....|
000003d0 73 ca 13 5b 99 19 e3 4d cb 4a 9f 42 3c b7 79 fb |s..[...M.J.B<.y.|
000003e0 70 33 f7 a7 59 cb 76 a7 7c f3 8a 9a 5d fd 12 74 |p3..Y.v.|...]..t|
000003f0 5a 16 03 02 00 04 0e 00 00 00 |Z.........|
00000320 d9 16 03 02 00 cb 0c 00 00 c7 03 00 17 41 04 26 |.............A.&|
00000330 56 18 02 e5 66 d4 aa 24 7e ae 39 e5 ca 78 6c c1 |V...f..$~.9..xl.|
00000340 90 02 c3 c4 ad 79 2c 47 a8 bf 54 e2 8a 22 b6 ef |.....y,G..T.."..|
00000350 99 d4 7a 7f 8f 78 6a 78 4e 14 2a 16 0d bb 54 38 |..z..xjxN.*...T8|
00000360 59 1f 7a 53 1b c7 73 10 89 4b de c3 66 39 7a 00 |Y.zS..s..K..f9z.|
00000370 80 3a 88 38 c8 15 07 ab 2f 0f 0d cb 19 07 84 ac |.:.8..../.......|
00000380 24 fd 8b d2 9d 05 45 c6 11 c3 d6 84 58 95 5a 08 |$.....E.....X.Z.|
00000390 b9 a4 2c c0 41 4e 34 e0 b2 24 98 94 b7 67 27 50 |..,.AN4..$...g'P|
000003a0 ba 82 35 28 a9 bf 16 ee e3 7b 49 9c 4c 81 80 69 |..5(.....{I.L..i|
000003b0 d7 aa ed 46 ea 9a 68 c4 97 b7 11 d4 35 91 74 5e |...F..h.....5.t^|
000003c0 54 10 34 83 cd c4 06 18 49 7d 7a 28 c9 53 06 73 |T.4.....I}z(.S.s|
000003d0 00 7b 04 b6 d8 36 a7 4b 67 7f 81 30 94 de 40 4d |.{...6.Kg..0..@M|
000003e0 18 f8 c4 b7 02 00 44 8e bc 72 06 24 53 15 74 72 |......D..r.$S.tr|
000003f0 8d 16 03 02 00 04 0e 00 00 00 |..........|
>>> Flow 3 (client to server)
00000000 16 03 02 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.|
@ -79,21 +79,21 @@
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 02 00 01 |..h.A.Vk.Z......|
00000050 01 16 03 02 00 40 00 00 00 00 00 00 00 00 00 00 |.....@..........|
00000060 00 00 00 00 00 00 9a 7d f8 d5 af e5 5d 16 a2 39 |.......}....]..9|
00000070 94 a5 de f6 ae 71 ba b7 b5 6e 9e a7 05 37 ed ff |.....q...n...7..|
00000080 b4 c3 d9 4e d5 d5 3c 84 7e 3f a4 68 23 3b 52 ab |...N..<.~?.h#;R.|
00000090 d7 30 3b 63 ed b1 |.0;c..|
00000060 00 00 00 00 00 00 8a 87 81 38 35 c0 4c bb f8 12 |.........85.L...|
00000070 fa 75 04 cd 1e 3a 61 96 93 c8 fb 07 d1 6d b4 55 |.u...:a......m.U|
00000080 0f b5 0f 07 35 0a 96 ce 5c 6f 24 62 d3 68 e4 b0 |....5...\o$b.h..|
00000090 5d be 81 37 c2 9c |]..7..|
>>> Flow 4 (server to client)
00000000 14 03 02 00 01 01 16 03 02 00 40 df 38 36 f9 ee |..........@.86..|
00000010 03 f3 92 e1 3b 81 21 60 3a 46 3a 2c fc 2f 6a 01 |....;.!`:F:,./j.|
00000020 a4 04 a6 f4 09 f9 bf 1f 73 a6 c6 04 83 8a ae 39 |........s......9|
00000030 43 d7 8d 88 8e 6c f2 da 0d a9 82 b5 4e b0 41 c9 |C....l......N.A.|
00000040 5a 00 93 9b 8c 60 3c 08 fa aa 91 |Z....`<....|
00000000 14 03 02 00 01 01 16 03 02 00 40 66 36 8d f8 8c |..........@f6...|
00000010 7f db 38 e8 39 df f8 2f cb 88 9c 14 d9 89 10 b4 |..8.9../........|
00000020 be 59 88 d7 f3 73 62 af a3 42 66 6e 74 38 64 9f |.Y...sb..Bfnt8d.|
00000030 16 79 09 d7 14 7e 91 8a 70 73 63 28 30 58 fe cc |.y...~..psc(0X..|
00000040 42 45 d6 37 fb 9e 8c c1 01 af 34 |BE.7......4|
>>> 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 85 20 30 5e 6e e6 ab a0 2c 66 7a |...... 0^n...,fz|
00000020 f9 88 3b ee c9 5b 5c 0b a3 7a 94 f0 8a ab 61 e0 |..;..[\..z....a.|
00000030 7f 93 78 79 61 15 03 02 00 30 00 00 00 00 00 00 |..xya....0......|
00000040 00 00 00 00 00 00 00 00 00 00 e0 de 16 23 01 0a |.............#..|
00000050 cf 90 1b 96 6a 14 f2 c9 af e2 20 49 ce b4 82 bf |....j..... I....|
00000060 bf ed 7a 28 e1 ed 8e e7 18 c6 |..z(......|
00000010 00 00 00 00 00 31 0b e3 9d 2a 05 83 19 7d 10 36 |.....1...*...}.6|
00000020 23 dc da fe 00 ab d3 aa 8f ce 28 5f 08 fd b7 59 |#.........(_...Y|
00000030 1e 00 2e 25 5a 15 03 02 00 30 00 00 00 00 00 00 |...%Z....0......|
00000040 00 00 00 00 00 00 00 00 00 00 10 91 fd fa 59 07 |..............Y.|
00000050 df 2c 92 25 15 7b 7c 83 44 89 0d 4f 65 43 99 2e |.,.%.{|.D..OeC..|
00000060 41 5d 51 c9 09 89 ed 02 08 bc |A]Q.......|

View File

@ -8,11 +8,11 @@
00000060 19 00 0b 00 02 01 00 00 0d 00 0a 00 08 04 01 04 |................|
00000070 03 02 01 02 03 ff 01 00 01 00 |..........|
>>> Flow 2 (server to client)
00000000 16 03 02 00 51 02 00 00 4d 03 02 52 cc 57 58 d2 |....Q...M..R.WX.|
00000010 3e 7a 93 49 2a f2 3f f8 fe 58 6b 88 d2 87 66 71 |>z.I*.?..Xk...fq|
00000020 69 bd d2 98 03 4b 17 b1 5d 5b a5 20 c6 5d a6 c7 |i....K..][. .]..|
00000030 40 53 b8 4f 68 74 12 70 64 58 4f 78 fa d1 a9 5c |@S.Oht.pdXOx...\|
00000040 f0 ce 5e 78 fd 66 30 98 8e ac 94 37 00 05 00 00 |..^x.f0....7....|
00000000 16 03 02 00 51 02 00 00 4d 03 02 53 04 f1 02 d4 |....Q...M..S....|
00000010 69 65 aa 96 3d 42 96 eb 9e 7d 8a 18 af 4c 7c 5d |ie..=B...}...L|]|
00000020 fb 97 5f da 94 62 13 69 1f 66 06 20 aa 52 e3 08 |.._..b.i.f. .R..|
00000030 35 0a 87 d5 ef 93 49 ab 1a 74 dd 90 bd 69 70 d1 |5.....I..t...ip.|
00000040 e9 f1 44 17 3a dc 33 98 f5 e5 ab 93 00 05 00 00 |..D.:.3.........|
00000050 05 ff 01 00 01 00 16 03 02 02 be 0b 00 02 ba 00 |................|
00000060 02 b7 00 02 b4 30 82 02 b0 30 82 02 19 a0 03 02 |.....0...0......|
00000070 01 02 02 09 00 85 b0 bb a4 8a 7f b8 ca 30 0d 06 |.............0..|
@ -69,15 +69,15 @@
00000060 e6 bd 77 82 6f 23 b6 e0 bd a2 92 b7 3a ac e8 56 |..w.o#......:..V|
00000070 f1 af 54 5e 46 87 e9 3b 33 e7 b8 28 b7 d6 c8 90 |..T^F..;3..(....|
00000080 35 d4 1c 43 d1 30 6f 55 4e 0a 70 14 03 02 00 01 |5..C.0oUN.p.....|
00000090 01 16 03 02 00 24 6c 69 1d 96 27 2b f5 0b 6e d5 |.....$li..'+..n.|
000000a0 f7 97 96 c6 9f 5e 59 92 9f 3a 0e e5 d0 36 e4 af |.....^Y..:...6..|
000000b0 bc 17 bf 95 ab f7 0c 19 a6 86 |..........|
00000090 01 16 03 02 00 24 07 9f dc df 2d c3 a6 88 06 28 |.....$....-....(|
000000a0 21 e0 e0 d3 31 99 fc 89 b8 82 6e 95 f4 4b 9e e2 |!...1.....n..K..|
000000b0 d9 36 5c 14 ce d7 db e2 78 4e |.6\.....xN|
>>> Flow 4 (server to client)
00000000 14 03 02 00 01 01 16 03 02 00 24 dd 9f e5 d3 53 |..........$....S|
00000010 ae af f2 41 bf eb 53 33 71 d0 f3 84 ac b0 88 72 |...A..S3q......r|
00000020 2d de 14 5b 59 9d f3 4c 9f ab a1 aa f4 f3 af |-..[Y..L.......|
00000000 14 03 02 00 01 01 16 03 02 00 24 81 72 75 80 d4 |..........$.ru..|
00000010 1b 1a 32 00 89 bf 9e 79 30 b9 6b 67 e0 8e c7 eb |..2....y0.kg....|
00000020 73 f2 e4 93 51 65 9b 5f 91 b1 b4 b1 f7 44 76 |s...Qe._.....Dv|
>>> Flow 5 (client to server)
00000000 17 03 02 00 1a 24 4d 6b 23 8a 36 07 80 49 1a e5 |.....$Mk#.6..I..|
00000010 da 85 7c a0 cb f3 82 e5 23 d7 b9 46 82 cb bc 15 |..|.....#..F....|
00000020 03 02 00 16 f3 f1 5b f2 40 0f 3f 88 ea f2 4e 28 |......[.@.?...N(|
00000030 52 aa c6 3a 6c 88 e3 30 21 0f |R..:l..0!.|
00000000 17 03 02 00 1a b2 91 39 63 c0 38 3c 4d 25 fd 14 |.......9c.8<M%..|
00000010 b9 b6 e1 23 21 b4 8d 17 9e 1f d8 33 92 69 c2 15 |...#!......3.i..|
00000020 03 02 00 16 4b 10 25 4d 9d 09 c2 11 96 be f7 5b |....K.%M.......[|
00000030 c2 9b 99 fd 1f 8e af 0f 2c 51 |........,Q|

View File

@ -8,11 +8,11 @@
00000060 19 00 0b 00 02 01 00 00 0d 00 0a 00 08 04 01 04 |................|
00000070 03 02 01 02 03 ff 01 00 01 00 |..........|
>>> Flow 2 (server to client)
00000000 16 03 03 00 59 02 00 00 55 03 03 52 cc 57 59 76 |....Y...U..R.WYv|
00000010 bc 07 88 2c 89 e3 aa 41 69 76 d1 0b 5f c0 7a b1 |...,...Aiv.._.z.|
00000020 c3 c4 f8 12 6e 73 7f 5b 25 41 8e 20 b4 2d 8d a9 |....ns.[%A. .-..|
00000030 80 95 44 d4 d7 47 8c a1 f1 de 36 57 cf 54 dd ee |..D..G....6W.T..|
00000040 a7 d8 ba cf ca b7 68 0e 9e b4 a3 7b c0 09 00 00 |......h....{....|
00000000 16 03 03 00 59 02 00 00 55 03 03 53 04 f1 03 6f |....Y...U..S...o|
00000010 c6 4b 55 27 fe e8 fe 4d 7c 0e d4 20 98 b8 7c 81 |.KU'...M|.. ..|.|
00000020 3d 31 f8 35 66 2f 0a 0b f1 2c e3 20 86 4d 12 32 |=1.5f/...,. .M.2|
00000030 73 e3 ba be 25 50 a4 a2 a1 7b f1 9a 76 7a 75 fb |s...%P...{..vzu.|
00000040 e2 64 a2 12 ec f3 e7 9d 9a 24 6e 94 c0 09 00 00 |.d.......$n.....|
00000050 0d ff 01 00 01 00 00 0b 00 04 03 00 01 02 16 03 |................|
00000060 03 02 0e 0b 00 02 0a 00 02 07 00 02 04 30 82 02 |.............0..|
00000070 00 30 82 01 62 02 09 00 b8 bf 2d 47 a0 d2 eb f4 |.0..b.....-G....|
@ -47,24 +47,24 @@
00000240 13 83 0d 94 06 bb d4 37 7a f6 ec 7a c9 86 2e dd |.......7z..z....|
00000250 d7 11 69 7f 85 7c 56 de fb 31 78 2b e4 c7 78 0d |..i..|V..1x+..x.|
00000260 ae cb be 9e 4e 36 24 31 7b 6a 0f 39 95 12 07 8f |....N6$1{j.9....|
00000270 2a 16 03 03 00 d8 0c 00 00 d4 03 00 17 41 04 3a |*............A.:|
00000280 16 95 9a af 75 ff 51 27 76 6e 82 c7 db a2 3d 62 |....u.Q'vn....=b|
00000290 b4 65 d1 97 26 38 55 68 29 68 2c fc 4b 69 2c f9 |.e..&8Uh)h,.Ki,.|
000002a0 01 00 4b 1e ee cf 88 54 a7 f3 49 a5 04 98 bd 12 |..K....T..I.....|
000002b0 74 b1 cb 95 4c 49 c2 1a 31 e6 95 9f f5 0a f5 04 |t...LI..1.......|
000002c0 03 00 8b 30 81 88 02 42 01 e7 72 2b 54 9e e0 97 |...0...B..r+T...|
000002d0 79 e6 23 52 f7 2e 08 36 d5 dc 31 21 9d f2 13 ae |y.#R...6..1!....|
000002e0 30 86 1c df d2 be 52 e0 e7 8b f5 dd fa 09 f2 f3 |0.....R.........|
000002f0 97 5d f7 48 37 83 9b aa 6c ef 87 95 de f4 50 19 |.].H7...l.....P.|
00000300 b2 9b d6 27 4c 4d 67 6a 27 be 02 42 01 d8 86 63 |...'LMgj'..B...c|
00000310 dc f1 9f 32 a3 25 6f 55 b3 67 7b 64 7e 24 38 25 |...2.%oU.g{d~$8%|
00000320 96 bb 7b b1 9b ef 73 c3 6c d1 69 83 7d bc c5 30 |..{...s.l.i.}..0|
00000330 fe 9a 21 0d 29 c4 d6 1a 51 a5 dd 6e a0 80 c8 9c |..!.)...Q..n....|
00000340 54 49 34 22 f7 5e cf 28 ae 2f cd 46 b1 71 16 03 |TI4".^.(./.F.q..|
00000350 03 00 30 0d 00 00 28 03 01 02 40 00 20 06 01 06 |..0...(...@. ...|
00000360 02 06 03 05 01 05 02 05 03 04 01 04 02 04 03 03 |................|
00000370 01 03 02 03 03 02 01 02 02 02 03 01 01 00 00 0e |................|
00000380 00 00 00 |...|
00000270 2a 16 03 03 00 d7 0c 00 00 d3 03 00 17 41 04 a3 |*............A..|
00000280 03 8c de d2 b0 68 c8 25 0e 85 ea d7 ae 13 0d 79 |.....h.%.......y|
00000290 ec 59 0d b5 4d 51 96 d9 7f 64 36 fb 4c d5 6a 26 |.Y..MQ...d6.L.j&|
000002a0 ae 0e 48 61 df 5c 2b d4 ff 09 41 15 c4 14 8e 1b |..Ha.\+...A.....|
000002b0 84 a8 c8 cd ef 10 97 95 66 67 85 dd fd dc 2a 04 |........fg....*.|
000002c0 03 00 8a 30 81 87 02 41 11 75 5d bc bd 08 28 d4 |...0...A.u]...(.|
000002d0 5b 1b 45 7f 9c d3 8d 0b 91 fa f6 82 ba 59 bd 3e |[.E..........Y.>|
000002e0 96 01 c6 1d 38 db fe 08 e7 56 89 fc 10 b0 37 6a |....8....V....7j|
000002f0 3d d6 c9 50 16 53 f7 c2 a2 60 67 82 1f 74 b8 d5 |=..P.S...`g..t..|
00000300 bc 02 ec 96 db 82 18 8c 87 02 42 01 0d df f7 b7 |..........B.....|
00000310 05 3c 8c 56 f0 1d 33 18 cf c5 4c 80 7e 0b d9 f9 |.<.V..3...L.~...|
00000320 f0 51 69 fe 5d b8 0b 64 c0 c7 0d f4 75 65 ae 07 |.Qi.]..d....ue..|
00000330 9d cf f4 4b ad 52 f6 b8 10 26 18 bd d6 e2 0d a8 |...K.R...&......|
00000340 80 10 50 34 15 cd 72 0b 7d a9 94 de 4c 16 03 03 |..P4..r.}...L...|
00000350 00 30 0d 00 00 28 03 01 02 40 00 20 06 01 06 02 |.0...(...@. ....|
00000360 06 03 05 01 05 02 05 03 04 01 04 02 04 03 03 01 |................|
00000370 03 02 03 03 02 01 02 02 02 03 01 01 00 00 0e 00 |................|
00000380 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|
@ -111,24 +111,24 @@
000002a0 b3 c1 85 6a 42 9b f9 7e 7e 31 c2 e5 bd 66 02 41 |...jB..~~1...f.A|
000002b0 4b 49 c6 cd 02 e3 83 f7 03 50 18 6d b4 c9 51 02 |KI.......P.m..Q.|
000002c0 c0 ab 87 bc e0 3e 4b 89 53 3a e2 65 89 97 02 c1 |.....>K.S:.e....|
000002d0 88 a6 56 bf d0 53 0b a9 7e 82 7d 4d fc 66 78 8f |..V..S..~.}M.fx.|
000002e0 57 dc 5e 62 54 70 cc 32 0c 1c b5 62 fc 6a 76 7e |W.^bTp.2...b.jv~|
000002f0 3f 14 03 03 00 01 01 16 03 03 00 40 00 00 00 00 |?..........@....|
00000300 00 00 00 00 00 00 00 00 00 00 00 00 62 a7 74 42 |............b.tB|
00000310 ab 04 f8 f9 5a 86 3e 35 94 ce 4b 79 77 a1 a0 6a |....Z.>5..Kyw..j|
00000320 cf 2b 3a 62 fc 3b 50 2b 51 5e d7 6a d1 d0 65 b4 |.+:b.;P+Q^.j..e.|
00000330 5d 15 99 11 10 d3 6b a3 97 d2 30 08 |].....k...0.|
000002d0 88 0d 64 db 8e 4f 73 4e ea 29 0b ed a0 f5 ce 3d |..d..OsN.).....=|
000002e0 5f cc 20 ef 0a 22 02 82 f2 14 2a b7 42 68 bd c7 |_. .."....*.Bh..|
000002f0 4d 14 03 03 00 01 01 16 03 03 00 40 00 00 00 00 |M..........@....|
00000300 00 00 00 00 00 00 00 00 00 00 00 00 f0 cc 4f c7 |..............O.|
00000310 b6 0f c9 38 4d 4b 97 2c 4f be 53 08 4c d6 5b 4e |...8MK.,O.S.L.[N|
00000320 24 70 30 81 82 3a 7f 62 95 03 4d fc 54 78 ec 13 |$p0..:.b..M.Tx..|
00000330 b2 a1 00 85 2b 04 e4 1d 7b 6e 87 60 |....+...{n.`|
>>> Flow 4 (server to client)
00000000 14 03 03 00 01 01 16 03 03 00 40 fa 8c c0 6f 59 |..........@...oY|
00000010 8f af a8 21 c8 aa 4c 00 db 6a a5 98 09 52 1a 27 |...!..L..j...R.'|
00000020 77 af 6d 13 c2 54 f8 90 31 37 5c 86 3b 66 de d8 |w.m..T..17\.;f..|
00000030 41 96 8b 84 d9 75 c0 00 b5 5f 99 3e a9 19 fa 6b |A....u..._.>...k|
00000040 be e2 78 43 30 41 94 39 ce 87 67 |..xC0A.9..g|
00000000 14 03 03 00 01 01 16 03 03 00 40 d5 2a 76 79 1c |..........@.*vy.|
00000010 e7 d5 b1 5c 65 6b d1 45 73 53 4c 05 3a 6c 5d 81 |...\ek.EsSL.:l].|
00000020 dd 2f f0 74 62 e4 8e f8 ed 21 99 c7 4f d6 28 40 |./.tb....!..O.(@|
00000030 63 d9 6d e5 b0 04 73 27 7a 1d 08 19 31 10 da ef |c.m...s'z...1...|
00000040 79 26 33 fb 45 23 be a4 7c 03 66 |y&3.E#..|.f|
>>> 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 76 8b 21 f2 c9 fe b7 c4 60 e6 91 |.....v.!.....`..|
00000020 00 ca 3e 54 25 5e f4 20 f8 df 58 41 03 b0 d0 fb |..>T%^. ..XA....|
00000030 e7 59 4d 6a 34 15 03 03 00 30 00 00 00 00 00 00 |.YMj4....0......|
00000040 00 00 00 00 00 00 00 00 00 00 0f 0f e5 7a a2 86 |.............z..|
00000050 8c 31 53 05 be 22 fb 53 51 e6 26 0a a5 c5 09 ca |.1S..".SQ.&.....|
00000060 f3 46 0f 67 50 d8 83 35 7b f3 |.F.gP..5{.|
00000010 00 00 00 00 00 e2 53 bd c0 ef 9e e6 44 94 ea 5d |......S.....D..]|
00000020 f5 c5 a9 4b ed eb 1c 49 9f 79 44 f9 cd d7 de 02 |...K...I.yD.....|
00000030 51 10 ae 87 7d 15 03 03 00 30 00 00 00 00 00 00 |Q...}....0......|
00000040 00 00 00 00 00 00 00 00 00 00 d3 95 13 7f 5f 58 |.............._X|
00000050 ab d6 17 ea 01 2c 2a ea 5d 7c 44 61 4a 27 97 52 |.....,*.]|DaJ'.R|
00000060 cc 9b 86 f6 37 42 2b 94 01 49 |....7B+..I|

View File

@ -8,11 +8,11 @@
00000060 19 00 0b 00 02 01 00 00 0d 00 0a 00 08 04 01 04 |................|
00000070 03 02 01 02 03 ff 01 00 01 00 |..........|
>>> Flow 2 (server to client)
00000000 16 03 03 00 51 02 00 00 4d 03 03 52 cc 57 59 85 |....Q...M..R.WY.|
00000010 0f 00 df b8 0d ef c4 98 ba e3 bd 71 4c 98 e5 80 |...........qL...|
00000020 af 77 c7 d8 5f c1 36 62 1c ef 89 20 b6 01 c3 3b |.w.._.6b... ...;|
00000030 9e 93 27 04 05 7b 73 b3 02 7b c3 89 f5 ac 51 24 |..'..{s..{....Q$|
00000040 7c e5 6d f3 34 d0 99 71 5e ae 30 ea 00 05 00 00 ||.m.4..q^.0.....|
00000000 16 03 03 00 51 02 00 00 4d 03 03 53 04 f1 03 b0 |....Q...M..S....|
00000010 43 00 97 24 a7 a8 ea b2 24 fe 96 24 a1 49 64 fd |C..$....$..$.Id.|
00000020 1c a3 30 35 2d 85 a7 40 42 86 6b 20 af 27 7f ac |..05-..@B.k .'..|
00000030 8b 16 89 6c 78 b7 f5 29 02 58 a6 8b 61 43 c2 b0 |...lx..).X..aC..|
00000040 e0 a8 96 c8 fa 2b 26 ad 9a 5f 2d d6 00 05 00 00 |.....+&.._-.....|
00000050 05 ff 01 00 01 00 16 03 03 02 be 0b 00 02 ba 00 |................|
00000060 02 b7 00 02 b4 30 82 02 b0 30 82 02 19 a0 03 02 |.....0...0......|
00000070 01 02 02 09 00 85 b0 bb a4 8a 7f b8 ca 30 0d 06 |.............0..|
@ -111,17 +111,17 @@
000002e0 b3 c1 85 6a 42 9b f9 7e 7e 31 c2 e5 bd 66 02 41 |...jB..~~1...f.A|
000002f0 4b 49 c6 cd 02 e3 83 f7 03 50 18 6d b4 c9 51 02 |KI.......P.m..Q.|
00000300 c0 ab 87 bc e0 3e 4b 89 53 3a e2 65 89 97 02 c1 |.....>K.S:.e....|
00000310 88 d6 42 09 8f e0 57 a7 e6 9e 65 3d fd 82 45 9d |..B...W...e=..E.|
00000320 3e 69 cc ad 17 72 c7 98 8d 3a ca f0 05 63 43 40 |>i...r...:...cC@|
00000330 7a 14 03 03 00 01 01 16 03 03 00 24 a8 45 b8 6e |z..........$.E.n|
00000340 21 28 b3 6d 94 0d 7b c4 af 24 0e ca 51 ec 85 3c |!(.m..{..$..Q..<|
00000350 87 43 fd 36 e4 3d 1a f4 28 df 90 19 b6 05 d0 c9 |.C.6.=..(.......|
00000310 88 5a 97 82 3e 55 6b 7c d8 db b8 cc 1b 30 84 0a |.Z..>Uk|.....0..|
00000320 7a 97 71 e4 10 bb a4 39 8c 2a cf f5 88 c7 d1 95 |z.q....9.*......|
00000330 73 14 03 03 00 01 01 16 03 03 00 24 9f 1e f0 72 |s..........$...r|
00000340 92 ea dc f7 56 96 37 e4 69 db db 66 1d f6 94 c4 |....V.7.i..f....|
00000350 18 31 4f d0 5d c5 f4 53 21 aa 98 b1 dc 08 94 94 |.1O.]..S!.......|
>>> Flow 4 (server to client)
00000000 14 03 03 00 01 01 16 03 03 00 24 ae 0d d7 72 4f |..........$...rO|
00000010 70 d9 16 20 da 70 dd 04 d5 5a 96 32 80 8c 14 db |p.. .p...Z.2....|
00000020 4d 10 31 47 1e 26 78 f1 95 25 0c fe 24 2f 6f |M.1G.&x..%..$/o|
00000000 14 03 03 00 01 01 16 03 03 00 24 ee 68 c1 87 9f |..........$.h...|
00000010 d7 90 94 f1 3b 6d 26 0b 3d 89 7a 45 3b 52 5d 3c |....;m&.=.zE;R]<|
00000020 dd 7c c1 4e 57 3e a9 ee 91 be cf 2b a3 98 9d |.|.NW>.....+...|
>>> Flow 5 (client to server)
00000000 17 03 03 00 1a d4 7d c7 83 f7 98 3b 77 91 4b e6 |......}....;w.K.|
00000010 68 fa e2 22 37 24 93 20 fa e2 67 18 03 41 90 15 |h.."7$. ..g..A..|
00000020 03 03 00 16 0b ff 73 1c e5 81 5f 28 52 72 49 39 |......s..._(RrI9|
00000030 ca 42 fb 57 8a 3a 80 75 2b ac |.B.W.:.u+.|
00000000 17 03 03 00 1a 88 33 3e 2b 22 6b 92 d0 bb 8a 1e |......3>+"k.....|
00000010 9b f4 9e aa 91 8b 2b 95 ea 53 c8 03 0a 93 58 15 |......+..S....X.|
00000020 03 03 00 16 c4 67 79 ba ec cf 90 b1 f9 ac ec 64 |.....gy........d|
00000030 72 01 08 8f 3a 98 aa 66 25 00 |r...:..f%.|

View File

@ -8,11 +8,11 @@
00000060 19 00 0b 00 02 01 00 00 0d 00 0a 00 08 04 01 04 |................|
00000070 03 02 01 02 03 ff 01 00 01 00 |..........|
>>> Flow 2 (server to client)
00000000 16 03 03 00 59 02 00 00 55 03 03 52 cc 57 58 6a |....Y...U..R.WXj|
00000010 f6 51 de a7 6b b0 94 bb 98 24 ab e2 c0 02 e4 8c |.Q..k....$......|
00000020 ac a8 48 5d 41 82 eb c0 de 5a 1e 20 70 29 82 6c |..H]A....Z. p).l|
00000030 01 cf 4e 21 52 18 98 8c 0a 31 14 26 6c a4 44 11 |..N!R....1.&l.D.|
00000040 6c 5b d6 5c cb a4 b1 91 52 13 b5 77 c0 09 00 00 |l[.\....R..w....|
00000000 16 03 03 00 59 02 00 00 55 03 03 53 04 f1 02 fd |....Y...U..S....|
00000010 41 bd ef ee f3 da fc 1a 31 8c 77 f2 e9 66 54 a0 |A.......1.w..fT.|
00000020 f4 15 b1 1c 84 0d 6d 74 87 ac 7d 20 78 17 8b 08 |......mt..} x...|
00000030 10 20 c9 44 e4 8a 43 af 4a c7 b8 3d 99 f2 f7 af |. .D..C.J..=....|
00000040 bb a3 21 2f 40 cc ed b6 da a8 a1 d5 c0 09 00 00 |..!/@...........|
00000050 0d ff 01 00 01 00 00 0b 00 04 03 00 01 02 16 03 |................|
00000060 03 02 0e 0b 00 02 0a 00 02 07 00 02 04 30 82 02 |.............0..|
00000070 00 30 82 01 62 02 09 00 b8 bf 2d 47 a0 d2 eb f4 |.0..b.....-G....|
@ -47,20 +47,20 @@
00000240 13 83 0d 94 06 bb d4 37 7a f6 ec 7a c9 86 2e dd |.......7z..z....|
00000250 d7 11 69 7f 85 7c 56 de fb 31 78 2b e4 c7 78 0d |..i..|V..1x+..x.|
00000260 ae cb be 9e 4e 36 24 31 7b 6a 0f 39 95 12 07 8f |....N6$1{j.9....|
00000270 2a 16 03 03 00 d8 0c 00 00 d4 03 00 17 41 04 de |*............A..|
00000280 c7 75 51 96 25 63 8e c0 da 9c c0 8e d1 76 ca 08 |.uQ.%c.......v..|
00000290 4c f5 a0 13 75 01 ab cf 12 09 ae cd 13 53 84 1e |L...u........S..|
000002a0 a4 f8 46 0f 15 08 18 48 65 d9 75 85 80 38 79 b7 |..F....He.u..8y.|
000002b0 fc 51 a2 7c 7a ac ab b9 67 8a d7 16 af 75 df 04 |.Q.|z...g....u..|
000002c0 03 00 8b 30 81 88 02 42 00 fe 19 74 a9 a1 27 05 |...0...B...t..'.|
000002d0 92 78 a4 c8 9d c8 a5 de 67 cd 1f a3 1b c7 ba 7e |.x......g......~|
000002e0 75 68 15 29 16 e7 91 f9 b9 7b d7 e4 e9 c0 2a 7f |uh.).....{....*.|
000002f0 1a ce 71 5a b9 c1 64 dd 26 59 24 e8 34 21 24 8a |..qZ..d.&Y$.4!$.|
00000300 b0 19 06 d4 46 0c 05 46 dc 5f 02 42 00 a8 05 71 |....F..F._.B...q|
00000310 59 ef 60 fa cf 06 ec 18 5f be 53 b7 95 07 05 5b |Y.`....._.S....[|
00000320 70 87 ac da f4 61 94 41 60 c8 ab 7b 26 5a 32 4d |p....a.A`..{&Z2M|
00000330 0d 53 00 0e 8e b3 b2 16 c7 4e 3a 15 14 76 bc dc |.S.......N:..v..|
00000340 ff b6 60 eb 62 b6 15 34 53 4f 2a 42 48 2c 16 03 |..`.b..4SO*BH,..|
00000270 2a 16 03 03 00 d8 0c 00 00 d4 03 00 17 41 04 a9 |*............A..|
00000280 19 8b d9 9b 5c 7c 6a 7d 85 d2 70 4e 89 7e 0b 5b |....\|j}..pN.~.[|
00000290 dd 5e a1 63 8d 15 bc 0b 0c 47 3d 4d e8 a7 56 88 |.^.c.....G=M..V.|
000002a0 2e f6 7f e2 4d fc ed cc 03 ed a1 2d ac ae 81 a5 |....M......-....|
000002b0 e2 6d 7f 9f a3 93 e9 10 c1 0e 48 1b f3 f4 38 04 |.m........H...8.|
000002c0 03 00 8b 30 81 88 02 42 00 87 fe 7e 63 82 14 57 |...0...B...~c..W|
000002d0 dc 7d e2 0f cc 97 2d ba 3c a7 56 4a 17 a8 09 6a |.}....-.<.VJ...j|
000002e0 28 2e f2 66 1a 3f 2d 48 2b 6f 79 a1 60 cd 5e 10 |(..f.?-H+oy.`.^.|
000002f0 0b 0a 28 f2 5f e4 3f 4f f9 c9 91 34 d9 dc bc fc |..(._.?O...4....|
00000300 98 ea 77 0b 99 f8 a2 11 c4 bd 02 42 01 a0 b0 dc |..w........B....|
00000310 db 5b c2 09 99 bd ee a0 b9 aa 31 b9 10 84 22 be |.[........1...".|
00000320 5a 63 12 5a 43 00 8e c1 33 cc 91 bb c2 70 7a 63 |Zc.ZC...3....pzc|
00000330 19 82 c0 74 48 a1 c7 3d 1f f1 6f 4a 6f 6a 8c 3f |...tH..=..oJoj.?|
00000340 28 31 a8 0c 65 19 26 62 4b 7a 7c 4b ea 1a 16 03 |(1..e.&bKz|K....|
00000350 03 00 30 0d 00 00 28 03 01 02 40 00 20 06 01 06 |..0...(...@. ...|
00000360 02 06 03 05 01 05 02 05 03 04 01 04 02 04 03 03 |................|
00000370 01 03 02 03 03 02 01 02 02 02 03 01 01 00 00 0e |................|
@ -103,31 +103,31 @@
00000220 a7 24 20 3e b2 56 1c ce 97 28 5e f8 2b 2d 4f 9e |.$ >.V...(^.+-O.|
00000230 f1 07 9f 6c 4b 5b 83 56 e2 32 42 e9 58 b6 d7 49 |...lK[.V.2B.X..I|
00000240 a6 b5 68 1a 41 03 56 6b dc 5a 89 16 03 03 00 88 |..h.A.Vk.Z......|
00000250 0f 00 00 84 04 01 00 80 42 bd a6 a2 1f 49 ea 57 |........B....I.W|
00000260 43 59 a0 b6 9f 1d b3 3c 35 a7 fa c7 57 02 fa f0 |CY.....<5...W...|
00000270 9f 7d a2 77 1a a4 e1 13 c0 78 a3 9e 59 1a f2 c6 |.}.w.....x..Y...|
00000280 2b dd 8d bc 5d f1 99 e8 db ac a2 9c 6e d8 b5 6a |+...].......n..j|
00000290 a5 04 aa 6c 48 b8 7a 06 55 81 1a e0 41 69 28 42 |...lH.z.U...Ai(B|
000002a0 53 fa f0 63 a9 b5 c1 2f 69 60 cf 02 da d2 eb c8 |S..c.../i`......|
000002b0 e8 a1 5c 7b b1 05 c3 b8 66 34 fe 21 8a 7a 84 10 |..\{....f4.!.z..|
000002c0 f1 4d bd b1 68 97 85 11 10 bf be 96 cf 37 e9 68 |.M..h........7.h|
000002d0 20 ab d2 f8 d2 20 65 90 14 03 03 00 01 01 16 03 | .... e.........|
00000250 0f 00 00 84 04 01 00 80 38 f2 16 e5 b5 86 16 62 |........8......b|
00000260 86 e1 7d 01 f1 a8 e1 f7 e7 85 b1 a0 17 ee 84 25 |..}............%|
00000270 cb 3c 46 61 1a 78 7b 1e ee 32 bc d9 6c fa 6b 76 |.<Fa.x{..2..l.kv|
00000280 67 a7 9e c8 7a 4c e8 79 0d 22 27 ad e7 98 6a 98 |g...zL.y."'...j.|
00000290 89 88 8b a9 69 5b 6f c6 00 48 9a 21 77 a9 7c 15 |....i[o..H.!w.|.|
000002a0 ba 47 16 74 8d 6c 67 dc 6d f1 98 b6 61 e8 bc 08 |.G.t.lg.m...a...|
000002b0 18 53 a6 93 bf fc 27 5e b7 4d d2 eb 68 e9 23 ee |.S....'^.M..h.#.|
000002c0 d2 70 d2 55 2c c7 99 7d c0 66 b5 1c ea 38 71 5c |.p.U,..}.f...8q\|
000002d0 a6 57 1f 52 e4 8e e8 51 14 03 03 00 01 01 16 03 |.W.R...Q........|
000002e0 03 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............|
000002f0 00 00 00 a1 73 35 05 15 f3 87 00 58 06 54 f7 44 |....s5.....X.T.D|
00000300 25 71 3f a6 16 3c e9 95 0a de 14 9d d0 78 73 35 |%q?..<.......xs5|
00000310 a4 84 dc 9e bf 94 4e fe 07 89 33 d0 81 ef 9f 49 |......N...3....I|
00000320 17 0a 64 |..d|
000002f0 00 00 00 5e e7 6e 1c a2 02 24 34 f0 a6 b6 27 ea |...^.n...$4...'.|
00000300 69 d5 0e 2e a8 ad 5c ad 6c 06 78 68 39 92 27 f1 |i.....\.l.xh9.'.|
00000310 e8 35 49 67 4d fb 5d 8a 31 2e 4e 3f 19 ed ea 30 |.5IgM.].1.N?...0|
00000320 20 60 e1 | `.|
>>> Flow 4 (server to client)
00000000 14 03 03 00 01 01 16 03 03 00 40 19 b8 9d de 48 |..........@....H|
00000010 86 1e be b4 62 54 57 12 fc f0 ad fd 70 b7 69 48 |....bTW.....p.iH|
00000020 58 66 8e 68 1c fd 73 62 da bd 6d 8f 83 8c 09 91 |Xf.h..sb..m.....|
00000030 de 53 83 20 2b 81 f1 30 3f 0b 6b 7d c1 59 47 dc |.S. +..0?.k}.YG.|
00000040 e1 f4 95 85 d5 0b 09 45 4e a7 2f |.......EN./|
00000000 14 03 03 00 01 01 16 03 03 00 40 ee a8 82 bc 3f |..........@....?|
00000010 bf ab a6 e4 30 e0 3d f1 2f 19 a2 ac 7a 81 57 f1 |....0.=./...z.W.|
00000020 ee 67 3f 55 2b 30 fa 72 b5 10 03 ec 8d 0a 8f bb |.g?U+0.r........|
00000030 24 f5 45 f5 4e 53 4b 93 a5 0d 42 6c 46 69 98 fb |$.E.NSK...BlFi..|
00000040 63 c5 9f 95 65 d1 b6 f0 a4 15 bd |c...e......|
>>> 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 69 73 64 71 d8 dc 9b a5 ce 9a 1e |.....isdq.......|
00000020 65 82 01 94 45 12 e7 13 4e 3e 59 7b 19 2b 41 a7 |e...E...N>Y{.+A.|
00000030 49 aa 70 1d ce 15 03 03 00 30 00 00 00 00 00 00 |I.p......0......|
00000040 00 00 00 00 00 00 00 00 00 00 5f 67 8d e3 77 5e |.........._g..w^|
00000050 32 c4 83 91 2b e6 37 76 18 11 8d 9f e5 c2 20 43 |2...+.7v...... C|
00000060 c1 68 83 f9 e6 0b 07 95 ef b6 |.h........|
00000010 00 00 00 00 00 cb 4e bc d1 a9 58 ef c8 39 a9 36 |......N...X..9.6|
00000020 f4 35 05 96 8e a4 50 bc f4 15 06 f9 fd 41 6d 1e |.5....P......Am.|
00000030 5e 7c 82 63 94 15 03 03 00 30 00 00 00 00 00 00 |^|.c.....0......|
00000040 00 00 00 00 00 00 00 00 00 00 bd 77 87 a5 5a d4 |...........w..Z.|
00000050 b8 59 e6 6b 0f dd ea f9 ed 18 b2 9f a9 61 b4 3a |.Y.k.........a.:|
00000060 47 15 15 3b 83 ef e1 6d db a8 |G..;...m..|

View File

@ -8,11 +8,11 @@
00000060 19 00 0b 00 02 01 00 00 0d 00 0a 00 08 04 01 04 |................|
00000070 03 02 01 02 03 ff 01 00 01 00 |..........|
>>> Flow 2 (server to client)
00000000 16 03 03 00 51 02 00 00 4d 03 03 52 cc 57 58 8f |....Q...M..R.WX.|
00000010 4b 2e 8c 90 dd 88 33 43 44 02 90 c0 b5 ae b3 b2 |K.....3CD.......|
00000020 c9 2c cd c4 53 8e 7e 5c de 08 fe 20 ee 4e 7b b1 |.,..S.~\... .N{.|
00000030 7e a2 eb b0 21 e3 b2 1e b5 18 ff b3 43 c8 a7 a3 |~...!.......C...|
00000040 2f ef 82 11 ae 66 be c5 64 5d 15 59 00 05 00 00 |/....f..d].Y....|
00000000 16 03 03 00 51 02 00 00 4d 03 03 53 04 f1 02 1d |....Q...M..S....|
00000010 0e dc 86 e5 a9 07 71 46 15 34 af 47 15 3f 03 9c |......qF.4.G.?..|
00000020 fc d6 fd 44 7c f4 f1 c7 8d 6f f8 20 28 ea 3c dc |...D|....o. (.<.|
00000030 b2 4c b7 ba 20 88 c4 db a5 73 ea 93 ab 3a 85 a6 |.L.. ....s...:..|
00000040 8f 59 49 d9 a9 31 14 d5 a6 2b 4f d1 00 05 00 00 |.YI..1...+O.....|
00000050 05 ff 01 00 01 00 16 03 03 02 be 0b 00 02 ba 00 |................|
00000060 02 b7 00 02 b4 30 82 02 b0 30 82 02 19 a0 03 02 |.....0...0......|
00000070 01 02 02 09 00 85 b0 bb a4 8a 7f b8 ca 30 0d 06 |.............0..|
@ -103,24 +103,24 @@
00000260 e6 bd 77 82 6f 23 b6 e0 bd a2 92 b7 3a ac e8 56 |..w.o#......:..V|
00000270 f1 af 54 5e 46 87 e9 3b 33 e7 b8 28 b7 d6 c8 90 |..T^F..;3..(....|
00000280 35 d4 1c 43 d1 30 6f 55 4e 0a 70 16 03 03 00 88 |5..C.0oUN.p.....|
00000290 0f 00 00 84 04 01 00 80 0a eb 78 3e 77 c5 9c 8e |..........x>w...|
000002a0 05 67 4e 06 bd ec c8 7c b2 16 13 7d c5 5d e1 1a |.gN....|...}.]..|
000002b0 4d 2e f4 b1 78 2c 94 1b 47 e4 3e 2f 7e 74 cc 03 |M...x,..G.>/~t..|
000002c0 1d eb e2 56 99 0e 92 27 79 e4 7e a7 12 86 88 91 |...V...'y.~.....|
000002d0 a4 99 db 1d 50 62 88 41 cc a6 b7 90 d0 51 66 47 |....Pb.A.....QfG|
000002e0 92 39 a0 2b 4c 8d 50 a6 af f4 72 2d 16 3b 6b b8 |.9.+L.P...r-.;k.|
000002f0 82 d2 9a d8 cd 7b b9 aa 82 a5 31 12 9e bb 19 23 |.....{....1....#|
00000300 15 5d ad a5 b1 65 c1 de 01 7d e3 d3 16 73 28 d6 |.]...e...}...s(.|
00000310 75 02 32 68 5a e0 b1 bb 14 03 03 00 01 01 16 03 |u.2hZ...........|
00000320 03 00 24 cd c6 25 df 1c 0b b3 a7 2a 46 99 b8 10 |..$..%.....*F...|
00000330 37 78 40 2a aa 66 7a 3a 34 8e 87 bf 85 4c e2 de |7x@*.fz:4....L..|
00000340 36 62 4a 9e 7f e8 e8 |6bJ....|
00000290 0f 00 00 84 04 01 00 80 2a 1f ae 48 9f 86 16 dc |........*..H....|
000002a0 c2 55 1f 5f 95 81 ed 56 00 5d 35 46 e5 b6 57 d5 |.U._...V.]5F..W.|
000002b0 a6 3e 32 38 8b e2 c6 1c b9 b1 38 b2 da 66 45 ed |.>28......8..fE.|
000002c0 58 6a 7f 43 41 93 a5 09 da b9 04 ce 3f 13 8a 19 |Xj.CA.......?...|
000002d0 13 e9 2c 1f c5 e7 35 b4 2d ea 7c 81 90 33 c0 66 |..,...5.-.|..3.f|
000002e0 dc 41 8b 23 08 8f 69 d4 d6 a2 5f c1 bd 26 e6 2e |.A.#..i..._..&..|
000002f0 7f c8 7c a8 2d d4 08 95 ce 6e 58 54 04 a2 a6 63 |..|.-....nXT...c|
00000300 54 72 67 f2 7f 61 0a 6b 58 46 d4 88 95 38 37 f2 |Trg..a.kXF...87.|
00000310 93 95 48 56 14 a7 b9 7c 14 03 03 00 01 01 16 03 |..HV...|........|
00000320 03 00 24 64 bb 41 3a cb a2 2f 95 53 5c 2f f7 83 |..$d.A:../.S\/..|
00000330 a2 35 18 f6 d0 8d 6f e2 54 ed 2f 07 10 f4 36 e2 |.5....o.T./...6.|
00000340 3d e5 30 1d e3 63 01 |=.0..c.|
>>> Flow 4 (server to client)
00000000 14 03 03 00 01 01 16 03 03 00 24 20 68 ec 6b 11 |..........$ h.k.|
00000010 e5 d6 eb c7 4f 7f e0 d0 c4 36 d4 c2 46 06 1d 92 |....O....6..F...|
00000020 83 b4 77 e2 58 b6 cb 06 74 0a 5c f8 c6 06 83 |..w.X...t.\....|
00000000 14 03 03 00 01 01 16 03 03 00 24 0a 22 b6 bc da |..........$."...|
00000010 34 38 53 8e 80 e2 25 7b 31 2f 70 8e 3a db e8 a3 |48S...%{1/p.:...|
00000020 70 0e 88 22 b4 a8 be d4 a3 e3 cc 13 94 ef 47 |p.."..........G|
>>> Flow 5 (client to server)
00000000 17 03 03 00 1a bb d6 71 f3 e0 2f c3 d6 0d 70 85 |.......q../...p.|
00000010 25 df 6f ba b1 37 dd 49 42 79 5c b3 c1 85 7e 15 |%.o..7.IBy\...~.|
00000020 03 03 00 16 8c 93 50 30 45 38 da e2 bf c6 df d8 |......P0E8......|
00000030 41 e1 63 ca 28 82 d1 ae 30 76 |A.c.(...0v|
00000000 17 03 03 00 1a b4 9c b1 57 ea 01 03 fe 01 e7 1e |........W.......|
00000010 c4 a7 0f 25 14 99 00 4f 88 51 c1 98 6e 99 01 15 |...%...O.Q..n...|
00000020 03 03 00 16 2e c4 11 8b 1a fc 37 81 18 33 e4 9f |..........7..3..|
00000030 48 a3 29 e3 ad 9b 9b ec 9f 99 |H.).......|

View File

@ -8,11 +8,11 @@
00000060 19 00 0b 00 02 01 00 00 0d 00 0a 00 08 04 01 04 |................|
00000070 03 02 01 02 03 ff 01 00 01 00 |..........|
>>> Flow 2 (server to client)
00000000 16 03 03 00 59 02 00 00 55 03 03 52 cc 57 58 4e |....Y...U..R.WXN|
00000010 9d 88 aa 42 ea 19 04 55 fe e8 13 0c db 2d a9 70 |...B...U.....-.p|
00000020 93 85 12 08 d2 15 f6 61 25 84 b7 20 55 a3 15 3b |.......a%.. U..;|
00000030 27 48 55 53 d1 23 c5 e8 f4 83 ce 44 db 2c 47 b8 |'HUS.#.....D.,G.|
00000040 2b 4a 3e be 29 3d 73 76 dc 79 6b 75 c0 09 00 00 |+J>.)=sv.yku....|
00000000 16 03 03 00 59 02 00 00 55 03 03 53 04 f1 02 a0 |....Y...U..S....|
00000010 5f bd a4 8d 98 93 b8 da 08 86 9f b2 be 9a a4 91 |_...............|
00000020 2b 3c 1f 18 f0 75 7c a9 a8 a0 f7 20 4a 89 9a d2 |+<...u|.... J...|
00000030 34 3b d9 b1 c2 fd 61 bd 97 19 22 ce b9 d1 5b a7 |4;....a..."...[.|
00000040 83 80 9c 19 d0 f5 a0 aa 4c ac 06 20 c0 09 00 00 |........L.. ....|
00000050 0d ff 01 00 01 00 00 0b 00 04 03 00 01 02 16 03 |................|
00000060 03 02 0e 0b 00 02 0a 00 02 07 00 02 04 30 82 02 |.............0..|
00000070 00 30 82 01 62 02 09 00 b8 bf 2d 47 a0 d2 eb f4 |.0..b.....-G....|
@ -47,21 +47,21 @@
00000240 13 83 0d 94 06 bb d4 37 7a f6 ec 7a c9 86 2e dd |.......7z..z....|
00000250 d7 11 69 7f 85 7c 56 de fb 31 78 2b e4 c7 78 0d |..i..|V..1x+..x.|
00000260 ae cb be 9e 4e 36 24 31 7b 6a 0f 39 95 12 07 8f |....N6$1{j.9....|
00000270 2a 16 03 03 00 d8 0c 00 00 d4 03 00 17 41 04 67 |*............A.g|
00000280 9e b0 72 cf 69 da 56 8c d2 8f fb 80 64 bb d2 ec |..r.i.V.....d...|
00000290 57 2d 8c 77 b7 5a b5 bc ae bb 1f de db e7 64 5c |W-.w.Z........d\|
000002a0 36 2a 9b cb 92 a7 f1 db 93 76 8c 10 b5 74 ad b5 |6*.......v...t..|
000002b0 8f c5 79 18 18 e7 92 6f 22 3b 92 47 dc 60 cf 04 |..y....o";.G.`..|
000002c0 03 00 8b 30 81 88 02 42 01 c9 0b bf 07 18 e3 7d |...0...B.......}|
000002d0 26 b0 17 94 70 1d dc e8 6c 9e 45 4f d5 e0 79 00 |&...p...l.EO..y.|
000002e0 2b 03 90 bb 7a aa 23 01 43 53 a1 d8 9f 81 1f 18 |+...z.#.CS......|
000002f0 a2 5f 54 fa 7c c3 3a 15 d4 18 38 80 7e de f0 70 |._T.|.:...8.~..p|
00000300 42 5d 2a 22 74 d1 6c 75 f5 18 02 42 00 a8 0a 3c |B]*"t.lu...B...<|
00000310 44 38 fa 3f b7 fc 00 1e 80 30 0d e5 55 87 99 53 |D8.?.....0..U..S|
00000320 0a ab cd ad dd 1b 72 7f 49 bf 2f 89 74 72 11 3c |......r.I./.tr.<|
00000330 6e 49 5e 31 3c 6c f1 bc 90 fc e9 75 95 78 7b 95 |nI^1<l.....u.x{.|
00000340 6a 8d 4d 51 0f e1 2f d1 9e 7b b7 c1 aa 62 16 03 |j.MQ../..{...b..|
00000350 03 00 04 0e 00 00 00 |.......|
00000270 2a 16 03 03 00 d7 0c 00 00 d3 03 00 17 41 04 3c |*............A.<|
00000280 8f 35 1e 47 5d 7b ad 13 0c e9 5c c0 97 c7 83 06 |.5.G]{....\.....|
00000290 49 0f 6c cf e5 4d 3b ed f7 1b c6 96 8d ba 54 35 |I.l..M;.......T5|
000002a0 7f df 35 e3 6e 28 e9 71 f2 24 b5 ab 17 2b 4b 2b |..5.n(.q.$...+K+|
000002b0 0c 8f 9f 48 89 73 8f 09 69 84 af 7f ec 43 7a 04 |...H.s..i....Cz.|
000002c0 03 00 8a 30 81 87 02 41 79 84 43 0c 78 fa 7e e2 |...0...Ay.C.x.~.|
000002d0 c5 51 c1 60 88 c4 4a 59 7d 02 fa dc 19 68 33 ed |.Q.`..JY}....h3.|
000002e0 19 ef a1 df ef 6b 21 a6 98 aa ba a9 13 70 91 0f |.....k!......p..|
000002f0 cc 6c 5c 1e 99 53 1b 42 51 6c 06 a7 3c c4 04 22 |.l\..S.BQl..<.."|
00000300 5d 0d c1 30 ab e3 ec b4 54 02 42 01 15 15 1a 6e |]..0....T.B....n|
00000310 6f f1 c6 b1 10 84 2c c8 04 de 2b 52 d5 b4 f7 c9 |o.....,...+R....|
00000320 4f 6d 0e 0e 26 45 1d 7a 28 59 2b 8b f6 92 3a 23 |Om..&E.z(Y+...:#|
00000330 7a 39 9c d5 4e cc 5d c5 45 92 9c d0 5f 33 12 e3 |z9..N.].E..._3..|
00000340 2b 29 39 52 bb 16 aa e1 72 9e b5 fe 99 16 03 03 |+)9R....r.......|
00000350 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.|
@ -69,21 +69,21 @@
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 40 00 00 00 00 00 00 00 00 00 00 |.....@..........|
00000060 00 00 00 00 00 00 ea 9c f3 e5 4d 7c 48 a5 48 9b |..........M|H.H.|
00000070 87 43 2a 6b 74 e4 8e ca e4 1c c9 87 46 c2 d7 ef |.C*kt.......F...|
00000080 5e 8f c8 60 a9 1c 5f 68 c6 a9 7d 39 a5 8d 13 7c |^..`.._h..}9...||
00000090 bd 31 6e 19 8d 95 |.1n...|
00000060 00 00 00 00 00 00 20 a3 f8 5a e2 ea f3 09 19 3e |...... ..Z.....>|
00000070 4a 54 69 70 06 5b 17 35 0f ed e7 30 3b 6f eb a1 |JTip.[.5...0;o..|
00000080 cb 9c 35 81 10 2e 34 f7 12 a5 e4 63 20 b2 65 31 |..5...4....c .e1|
00000090 19 da 30 43 39 59 |..0C9Y|
>>> Flow 4 (server to client)
00000000 14 03 03 00 01 01 16 03 03 00 40 b1 d2 81 e7 2c |..........@....,|
00000010 ae 4a 72 98 91 5a 36 ae 8b 62 4b 58 55 f0 65 30 |.Jr..Z6..bKXU.e0|
00000020 9a 8d ca 73 13 9f 90 c0 18 fb 10 07 c9 fa 9c aa |...s............|
00000030 67 2a 42 90 11 e5 38 7f 2f 35 ac d7 c7 75 cc 84 |g*B...8./5...u..|
00000040 a4 73 dd 9c f5 0d 3e 5d 25 76 c6 |.s....>]%v.|
00000000 14 03 03 00 01 01 16 03 03 00 40 8d 4d 31 07 df |..........@.M1..|
00000010 ab 41 f5 19 9c 1a 57 fc 33 ab 5f e6 bd 45 b9 fa |.A....W.3._..E..|
00000020 7f db c0 df 72 f2 3b ef aa d4 5e 34 e6 3d 44 7c |....r.;...^4.=D||
00000030 12 05 c7 57 da 54 b1 e3 66 f0 0a ab cd 15 a5 bf |...W.T..f.......|
00000040 c5 c2 07 a9 d9 a7 2e 5e 29 da da |.......^)..|
>>> 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 5c f6 d4 35 91 79 5d 47 e6 7d eb |.....\..5.y]G.}.|
00000020 a4 ba d8 94 ee 89 71 60 ba 67 e6 58 79 d7 52 38 |......q`.g.Xy.R8|
00000030 35 07 0a 90 e4 15 03 03 00 30 00 00 00 00 00 00 |5........0......|
00000040 00 00 00 00 00 00 00 00 00 00 73 92 bf 53 22 d7 |..........s..S".|
00000050 80 54 7a 1c 77 d9 a5 16 05 68 c7 c7 5b ce 05 41 |.Tz.w....h..[..A|
00000060 51 d2 a6 2b b9 ba 34 ef 93 5e |Q..+..4..^|
00000010 00 00 00 00 00 dc 03 7b 29 2c 49 64 58 2d dc f7 |.......{),IdX-..|
00000020 26 a1 3b ec 2d e8 30 c4 6c a3 ff e2 bc b5 a4 a6 |&.;.-.0.l.......|
00000030 93 ce 14 bd da 15 03 03 00 30 00 00 00 00 00 00 |.........0......|
00000040 00 00 00 00 00 00 00 00 00 00 a6 77 10 30 15 eb |...........w.0..|
00000050 ed cf 73 5b 74 5d 09 52 4a 5b e2 f0 e4 67 f8 7a |..s[t].RJ[...g.z|
00000060 5e 5e fc ba 7f 80 0a d2 f4 fb |^^........|

View File

@ -8,11 +8,11 @@
00000060 19 00 0b 00 02 01 00 00 0d 00 0a 00 08 04 01 04 |................|
00000070 03 02 01 02 03 ff 01 00 01 00 |..........|
>>> Flow 2 (server to client)
00000000 16 03 03 00 59 02 00 00 55 03 03 52 cc 57 58 95 |....Y...U..R.WX.|
00000010 a0 c0 f9 1d 34 16 31 f5 a5 08 dd 3d 6a 4c c9 96 |....4.1....=jL..|
00000020 aa 8b 7f f3 1e 0c 59 4c 06 c1 2b 20 22 f5 fb 09 |......YL..+ "...|
00000030 f2 7a c3 22 85 2f 16 b6 81 2d 2b d6 12 c2 4d 84 |.z."./...-+...M.|
00000040 7e a9 3f 18 f2 1c f7 44 6c 66 3f 7f c0 2b 00 00 |~.?....Dlf?..+..|
00000000 16 03 03 00 59 02 00 00 55 03 03 53 04 f1 02 48 |....Y...U..S...H|
00000010 03 36 01 05 56 6f f0 54 d2 c3 d3 41 c2 e2 69 7b |.6..Vo.T...A..i{|
00000020 50 f8 03 ef 3f 5d 7c e6 9c cb fe 20 82 a0 81 fd |P...?]|.... ....|
00000030 72 4b b8 e6 29 76 3b 0f 1d 0a b7 82 9d 0b cf a0 |rK..)v;.........|
00000040 65 b1 56 53 c9 d5 58 7b f0 b6 2d cf c0 2b 00 00 |e.VS..X{..-..+..|
00000050 0d ff 01 00 01 00 00 0b 00 04 03 00 01 02 16 03 |................|
00000060 03 02 0e 0b 00 02 0a 00 02 07 00 02 04 30 82 02 |.............0..|
00000070 00 30 82 01 62 02 09 00 b8 bf 2d 47 a0 d2 eb f4 |.0..b.....-G....|
@ -47,38 +47,38 @@
00000240 13 83 0d 94 06 bb d4 37 7a f6 ec 7a c9 86 2e dd |.......7z..z....|
00000250 d7 11 69 7f 85 7c 56 de fb 31 78 2b e4 c7 78 0d |..i..|V..1x+..x.|
00000260 ae cb be 9e 4e 36 24 31 7b 6a 0f 39 95 12 07 8f |....N6$1{j.9....|
00000270 2a 16 03 03 00 d8 0c 00 00 d4 03 00 17 41 04 dd |*............A..|
00000280 b5 88 3a be 12 a5 fe 0e 19 f5 76 4f 71 90 93 ca |..:.......vOq...|
00000290 0e b3 62 a2 b0 c0 f2 78 95 90 cb 10 f9 e8 c8 8e |..b....x........|
000002a0 a6 5e 48 ae 8e 96 3d 60 3f 0a b0 73 e8 ea 42 42 |.^H...=`?..s..BB|
000002b0 6e 19 fe e3 ab 30 ff 01 cc ae c1 90 3a 10 85 04 |n....0......:...|
000002c0 03 00 8b 30 81 88 02 42 01 6e b2 79 a1 c1 45 7d |...0...B.n.y..E}|
000002d0 a3 44 45 75 e0 05 b6 68 ee e3 bb 80 2d 88 23 0c |.DEu...h....-.#.|
000002e0 40 ad 68 95 59 0f 49 5b e5 67 2a 5a 9b 29 32 38 |@.h.Y.I[.g*Z.)28|
000002f0 13 a0 f1 6c 11 3f 23 b9 1b 4b 0c 1f 2d 61 5e b3 |...l.?#..K..-a^.|
00000300 de 14 b7 b8 a6 fb 7b 23 1f f3 02 42 01 30 39 22 |......{#...B.09"|
00000310 01 6f d7 a2 83 2a fd 8a 6f f0 c2 d6 1b 0f b4 17 |.o...*..o.......|
00000320 d3 50 f7 de 59 20 6a 5c a1 93 65 ed aa fa 8f 6f |.P..Y j\..e....o|
00000330 75 3a b6 ab 33 b6 68 26 0b 8f d5 b2 ca eb 86 27 |u:..3.h&.......'|
00000340 27 72 68 ed ee 42 37 1a ff 8a 68 c3 32 91 16 03 |'rh..B7...h.2...|
00000350 03 00 04 0e 00 00 00 |.......|
00000270 2a 16 03 03 00 d7 0c 00 00 d3 03 00 17 41 04 86 |*............A..|
00000280 36 b4 78 76 87 70 ed ae 0d 34 70 3d 16 e5 a4 db |6.xv.p...4p=....|
00000290 ae 28 58 4c 01 5a 56 73 a7 0d 34 59 a7 04 75 69 |.(XL.ZVs..4Y..ui|
000002a0 f2 55 24 40 b0 33 c6 93 ff ae e0 14 f5 4b ce a8 |.U$@.3.......K..|
000002b0 e2 e6 9a 67 1d 66 fb 8f fd 56 59 e7 73 f2 2c 04 |...g.f...VY.s.,.|
000002c0 03 00 8a 30 81 87 02 41 73 ab a8 3c 64 17 69 9f |...0...As..<d.i.|
000002d0 4d b2 9b 55 12 60 33 94 cf f3 83 40 2b 7b 1b af |M..U.`3....@+{..|
000002e0 5c f4 cd 02 66 fb 83 04 35 fd ab 74 98 1a 7d f6 |\...f...5..t..}.|
000002f0 9e 50 98 c3 98 e8 56 9c f2 2a b0 30 9d 05 14 58 |.P....V..*.0...X|
00000300 68 6a 88 04 49 07 78 bf 3a 02 42 01 be b2 05 9e |hj..I.x.:.B.....|
00000310 67 da 1e e9 5a 36 98 52 21 9f 43 75 43 ba bb 9a |g...Z6.R!.CuC...|
00000320 e6 e2 65 f4 e0 44 45 08 5a 1e 54 06 dd 5f 60 2e |..e..DE.Z.T.._`.|
00000330 7d e7 55 08 d3 7b 4e 0a c7 da d4 27 34 d4 bd b0 |}.U..{N....'4...|
00000340 12 2f 41 7a ed 71 32 ef ee 12 74 66 00 16 03 03 |./Az.q2...tf....|
00000350 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 8c c6 |.....(..........|
00000060 b4 4f c9 4b f0 81 05 aa aa 88 79 b0 76 fb 56 8a |.O.K......y.v.V.|
00000070 d3 8f 14 ff e2 9b a3 f6 92 77 aa cf f3 4e |.........w...N|
00000050 01 16 03 03 00 28 00 00 00 00 00 00 00 00 87 7a |.....(.........z|
00000060 82 d7 46 25 1d a6 bb c2 a8 a8 4e a5 d1 f8 02 db |..F%......N.....|
00000070 33 33 ca 78 b6 d3 bd 77 8a 33 23 a7 95 fb |33.x...w.3#...|
>>> Flow 4 (server to client)
00000000 14 03 03 00 01 01 16 03 03 00 28 ca a5 27 78 fb |..........(..'x.|
00000010 e9 66 83 4d 71 62 d4 37 2f 01 5c 8b 67 52 98 5d |.f.Mqb.7/.\.gR.]|
00000020 0d a0 94 53 c1 b5 25 00 e2 42 ab 37 67 2e 12 eb |...S..%..B.7g...|
00000030 35 a3 9a |5..|
00000000 14 03 03 00 01 01 16 03 03 00 28 ce a1 9d 01 c0 |..........(.....|
00000010 31 e5 d5 57 16 e1 a6 b3 8b 25 58 0f fa 2a de 3e |1..W.....%X..*.>|
00000020 0c d9 06 11 a6 b0 d7 b0 33 ad 31 73 5b 26 b4 d2 |........3.1s[&..|
00000030 12 56 c8 |.V.|
>>> Flow 5 (client to server)
00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 e0 be 1e |................|
00000010 a7 0f 73 a6 25 ca 9e d3 0a ad 6b e7 e9 db 21 a1 |..s.%.....k...!.|
00000020 70 5f c1 15 03 03 00 1a 00 00 00 00 00 00 00 02 |p_..............|
00000030 c3 af f9 8c 63 94 cb e4 99 6d b7 32 80 22 f7 1f |....c....m.2."..|
00000040 02 87 |..|
00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 d5 04 4c |...............L|
00000010 7b 35 b4 d7 90 ae fe 00 d2 f2 4b 76 f1 36 5e 24 |{5........Kv.6^$|
00000020 4a aa 94 15 03 03 00 1a 00 00 00 00 00 00 00 02 |J...............|
00000030 d3 1c 41 37 ab f6 17 79 f0 01 a4 19 a5 75 7a 8e |..A7...y.....uz.|
00000040 a3 b2 |..|

View File

@ -8,11 +8,11 @@
00000060 19 00 0b 00 02 01 00 00 0d 00 0a 00 08 04 01 04 |................|
00000070 03 02 01 02 03 ff 01 00 01 00 |..........|
>>> Flow 2 (server to client)
00000000 16 03 03 00 59 02 00 00 55 03 03 52 cc 57 58 64 |....Y...U..R.WXd|
00000010 28 c0 0d 0a be 3a aa 96 4e 92 8d 9d f2 19 ab de |(....:..N.......|
00000020 b2 05 3a 61 13 78 60 7e 96 24 b2 20 a3 06 80 14 |..:a.x`~.$. ....|
00000030 15 52 89 1b d4 84 94 8b ed 66 8d 75 63 8f dc 5a |.R.......f.uc..Z|
00000040 a8 20 14 65 5d ce 7e 2f 4b 3e 1e 09 c0 13 00 00 |. .e].~/K>......|
00000000 16 03 03 00 59 02 00 00 55 03 03 53 04 f1 02 41 |....Y...U..S...A|
00000010 95 cc 56 30 65 46 24 75 d5 9e 3c a7 5b 6c 99 fe |..V0eF$u..<.[l..|
00000020 86 35 23 42 3a 8f 4d 4c b9 98 7d 20 a7 46 43 72 |.5#B:.ML..} .FCr|
00000030 66 bb b6 ad ff ad cf 63 37 fe 6b b4 78 94 08 49 |f......c7.k.x..I|
00000040 54 06 ed f4 85 73 38 4a c6 fe b6 98 c0 13 00 00 |T....s8J........|
00000050 0d ff 01 00 01 00 00 0b 00 04 03 00 01 02 16 03 |................|
00000060 03 02 be 0b 00 02 ba 00 02 b7 00 02 b4 30 82 02 |.............0..|
00000070 b0 30 82 02 19 a0 03 02 01 02 02 09 00 85 b0 bb |.0..............|
@ -58,20 +58,20 @@
000002f0 5f 33 c4 b6 d8 c9 75 90 96 8c 0f 52 98 b5 cd 98 |_3....u....R....|
00000300 1f 89 20 5f f2 a0 1c a3 1b 96 94 dd a9 fd 57 e9 |.. _..........W.|
00000310 70 e8 26 6d 71 99 9b 26 6e 38 50 29 6c 90 a7 bd |p.&mq..&n8P)l...|
00000320 d9 16 03 03 00 cd 0c 00 00 c9 03 00 17 41 04 33 |.............A.3|
00000330 96 55 c1 5e 9d c4 a1 23 86 5b e8 df f9 7d d4 d0 |.U.^...#.[...}..|
00000340 5f 61 9a c6 24 be a6 4b ce 08 6e 9f 8f ef 08 66 |_a..$..K..n....f|
00000350 9f a5 2e e7 04 c9 f2 d9 ab ef fa 62 28 a0 01 7a |...........b(..z|
00000360 d9 d6 44 9b c3 25 dc 5e a9 75 ea 8d 2f e8 63 04 |..D..%.^.u../.c.|
00000370 01 00 80 ba b3 36 74 0f 2c 3a c2 a3 2c ae 74 dc |.....6t.,:..,.t.|
00000380 f8 90 ba 91 10 a3 c1 8e 2b bf 2c b4 05 78 12 ff |........+.,..x..|
00000390 ec 62 b3 db f2 27 3d d0 0f bb 7d 1e f6 8f fd ee |.b...'=...}.....|
000003a0 53 37 be 6a 9e d9 21 42 ea 20 1e d8 fc eb 3c 79 |S7.j..!B. ....<y|
000003b0 98 85 ab fe 9b 2d 63 77 cb 13 32 32 81 94 3e 53 |.....-cw..22..>S|
000003c0 4f a7 63 c4 78 2d a2 48 08 ea f6 2a 50 24 33 f4 |O.c.x-.H...*P$3.|
000003d0 9f 10 63 13 80 4e ec 5e 68 e3 18 f0 7b a4 2f 16 |..c..N.^h...{./.|
000003e0 db c0 aa 8c a0 ee 47 65 a9 57 f3 a5 ef 6a 45 f5 |......Ge.W...jE.|
000003f0 e2 54 cd 16 03 03 00 04 0e 00 00 00 |.T..........|
00000320 d9 16 03 03 00 cd 0c 00 00 c9 03 00 17 41 04 48 |.............A.H|
00000330 68 d8 8a 10 b4 bf eb 8d d1 98 b0 a6 f4 47 5d 91 |h............G].|
00000340 61 da 50 d9 85 7b 5d 90 02 2c 38 c9 af 81 d3 55 |a.P..{]..,8....U|
00000350 07 62 b1 62 58 7f 39 94 d7 91 96 a8 1f 47 60 a5 |.b.bX.9......G`.|
00000360 c0 04 f2 fb cb 15 75 a6 16 3f 94 53 7c ff dd 04 |......u..?.S|...|
00000370 01 00 80 b9 82 fa 0b f8 8c 94 2c 6e 05 81 7d 80 |..........,n..}.|
00000380 5d 9a 77 78 af c8 33 5d 89 7e 2e 3c e5 72 66 a8 |].wx..3].~.<.rf.|
00000390 f1 5c 02 04 02 70 76 7b 45 ff 0d 29 a0 cb 0d db |.\...pv{E..)....|
000003a0 7a 4c c4 13 19 cd 47 b2 f1 c9 43 4f 95 d2 f1 c6 |zL....G...CO....|
000003b0 bc ae 31 4a 9d de 80 b2 a4 b7 b6 dd 8c 03 3e 2a |..1J..........>*|
000003c0 46 5e d1 e7 5b c5 9e 06 58 f3 55 b2 77 09 f3 98 |F^..[...X.U.w...|
000003d0 d5 7f 5a 74 64 7e 48 22 8f 7d a8 68 b6 1d 90 df |..Ztd~H".}.h....|
000003e0 2c 91 d7 c5 07 3d d1 6f e9 c1 91 03 3c 23 5a 56 |,....=.o....<#ZV|
000003f0 3b b2 c2 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.|
@ -79,21 +79,21 @@
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 40 00 00 00 00 00 00 00 00 00 00 |.....@..........|
00000060 00 00 00 00 00 00 73 06 31 ab 8e cc e0 db 1a fe |......s.1.......|
00000070 7e d1 5b 2b 96 93 ee 2d 76 54 17 f9 c2 73 e8 62 |~.[+...-vT...s.b|
00000080 f0 39 31 02 72 e9 ae 08 75 2d f1 f3 82 06 17 57 |.91.r...u-.....W|
00000090 b7 aa c2 79 9f 8e |...y..|
00000060 00 00 00 00 00 00 59 e6 92 05 27 ec 09 2c b0 a5 |......Y...'..,..|
00000070 2a fb 7e f1 03 53 16 63 68 a1 86 13 bb da 98 27 |*.~..S.ch......'|
00000080 6d 42 08 35 6a ec 58 61 2a 4d 44 ec ae c5 b9 d2 |mB.5j.Xa*MD.....|
00000090 76 57 1f 75 9f 8d |vW.u..|
>>> Flow 4 (server to client)
00000000 14 03 03 00 01 01 16 03 03 00 40 dc c3 03 17 76 |..........@....v|
00000010 d0 a5 61 9e 47 6a 1a 01 d0 21 92 c5 d5 f9 69 ba |..a.Gj...!....i.|
00000020 5e 82 2e d3 fc 4b a4 af 78 9d 47 6e b8 33 dc 8b |^....K..x.Gn.3..|
00000030 a0 94 b5 72 ea 4a 7d fc ea f5 6e b6 c9 00 73 d1 |...r.J}...n...s.|
00000040 3e cb 44 ef 0c fc fc ff 1e 87 8e |>.D........|
00000000 14 03 03 00 01 01 16 03 03 00 40 6e 03 d0 e6 98 |..........@n....|
00000010 1f f5 39 7b 06 9f 95 f0 7a 88 35 7c 55 db c3 2f |..9{....z.5|U../|
00000020 00 ef 5b d3 62 87 a2 94 da 2f f6 4a 89 c9 a8 3d |..[.b..../.J...=|
00000030 3a 92 db 77 35 92 01 4b f5 c5 6b 95 09 9f cd 79 |:..w5..K..k....y|
00000040 3c af 37 5b 27 bf 93 3e 04 55 71 |<.7['..>.Uq|
>>> 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 de 2e e3 8e d3 a5 e5 64 8e 22 f7 |............d.".|
00000020 09 00 15 06 cb e9 d3 c5 3c 17 41 2f 5b a8 ce 09 |........<.A/[...|
00000030 70 59 47 24 22 15 03 03 00 30 00 00 00 00 00 00 |pYG$"....0......|
00000040 00 00 00 00 00 00 00 00 00 00 6a af 3f c1 54 6b |..........j.?.Tk|
00000050 14 64 23 c4 94 79 82 fd 78 84 ef 04 6f 64 fd 3e |.d#..y..x...od.>|
00000060 20 ff a0 11 ed fb d1 fb ff 07 | .........|
00000010 00 00 00 00 00 bc c9 d0 8e 80 14 de 32 18 49 e8 |............2.I.|
00000020 20 dc 5e 6c e4 6d 14 00 df 51 71 fb 86 95 16 4c | .^l.m...Qq....L|
00000030 04 8e 71 e1 48 15 03 03 00 30 00 00 00 00 00 00 |..q.H....0......|
00000040 00 00 00 00 00 00 00 00 00 00 b7 6d 30 72 61 53 |...........m0raS|
00000050 d8 0a d4 1d ae e5 d4 22 46 c9 d5 4e 4a 86 f5 ac |......."F..NJ...|
00000060 72 98 c6 db 38 29 97 2c 84 0b |r...8).,..|

View File

@ -8,11 +8,11 @@
00000060 19 00 0b 00 02 01 00 00 0d 00 0a 00 08 04 01 04 |................|
00000070 03 02 01 02 03 ff 01 00 01 00 |..........|
>>> Flow 2 (server to client)
00000000 16 03 03 00 51 02 00 00 4d 03 03 52 cc 57 58 70 |....Q...M..R.WXp|
00000010 03 50 58 32 ec de bc ae 18 e7 24 15 2b 4d cc d5 |.PX2......$.+M..|
00000020 1f 40 db 80 5b 19 d9 3f 48 4b 06 20 87 fe d3 d4 |.@..[..?HK. ....|
00000030 51 42 74 9c cf 9d fd 31 c3 53 28 f1 a4 21 16 d6 |QBt....1.S(..!..|
00000040 4f 5a 22 09 9d 99 89 7c f9 e7 5b 49 00 05 00 00 |OZ"....|..[I....|
00000000 16 03 03 00 51 02 00 00 4d 03 03 53 04 f1 02 9d |....Q...M..S....|
00000010 2e 4e d9 17 4a 35 fa 9d 94 f6 45 0a f6 6b 5d 1c |.N..J5....E..k].|
00000020 1e 15 19 8d 6d 94 cc 90 d9 39 94 20 8b 4b de 76 |....m....9. .K.v|
00000030 d5 64 5d b7 19 df e7 eb 7e a0 22 c4 09 38 a0 12 |.d].....~."..8..|
00000040 d5 59 10 c8 31 06 dc fc e4 9d d1 80 00 05 00 00 |.Y..1...........|
00000050 05 ff 01 00 01 00 16 03 03 02 be 0b 00 02 ba 00 |................|
00000060 02 b7 00 02 b4 30 82 02 b0 30 82 02 19 a0 03 02 |.....0...0......|
00000070 01 02 02 09 00 85 b0 bb a4 8a 7f b8 ca 30 0d 06 |.............0..|
@ -69,15 +69,15 @@
00000060 e6 bd 77 82 6f 23 b6 e0 bd a2 92 b7 3a ac e8 56 |..w.o#......:..V|
00000070 f1 af 54 5e 46 87 e9 3b 33 e7 b8 28 b7 d6 c8 90 |..T^F..;3..(....|
00000080 35 d4 1c 43 d1 30 6f 55 4e 0a 70 14 03 03 00 01 |5..C.0oUN.p.....|
00000090 01 16 03 03 00 24 fb 2b 2f c5 19 90 a6 bc 81 c0 |.....$.+/.......|
000000a0 ac 6b e6 1f e2 af be 10 b4 a0 c7 31 aa d8 cc a2 |.k.........1....|
000000b0 ce 51 1e 8e d6 00 76 27 72 53 |.Q....v'rS|
00000090 01 16 03 03 00 24 37 14 b2 97 7b b5 f0 9a 38 05 |.....$7...{...8.|
000000a0 22 35 69 9c 95 2f 86 4b 37 98 22 db 4e 9a 46 9c |"5i../.K7.".N.F.|
000000b0 b9 81 74 72 58 18 53 0c 5c 3c |..trX.S.\<|
>>> Flow 4 (server to client)
00000000 14 03 03 00 01 01 16 03 03 00 24 d4 c8 b3 8a 87 |..........$.....|
00000010 b5 0d 01 80 fc 2c df 18 ca 17 fd 06 ad 31 29 13 |.....,.......1).|
00000020 5f f9 b4 75 ad 49 c8 de ec 1a ee 57 6b 1a 81 |_..u.I.....Wk..|
00000000 14 03 03 00 01 01 16 03 03 00 24 3c b3 e7 77 5a |..........$<..wZ|
00000010 7c 36 5a 74 74 26 8d 5b 5a 09 96 60 e8 24 45 2f ||6Ztt&.[Z..`.$E/|
00000020 c2 39 14 5e db 58 12 49 ad a8 b6 ea ef 58 16 |.9.^.X.I.....X.|
>>> Flow 5 (client to server)
00000000 17 03 03 00 1a 8b ce be 7d c7 06 42 d0 9b 65 6c |........}..B..el|
00000010 23 0e 84 ef e0 a3 ec 42 4e 70 14 65 78 ad 52 15 |#......BNp.ex.R.|
00000020 03 03 00 16 49 5f f2 e2 e0 8f d3 54 68 2a d6 ab |....I_.....Th*..|
00000030 28 be 50 3d 62 8b 1a b3 5b e5 |(.P=b...[.|
00000000 17 03 03 00 1a 6d 29 d7 ba 2f 85 02 b6 f0 82 64 |.....m)../.....d|
00000010 6c 55 ae ab f6 fd 14 ff b8 38 f0 f8 a6 ea cc 15 |lU.......8......|
00000020 03 03 00 16 10 c5 d9 41 7b e2 89 67 dc 29 8e f8 |.......A{..g.)..|
00000030 b5 ab 32 91 44 2c 27 84 49 f7 |..2.D,'.I.|

View File

@ -1,7 +1,7 @@
>>> Flow 1 (client to server)
00000000 16 03 01 00 76 01 00 00 72 03 01 52 cc 57 59 19 |....v...r..R.WY.|
00000010 3d b7 7c 4b 54 8d ca 3a b1 4c 4e a9 78 86 d9 74 |=.|KT..:.LN.x..t|
00000020 87 2f f3 86 bf ac cc f4 11 75 b7 00 00 04 c0 0a |./.......u......|
00000000 16 03 01 00 76 01 00 00 72 03 01 53 04 f0 f9 4b |....v...r..S...K|
00000010 30 a8 68 d0 79 13 14 69 ee 3b 5d 05 cb 71 63 43 |0.h.y..i.;]..qcC|
00000020 4a 55 6b 05 25 53 19 ba e0 2f b1 00 00 04 c0 0a |JUk.%S.../......|
00000030 00 ff 01 00 00 45 00 0b 00 04 03 00 01 02 00 0a |.....E..........|
00000040 00 34 00 32 00 0e 00 0d 00 19 00 0b 00 0c 00 18 |.4.2............|
00000050 00 09 00 0a 00 16 00 17 00 08 00 06 00 07 00 14 |................|
@ -44,50 +44,41 @@
00000210 0e bd 3f a3 8c 25 c1 33 13 83 0d 94 06 bb d4 37 |..?..%.3.......7|
00000220 7a f6 ec 7a c9 86 2e dd d7 11 69 7f 85 7c 56 de |z..z......i..|V.|
00000230 fb 31 78 2b e4 c7 78 0d ae cb be 9e 4e 36 24 31 |.1x+..x.....N6$1|
00000240 7b 6a 0f 39 95 12 07 8f 2a 16 03 01 01 1a 0c 00 |{j.9....*.......|
00000250 01 16 03 00 19 85 04 01 39 dc ee 44 17 5e db d7 |........9..D.^..|
00000260 27 af b6 56 d9 b4 43 5a 99 cf aa 31 37 0c 6f 3a |'..V..CZ...17.o:|
00000270 a0 f8 53 c4 74 d1 91 0a 46 f5 38 3b 5c 09 d8 97 |..S.t...F.8;\...|
00000280 dc 4b aa 70 26 48 f2 d6 0b 31 c9 f8 d4 98 43 e1 |.K.p&H...1....C.|
00000290 6c d5 c7 b2 8e 0b 01 e6 b6 00 28 80 7b fc 96 8f |l.........(.{...|
000002a0 0d a2 4f b0 79 af dc 61 28 63 33 78 f6 31 39 fd |..O.y..a(c3x.19.|
000002b0 8a f4 15 18 11 fe db d5 07 da 2c ed 49 a0 23 bf |..........,.I.#.|
000002c0 d0 3a 38 1d 54 ae 1c 7b ea 29 ee d0 38 c1 76 a7 |.:8.T..{.)..8.v.|
000002d0 7f 2a f4 ce 1e ac cc 94 79 90 33 00 8b 30 81 88 |.*......y.3..0..|
000002e0 02 42 00 c6 85 8e 06 b7 04 04 e9 cd 9e 3e cb 66 |.B...........>.f|
000002f0 23 95 b4 42 9c 64 81 39 05 3f b5 21 f8 28 af 60 |#..B.d.9.?.!.(.`|
00000300 6b 4d 3d ba a1 4b 5e 77 ef e7 59 28 fe 1d c1 27 |kM=..K^w..Y(...'|
00000310 a2 ff a8 de 33 48 b3 c1 85 6a 42 9b f9 7e 7e 31 |....3H...jB..~~1|
00000320 c2 e5 bd 66 02 42 00 ad 7d 06 35 ab ec 8d ac d4 |...f.B..}.5.....|
00000330 ba 1b 49 5e 05 5f f0 97 93 82 b8 2b 8d 91 98 63 |..I^._.....+...c|
00000340 8e b4 14 62 db 1e c9 2b 30 f8 41 9b a6 e6 bc de |...b...+0.A.....|
00000350 0e 68 30 21 e4 33 62 b4 3c 00 12 33 3c d2 bb 9e |.h0!.3b.<..3<...|
00000360 a9 db ef 22 41 ed 2b 1a 16 03 01 00 04 0e 00 00 |..."A.+.........|
00000370 00 |.|
00000240 7b 6a 0f 39 95 12 07 8f 2a 16 03 01 00 d6 0c 00 |{j.9....*.......|
00000250 00 d2 03 00 17 41 04 1e 18 37 ef 0d 19 51 88 35 |.....A...7...Q.5|
00000260 75 71 b5 e5 54 5b 12 2e 8f 09 67 fd a7 24 20 3e |uq..T[....g..$ >|
00000270 b2 56 1c ce 97 28 5e f8 2b 2d 4f 9e f1 07 9f 6c |.V...(^.+-O....l|
00000280 4b 5b 83 56 e2 32 42 e9 58 b6 d7 49 a6 b5 68 1a |K[.V.2B.X..I..h.|
00000290 41 03 56 6b dc 5a 89 00 8b 30 81 88 02 42 00 c6 |A.Vk.Z...0...B..|
000002a0 85 8e 06 b7 04 04 e9 cd 9e 3e cb 66 23 95 b4 42 |.........>.f#..B|
000002b0 9c 64 81 39 05 3f b5 21 f8 28 af 60 6b 4d 3d ba |.d.9.?.!.(.`kM=.|
000002c0 a1 4b 5e 77 ef e7 59 28 fe 1d c1 27 a2 ff a8 de |.K^w..Y(...'....|
000002d0 33 48 b3 c1 85 6a 42 9b f9 7e 7e 31 c2 e5 bd 66 |3H...jB..~~1...f|
000002e0 02 42 00 ad 7d 06 35 ab ec 8d ac d4 ba 1b 49 5e |.B..}.5.......I^|
000002f0 05 5f f0 97 93 82 b8 2b 8d 91 98 63 8e b4 14 62 |._.....+...c...b|
00000300 db 1e c9 2b 30 f8 41 9b a6 e6 bc de 0e 68 30 21 |...+0.A......h0!|
00000310 d8 ef 2f 05 42 da f2 e0 2c 06 33 1d 0d 9a 1a 75 |../.B...,.3....u|
00000320 59 a7 3a bc 16 03 01 00 04 0e 00 00 00 |Y.:..........|
>>> Flow 3 (client to server)
00000000 16 03 01 00 8a 10 00 00 86 85 04 00 be 44 15 9d |.............D..|
00000010 89 bc 13 e7 55 cf 7a f9 b1 dc 2b 22 f2 7b a6 33 |....U.z...+".{.3|
00000020 b6 46 de 7d c2 08 a6 67 15 7d 3e c2 02 d4 30 dc |.F.}...g.}>...0.|
00000030 35 37 7e ee fb 12 8c 74 c0 bf ea db 72 06 cd 52 |57~....t....r..R|
00000040 1a e9 36 2e c5 5d 22 9e 56 e5 8d 9f a5 01 e2 e6 |..6..]".V.......|
00000050 f5 77 64 05 80 c0 e3 54 9a 89 76 f9 73 64 7d 0e |.wd....T..v.sd}.|
00000060 bf d7 b3 57 a2 6c 4a 34 80 53 96 90 61 56 34 ad |...W.lJ4.S..aV4.|
00000070 75 44 54 79 dd 71 16 fe 4f 27 4f d0 0c d0 1e b6 |uDTy.q..O'O.....|
00000080 82 c4 b2 e9 a1 87 fd a7 2a 6a 5d 79 b8 f1 4e 14 |........*j]y..N.|
00000090 03 01 00 01 01 16 03 01 00 30 db c5 5f 9b 03 77 |.........0.._..w|
000000a0 c9 aa 5e 74 fd 0c f7 28 fe 40 8b 0e 2d 85 1e 25 |..^t...(.@..-..%|
000000b0 96 23 79 48 2c 3f 5d 9b 57 f0 34 8d 87 81 13 d9 |.#yH,?].W.4.....|
000000c0 ed 72 f6 51 bf d7 6e 8b 61 3d |.r.Q..n.a=|
00000000 16 03 01 00 46 10 00 00 42 41 04 08 28 cf bd 3c |....F...BA..(..<|
00000010 3c cc 98 9e 73 3f 92 a7 cb 22 83 3b c7 61 46 0e |<...s?...".;.aF.|
00000020 4d 7c 30 b5 06 85 2f 01 be b5 40 e2 64 1e 45 c1 |M|0.../...@.d.E.|
00000030 9d 73 95 d5 65 92 0b 9b e7 6f c6 91 ab b6 fa be |.s..e....o......|
00000040 61 83 a7 f2 eb f5 65 31 fe 24 7b 14 03 01 00 01 |a.....e1.${.....|
00000050 01 16 03 01 00 30 15 d1 c4 ca 0b 01 84 13 5a ba |.....0........Z.|
00000060 89 04 87 73 7c bb d8 89 7e 10 27 ba 6f 5d dc d3 |...s|...~.'.o]..|
00000070 b5 ef 32 86 58 cc fb eb 5c 32 9e 95 ef 01 1c ac |..2.X...\2......|
00000080 dc 8e df 7f fe 0a |......|
>>> Flow 4 (server to client)
00000000 14 03 01 00 01 01 16 03 01 00 30 95 b6 20 60 88 |..........0.. `.|
00000010 5f 23 11 06 83 f5 20 2d 42 77 36 c2 84 1b 70 90 |_#.... -Bw6...p.|
00000020 12 af d3 5e fa b0 59 6b 1e 91 0a c3 e0 37 40 94 |...^..Yk.....7@.|
00000030 07 c0 2b 84 74 41 fa fd 7c 41 59 17 03 01 00 20 |..+.tA..|AY.... |
00000040 de a7 ea 4e f8 88 22 6d cb 3d d5 ed 60 7c b9 a0 |...N.."m.=..`|..|
00000050 ba c5 19 14 86 3a 98 ea d3 73 68 1e d4 f8 0e 12 |.....:...sh.....|
00000060 17 03 01 00 30 30 50 48 84 2e b0 15 0a 5f 64 3c |....00PH....._d<|
00000070 fc 19 aa 89 7d 6e ba 84 56 56 66 15 6e d4 b9 35 |....}n..VVf.n..5|
00000080 20 ac 98 0d 8d 09 e1 80 8d 32 c8 99 d2 70 41 3a | ........2...pA:|
00000090 9b 62 d6 48 b1 15 03 01 00 20 9a 16 01 aa d0 6f |.b.H..... .....o|
000000a0 d4 d3 bb 5d 57 c0 7c d1 a8 d4 67 5d 5e 1d be 7d |...]W.|...g]^..}|
000000b0 d2 78 4a 33 93 ae 53 cc fb a0 |.xJ3..S...|
00000000 14 03 01 00 01 01 16 03 01 00 30 e8 48 86 81 3c |..........0.H..<|
00000010 f5 25 5c 94 a9 06 c4 5c 71 62 b1 43 76 ec 2c 44 |.%\....\qb.Cv.,D|
00000020 95 b5 8c 95 d2 ff 82 92 b6 fc 52 75 03 c6 a1 f0 |..........Ru....|
00000030 99 6d b1 ed ec 68 6c d7 9f 18 50 17 03 01 00 20 |.m...hl...P.... |
00000040 32 d9 26 8a 81 b8 9d a5 7b fd d5 4e 7a db 2e 29 |2.&.....{..Nz..)|
00000050 58 9a 4f 6a 27 18 bc dc c2 49 b8 65 cb 8e 16 5a |X.Oj'....I.e...Z|
00000060 17 03 01 00 30 c4 56 0a ad 9a 82 cb 3e 32 f1 7c |....0.V.....>2.||
00000070 95 6e dd cd e9 4d f0 e5 2d c9 a3 f7 de bb d7 fd |.n...M..-.......|
00000080 84 bb df 34 8c 64 1f 03 58 64 19 4a 5b 7a a8 81 |...4.d..Xd.J[z..|
00000090 52 bb 51 0a 43 15 03 01 00 20 89 18 7a 40 ec 49 |R.Q.C.... ..z@.I|
000000a0 52 d5 d3 20 ac 07 eb e9 4a 78 23 cf e7 21 32 74 |R.. ....Jx#..!2t|
000000b0 ec 40 8d a8 f4 33 1c ae 93 cf |.@...3....|

View File

@ -1,7 +1,7 @@
>>> Flow 1 (client to server)
00000000 16 03 01 00 ca 01 00 00 c6 03 03 52 cc 5e 7f 49 |...........R.^.I|
00000010 8a 7a 88 c0 85 24 6b 3d 95 ff 0f 9e 91 32 c2 a4 |.z...$k=.....2..|
00000020 6b 4c 53 e4 b4 4c 40 72 e4 54 27 00 00 32 c0 30 |kLS..L@r.T'..2.0|
00000000 16 03 01 00 ca 01 00 00 c6 03 03 53 04 f1 3f 5f |...........S..?_|
00000010 f4 ef 1f b3 41 0b 54 e4 4d 56 0a 31 22 b8 5c 73 |....A.T.MV.1".\s|
00000020 a3 cb b5 b2 9d 43 f1 83 bc d3 bd 00 00 32 c0 30 |.....C.......2.0|
00000030 c0 2c c0 28 c0 24 c0 14 c0 0a c0 22 c0 21 00 a3 |.,.(.$.....".!..|
00000040 00 9f 00 6b 00 6a 00 39 00 38 00 88 00 87 c0 32 |...k.j.9.8.....2|
00000050 c0 2e c0 2a c0 26 c0 0f c0 05 00 9d 00 3d 00 35 |...*.&.......=.5|
@ -49,51 +49,43 @@
00000210 33 13 83 0d 94 06 bb d4 37 7a f6 ec 7a c9 86 2e |3.......7z..z...|
00000220 dd d7 11 69 7f 85 7c 56 de fb 31 78 2b e4 c7 78 |...i..|V..1x+..x|
00000230 0d ae cb be 9e 4e 36 24 31 7b 6a 0f 39 95 12 07 |.....N6$1{j.9...|
00000240 8f 2a 16 03 03 01 1c 0c 00 01 18 03 00 19 85 04 |.*..............|
00000250 01 39 dc ee 44 17 5e db d7 27 af b6 56 d9 b4 43 |.9..D.^..'..V..C|
00000260 5a 99 cf aa 31 37 0c 6f 3a a0 f8 53 c4 74 d1 91 |Z...17.o:..S.t..|
00000270 0a 46 f5 38 3b 5c 09 d8 97 dc 4b aa 70 26 48 f2 |.F.8;\....K.p&H.|
00000280 d6 0b 31 c9 f8 d4 98 43 e1 6c d5 c7 b2 8e 0b 01 |..1....C.l......|
00000290 e6 b6 00 28 80 7b fc 96 8f 0d a2 4f b0 79 af dc |...(.{.....O.y..|
000002a0 61 28 63 33 78 f6 31 39 fd 8a f4 15 18 11 fe db |a(c3x.19........|
000002b0 d5 07 da 2c ed 49 a0 23 bf d0 3a 38 1d 54 ae 1c |...,.I.#..:8.T..|
000002c0 7b ea 29 ee d0 38 c1 76 a7 7f 2a f4 ce 1e ac cc |{.)..8.v..*.....|
000002d0 94 79 90 33 04 03 00 8b 30 81 88 02 42 00 c6 85 |.y.3....0...B...|
000002e0 8e 06 b7 04 04 e9 cd 9e 3e cb 66 23 95 b4 42 9c |........>.f#..B.|
000002f0 64 81 39 05 3f b5 21 f8 28 af 60 6b 4d 3d ba a1 |d.9.?.!.(.`kM=..|
00000300 4b 5e 77 ef e7 59 28 fe 1d c1 27 a2 ff a8 de 33 |K^w..Y(...'....3|
00000310 48 b3 c1 85 6a 42 9b f9 7e 7e 31 c2 e5 bd 66 02 |H...jB..~~1...f.|
00000320 42 00 ad 7d 06 35 ab ec 8d ac d4 ba 1b 49 5e 05 |B..}.5.......I^.|
00000330 5f f0 97 93 82 b8 2b 8d 91 98 63 8e b4 14 62 db |_.....+...c...b.|
00000340 1e c9 2b ca fe c9 88 b7 3d 46 d2 5b 55 de bc 9a |..+.....=F.[U...|
00000350 66 c9 cf b7 3d e8 c8 62 24 93 d8 db 12 77 2a 6c |f...=..b$....w*l|
00000360 08 66 48 16 03 03 00 04 0e 00 00 00 |.fH.........|
00000240 8f 2a 16 03 03 00 d8 0c 00 00 d4 03 00 17 41 04 |.*............A.|
00000250 1e 18 37 ef 0d 19 51 88 35 75 71 b5 e5 54 5b 12 |..7...Q.5uq..T[.|
00000260 2e 8f 09 67 fd a7 24 20 3e b2 56 1c ce 97 28 5e |...g..$ >.V...(^|
00000270 f8 2b 2d 4f 9e f1 07 9f 6c 4b 5b 83 56 e2 32 42 |.+-O....lK[.V.2B|
00000280 e9 58 b6 d7 49 a6 b5 68 1a 41 03 56 6b dc 5a 89 |.X..I..h.A.Vk.Z.|
00000290 04 03 00 8b 30 81 88 02 42 00 c6 85 8e 06 b7 04 |....0...B.......|
000002a0 04 e9 cd 9e 3e cb 66 23 95 b4 42 9c 64 81 39 05 |....>.f#..B.d.9.|
000002b0 3f b5 21 f8 28 af 60 6b 4d 3d ba a1 4b 5e 77 ef |?.!.(.`kM=..K^w.|
000002c0 e7 59 28 fe 1d c1 27 a2 ff a8 de 33 48 b3 c1 85 |.Y(...'....3H...|
000002d0 6a 42 9b f9 7e 7e 31 c2 e5 bd 66 02 42 00 ad 7d |jB..~~1...f.B..}|
000002e0 06 35 ab ec 8d ac d4 ba 1b 49 5e 05 5f f0 97 93 |.5.......I^._...|
000002f0 82 b8 2b 8d 91 98 63 8e b4 14 62 db 1e c9 2b 64 |..+...c...b...+d|
00000300 e9 e6 bf 15 5b 67 c2 40 90 c6 1f b7 92 db 4b f6 |....[g.@......K.|
00000310 f4 db ae 82 f1 4f 02 75 52 40 38 10 ff 35 f0 16 |.....O.uR@8..5..|
00000320 03 03 00 04 0e 00 00 00 |........|
>>> Flow 3 (client to server)
00000000 16 03 03 00 8a 10 00 00 86 85 04 01 fd 02 a1 b1 |................|
00000010 56 3c 37 37 da 78 37 d9 07 ee 09 35 4f ff 3e db |V<77.x7....5O.>.|
00000020 da da 23 12 2c 40 12 dd 73 e7 2c c5 2e fb 37 24 |..#.,@..s.,...7$|
00000030 2f 97 95 b4 6c 1e 56 6c 4e 49 d5 89 21 8b ca 74 |/...l.VlNI..!..t|
00000040 85 1b 24 96 fb 28 cc 64 70 59 fc be 18 00 00 98 |..$..(.dpY......|
00000050 9a f6 c9 26 26 6d ce 48 7b 3b 62 ea dd da 73 8b |...&&m.H{;b...s.|
00000060 71 48 18 71 52 2d 22 1d 7c 67 55 1b 6b fa 44 40 |qH.qR-".|gU.k.D@|
00000070 be 87 0f 52 21 4b 86 b4 f0 6d 1b dd e7 0f f8 ef |...R!K...m......|
00000080 1a 09 8b 66 b9 60 38 da 6f 9d 9d 74 58 d9 35 14 |...f.`8.o..tX.5.|
00000090 03 03 00 01 01 16 03 03 00 40 5b 98 11 9d d4 83 |.........@[.....|
000000a0 13 b6 28 4b 85 61 0b e1 bf 36 3f 43 c0 95 3d 7e |..(K.a...6?C..=~|
000000b0 95 ea 84 14 e6 6d 1a e0 20 50 b4 02 d0 b2 e9 5f |.....m.. P....._|
000000c0 07 82 a8 6a 1e 7c 1e f7 6c b5 be 1b 20 2e 98 4e |...j.|..l... ..N|
000000d0 ab 8d 1e f2 56 88 ed ef aa 39 |....V....9|
00000000 16 03 03 00 46 10 00 00 42 41 04 d8 94 c4 05 26 |....F...BA.....&|
00000010 76 29 2d 0e ec 47 b6 50 d5 a3 da 2a ba 02 11 37 |v)-..G.P...*...7|
00000020 3d ef e6 2a db d0 47 47 a7 9a 5f 43 2d 98 78 26 |=..*..GG.._C-.x&|
00000030 81 e2 f1 ba fe f7 66 c6 61 cb c1 b7 60 62 34 a5 |......f.a...`b4.|
00000040 78 67 50 3d 9a 0e 4a 8c 8f d7 10 14 03 03 00 01 |xgP=..J.........|
00000050 01 16 03 03 00 40 5e 46 b0 5d 30 f6 da 8f 9e 67 |.....@^F.]0....g|
00000060 f5 3e bd fe c9 b8 53 b2 10 d5 7c 0e 34 e3 93 6d |.>....S...|.4..m|
00000070 0e 8e 8a 2b df fb 9a 0f a5 23 55 e7 0a 4b e2 d3 |...+.....#U..K..|
00000080 db 15 e8 52 74 26 78 b3 b0 56 65 63 ac ae 1e c0 |...Rt&x..Vec....|
00000090 0b f4 92 56 a9 04 |...V..|
>>> 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 7e f1 fc 1d 0c |...........~....|
00000020 f5 a2 c6 35 de 78 97 62 72 3f 05 6c a3 a8 0e cb |...5.x.br?.l....|
00000030 10 7e c0 3d 28 c7 d9 4e 71 f4 18 d7 14 42 09 5c |.~.=(..Nq....B.\|
00000040 22 26 04 1f 04 12 9f 88 3d 4a 4a 17 03 03 00 40 |"&......=JJ....@|
00000010 00 00 00 00 00 00 00 00 00 00 00 16 a9 63 0a 99 |.............c..|
00000020 21 8a fc 5c b3 ee 05 71 4e 75 c0 d9 40 54 0d 3e |!..\...qNu..@T.>|
00000030 4e 5d 44 b7 4b 5d a9 e7 5a 30 ed b6 d5 08 50 b1 |N]D.K]..Z0....P.|
00000040 e8 8c 54 eb 1b 39 7a f9 3b ac 2e 17 03 03 00 40 |..T..9z.;......@|
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000060 0f 35 50 38 be 3a c7 4e c4 de 36 63 85 c1 7a 78 |.5P8.:.N..6c..zx|
00000070 c6 7f 65 8c d1 44 c5 7e 45 32 60 88 93 bf 10 82 |..e..D.~E2`.....|
00000080 4b 1a 46 9a 60 54 c5 ee 2a c1 86 02 a7 b6 d5 ea |K.F.`T..*.......|
00000060 96 03 20 2b 20 c4 c1 9a 76 7b f3 96 bd 33 ed e6 |.. + ...v{...3..|
00000070 38 48 ea 53 d5 e0 62 b5 7e 1a 36 a8 dd 9f 2d 4b |8H.S..b.~.6...-K|
00000080 06 0d ae f6 bc 99 14 b3 93 14 27 63 e2 a0 c8 76 |..........'c...v|
00000090 15 03 03 00 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........|
000000a0 00 00 00 00 00 78 6c 41 05 2f 6f c2 d7 70 54 24 |.....xlA./o..pT$|
000000b0 66 01 2c 1e 71 43 05 3a 1b 9e 86 ff b4 c5 65 b2 |f.,.qC.:......e.|
000000c0 f0 f8 ef 6b 25 |...k%|
000000a0 00 00 00 00 00 48 af e1 e4 11 e1 b7 03 19 b0 e3 |.....H..........|
000000b0 e6 a9 66 d8 ac af aa 03 f6 0d 51 df 9a 27 78 3a |..f.......Q..'x:|
000000c0 56 5a 03 1a 4c |VZ..L|

View File

@ -1,7 +1,7 @@
>>> Flow 1 (client to server)
00000000 16 03 01 00 ca 01 00 00 c6 03 03 52 cc 5e 7f ec |...........R.^..|
00000010 d7 b4 0c ac 92 e8 d1 6e df c1 e6 ee f5 84 5e 1a |.......n......^.|
00000020 1d 05 bf 2d 3f 71 91 d1 cc b7 f8 00 00 32 c0 30 |...-?q.......2.0|
00000000 16 03 01 00 ca 01 00 00 c6 03 03 53 04 f1 3f cc |...........S..?.|
00000010 41 74 00 07 cb ae 3b 30 79 48 51 60 41 a3 8c ab |At....;0yHQ`A...|
00000020 dc 76 f9 74 52 1e c5 fb a9 69 c2 00 00 32 c0 30 |.v.tR....i...2.0|
00000030 c0 2c c0 28 c0 24 c0 14 c0 0a c0 22 c0 21 00 a3 |.,.(.$.....".!..|
00000040 00 9f 00 6b 00 6a 00 39 00 38 00 88 00 87 c0 32 |...k.j.9.8.....2|
00000050 c0 2e c0 2a c0 26 c0 0f c0 05 00 9d 00 3d 00 35 |...*.&.......=.5|
@ -60,51 +60,42 @@
000002c0 5a 5f 33 c4 b6 d8 c9 75 90 96 8c 0f 52 98 b5 cd |Z_3....u....R...|
000002d0 98 1f 89 20 5f f2 a0 1c a3 1b 96 94 dd a9 fd 57 |... _..........W|
000002e0 e9 70 e8 26 6d 71 99 9b 26 6e 38 50 29 6c 90 a7 |.p.&mq..&n8P)l..|
000002f0 bd d9 16 03 03 01 11 0c 00 01 0d 03 00 19 85 04 |................|
00000300 01 39 dc ee 44 17 5e db d7 27 af b6 56 d9 b4 43 |.9..D.^..'..V..C|
00000310 5a 99 cf aa 31 37 0c 6f 3a a0 f8 53 c4 74 d1 91 |Z...17.o:..S.t..|
00000320 0a 46 f5 38 3b 5c 09 d8 97 dc 4b aa 70 26 48 f2 |.F.8;\....K.p&H.|
00000330 d6 0b 31 c9 f8 d4 98 43 e1 6c d5 c7 b2 8e 0b 01 |..1....C.l......|
00000340 e6 b6 00 28 80 7b fc 96 8f 0d a2 4f b0 79 af dc |...(.{.....O.y..|
00000350 61 28 63 33 78 f6 31 39 fd 8a f4 15 18 11 fe db |a(c3x.19........|
00000360 d5 07 da 2c ed 49 a0 23 bf d0 3a 38 1d 54 ae 1c |...,.I.#..:8.T..|
00000370 7b ea 29 ee d0 38 c1 76 a7 7f 2a f4 ce 1e ac cc |{.)..8.v..*.....|
00000380 94 79 90 33 04 01 00 80 ad 89 a5 bf 16 74 a1 14 |.y.3.........t..|
00000390 c4 a1 09 31 95 69 e4 b4 e3 8d df 99 73 cd e6 94 |...1.i......s...|
000003a0 eb ca 07 7f f4 36 ca 31 1c 29 f0 f0 d8 40 6b 19 |.....6.1.)...@k.|
000003b0 f2 15 be f1 76 22 b3 82 f7 bf 2b 09 0f cd 31 c8 |....v"....+...1.|
000003c0 69 7b 7b 1a ed a1 f7 85 6e 04 5c fa a5 20 c0 ef |i{{.....n.\.. ..|
000003d0 c6 45 6d 05 25 37 ec f6 94 91 32 f3 c8 d1 f0 13 |.Em.%7....2.....|
000003e0 81 1e 26 bb 4c 47 91 79 ad cf 7e 61 85 54 eb 13 |..&.LG.y..~a.T..|
000003f0 6b b1 15 36 72 bf d1 ad 07 3e 6d bd 44 1a 30 ac |k..6r....>m.D.0.|
00000400 41 39 ad 75 14 bb 11 dc 16 03 03 00 04 0e 00 00 |A9.u............|
00000410 00 |.|
000002f0 bd d9 16 03 03 00 cd 0c 00 00 c9 03 00 17 41 04 |..............A.|
00000300 1e 18 37 ef 0d 19 51 88 35 75 71 b5 e5 54 5b 12 |..7...Q.5uq..T[.|
00000310 2e 8f 09 67 fd a7 24 20 3e b2 56 1c ce 97 28 5e |...g..$ >.V...(^|
00000320 f8 2b 2d 4f 9e f1 07 9f 6c 4b 5b 83 56 e2 32 42 |.+-O....lK[.V.2B|
00000330 e9 58 b6 d7 49 a6 b5 68 1a 41 03 56 6b dc 5a 89 |.X..I..h.A.Vk.Z.|
00000340 04 01 00 80 9d 84 09 35 73 fb f6 ea 94 7b 49 fb |.......5s....{I.|
00000350 c2 70 b1 11 64 5b 93 9f d9 8c f5 56 98 f6 d3 66 |.p..d[.....V...f|
00000360 a6 1d 18 56 88 87 71 3f b0 38 9d 44 1f ad 2c 0d |...V..q?.8.D..,.|
00000370 3a a7 e8 d4 3e 33 3c 41 20 f3 3f 5c e5 fb e3 23 |:...>3<A .?\...#|
00000380 12 48 ff d2 c4 30 7c 8a 51 3f 9f 19 6e 34 d7 60 |.H...0|.Q?..n4.`|
00000390 7d 12 8a aa 90 0f 50 d9 0b 9a b2 d7 66 b1 c6 84 |}.....P.....f...|
000003a0 af 5c e2 5e 16 3e 36 61 73 84 64 89 b3 c1 6d 50 |.\.^.>6as.d...mP|
000003b0 33 55 c7 e1 c5 a5 4c 32 5c 95 dc 07 43 60 49 11 |3U....L2\...C`I.|
000003c0 e9 98 cc ba 16 03 03 00 04 0e 00 00 00 |.............|
>>> Flow 3 (client to server)
00000000 16 03 03 00 8a 10 00 00 86 85 04 01 fb 77 96 9a |.............w..|
00000010 82 26 4f 44 b5 2f 32 28 0a dd 51 f5 a4 84 46 a1 |.&OD./2(..Q...F.|
00000020 ba 58 e6 9a 96 1b 85 9f ae 3a 8b db a8 93 81 00 |.X.......:......|
00000030 17 be 24 26 17 fd b8 7c fe 93 7f af 5f 4d c6 47 |..$&...|...._M.G|
00000040 8b 72 5b 23 89 03 d5 a6 fb 6f de 59 15 00 bb 36 |.r[#.....o.Y...6|
00000050 6d 72 03 47 61 b7 7e d4 46 43 b3 e9 9d 2f 61 6a |mr.Ga.~.FC.../aj|
00000060 08 1b 04 70 ac 95 ad bf 18 e5 09 b6 b3 0d 6a bb |...p..........j.|
00000070 e8 77 09 fa 81 2e 8a e1 61 7e 9f 38 d0 67 f5 11 |.w......a~.8.g..|
00000080 f1 62 7f a4 69 4a 42 7a f8 9e 05 26 66 34 6e 14 |.b..iJBz...&f4n.|
00000090 03 03 00 01 01 16 03 03 00 40 2c a1 a8 3a 34 18 |.........@,..:4.|
000000a0 ea a1 d4 28 0b 1a ac ab 51 b1 c5 48 f2 56 8d c7 |...(....Q..H.V..|
000000b0 83 7b 70 44 40 7d 15 1c 00 19 ed 53 21 fe 9d c1 |.{pD@}.....S!...|
000000c0 a2 13 8f a0 0c 51 f5 13 67 1f bf 07 da bc 2d ca |.....Q..g.....-.|
000000d0 7c 0f 53 4b 4a 02 bb 0f 72 c6 ||.SKJ...r.|
00000000 16 03 03 00 46 10 00 00 42 41 04 28 02 84 d5 b4 |....F...BA.(....|
00000010 58 07 47 d5 a0 d6 0b 1d 37 91 e6 34 a4 ad 0b ad |X.G.....7..4....|
00000020 22 01 82 77 a7 32 86 78 83 3a da 75 2f e5 68 7a |"..w.2.x.:.u/.hz|
00000030 de e4 05 e0 02 47 40 4e 38 d2 2c c3 7b da 53 73 |.....G@N8.,.{.Ss|
00000040 19 cb 8b 73 34 72 4d 33 71 39 c8 14 03 03 00 01 |...s4rM3q9......|
00000050 01 16 03 03 00 40 10 63 43 76 83 bd 36 e4 1e 4d |.....@.cCv..6..M|
00000060 7e 13 b0 ac aa c8 ec 90 31 df 84 46 49 68 39 5a |~.......1..FIh9Z|
00000070 05 8b 73 32 86 15 3a 18 57 d8 e2 2c 2d 05 89 93 |..s2..:.W..,-...|
00000080 37 b8 dd 73 33 92 ff a7 b2 53 27 94 b7 25 56 64 |7..s3....S'..%Vd|
00000090 a1 d3 2c f7 6b 71 |..,.kq|
>>> 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 82 f6 03 51 7f |..............Q.|
00000020 37 19 ec 26 20 db e2 5b 8e 5e 22 29 1a 88 ca f1 |7..& ..[.^")....|
00000030 ad 55 1c 3c 07 1d 05 b6 c4 88 58 84 a0 5d 33 41 |.U.<......X..]3A|
00000040 7a 65 bc ba a1 71 a4 71 df 6c 9d 17 03 03 00 40 |ze...q.q.l.....@|
00000010 00 00 00 00 00 00 00 00 00 00 00 21 5c 31 b1 4b |...........!\1.K|
00000020 96 96 30 8f 79 35 3a 3a 2d 26 67 d0 70 48 be 30 |..0.y5::-&g.pH.0|
00000030 f8 3e e8 c1 cb 1d d5 89 f6 9c 72 bb 1c f9 4d 90 |.>........r...M.|
00000040 9c d7 c6 fa 40 76 a5 61 46 61 24 17 03 03 00 40 |....@v.aFa$....@|
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000060 8d ca 51 a1 4a b1 23 dc e3 ef 63 5f b0 e8 7a c6 |..Q.J.#...c_..z.|
00000070 97 d7 18 6a 4b 80 3e 5c 7b 79 86 93 60 2c 8b f1 |...jK.>\{y..`,..|
00000080 4e 46 c5 5e 64 0c 98 81 10 6d c5 08 22 f1 02 1d |NF.^d....m.."...|
00000060 94 8a 14 04 06 b9 30 a0 67 fd b2 4c 84 f4 10 93 |......0.g..L....|
00000070 7d d4 2b 23 f0 e9 62 93 c2 20 a2 f2 7c 07 21 4b |}.+#..b.. ..|.!K|
00000080 94 ba 7b 7d cb 77 da 85 93 bd 53 ee ca db 9b 3e |..{}.w....S....>|
00000090 15 03 03 00 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........|
000000a0 00 00 00 00 00 51 19 c4 67 b7 14 6b 5c 49 ac 1d |.....Q..g..k\I..|
000000b0 b3 97 88 42 29 cb f5 06 54 f4 c6 38 9a 47 41 78 |...B)...T..8.GAx|
000000c0 0f 33 21 ac c5 |.3!..|
000000a0 00 00 00 00 00 17 3f 53 8d b3 35 b4 84 ed bb 12 |......?S..5.....|
000000b0 cf 73 25 25 7c c3 d3 bb 1f 5a 6b 73 9a 8a b1 a2 |.s%%|....Zks....|
000000c0 ba 99 f8 0e 43 |....C|

View File

@ -1,7 +1,7 @@
>>> Flow 1 (client to server)
00000000 16 03 01 00 9c 01 00 00 98 03 03 52 cc 57 59 54 |...........R.WYT|
00000010 0b ba f3 ec 2c 33 3e 3e ac b8 c1 d5 d5 ff e3 d3 |....,3>>........|
00000020 63 d0 29 16 aa 5d 96 37 89 90 c4 00 00 04 c0 0a |c.)..].7........|
00000000 16 03 01 00 9c 01 00 00 98 03 03 53 04 f0 f9 09 |...........S....|
00000010 13 56 01 37 84 b1 32 59 4c 73 b1 8e bb 02 1a 32 |.V.7..2YLs.....2|
00000020 db ab 8c e6 ed ad 7f 52 9a 59 39 00 00 04 c0 0a |.......R.Y9.....|
00000030 00 ff 01 00 00 6b 00 0b 00 04 03 00 01 02 00 0a |.....k..........|
00000040 00 34 00 32 00 0e 00 0d 00 19 00 0b 00 0c 00 18 |.4.2............|
00000050 00 09 00 0a 00 16 00 17 00 08 00 06 00 07 00 14 |................|
@ -47,52 +47,43 @@
00000210 0e bd 3f a3 8c 25 c1 33 13 83 0d 94 06 bb d4 37 |..?..%.3.......7|
00000220 7a f6 ec 7a c9 86 2e dd d7 11 69 7f 85 7c 56 de |z..z......i..|V.|
00000230 fb 31 78 2b e4 c7 78 0d ae cb be 9e 4e 36 24 31 |.1x+..x.....N6$1|
00000240 7b 6a 0f 39 95 12 07 8f 2a 16 03 03 01 1c 0c 00 |{j.9....*.......|
00000250 01 18 03 00 19 85 04 01 39 dc ee 44 17 5e db d7 |........9..D.^..|
00000260 27 af b6 56 d9 b4 43 5a 99 cf aa 31 37 0c 6f 3a |'..V..CZ...17.o:|
00000270 a0 f8 53 c4 74 d1 91 0a 46 f5 38 3b 5c 09 d8 97 |..S.t...F.8;\...|
00000280 dc 4b aa 70 26 48 f2 d6 0b 31 c9 f8 d4 98 43 e1 |.K.p&H...1....C.|
00000290 6c d5 c7 b2 8e 0b 01 e6 b6 00 28 80 7b fc 96 8f |l.........(.{...|
000002a0 0d a2 4f b0 79 af dc 61 28 63 33 78 f6 31 39 fd |..O.y..a(c3x.19.|
000002b0 8a f4 15 18 11 fe db d5 07 da 2c ed 49 a0 23 bf |..........,.I.#.|
000002c0 d0 3a 38 1d 54 ae 1c 7b ea 29 ee d0 38 c1 76 a7 |.:8.T..{.)..8.v.|
000002d0 7f 2a f4 ce 1e ac cc 94 79 90 33 04 03 00 8b 30 |.*......y.3....0|
000002e0 81 88 02 42 00 c6 85 8e 06 b7 04 04 e9 cd 9e 3e |...B...........>|
000002f0 cb 66 23 95 b4 42 9c 64 81 39 05 3f b5 21 f8 28 |.f#..B.d.9.?.!.(|
00000300 af 60 6b 4d 3d ba a1 4b 5e 77 ef e7 59 28 fe 1d |.`kM=..K^w..Y(..|
00000310 c1 27 a2 ff a8 de 33 48 b3 c1 85 6a 42 9b f9 7e |.'....3H...jB..~|
00000320 7e 31 c2 e5 bd 66 02 42 00 ad 7d 06 35 ab ec 8d |~1...f.B..}.5...|
00000330 ac d4 ba 1b 49 5e 05 5f f0 97 93 82 b8 2b 8d 91 |....I^._.....+..|
00000340 98 63 8e b4 14 62 db 1e c9 2b eb 95 36 9b 44 c6 |.c...b...+..6.D.|
00000350 a6 89 58 50 f9 30 94 89 ef 0f 71 ed c0 42 59 11 |..XP.0....q..BY.|
00000360 68 e7 ac 52 2c 1e ed 70 b1 f8 16 03 03 00 04 0e |h..R,..p........|
00000370 00 00 00 |...|
00000240 7b 6a 0f 39 95 12 07 8f 2a 16 03 03 00 d8 0c 00 |{j.9....*.......|
00000250 00 d4 03 00 17 41 04 1e 18 37 ef 0d 19 51 88 35 |.....A...7...Q.5|
00000260 75 71 b5 e5 54 5b 12 2e 8f 09 67 fd a7 24 20 3e |uq..T[....g..$ >|
00000270 b2 56 1c ce 97 28 5e f8 2b 2d 4f 9e f1 07 9f 6c |.V...(^.+-O....l|
00000280 4b 5b 83 56 e2 32 42 e9 58 b6 d7 49 a6 b5 68 1a |K[.V.2B.X..I..h.|
00000290 41 03 56 6b dc 5a 89 04 03 00 8b 30 81 88 02 42 |A.Vk.Z.....0...B|
000002a0 00 c6 85 8e 06 b7 04 04 e9 cd 9e 3e cb 66 23 95 |...........>.f#.|
000002b0 b4 42 9c 64 81 39 05 3f b5 21 f8 28 af 60 6b 4d |.B.d.9.?.!.(.`kM|
000002c0 3d ba a1 4b 5e 77 ef e7 59 28 fe 1d c1 27 a2 ff |=..K^w..Y(...'..|
000002d0 a8 de 33 48 b3 c1 85 6a 42 9b f9 7e 7e 31 c2 e5 |..3H...jB..~~1..|
000002e0 bd 66 02 42 00 ad 7d 06 35 ab ec 8d ac d4 ba 1b |.f.B..}.5.......|
000002f0 49 5e 05 5f f0 97 93 82 b8 2b 8d 91 98 63 8e b4 |I^._.....+...c..|
00000300 14 62 db 1e c9 2c 13 ae b7 d3 17 38 23 2f f6 7f |.b...,.....8#/..|
00000310 0c 4d d3 33 d2 79 d1 77 ee cb b1 c2 fc 34 b8 69 |.M.3.y.w.....4.i|
00000320 f9 10 8b 61 89 85 16 03 03 00 04 0e 00 00 00 |...a...........|
>>> Flow 3 (client to server)
00000000 16 03 03 00 8a 10 00 00 86 85 04 01 7d 90 e6 a1 |............}...|
00000010 06 d6 a9 32 e9 ba 42 d5 05 11 e7 69 7c 5e 6e b6 |...2..B....i|^n.|
00000020 ad 51 bc 25 12 89 93 e0 bf 3c 2f ce a8 83 29 0e |.Q.%.....</...).|
00000030 eb 06 89 10 f4 de ce d9 16 6c 95 dc 61 66 84 87 |.........l..af..|
00000040 84 6b 47 77 01 55 79 a2 0d e0 e8 d0 bd 00 7e d7 |.kGw.Uy.......~.|
00000050 34 a4 75 e4 c8 ac e4 a3 4b df 27 52 7a f7 1b 0f |4.u.....K.'Rz...|
00000060 73 af 26 66 2c c9 29 56 b9 e2 1b b8 02 21 80 74 |s.&f,.)V.....!.t|
00000070 db c8 d4 99 31 8f 6c 41 a6 b2 ac 60 82 13 85 08 |....1.lA...`....|
00000080 4d 34 f2 77 ba 22 ec 05 92 9c 9b ca 2d 8e dc 14 |M4.w."......-...|
00000090 03 03 00 01 01 16 03 03 00 40 19 4c 60 51 51 ed |.........@.L`QQ.|
000000a0 03 16 fe 05 a4 88 17 91 f0 0a 50 0d e4 a8 82 9a |..........P.....|
000000b0 4d 4b ef 2a 3d 57 29 60 e7 36 70 9c 41 e2 93 89 |MK.*=W)`.6p.A...|
000000c0 b7 b0 f6 76 fc 19 93 7b ac 8e 39 d1 7c 90 73 62 |...v...{..9.|.sb|
000000d0 88 bf 0b 20 f9 fd 49 b4 d9 3c |... ..I..<|
00000000 16 03 03 00 46 10 00 00 42 41 04 dd 22 68 a1 4e |....F...BA.."h.N|
00000010 04 1b 47 f9 c5 7d 04 1d d8 fe 84 fa be 31 2e a7 |..G..}.......1..|
00000020 f8 e5 b8 14 92 44 99 11 0e 34 97 fc e5 b1 91 cf |.....D...4......|
00000030 a4 d1 3f b4 71 94 c6 06 16 f0 98 c0 3e 05 f9 2f |..?.q.......>../|
00000040 0a 97 78 3d ef dc fa a2 d7 ee 7d 14 03 03 00 01 |..x=......}.....|
00000050 01 16 03 03 00 40 90 bf 7f e9 c9 6e d1 80 f5 12 |.....@.....n....|
00000060 6d c5 b7 c5 15 4b 18 a5 d3 18 1e f8 8c 4d 7e 6d |m....K.......M~m|
00000070 03 60 29 7c 45 7c b2 ca 8c 07 71 70 aa 23 fa 6e |.`)|E|....qp.#.n|
00000080 d9 0b 0a 32 4c 9e e5 00 f9 19 9b b6 8d dc d3 67 |...2L..........g|
00000090 3d 0f bb b8 4b 9e |=...K.|
>>> 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 f1 df 07 dd 3f |...............?|
00000020 92 27 96 9a 5c 98 4a 3b 39 0b 5d 2e 5f 12 55 11 |.'..\.J;9.]._.U.|
00000030 32 4d 14 39 31 02 1b 02 ee b0 ae 2c 19 8d c2 31 |2M.91......,...1|
00000040 52 cc e9 c3 d6 34 ac 4d 7f e6 6e 17 03 03 00 40 |R....4.M..n....@|
00000010 00 00 00 00 00 00 00 00 00 00 00 a1 6e e5 d1 ca |............n...|
00000020 03 f4 77 dc ec ee 5d f0 22 5e 7f 55 1a 8d ad 45 |..w...]."^.U...E|
00000030 09 f1 3b b2 61 36 dc 3d 2a 1e 1f e5 a7 84 76 a9 |..;.a6.=*.....v.|
00000040 41 5b 86 03 ac 22 18 20 9b a9 29 17 03 03 00 40 |A[...". ..)....@|
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000060 6b 1e 9a b5 a8 89 3c d0 05 08 cf 81 a7 02 b4 ed |k.....<.........|
00000070 fa 21 e2 15 87 d0 78 ac 4b 8e fc d0 c5 0e b2 5c |.!....x.K......\|
00000080 bb c6 49 2a 80 00 67 93 37 4c a6 38 a7 24 f3 05 |..I*..g.7L.8.$..|
00000060 f5 cb 28 1e b5 bc 82 7f 82 38 54 14 e8 b9 6d 3b |..(......8T...m;|
00000070 bc 99 d6 0e f9 00 96 99 a8 92 2e 86 9d 62 4e 90 |.............bN.|
00000080 27 52 58 45 20 93 90 a1 f3 a8 89 2b e7 21 24 16 |'RXE ......+.!$.|
00000090 15 03 03 00 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........|
000000a0 00 00 00 00 00 50 ea de de b1 ba e4 da b1 d2 3e |.....P.........>|
000000b0 b3 ed 03 2f 8e 30 d5 20 f8 2a 65 d4 4c 1c b9 7f |.../.0. .*e.L...|
000000c0 4c 0c 8f cf 5a |L...Z|
000000a0 00 00 00 00 00 a8 2a ab 8f b0 ce 49 8b fd a5 c9 |......*....I....|
000000b0 11 b2 04 83 18 f3 1d 6c 82 34 1d df dd 2f 45 3b |.......l.4.../E;|
000000c0 27 8a 0f 16 69 |'...i|

View File

@ -1,7 +1,7 @@
>>> Flow 1 (client to server)
00000000 16 03 01 00 9c 01 00 00 98 03 03 52 cc 57 59 d3 |...........R.WY.|
00000010 91 67 1b de 52 be 25 1d 61 3b 45 29 43 aa 8a e9 |.g..R.%.a;E)C...|
00000020 fc 29 19 d5 59 aa 48 0d 21 8a eb 00 00 04 c0 2f |.)..Y.H.!....../|
00000000 16 03 01 00 9c 01 00 00 98 03 03 53 04 f1 30 73 |...........S..0s|
00000010 a1 ea 8c d2 90 1c c6 d6 0d 3c af 58 21 65 90 25 |.........<.X!e.%|
00000020 5e fa f4 27 22 65 c9 68 90 b9 04 00 00 04 c0 2f |^..'"e.h......./|
00000030 00 ff 01 00 00 6b 00 0b 00 04 03 00 01 02 00 0a |.....k..........|
00000040 00 34 00 32 00 0e 00 0d 00 19 00 0b 00 0c 00 18 |.4.2............|
00000050 00 09 00 0a 00 16 00 17 00 08 00 06 00 07 00 14 |................|
@ -58,45 +58,36 @@
000002c0 50 56 5c d5 82 5a 2d 5a 5f 33 c4 b6 d8 c9 75 90 |PV\..Z-Z_3....u.|
000002d0 96 8c 0f 52 98 b5 cd 98 1f 89 20 5f f2 a0 1c a3 |...R...... _....|
000002e0 1b 96 94 dd a9 fd 57 e9 70 e8 26 6d 71 99 9b 26 |......W.p.&mq..&|
000002f0 6e 38 50 29 6c 90 a7 bd d9 16 03 03 01 11 0c 00 |n8P)l...........|
00000300 01 0d 03 00 19 85 04 01 39 dc ee 44 17 5e db d7 |........9..D.^..|
00000310 27 af b6 56 d9 b4 43 5a 99 cf aa 31 37 0c 6f 3a |'..V..CZ...17.o:|
00000320 a0 f8 53 c4 74 d1 91 0a 46 f5 38 3b 5c 09 d8 97 |..S.t...F.8;\...|
00000330 dc 4b aa 70 26 48 f2 d6 0b 31 c9 f8 d4 98 43 e1 |.K.p&H...1....C.|
00000340 6c d5 c7 b2 8e 0b 01 e6 b6 00 28 80 7b fc 96 8f |l.........(.{...|
00000350 0d a2 4f b0 79 af dc 61 28 63 33 78 f6 31 39 fd |..O.y..a(c3x.19.|
00000360 8a f4 15 18 11 fe db d5 07 da 2c ed 49 a0 23 bf |..........,.I.#.|
00000370 d0 3a 38 1d 54 ae 1c 7b ea 29 ee d0 38 c1 76 a7 |.:8.T..{.)..8.v.|
00000380 7f 2a f4 ce 1e ac cc 94 79 90 33 04 01 00 80 5f |.*......y.3...._|
00000390 c6 9e 6d 87 97 04 b5 c2 12 73 75 ff a5 40 d0 0f |..m......su..@..|
000003a0 39 74 98 e5 1f 62 4c e8 9a af a0 d4 08 61 d4 53 |9t...bL......a.S|
000003b0 67 ee f6 27 45 1a ee 52 35 7a 5f 5b 54 4a de 9b |g..'E..R5z_[TJ..|
000003c0 fb 9a a2 61 e1 db be b0 08 5d 4f fc b5 5d d3 bc |...a.....]O..]..|
000003d0 c9 49 e2 b9 d8 52 52 79 d1 a3 8e da 7d 35 12 19 |.I...RRy....}5..|
000003e0 45 30 fb fd e7 e2 f4 00 43 78 64 ca 2b 6c 65 28 |E0......Cxd.+le(|
000003f0 8a 8d 83 4f cf 44 9a 19 89 4d 08 d8 85 b3 65 95 |...O.D...M....e.|
00000400 e8 47 4d 86 25 48 09 5c 77 7d 73 0c 6b 22 22 16 |.GM.%H.\w}s.k"".|
00000410 03 03 00 04 0e 00 00 00 |........|
000002f0 6e 38 50 29 6c 90 a7 bd d9 16 03 03 00 cd 0c 00 |n8P)l...........|
00000300 00 c9 03 00 17 41 04 1e 18 37 ef 0d 19 51 88 35 |.....A...7...Q.5|
00000310 75 71 b5 e5 54 5b 12 2e 8f 09 67 fd a7 24 20 3e |uq..T[....g..$ >|
00000320 b2 56 1c ce 97 28 5e f8 2b 2d 4f 9e f1 07 9f 6c |.V...(^.+-O....l|
00000330 4b 5b 83 56 e2 32 42 e9 58 b6 d7 49 a6 b5 68 1a |K[.V.2B.X..I..h.|
00000340 41 03 56 6b dc 5a 89 04 01 00 80 a2 54 61 84 29 |A.Vk.Z......Ta.)|
00000350 3e 97 4b 97 9a 9f 5c c0 49 6d 86 d2 79 8e 95 a1 |>.K...\.Im..y...|
00000360 0a 5a 36 73 34 bb 05 73 35 47 e1 2b 5d f3 ef 36 |.Z6s4..s5G.+]..6|
00000370 a8 32 e2 7e ef aa 3f 1f b3 64 60 d4 06 2e 98 e3 |.2.~..?..d`.....|
00000380 11 e2 60 3c d6 20 17 63 b2 6f a0 cd 21 01 2b 4e |..`<. .c.o..!.+N|
00000390 b2 a8 55 04 39 37 5c 6c 71 66 4d a3 eb 1b 83 67 |..U.97\lqfM....g|
000003a0 6b 15 a0 56 9a f1 a2 79 92 29 ce 58 3c 10 4d 65 |k..V...y.).X<.Me|
000003b0 1f 22 e3 ea d8 74 aa 01 7e ca f3 89 23 41 4d bd |."...t..~...#AM.|
000003c0 df 77 4e 59 54 97 74 ad 07 ea c0 16 03 03 00 04 |.wNYT.t.........|
000003d0 0e 00 00 00 |....|
>>> Flow 3 (client to server)
00000000 16 03 03 00 8a 10 00 00 86 85 04 01 4e f2 1d 1f |............N...|
00000010 c0 23 cf 00 58 0b 25 ee 6b e1 5f 50 7b c9 15 9d |.#..X.%.k._P{...|
00000020 d9 2f 8a f1 b8 7b 62 d2 6d d0 46 b8 6f 3f 2d 6f |./...{b.m.F.o?-o|
00000030 ba 68 74 7e a3 b5 12 1c 93 d1 0a 13 e1 50 d7 82 |.ht~.........P..|
00000040 1b 4c 54 b5 73 a9 9e 72 80 4e bc 75 17 00 e1 f3 |.LT.s..r.N.u....|
00000050 70 03 80 1f d3 1f 2a 53 52 6a ee 4e 93 f4 10 1c |p.....*SRj.N....|
00000060 2d ff 5f 6c a4 3b fa a1 7f 87 93 5d 76 b3 35 62 |-._l.;.....]v.5b|
00000070 0b 48 41 42 f9 57 65 4a 42 9e 53 7d 2c 09 37 02 |.HAB.WeJB.S},.7.|
00000080 55 bd 6f 0e 4d 05 17 8d c5 df ff 54 da 94 d6 14 |U.o.M......T....|
00000090 03 03 00 01 01 16 03 03 00 28 38 e3 ad 08 8e e3 |.........(8.....|
000000a0 b8 bc 6d a2 15 35 b1 b2 28 47 82 63 30 9e b6 5c |..m..5..(G.c0..\|
000000b0 26 47 38 20 a0 77 e3 b2 38 8f 8b c4 96 ac f4 5c |&G8 .w..8......\|
000000c0 10 9f |..|
00000000 16 03 03 00 46 10 00 00 42 41 04 45 65 ce f7 b9 |....F...BA.Ee...|
00000010 52 e3 fb 13 db 91 f2 65 43 84 57 f5 1a 19 a0 e6 |R......eC.W.....|
00000020 89 2d bb 2c 83 6b 62 f6 6f 1f 26 ae 59 67 bd dc |.-.,.kb.o.&.Yg..|
00000030 c4 9e 0b dc 7d 6e f8 6b 95 8c 61 47 3d cd d1 df |....}n.k..aG=...|
00000040 82 45 30 81 c3 a3 49 5d 85 59 70 14 03 03 00 01 |.E0...I].Yp.....|
00000050 01 16 03 03 00 28 3f aa 85 33 f9 c6 95 a0 56 ff |.....(?..3....V.|
00000060 1c f1 5a ba 6e 41 50 0c ab 92 e1 e2 8e 89 1c f1 |..Z.nAP.........|
00000070 fa 54 1b f1 f5 00 01 12 6d c4 96 78 b6 87 |.T......m..x..|
>>> Flow 4 (server to client)
00000000 14 03 03 00 01 01 16 03 03 00 28 00 00 00 00 00 |..........(.....|
00000010 00 00 00 30 ae 4d 36 49 d1 d6 4d 1a 71 87 eb ed |...0.M6I..M.q...|
00000020 d2 6f 66 3f 25 03 a5 69 04 5d ca e6 71 eb c2 06 |.of?%..i.]..q...|
00000030 b4 15 b7 17 03 03 00 25 00 00 00 00 00 00 00 01 |.......%........|
00000040 8d a6 27 08 34 77 a2 a7 f5 e6 c3 ca 49 25 db 9a |..'.4w......I%..|
00000050 19 44 42 d1 0b c1 3a d6 73 b2 11 df 52 15 03 03 |.DB...:.s...R...|
00000060 00 1a 00 00 00 00 00 00 00 02 42 63 43 f7 98 69 |..........BcC..i|
00000070 d9 2b 38 6b 88 9d bf a2 8a 31 5d 54 |.+8k.....1]T|
00000010 00 00 00 94 5c be 46 05 d6 d0 b0 3a 56 dc 2c 10 |....\.F....:V.,.|
00000020 0f 6f 5d 33 33 7f a5 4e 74 84 bf 63 87 c4 f4 49 |.o]33..Nt..c...I|
00000030 bc 6b ab 17 03 03 00 25 00 00 00 00 00 00 00 01 |.k.....%........|
00000040 7e 4f f9 ae ae fe 6b a0 4a f8 0f 0b b4 b6 65 b6 |~O....k.J.....e.|
00000050 be 24 5f 94 6d d1 db 54 11 07 b9 ce 01 15 03 03 |.$_.m..T........|
00000060 00 1a 00 00 00 00 00 00 00 02 a8 1c d6 62 ac fd |.............b..|
00000070 77 ba 23 92 5d 34 f1 17 c7 e1 1c 99 |w.#.]4......|

View File

@ -15,6 +15,7 @@ import (
"io/ioutil"
"net"
"strings"
"time"
)
// Server returns a new TLS server side connection
@ -27,7 +28,7 @@ func Server(conn net.Conn, config *Config) *Conn {
// Client returns a new TLS client side connection
// using conn as the underlying transport.
// The config cannot be nil: users must set either ServerHostname or
// The config cannot be nil: users must set either ServerName or
// InsecureSkipVerify in the config.
func Client(conn net.Conn, config *Config) *Conn {
return &Conn{conn: conn, config: config, isClient: true}
@ -76,24 +77,51 @@ func Listen(network, laddr string, config *Config) (net.Listener, error) {
return NewListener(l, config), nil
}
// Dial connects to the given network address using net.Dial
// and then initiates a TLS handshake, returning the resulting
// TLS connection.
// Dial interprets a nil configuration as equivalent to
// the zero configuration; see the documentation of Config
// for the defaults.
func Dial(network, addr string, config *Config) (*Conn, error) {
raddr := addr
c, err := net.Dial(network, raddr)
type timeoutError struct{}
func (timeoutError) Error() string { return "tls: DialWithDialer timed out" }
func (timeoutError) Timeout() bool { return true }
func (timeoutError) Temporary() bool { return true }
// DialWithDialer connects to the given network address using dialer.Dial and
// then initiates a TLS handshake, returning the resulting TLS connection. Any
// timeout or deadline given in the dialer apply to connection and TLS
// handshake as a whole.
//
// DialWithDialer interprets a nil configuration as equivalent to the zero
// configuration; see the documentation of Config for the defaults.
func DialWithDialer(dialer *net.Dialer, network, addr string, config *Config) (*Conn, error) {
// We want the Timeout and Deadline values from dialer to cover the
// whole process: TCP connection and TLS handshake. This means that we
// also need to start our own timers now.
timeout := dialer.Timeout
if !dialer.Deadline.IsZero() {
deadlineTimeout := dialer.Deadline.Sub(time.Now())
if timeout == 0 || deadlineTimeout < timeout {
timeout = deadlineTimeout
}
}
var errChannel chan error
if timeout != 0 {
errChannel = make(chan error, 2)
time.AfterFunc(timeout, func() {
errChannel <- timeoutError{}
})
}
rawConn, err := dialer.Dial(network, addr)
if err != nil {
return nil, err
}
colonPos := strings.LastIndex(raddr, ":")
colonPos := strings.LastIndex(addr, ":")
if colonPos == -1 {
colonPos = len(raddr)
colonPos = len(addr)
}
hostname := raddr[:colonPos]
hostname := addr[:colonPos]
if config == nil {
config = defaultConfig()
@ -106,14 +134,37 @@ func Dial(network, addr string, config *Config) (*Conn, error) {
c.ServerName = hostname
config = &c
}
conn := Client(c, config)
if err = conn.Handshake(); err != nil {
c.Close()
conn := Client(rawConn, config)
if timeout == 0 {
err = conn.Handshake()
} else {
go func() {
errChannel <- conn.Handshake()
}()
err = <-errChannel
}
if err != nil {
rawConn.Close()
return nil, err
}
return conn, nil
}
// Dial connects to the given network address using net.Dial
// and then initiates a TLS handshake, returning the resulting
// TLS connection.
// Dial interprets a nil configuration as equivalent to
// the zero configuration; see the documentation of Config
// for the defaults.
func Dial(network, addr string, config *Config) (*Conn, error) {
return DialWithDialer(new(net.Dialer), network, addr, config)
}
// LoadX509KeyPair reads and parses a public/private key pair from a pair of
// files. The files must contain PEM encoded data.
func LoadX509KeyPair(certFile, keyFile string) (cert Certificate, err error) {

View File

@ -5,7 +5,12 @@
package tls
import (
"fmt"
"io"
"net"
"strings"
"testing"
"time"
)
var rsaCertPEM = `-----BEGIN CERTIFICATE-----
@ -105,3 +110,128 @@ func TestX509MixedKeyPair(t *testing.T) {
t.Error("Load of ECDSA certificate succeeded with RSA private key")
}
}
func newLocalListener(t *testing.T) net.Listener {
ln, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
ln, err = net.Listen("tcp6", "[::1]:0")
}
if err != nil {
t.Fatal(err)
}
return ln
}
func TestDialTimeout(t *testing.T) {
if testing.Short() {
t.Skip("skipping in short mode")
}
listener := newLocalListener(t)
addr := listener.Addr().String()
defer listener.Close()
complete := make(chan bool)
defer close(complete)
go func() {
conn, err := listener.Accept()
if err != nil {
t.Error(err)
return
}
<-complete
conn.Close()
}()
dialer := &net.Dialer{
Timeout: 10 * time.Millisecond,
}
var err error
if _, err = DialWithDialer(dialer, "tcp", addr, nil); err == nil {
t.Fatal("DialWithTimeout completed successfully")
}
if !strings.Contains(err.Error(), "timed out") {
t.Errorf("resulting error not a timeout: %s", err)
}
}
// tests that Conn.Read returns (non-zero, io.EOF) instead of
// (non-zero, nil) when a Close (alertCloseNotify) is sitting right
// behind the application data in the buffer.
func TestConnReadNonzeroAndEOF(t *testing.T) {
// This test is racy: it assumes that after a write to a
// localhost TCP connection, the peer TCP connection can
// immediately read it. Because it's racy, we skip this test
// in short mode, and then retry it several times with an
// increasing sleep in between our final write (via srv.Close
// below) and the following read.
if testing.Short() {
t.Skip("skipping in short mode")
}
var err error
for delay := time.Millisecond; delay <= 64*time.Millisecond; delay *= 2 {
if err = testConnReadNonzeroAndEOF(t, delay); err == nil {
return
}
}
t.Error(err)
}
func testConnReadNonzeroAndEOF(t *testing.T, delay time.Duration) error {
ln := newLocalListener(t)
defer ln.Close()
srvCh := make(chan *Conn, 1)
var serr error
go func() {
sconn, err := ln.Accept()
if err != nil {
serr = err
srvCh <- nil
return
}
serverConfig := *testConfig
srv := Server(sconn, &serverConfig)
if err := srv.Handshake(); err != nil {
serr = fmt.Errorf("handshake: %v", err)
srvCh <- nil
return
}
srvCh <- srv
}()
clientConfig := *testConfig
conn, err := Dial("tcp", ln.Addr().String(), &clientConfig)
if err != nil {
t.Fatal(err)
}
defer conn.Close()
srv := <-srvCh
if srv == nil {
return serr
}
buf := make([]byte, 6)
srv.Write([]byte("foobar"))
n, err := conn.Read(buf)
if n != 6 || err != nil || string(buf) != "foobar" {
return fmt.Errorf("Read = %d, %v, data %q; want 6, nil, foobar", n, err, buf)
}
srv.Write([]byte("abcdef"))
srv.Close()
time.Sleep(delay)
n, err = conn.Read(buf)
if n != 6 || string(buf) != "abcdef" {
return fmt.Errorf("Read = %d, buf= %q; want 6, abcdef", n, buf)
}
if err != io.EOF {
return fmt.Errorf("Second Read error = %v; want io.EOF", err)
}
return nil
}

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build dragonfly freebsd linux openbsd netbsd solaris
// +build dragonfly freebsd linux nacl netbsd openbsd solaris
package x509

View File

@ -31,8 +31,8 @@ type verifyTest struct {
var verifyTests = []verifyTest{
{
leaf: googleLeaf,
intermediates: []string{thawteIntermediate},
currentTime: 1302726541,
intermediates: []string{giag2Intermediate},
currentTime: 1395785200,
dnsName: "www.google.com",
testSystemRootsError: true,
@ -42,39 +42,39 @@ var verifyTests = []verifyTest{
},
{
leaf: googleLeaf,
intermediates: []string{thawteIntermediate},
roots: []string{verisignRoot},
currentTime: 1302726541,
intermediates: []string{giag2Intermediate},
roots: []string{geoTrustRoot},
currentTime: 1395785200,
dnsName: "www.google.com",
expectedChains: [][]string{
{"Google", "Thawte", "VeriSign"},
{"Google", "Google Internet Authority", "GeoTrust"},
},
},
{
leaf: googleLeaf,
intermediates: []string{thawteIntermediate},
roots: []string{verisignRoot},
currentTime: 1302726541,
intermediates: []string{giag2Intermediate},
roots: []string{geoTrustRoot},
currentTime: 1395785200,
dnsName: "WwW.GooGLE.coM",
expectedChains: [][]string{
{"Google", "Thawte", "VeriSign"},
{"Google", "Google Internet Authority", "GeoTrust"},
},
},
{
leaf: googleLeaf,
intermediates: []string{thawteIntermediate},
roots: []string{verisignRoot},
currentTime: 1302726541,
intermediates: []string{giag2Intermediate},
roots: []string{geoTrustRoot},
currentTime: 1395785200,
dnsName: "www.example.com",
errorCallback: expectHostnameError,
},
{
leaf: googleLeaf,
intermediates: []string{thawteIntermediate},
roots: []string{verisignRoot},
intermediates: []string{giag2Intermediate},
roots: []string{geoTrustRoot},
currentTime: 1,
dnsName: "www.example.com",
@ -82,8 +82,8 @@ var verifyTests = []verifyTest{
},
{
leaf: googleLeaf,
roots: []string{verisignRoot},
currentTime: 1302726541,
roots: []string{geoTrustRoot},
currentTime: 1395785200,
dnsName: "www.google.com",
// Skip when using systemVerify, since Windows
@ -93,14 +93,22 @@ var verifyTests = []verifyTest{
},
{
leaf: googleLeaf,
intermediates: []string{verisignRoot, thawteIntermediate},
roots: []string{verisignRoot},
currentTime: 1302726541,
intermediates: []string{geoTrustRoot, giag2Intermediate},
roots: []string{geoTrustRoot},
currentTime: 1395785200,
dnsName: "www.google.com",
expectedChains: [][]string{
{"Google", "Thawte", "VeriSign"},
{"Google", "Google Internet Authority", "GeoTrust"},
// TODO(agl): this is ok, but it would be nice if the
// chain building didn't visit the same SPKI
// twice.
{"Google", "Google Internet Authority", "GeoTrust", "GeoTrust"},
},
// CAPI doesn't build the chain with the duplicated GeoTrust
// entry so the results don't match. Thus we skip this test
// until that's fixed.
systemSkip: true,
},
{
leaf: dnssecExpLeaf,
@ -128,9 +136,9 @@ var verifyTests = []verifyTest{
},
{
leaf: googleLeafWithInvalidHash,
intermediates: []string{thawteIntermediate},
roots: []string{verisignRoot},
currentTime: 1302726541,
intermediates: []string{giag2Intermediate},
roots: []string{geoTrustRoot},
currentTime: 1395785200,
dnsName: "www.google.com",
// The specific error message may not occur when using system
@ -201,6 +209,24 @@ var verifyTests = []verifyTest{
},
},
},
{
// Check that SHA-384 intermediates (which are popping up)
// work.
leaf: moipLeafCert,
intermediates: []string{comodoIntermediateSHA384, comodoRSAAuthority},
roots: []string{addTrustRoot},
currentTime: 1397502195,
dnsName: "api.moip.com.br",
expectedChains: [][]string{
{
"api.moip.com.br",
"COMODO RSA Extended Validation Secure Server CA",
"COMODO RSA Certification Authority",
"AddTrust External CA Root",
},
},
},
}
func expectHostnameError(t *testing.T, i int, err error) (ok bool) {
@ -385,84 +411,111 @@ func nameToKey(name *pkix.Name) string {
return strings.Join(name.Country, ",") + "/" + strings.Join(name.Organization, ",") + "/" + strings.Join(name.OrganizationalUnit, ",") + "/" + name.CommonName
}
const verisignRoot = `-----BEGIN CERTIFICATE-----
MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG
A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do
lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc
AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k
const geoTrustRoot = `-----BEGIN CERTIFICATE-----
MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG
EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg
R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9
9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq
fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv
iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU
1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+
bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW
MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA
ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l
uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn
Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS
tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF
PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un
hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV
5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw==
-----END CERTIFICATE-----
`
const thawteIntermediate = `-----BEGIN CERTIFICATE-----
MIIDIzCCAoygAwIBAgIEMAAAAjANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJV
UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNzA1BgNVBAsTLkNsYXNzIDMgUHVi
bGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNTEzMDAw
MDAwWhcNMTQwNTEyMjM1OTU5WjBMMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhh
d3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEWMBQGA1UEAxMNVGhhd3RlIFNHQyBD
QTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1NNn0I0Vf67NMf59HZGhPwtx
PKzMyGT7Y/wySweUvW+Aui/hBJPAM/wJMyPpC3QrccQDxtLN4i/1CWPN/0ilAL/g
5/OIty0y3pg25gqtAHvEZEo7hHUD8nCSfQ5i9SGraTaEMXWQ+L/HbIgbBpV8yeWo
3nWhLHpo39XKHIdYYBkCAwEAAaOB/jCB+zASBgNVHRMBAf8ECDAGAQH/AgEAMAsG
A1UdDwQEAwIBBjARBglghkgBhvhCAQEEBAMCAQYwKAYDVR0RBCEwH6QdMBsxGTAX
BgNVBAMTEFByaXZhdGVMYWJlbDMtMTUwMQYDVR0fBCowKDAmoCSgIoYgaHR0cDov
L2NybC52ZXJpc2lnbi5jb20vcGNhMy5jcmwwMgYIKwYBBQUHAQEEJjAkMCIGCCsG
AQUFBzABhhZodHRwOi8vb2NzcC50aGF3dGUuY29tMDQGA1UdJQQtMCsGCCsGAQUF
BwMBBggrBgEFBQcDAgYJYIZIAYb4QgQBBgpghkgBhvhFAQgBMA0GCSqGSIb3DQEB
BQUAA4GBAFWsY+reod3SkF+fC852vhNRj5PZBSvIG3dLrWlQoe7e3P3bB+noOZTc
q3J5Lwa/q4FwxKjt6lM07e8eU9kGx1Yr0Vz00YqOtCuxN5BICEIlxT6Ky3/rbwTR
bcV0oveifHtgPHfNDs5IAn8BL7abN+AqKjbc1YXWrOU/VG+WHgWv
const giag2Intermediate = `-----BEGIN CERTIFICATE-----
MIIEBDCCAuygAwIBAgIDAjppMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
YWwgQ0EwHhcNMTMwNDA1MTUxNTU1WhcNMTUwNDA0MTUxNTU1WjBJMQswCQYDVQQG
EwJVUzETMBEGA1UEChMKR29vZ2xlIEluYzElMCMGA1UEAxMcR29vZ2xlIEludGVy
bmV0IEF1dGhvcml0eSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AJwqBHdc2FCROgajguDYUEi8iT/xGXAaiEZ+4I/F8YnOIe5a/mENtzJEiaB0C1NP
VaTOgmKV7utZX8bhBYASxF6UP7xbSDj0U/ck5vuR6RXEz/RTDfRK/J9U3n2+oGtv
h8DQUB8oMANA2ghzUWx//zo8pzcGjr1LEQTrfSTe5vn8MXH7lNVg8y5Kr0LSy+rE
ahqyzFPdFUuLH8gZYR/Nnag+YyuENWllhMgZxUYi+FOVvuOAShDGKuy6lyARxzmZ
EASg8GF6lSWMTlJ14rbtCMoU/M4iarNOz0YDl5cDfsCx3nuvRTPPuj5xt970JSXC
DTWJnZ37DhF5iR43xa+OcmkCAwEAAaOB+zCB+DAfBgNVHSMEGDAWgBTAephojYn7
qwVkDBF9qn1luMrMTjAdBgNVHQ4EFgQUSt0GFhu89mi1dvWBtrtiGrpagS8wEgYD
VR0TAQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAQYwOgYDVR0fBDMwMTAvoC2g
K4YpaHR0cDovL2NybC5nZW90cnVzdC5jb20vY3Jscy9ndGdsb2JhbC5jcmwwPQYI
KwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwOi8vZ3RnbG9iYWwtb2NzcC5n
ZW90cnVzdC5jb20wFwYDVR0gBBAwDjAMBgorBgEEAdZ5AgUBMA0GCSqGSIb3DQEB
BQUAA4IBAQA21waAESetKhSbOHezI6B1WLuxfoNCunLaHtiONgaX4PCVOzf9G0JY
/iLIa704XtE7JW4S615ndkZAkNoUyHgN7ZVm2o6Gb4ChulYylYbc3GrKBIxbf/a/
zG+FA1jDaFETzf3I93k9mTXwVqO94FntT0QJo544evZG0R0SnU++0ED8Vf4GXjza
HFa9llF7b1cq26KqltyMdMKVvvBulRP/F/A8rLIQjcxz++iPAsbw+zOzlTvjwsto
WHPbqCRiOwY1nQ2pM714A5AuTHhdUDqB1O6gyHA43LL5Z/qHQF1hwFGPa4NrzQU6
yuGnBXj8ytqU0CwIPX4WecigUCAkVDNx
-----END CERTIFICATE-----
`
const googleLeaf = `-----BEGIN CERTIFICATE-----
MIIDITCCAoqgAwIBAgIQL9+89q6RUm0PmqPfQDQ+mjANBgkqhkiG9w0BAQUFADBM
MQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkg
THRkLjEWMBQGA1UEAxMNVGhhd3RlIFNHQyBDQTAeFw0wOTEyMTgwMDAwMDBaFw0x
MTEyMTgyMzU5NTlaMGgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlh
MRYwFAYDVQQHFA1Nb3VudGFpbiBWaWV3MRMwEQYDVQQKFApHb29nbGUgSW5jMRcw
FQYDVQQDFA53d3cuZ29vZ2xlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkC
gYEA6PmGD5D6htffvXImttdEAoN4c9kCKO+IRTn7EOh8rqk41XXGOOsKFQebg+jN
gtXj9xVoRaELGYW84u+E593y17iYwqG7tcFR39SDAqc9BkJb4SLD3muFXxzW2k6L
05vuuWciKh0R73mkszeK9P4Y/bz5RiNQl/Os/CRGK1w7t0UCAwEAAaOB5zCB5DAM
BgNVHRMBAf8EAjAAMDYGA1UdHwQvMC0wK6ApoCeGJWh0dHA6Ly9jcmwudGhhd3Rl
LmNvbS9UaGF3dGVTR0NDQS5jcmwwKAYDVR0lBCEwHwYIKwYBBQUHAwEGCCsGAQUF
BwMCBglghkgBhvhCBAEwcgYIKwYBBQUHAQEEZjBkMCIGCCsGAQUFBzABhhZodHRw
Oi8vb2NzcC50aGF3dGUuY29tMD4GCCsGAQUFBzAChjJodHRwOi8vd3d3LnRoYXd0
ZS5jb20vcmVwb3NpdG9yeS9UaGF3dGVfU0dDX0NBLmNydDANBgkqhkiG9w0BAQUF
AAOBgQCfQ89bxFApsb/isJr/aiEdLRLDLE5a+RLizrmCUi3nHX4adpaQedEkUjh5
u2ONgJd8IyAPkU0Wueru9G2Jysa9zCRo1kNbzipYvzwY4OA8Ys+WAi0oR1A04Se6
z5nRUP8pJcA2NhUzUnC+MY+f6H/nEQyNv4SgQhqAibAxWEEHXw==
-----END CERTIFICATE-----`
MIIEdjCCA16gAwIBAgIIcR5k4dkoe04wDQYJKoZIhvcNAQEFBQAwSTELMAkGA1UE
BhMCVVMxEzARBgNVBAoTCkdvb2dsZSBJbmMxJTAjBgNVBAMTHEdvb2dsZSBJbnRl
cm5ldCBBdXRob3JpdHkgRzIwHhcNMTQwMzEyMDkzODMwWhcNMTQwNjEwMDAwMDAw
WjBoMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwN
TW91bnRhaW4gVmlldzETMBEGA1UECgwKR29vZ2xlIEluYzEXMBUGA1UEAwwOd3d3
Lmdvb2dsZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC4zYCe
m0oUBhwE0EwBr65eBOcgcQO2PaSIAB2dEP/c1EMX2tOy0ov8rk83ePhJ+MWdT1z6
jge9X4zQQI8ZyA9qIiwrKBZOi8DNUvrqNZC7fJAVRrb9aX/99uYOJCypIbpmWG1q
fhbHjJewhwf8xYPj71eU4rLG80a+DapWmphtfq3h52lDQIBzLVf1yYbyrTaELaz4
NXF7HXb5YkId/gxIsSzM0aFUVu2o8sJcLYAsJqwfFKBKOMxUcn545nlspf0mTcWZ
0APlbwsKznNs4/xCDwIxxWjjqgHrYAFl6y07i1gzbAOqdNEyR24p+3JWI8WZBlBI
dk2KGj0W1fIfsvyxAgMBAAGjggFBMIIBPTAdBgNVHSUEFjAUBggrBgEFBQcDAQYI
KwYBBQUHAwIwGQYDVR0RBBIwEIIOd3d3Lmdvb2dsZS5jb20waAYIKwYBBQUHAQEE
XDBaMCsGCCsGAQUFBzAChh9odHRwOi8vcGtpLmdvb2dsZS5jb20vR0lBRzIuY3J0
MCsGCCsGAQUFBzABhh9odHRwOi8vY2xpZW50czEuZ29vZ2xlLmNvbS9vY3NwMB0G
A1UdDgQWBBTXD5Bx6iqT+dmEhbFL4OUoHyZn8zAMBgNVHRMBAf8EAjAAMB8GA1Ud
IwQYMBaAFErdBhYbvPZotXb1gba7Yhq6WoEvMBcGA1UdIAQQMA4wDAYKKwYBBAHW
eQIFATAwBgNVHR8EKTAnMCWgI6Ahhh9odHRwOi8vcGtpLmdvb2dsZS5jb20vR0lB
RzIuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQCR3RJtHzgDh33b/MI1ugiki+nl8Ikj
5larbJRE/rcA5oite+QJyAr6SU1gJJ/rRrK3ItVEHr9L621BCM7GSdoNMjB9MMcf
tJAW0kYGJ+wqKm53wG/JaOADTnnq2Mt/j6F2uvjgN/ouns1nRHufIvd370N0LeH+
orKqTuAPzXK7imQk6+OycYABbqCtC/9qmwRd8wwn7sF97DtYfK8WuNHtFalCAwyi
8LxJJYJCLWoMhZ+V8GZm+FOex5qkQAjnZrtNlbQJ8ro4r+rpKXtmMFFhfa+7L+PA
Kom08eUK8skxAzfDDijZPh10VtJ66uBoiDPdT+uCBehcBIcmSTrKjFGX
-----END CERTIFICATE-----
`
// googleLeafWithInvalidHash is the same as googleLeaf, but the signature
// algorithm in the certificate contains a nonsense OID.
const googleLeafWithInvalidHash = `-----BEGIN CERTIFICATE-----
MIIDITCCAoqgAwIBAgIQL9+89q6RUm0PmqPfQDQ+mjANBgkqhkiG9w0BATIFADBM
MQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkg
THRkLjEWMBQGA1UEAxMNVGhhd3RlIFNHQyBDQTAeFw0wOTEyMTgwMDAwMDBaFw0x
MTEyMTgyMzU5NTlaMGgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlh
MRYwFAYDVQQHFA1Nb3VudGFpbiBWaWV3MRMwEQYDVQQKFApHb29nbGUgSW5jMRcw
FQYDVQQDFA53d3cuZ29vZ2xlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkC
gYEA6PmGD5D6htffvXImttdEAoN4c9kCKO+IRTn7EOh8rqk41XXGOOsKFQebg+jN
gtXj9xVoRaELGYW84u+E593y17iYwqG7tcFR39SDAqc9BkJb4SLD3muFXxzW2k6L
05vuuWciKh0R73mkszeK9P4Y/bz5RiNQl/Os/CRGK1w7t0UCAwEAAaOB5zCB5DAM
BgNVHRMBAf8EAjAAMDYGA1UdHwQvMC0wK6ApoCeGJWh0dHA6Ly9jcmwudGhhd3Rl
LmNvbS9UaGF3dGVTR0NDQS5jcmwwKAYDVR0lBCEwHwYIKwYBBQUHAwEGCCsGAQUF
BwMCBglghkgBhvhCBAEwcgYIKwYBBQUHAQEEZjBkMCIGCCsGAQUFBzABhhZodHRw
Oi8vb2NzcC50aGF3dGUuY29tMD4GCCsGAQUFBzAChjJodHRwOi8vd3d3LnRoYXd0
ZS5jb20vcmVwb3NpdG9yeS9UaGF3dGVfU0dDX0NBLmNydDANBgkqhkiG9w0BAVAF
AAOBgQCfQ89bxFApsb/isJr/aiEdLRLDLE5a+RLizrmCUi3nHX4adpaQedEkUjh5
u2ONgJd8IyAPkU0Wueru9G2Jysa9zCRo1kNbzipYvzwY4OA8Ys+WAi0oR1A04Se6
z5nRUP8pJcA2NhUzUnC+MY+f6H/nEQyNv4SgQhqAibAxWEEHXw==
-----END CERTIFICATE-----`
MIIEdjCCA16gAwIBAgIIcR5k4dkoe04wDQYJKoZIhvcNAWAFBQAwSTELMAkGA1UE
BhMCVVMxEzARBgNVBAoTCkdvb2dsZSBJbmMxJTAjBgNVBAMTHEdvb2dsZSBJbnRl
cm5ldCBBdXRob3JpdHkgRzIwHhcNMTQwMzEyMDkzODMwWhcNMTQwNjEwMDAwMDAw
WjBoMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwN
TW91bnRhaW4gVmlldzETMBEGA1UECgwKR29vZ2xlIEluYzEXMBUGA1UEAwwOd3d3
Lmdvb2dsZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC4zYCe
m0oUBhwE0EwBr65eBOcgcQO2PaSIAB2dEP/c1EMX2tOy0ov8rk83ePhJ+MWdT1z6
jge9X4zQQI8ZyA9qIiwrKBZOi8DNUvrqNZC7fJAVRrb9aX/99uYOJCypIbpmWG1q
fhbHjJewhwf8xYPj71eU4rLG80a+DapWmphtfq3h52lDQIBzLVf1yYbyrTaELaz4
NXF7HXb5YkId/gxIsSzM0aFUVu2o8sJcLYAsJqwfFKBKOMxUcn545nlspf0mTcWZ
0APlbwsKznNs4/xCDwIxxWjjqgHrYAFl6y07i1gzbAOqdNEyR24p+3JWI8WZBlBI
dk2KGj0W1fIfsvyxAgMBAAGjggFBMIIBPTAdBgNVHSUEFjAUBggrBgEFBQcDAQYI
KwYBBQUHAwIwGQYDVR0RBBIwEIIOd3d3Lmdvb2dsZS5jb20waAYIKwYBBQUHAQEE
XDBaMCsGCCsGAQUFBzAChh9odHRwOi8vcGtpLmdvb2dsZS5jb20vR0lBRzIuY3J0
MCsGCCsGAQUFBzABhh9odHRwOi8vY2xpZW50czEuZ29vZ2xlLmNvbS9vY3NwMB0G
A1UdDgQWBBTXD5Bx6iqT+dmEhbFL4OUoHyZn8zAMBgNVHRMBAf8EAjAAMB8GA1Ud
IwQYMBaAFErdBhYbvPZotXb1gba7Yhq6WoEvMBcGA1UdIAQQMA4wDAYKKwYBBAHW
eQIFATAwBgNVHR8EKTAnMCWgI6Ahhh9odHRwOi8vcGtpLmdvb2dsZS5jb20vR0lB
RzIuY3JsMA0GCSqGSIb3DQFgBQUAA4IBAQCR3RJtHzgDh33b/MI1ugiki+nl8Ikj
5larbJRE/rcA5oite+QJyAr6SU1gJJ/rRrK3ItVEHr9L621BCM7GSdoNMjB9MMcf
tJAW0kYGJ+wqKm53wG/JaOADTnnq2Mt/j6F2uvjgN/ouns1nRHufIvd370N0LeH+
orKqTuAPzXK7imQk6+OycYABbqCtC/9qmwRd8wwn7sF97DtYfK8WuNHtFalCAwyi
8LxJJYJCLWoMhZ+V8GZm+FOex5qkQAjnZrtNlbQJ8ro4r+rpKXtmMFFhfa+7L+PA
Kom08eUK8skxAzfDDijZPh10VtJ66uBoiDPdT+uCBehcBIcmSTrKjFGX
-----END CERTIFICATE-----
`
const dnssecExpLeaf = `-----BEGIN CERTIFICATE-----
MIIGzTCCBbWgAwIBAgIDAdD6MA0GCSqGSIb3DQEBBQUAMIGMMQswCQYDVQQGEwJJ
@ -936,3 +989,135 @@ AbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhHhm4qxFYxldBniYUr+WymXUad
DKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveCX4XSQRjbgbME
HMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==
-----END CERTIFICATE-----`
var moipLeafCert = `-----BEGIN CERTIFICATE-----
MIIGQDCCBSigAwIBAgIRAPe/cwh7CUWizo8mYSDavLIwDQYJKoZIhvcNAQELBQAw
gZIxCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
BgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMTgwNgYD
VQQDEy9DT01PRE8gUlNBIEV4dGVuZGVkIFZhbGlkYXRpb24gU2VjdXJlIFNlcnZl
ciBDQTAeFw0xMzA4MTUwMDAwMDBaFw0xNDA4MTUyMzU5NTlaMIIBQjEXMBUGA1UE
BRMOMDg3MTg0MzEwMDAxMDgxEzARBgsrBgEEAYI3PAIBAxMCQlIxGjAYBgsrBgEE
AYI3PAIBAhMJU2FvIFBhdWxvMR0wGwYDVQQPExRQcml2YXRlIE9yZ2FuaXphdGlv
bjELMAkGA1UEBhMCQlIxETAPBgNVBBETCDAxNDUyMDAwMRIwEAYDVQQIEwlTYW8g
UGF1bG8xEjAQBgNVBAcTCVNhbyBQYXVsbzEtMCsGA1UECRMkQXZlbmlkYSBCcmln
YWRlaXJvIEZhcmlhIExpbWEgLCAyOTI3MR0wGwYDVQQKExRNb2lwIFBhZ2FtZW50
b3MgUy5BLjENMAsGA1UECxMETU9JUDEYMBYGA1UECxMPU1NMIEJsaW5kYWRvIEVW
MRgwFgYDVQQDEw9hcGkubW9pcC5jb20uYnIwggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAQDN0b9x6TrXXA9hPCF8/NjqGJ++2D4LO4ZiMFTjs0VwpXy2Y1Oe
s74/HuiLGnAHxTmAtV7IpZMibiOcTxcnDYp9oEWkf+gR+hZvwFZwyOBC7wyb3SR3
UvV0N1ZbEVRYpN9kuX/3vjDghjDmzzBwu8a/T+y5JTym5uiJlngVAWyh/RjtIvYi
+NVkQMbyVlPGkoCe6c30pH8DKYuUCZU6DHjUsPTX3jAskqbhDSAnclX9iX0p2bmw
KVBc+5Vh/2geyzDuquF0w+mNIYdU5h7uXvlmJnf3d2Cext5dxdL8/jezD3U0dAqI
pYSKERbyxSkJWxdvRlhdpM9YXMJcpc88xNp1AgMBAAGjggHcMIIB2DAfBgNVHSME
GDAWgBQ52v/KKBSKqHQTCLnkDqnS+n6daTAdBgNVHQ4EFgQU/lXuOa7DMExzZjRj
LQWcMWGZY7swDgYDVR0PAQH/BAQDAgWgMAwGA1UdEwEB/wQCMAAwHQYDVR0lBBYw
FAYIKwYBBQUHAwEGCCsGAQUFBwMCMEYGA1UdIAQ/MD0wOwYMKwYBBAGyMQECAQUB
MCswKQYIKwYBBQUHAgEWHWh0dHBzOi8vc2VjdXJlLmNvbW9kby5jb20vQ1BTMFYG
A1UdHwRPME0wS6BJoEeGRWh0dHA6Ly9jcmwuY29tb2RvY2EuY29tL0NPTU9ET1JT
QUV4dGVuZGVkVmFsaWRhdGlvblNlY3VyZVNlcnZlckNBLmNybDCBhwYIKwYBBQUH
AQEEezB5MFEGCCsGAQUFBzAChkVodHRwOi8vY3J0LmNvbW9kb2NhLmNvbS9DT01P
RE9SU0FFeHRlbmRlZFZhbGlkYXRpb25TZWN1cmVTZXJ2ZXJDQS5jcnQwJAYIKwYB
BQUHMAGGGGh0dHA6Ly9vY3NwLmNvbW9kb2NhLmNvbTAvBgNVHREEKDAmgg9hcGku
bW9pcC5jb20uYnKCE3d3dy5hcGkubW9pcC5jb20uYnIwDQYJKoZIhvcNAQELBQAD
ggEBAFoTmPlaDcf+nudhjXHwud8g7/LRyA8ucb+3/vfmgbn7FUc1eprF5sJS1mA+
pbiTyXw4IxcJq2KUj0Nw3IPOe9k84mzh+XMmdCKH+QK3NWkE9Udz+VpBOBc0dlqC
1RH5umStYDmuZg/8/r652eeQ5kUDcJyADfpKWBgDPYaGtwzKVT4h3Aok9SLXRHx6
z/gOaMjEDMarMCMw4VUIG1pvNraZrG5oTaALPaIXXpd8VqbQYPudYJ6fR5eY3FeW
H/ofbYFdRcuD26MfBFWE9VGGral9Fgo8sEHffho+UWhgApuQV4/l5fMzxB5YBXyQ
jhuy8PqqZS9OuLilTeLu4a8z2JI=
-----END CERTIFICATE-----`
var comodoIntermediateSHA384 = `-----BEGIN CERTIFICATE-----
MIIGDjCCA/agAwIBAgIQBqdDgNTr/tQ1taP34Wq92DANBgkqhkiG9w0BAQwFADCB
hTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNV
BAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTIwMjEy
MDAwMDAwWhcNMjcwMjExMjM1OTU5WjCBkjELMAkGA1UEBhMCR0IxGzAZBgNVBAgT
EkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR
Q09NT0RPIENBIExpbWl0ZWQxODA2BgNVBAMTL0NPTU9ETyBSU0EgRXh0ZW5kZWQg
VmFsaWRhdGlvbiBTZWN1cmUgU2VydmVyIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEAlVbeVLTf1QJJe9FbXKKyHo+cK2JMK40SKPMalaPGEP0p3uGf
CzhAk9HvbpUQ/OGQF3cs7nU+e2PsYZJuTzurgElr3wDqAwB/L3XVKC/sVmePgIOj
vdwDmZOLlJFWW6G4ajo/Br0OksxgnP214J9mMF/b5pTwlWqvyIqvgNnmiDkBfBzA
xSr3e5Wg8narbZtyOTDr0VdVAZ1YEZ18bYSPSeidCfw8/QpKdhQhXBZzQCMZdMO6
WAqmli7eNuWf0MLw4eDBYuPCGEUZUaoXHugjddTI0JYT/8ck0YwLJ66eetw6YWNg
iJctXQUL5Tvrrs46R3N2qPos3cCHF+msMJn4HwIDAQABo4IBaTCCAWUwHwYDVR0j
BBgwFoAUu69+Aj36pvE8hI6t7jiY7NkyMtQwHQYDVR0OBBYEFDna/8ooFIqodBMI
ueQOqdL6fp1pMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEAMD4G
A1UdIAQ3MDUwMwYEVR0gADArMCkGCCsGAQUFBwIBFh1odHRwczovL3NlY3VyZS5j
b21vZG8uY29tL0NQUzBMBgNVHR8ERTBDMEGgP6A9hjtodHRwOi8vY3JsLmNvbW9k
b2NhLmNvbS9DT01PRE9SU0FDZXJ0aWZpY2F0aW9uQXV0aG9yaXR5LmNybDBxBggr
BgEFBQcBAQRlMGMwOwYIKwYBBQUHMAKGL2h0dHA6Ly9jcnQuY29tb2RvY2EuY29t
L0NPTU9ET1JTQUFkZFRydXN0Q0EuY3J0MCQGCCsGAQUFBzABhhhodHRwOi8vb2Nz
cC5jb21vZG9jYS5jb20wDQYJKoZIhvcNAQEMBQADggIBAERCnUFRK0iIXZebeV4R
AUpSGXtBLMeJPNBy3IX6WK/VJeQT+FhlZ58N/1eLqYVeyqZLsKeyLeCMIs37/3mk
jCuN/gI9JN6pXV/kD0fQ22YlPodHDK4ixVAihNftSlka9pOlk7DgG4HyVsTIEFPk
1Hax0VtpS3ey4E/EhOfUoFDuPPpE/NBXueEoU/1Tzdy5H3pAvTA/2GzS8+cHnx8i
teoiccsq8FZ8/qyo0QYPFBRSTP5kKwxpKrgNUG4+BAe/eiCL+O5lCeHHSQgyPQ0o
fkkdt0rvAucNgBfIXOBhYsvss2B5JdoaZXOcOBCgJjqwyBZ9kzEi7nQLiMBciUEA
KKlHMd99SUWa9eanRRrSjhMQ34Ovmw2tfn6dNVA0BM7pINae253UqNpktNEvWS5e
ojZh1CSggjMziqHRbO9haKPl0latxf1eYusVqHQSTC8xjOnB3xBLAer2VBvNfzu9
XJ/B288ByvK6YBIhMe2pZLiySVgXbVrXzYxtvp5/4gJYp9vDLVj2dAZqmvZh+fYA
tmnYOosxWd2R5nwnI4fdAw+PKowegwFOAWEMUnNt/AiiuSpm5HZNMaBWm9lTjaK2
jwLI5jqmBNFI+8NKAnb9L9K8E7bobTQk+p0pisehKxTxlgBzuRPpwLk6R1YCcYAn
pLwltum95OmYdBbxN4SBB7SC
-----END CERTIFICATE-----`
const comodoRSAAuthority = `-----BEGIN CERTIFICATE-----
MIIFdDCCBFygAwIBAgIQJ2buVutJ846r13Ci/ITeIjANBgkqhkiG9w0BAQwFADBv
MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFk
ZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBF
eHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFow
gYUxCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
BgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMSswKQYD
VQQDEyJDT01PRE8gUlNBIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkq
hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAkehUktIKVrGsDSTdxc9EZ3SZKzejfSNw
AHG8U9/E+ioSj0t/EFa9n3Byt2F/yUsPF6c947AEYe7/EZfH9IY+Cvo+XPmT5jR6
2RRr55yzhaCCenavcZDX7P0N+pxs+t+wgvQUfvm+xKYvT3+Zf7X8Z0NyvQwA1onr
ayzT7Y+YHBSrfuXjbvzYqOSSJNpDa2K4Vf3qwbxstovzDo2a5JtsaZn4eEgwRdWt
4Q08RWD8MpZRJ7xnw8outmvqRsfHIKCxH2XeSAi6pE6p8oNGN4Tr6MyBSENnTnIq
m1y9TBsoilwie7SrmNnu4FGDwwlGTm0+mfqVF9p8M1dBPI1R7Qu2XK8sYxrfV8g/
vOldxJuvRZnio1oktLqpVj3Pb6r/SVi+8Kj/9Lit6Tf7urj0Czr56ENCHonYhMsT
8dm74YlguIwoVqwUHZwK53Hrzw7dPamWoUi9PPevtQ0iTMARgexWO/bTouJbt7IE
IlKVgJNp6I5MZfGRAy1wdALqi2cVKWlSArvX31BqVUa/oKMoYX9w0MOiqiwhqkfO
KJwGRXa/ghgntNWutMtQ5mv0TIZxMOmm3xaG4Nj/QN370EKIf6MzOi5cHkERgWPO
GHFrK+ymircxXDpqR+DDeVnWIBqv8mqYqnK8V0rSS527EPywTEHl7R09XiidnMy/
s1Hap0flhFMCAwEAAaOB9DCB8TAfBgNVHSMEGDAWgBStvZh6NLQm9/rEJlTvA73g
JMtUGjAdBgNVHQ4EFgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQD
AgGGMA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0gBAowCDAGBgRVHSAAMEQGA1UdHwQ9
MDswOaA3oDWGM2h0dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9BZGRUcnVzdEV4dGVy
bmFsQ0FSb290LmNybDA1BggrBgEFBQcBAQQpMCcwJQYIKwYBBQUHMAGGGWh0dHA6
Ly9vY3NwLnVzZXJ0cnVzdC5jb20wDQYJKoZIhvcNAQEMBQADggEBAGS/g/FfmoXQ
zbihKVcN6Fr30ek+8nYEbvFScLsePP9NDXRqzIGCJdPDoCpdTPW6i6FtxFQJdcfj
Jw5dhHk3QBN39bSsHNA7qxcS1u80GH4r6XnTq1dFDK8o+tDb5VCViLvfhVdpfZLY
Uspzgb8c8+a4bmYRBbMelC1/kZWSWfFMzqORcUx8Rww7Cxn2obFshj5cqsQugsv5
B5a6SE2Q8pTIqXOi6wZ7I53eovNNVZ96YUWYGGjHXkBrI/V5eu+MtWuLt29G9Hvx
PUsE2JOAWVrgQSQdso8VYFhH2+9uRv0V9dlfmrPb2LjkQLPNlzmuhbsdjrzch5vR
pu/xO28QOG8=
-----END CERTIFICATE-----`
const addTrustRoot = `-----BEGIN CERTIFICATE-----
MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU
MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs
IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290
MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux
FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h
bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v
dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt
H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9
uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX
mk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX
a0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN
E0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0
WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYD
VR0PBAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0
Jvf6xCZU7wO94CTLVBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRU
cnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsx
IjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN
AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH
YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC
Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX
c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a
mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
-----END CERTIFICATE-----`

View File

@ -14,6 +14,7 @@ import (
"crypto/rsa"
"crypto/sha1"
_ "crypto/sha256"
_ "crypto/sha512"
"crypto/x509/pkix"
"encoding/asn1"
"encoding/pem"

View File

@ -22,6 +22,7 @@ import (
"net"
"os/exec"
"reflect"
"runtime"
"testing"
"time"
)
@ -395,7 +396,7 @@ func TestCreateSelfSignedCertificate(t *testing.T) {
}
if cert.SignatureAlgorithm != test.sigAlgo {
t.Errorf("%s: SignatureAlgorithm wasn't copied from template. Got %s, want %s", test.name, cert.SignatureAlgorithm, test.sigAlgo)
t.Errorf("%s: SignatureAlgorithm wasn't copied from template. Got %v, want %v", test.name, cert.SignatureAlgorithm, test.sigAlgo)
}
if !reflect.DeepEqual(cert.ExtKeyUsage, testExtKeyUsage) {
@ -728,6 +729,10 @@ func TestParsePEMCRL(t *testing.T) {
func TestImports(t *testing.T) {
t.Skip("gccgo does not have a go command")
if runtime.GOOS == "nacl" {
t.Skip("skipping on nacl")
}
if err := exec.Command("go", "run", "x509_test_import.go").Run(); err != nil {
t.Errorf("failed to run x509_test_import.go: %s", err)
}

View File

@ -134,7 +134,7 @@ type Stmt interface {
// as an INSERT or UPDATE.
Exec(args []Value) (Result, error)
// Exec executes a query that may return rows, such as a
// Query executes a query that may return rows, such as a
// SELECT.
Query(args []Value) (Rows, error)
}

View File

@ -181,7 +181,8 @@ type Scanner interface {
// defers this error until a Scan.
var ErrNoRows = errors.New("sql: no rows in result set")
// DB is a database handle. It's safe for concurrent use by multiple
// DB is a database handle representing a pool of zero or more
// underlying connections. It's safe for concurrent use by multiple
// goroutines.
//
// The sql package creates and frees connections automatically; it
@ -405,7 +406,7 @@ func (db *DB) removeDepLocked(x finalCloser, dep interface{}) func() error {
// This value should be larger than the maximum typical value
// used for db.maxOpen. If maxOpen is significantly larger than
// connectionRequestQueueSize then it is possible for ALL calls into the *DB
// to block until the connectionOpener can satify the backlog of requests.
// to block until the connectionOpener can satisfy the backlog of requests.
var connectionRequestQueueSize = 1000000
// Open opens a database specified by its database driver name and a
@ -420,6 +421,11 @@ var connectionRequestQueueSize = 1000000
// Open may just validate its arguments without creating a connection
// to the database. To verify that the data source name is valid, call
// Ping.
//
// The returned DB is safe for concurrent use by multiple goroutines
// and maintains its own pool of idle connections. Thus, the Open
// function should be called just once. It is rarely necessary to
// close a DB.
func Open(driverName, dataSourceName string) (*DB, error) {
driveri, ok := drivers[driverName]
if !ok {
@ -452,6 +458,9 @@ func (db *DB) Ping() error {
}
// Close closes the database, releasing any open resources.
//
// It is rare to Close a DB, as the DB handle is meant to be
// long-lived and shared between many goroutines.
func (db *DB) Close() error {
db.mu.Lock()
if db.closed { // Make DB.Close idempotent
@ -652,13 +661,16 @@ func (db *DB) conn() (*driverConn, error) {
return conn, nil
}
db.numOpen++ // optimistically
db.mu.Unlock()
ci, err := db.driver.Open(db.dsn)
if err != nil {
db.mu.Lock()
db.numOpen-- // correct for earlier optimism
db.mu.Unlock()
return nil, err
}
db.mu.Lock()
db.numOpen++
dc := &driverConn{
db: db,
ci: ci,
@ -778,7 +790,7 @@ func (db *DB) putConn(dc *driverConn, err error) {
// connection limit will not be exceeded.
// If err != nil, the value of dc is ignored.
// If err == nil, then dc must not equal nil.
// If a connRequest was fullfilled or the *driverConn was placed in the
// If a connRequest was fulfilled or the *driverConn was placed in the
// freeConn list, then true is returned, otherwise false is returned.
func (db *DB) putConnDBLocked(dc *driverConn, err error) bool {
if db.connRequests.Len() > 0 {
@ -1494,6 +1506,7 @@ func (s *Stmt) finalClose() error {
//
// rows, err := db.Query("SELECT ...")
// ...
// defer rows.Close()
// for rows.Next() {
// var id int
// var name string

View File

@ -461,7 +461,7 @@ func TestTxStmt(t *testing.T) {
}
// Issue: http://golang.org/issue/2784
// This test didn't fail before because we got luckly with the fakedb driver.
// This test didn't fail before because we got lucky with the fakedb driver.
// It was failing, and now not, in github.com/bradfitz/go-sql-test
func TestTxQuery(t *testing.T) {
db := newTestDB(t, "")

View File

@ -212,6 +212,10 @@ const (
formExprloc format = 0x18
formFlagPresent format = 0x19
formRefSig8 format = 0x20
// Extensions for multi-file compression (.dwz)
// http://www.dwarfstd.org/ShowIssue.php?issue=120604.1
formGnuRefAlt format = 0x1f20
formGnuStrpAlt format = 0x1f21
)
// A Tag is the classification (the type) of an Entry.

View File

@ -241,10 +241,10 @@ func (b *buf) entry(atab abbrevTable, ubase Offset) *Entry {
// lineptr, loclistptr, macptr, rangelistptr
// New in DWARF 4, but clang can generate them with -gdwarf-2.
// Section reference, replacing use of formData4 and formData8.
case formSecOffset:
case formSecOffset, formGnuRefAlt, formGnuStrpAlt:
is64, known := b.format.dwarf64()
if !known {
b.error("unknown size for DW_FORM_sec_offset")
b.error("unknown size for form 0x" + strconv.FormatInt(int64(fmt), 16))
} else if is64 {
val = int64(b.uint64())
} else {

View File

@ -517,7 +517,7 @@ const (
DT_INIT_ARRAY DynTag = 25 /* Address of the array of pointers to initialization functions */
DT_FINI_ARRAY DynTag = 26 /* Address of the array of pointers to termination functions */
DT_INIT_ARRAYSZ DynTag = 27 /* Size in bytes of the array of initialization functions. */
DT_FINI_ARRAYSZ DynTag = 28 /* Size in bytes of the array of terminationfunctions. */
DT_FINI_ARRAYSZ DynTag = 28 /* Size in bytes of the array of termination functions. */
DT_RUNPATH DynTag = 29 /* String table offset of a null-terminated library search path string. */
DT_FLAGS DynTag = 30 /* Object specific flag values. */
DT_ENCODING DynTag = 32 /* Values greater than or equal to DT_ENCODING

View File

@ -522,13 +522,17 @@ func (f *File) applyRelocations(dst []byte, rels []byte) error {
if f.Class == ELFCLASS64 && f.Machine == EM_X86_64 {
return f.applyRelocationsAMD64(dst, rels)
}
if f.Class == ELFCLASS32 && f.Machine == EM_386 {
return f.applyRelocations386(dst, rels)
}
return errors.New("not implemented")
}
func (f *File) applyRelocationsAMD64(dst []byte, rels []byte) error {
if len(rels)%Sym64Size != 0 {
return errors.New("length of relocation section is not a multiple of Sym64Size")
// 24 is the size of Rela64.
if len(rels)%24 != 0 {
return errors.New("length of relocation section is not a multiple of 24")
}
symbols, _, err := f.getSymbols(SHT_SYMTAB)
@ -570,6 +574,43 @@ func (f *File) applyRelocationsAMD64(dst []byte, rels []byte) error {
return nil
}
func (f *File) applyRelocations386(dst []byte, rels []byte) error {
// 8 is the size of Rel32.
if len(rels)%8 != 0 {
return errors.New("length of relocation section is not a multiple of 8")
}
symbols, _, err := f.getSymbols(SHT_SYMTAB)
if err != nil {
return err
}
b := bytes.NewReader(rels)
var rel Rel32
for b.Len() > 0 {
binary.Read(b, f.ByteOrder, &rel)
symNo := rel.Info >> 8
t := R_386(rel.Info & 0xff)
if symNo == 0 || symNo > uint32(len(symbols)) {
continue
}
sym := &symbols[symNo-1]
if t == R_386_32 {
if rel.Off+4 >= uint32(len(dst)) {
continue
}
val := f.ByteOrder.Uint32(dst[rel.Off : rel.Off+4])
val += uint32(sym.Value)
f.ByteOrder.PutUint32(dst[rel.Off:rel.Off+4], val)
}
}
return nil
}
func (f *File) DWARF() (*dwarf.Data, error) {
// There are many other DWARF sections, but these
// are the required ones, and the debug/dwarf package
@ -603,6 +644,19 @@ func (f *File) DWARF() (*dwarf.Data, error) {
}
}
// When using clang we need to process relocations even for 386.
rel := f.Section(".rel.debug_info")
if rel != nil && rel.Type == SHT_REL && f.Machine == EM_386 {
data, err := rel.Data()
if err != nil {
return nil, err
}
err = f.applyRelocations(dat[1], data)
if err != nil {
return nil, err
}
}
abbrev, info, line, ranges, str := dat[0], dat[1], dat[2], dat[3], dat[4]
d, err := dwarf.New(abbrev, nil, nil, info, line, nil, ranges, str)
if err != nil {

View File

@ -260,6 +260,12 @@ var relocationTests = []relocationTest{
{0, &dwarf.Entry{Offset: 0xb, Tag: dwarf.TagCompileUnit, Children: true, Field: []dwarf.Field{{Attr: dwarf.AttrProducer, Val: "GNU C 4.2.4 (Ubuntu 4.2.4-1ubuntu4)"}, {Attr: dwarf.AttrLanguage, Val: int64(1)}, {Attr: dwarf.AttrName, Val: "go-relocation-test-gcc424.c"}, {Attr: dwarf.AttrCompDir, Val: "/tmp"}, {Attr: dwarf.AttrLowpc, Val: uint64(0x0)}, {Attr: dwarf.AttrHighpc, Val: uint64(0x6)}, {Attr: dwarf.AttrStmtList, Val: int64(0)}}}},
},
},
{
"testdata/go-relocation-test-clang-x86.obj",
[]relocationTestEntry{
{0, &dwarf.Entry{Offset: 0xb, Tag: dwarf.TagCompileUnit, Children: true, Field: []dwarf.Field{{Attr: dwarf.AttrProducer, Val: "clang version google3-trunk (trunk r209387)"}, {Attr: dwarf.AttrLanguage, Val: int64(12)}, {Attr: dwarf.AttrName, Val: "go-relocation-test-clang.c"}, {Attr: dwarf.AttrStmtList, Val: int64(0)}, {Attr: dwarf.AttrCompDir, Val: "/tmp"}}}},
},
},
{
"testdata/gcc-amd64-openbsd-debug-with-rela.obj",
[]relocationTestEntry{

Binary file not shown.

View File

@ -1,655 +0,0 @@
// Copyright 2013 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 goobj implements reading of Go object files and archives.
//
// TODO(rsc): Decide where this package should live. (golang.org/issue/6932)
// TODO(rsc): Decide the appropriate integer types for various fields.
// TODO(rsc): Write tests. (File format still up in the air a little.)
package goobj
import (
"bufio"
"bytes"
"errors"
"fmt"
"io"
"strconv"
"strings"
)
// A SymKind describes the kind of memory represented by a symbol.
type SymKind int
// This list is taken from include/link.h.
// Defined SymKind values.
// TODO(rsc): Give idiomatic Go names.
// TODO(rsc): Reduce the number of symbol types in the object files.
const (
_ SymKind = iota
// readonly, executable
STEXT
SELFRXSECT
// readonly, non-executable
STYPE
SSTRING
SGOSTRING
SGOFUNC
SRODATA
SFUNCTAB
STYPELINK
SSYMTAB // TODO: move to unmapped section
SPCLNTAB
SELFROSECT
// writable, non-executable
SMACHOPLT
SELFSECT
SMACHO // Mach-O __nl_symbol_ptr
SMACHOGOT
SNOPTRDATA
SINITARR
SDATA
SWINDOWS
SBSS
SNOPTRBSS
STLSBSS
// not mapped
SXREF
SMACHOSYMSTR
SMACHOSYMTAB
SMACHOINDIRECTPLT
SMACHOINDIRECTGOT
SFILE
SFILEPATH
SCONST
SDYNIMPORT
SHOSTOBJ
)
var symKindStrings = []string{
SBSS: "SBSS",
SCONST: "SCONST",
SDATA: "SDATA",
SDYNIMPORT: "SDYNIMPORT",
SELFROSECT: "SELFROSECT",
SELFRXSECT: "SELFRXSECT",
SELFSECT: "SELFSECT",
SFILE: "SFILE",
SFILEPATH: "SFILEPATH",
SFUNCTAB: "SFUNCTAB",
SGOFUNC: "SGOFUNC",
SGOSTRING: "SGOSTRING",
SHOSTOBJ: "SHOSTOBJ",
SINITARR: "SINITARR",
SMACHO: "SMACHO",
SMACHOGOT: "SMACHOGOT",
SMACHOINDIRECTGOT: "SMACHOINDIRECTGOT",
SMACHOINDIRECTPLT: "SMACHOINDIRECTPLT",
SMACHOPLT: "SMACHOPLT",
SMACHOSYMSTR: "SMACHOSYMSTR",
SMACHOSYMTAB: "SMACHOSYMTAB",
SNOPTRBSS: "SNOPTRBSS",
SNOPTRDATA: "SNOPTRDATA",
SPCLNTAB: "SPCLNTAB",
SRODATA: "SRODATA",
SSTRING: "SSTRING",
SSYMTAB: "SSYMTAB",
STEXT: "STEXT",
STLSBSS: "STLSBSS",
STYPE: "STYPE",
STYPELINK: "STYPELINK",
SWINDOWS: "SWINDOWS",
SXREF: "SXREF",
}
func (k SymKind) String() string {
if k < 0 || int(k) >= len(symKindStrings) {
return fmt.Sprintf("SymKind(%d)", k)
}
return symKindStrings[k]
}
// A Sym is a named symbol in an object file.
type Sym struct {
SymID // symbol identifier (name and version)
Kind SymKind // kind of symbol
DupOK bool // are duplicate definitions okay?
Size int // size of corresponding data
Type SymID // symbol for Go type information
Data Data // memory image of symbol
Reloc []Reloc // relocations to apply to Data
Func *Func // additional data for functions
}
// A SymID - the combination of Name and Version - uniquely identifies
// a symbol within a package.
type SymID struct {
// Name is the name of a symbol.
Name string
// Version is zero for symbols with global visibility.
// Symbols with only file visibility (such as file-level static
// declarations in C) have a non-zero version distinguising
// a symbol in one file from a symbol of the same name
// in another file
Version int
}
func (s SymID) String() string {
if s.Version == 0 {
return s.Name
}
return fmt.Sprintf("%s<%d>", s.Name, s.Version)
}
// A Data is a reference to data stored in an object file.
// It records the offset and size of the data, so that a client can
// read the data only if necessary.
type Data struct {
Offset int64
Size int64
}
// A Reloc describes a relocation applied to a memory image to refer
// to an address within a particular symbol.
type Reloc struct {
// The bytes at [Offset, Offset+Size) within the memory image
// should be updated to refer to the address Add bytes after the start
// of the symbol Sym.
Offset int
Size int
Sym SymID
Add int
// The Type records the form of address expected in the bytes
// described by the previous fields: absolute, PC-relative, and so on.
// TODO(rsc): The interpretation of Type is not exposed by this package.
Type int
}
// A Var describes a variable in a function stack frame: a declared
// local variable, an input argument, or an output result.
type Var struct {
// The combination of Name, Kind, and Offset uniquely
// identifies a variable in a function stack frame.
// Using fewer of these - in particular, using only Name - does not.
Name string // Name of variable.
Kind int // TODO(rsc): Define meaning.
Offset int // Frame offset. TODO(rsc): Define meaning.
Type SymID // Go type for variable.
}
// Func contains additional per-symbol information specific to functions.
type Func struct {
Args int // size in bytes of of argument frame: inputs and outputs
Frame int // size in bytes of local variable frame
Var []Var // detail about local variables
PCSP Data // PC → SP offset map
PCFile Data // PC → file number map (index into File)
PCLine Data // PC → line number map
PCData []Data // PC → runtime support data map
FuncData []FuncData // non-PC-specific runtime support data
File []string // paths indexed by PCFile
}
// TODO: Add PCData []byte and PCDataIter (similar to liblink).
// A FuncData is a single function-specific data value.
type FuncData struct {
Sym SymID // symbol holding data
Offset int64 // offset into symbol for funcdata pointer
}
// A Package is a parsed Go object file or archive defining a Go package.
type Package struct {
ImportPath string // import path denoting this package
Imports []string // packages imported by this package
Syms []*Sym // symbols defined by this package
MaxVersion int // maximum Version in any SymID in Syms
}
var (
archiveHeader = []byte("!<arch>\n")
archiveMagic = []byte("`\n")
goobjHeader = []byte("go objec") // truncated to size of archiveHeader
errCorruptArchive = errors.New("corrupt archive")
errTruncatedArchive = errors.New("truncated archive")
errNotArchive = errors.New("unrecognized archive format")
errCorruptObject = errors.New("corrupt object file")
errTruncatedObject = errors.New("truncated object file")
errNotObject = errors.New("unrecognized object file format")
)
// An objReader is an object file reader.
type objReader struct {
p *Package
b *bufio.Reader
f io.ReadSeeker
err error
offset int64
limit int64
tmp [256]byte
pkg string
pkgprefix string
}
// importPathToPrefix returns the prefix that will be used in the
// final symbol table for the given import path.
// We escape '%', '"', all control characters and non-ASCII bytes,
// and any '.' after the final slash.
//
// See ../../../cmd/ld/lib.c:/^pathtoprefix and
// ../../../cmd/gc/subr.c:/^pathtoprefix.
func importPathToPrefix(s string) string {
// find index of last slash, if any, or else -1.
// used for determining whether an index is after the last slash.
slash := strings.LastIndex(s, "/")
// check for chars that need escaping
n := 0
for r := 0; r < len(s); r++ {
if c := s[r]; c <= ' ' || (c == '.' && r > slash) || c == '%' || c == '"' || c >= 0x7F {
n++
}
}
// quick exit
if n == 0 {
return s
}
// escape
const hex = "0123456789abcdef"
p := make([]byte, 0, len(s)+2*n)
for r := 0; r < len(s); r++ {
if c := s[r]; c <= ' ' || (c == '.' && r > slash) || c == '%' || c == '"' || c >= 0x7F {
p = append(p, '%', hex[c>>4], hex[c&0xF])
} else {
p = append(p, c)
}
}
return string(p)
}
// init initializes r to read package p from f.
func (r *objReader) init(f io.ReadSeeker, p *Package) {
r.f = f
r.p = p
r.offset, _ = f.Seek(0, 1)
r.limit, _ = f.Seek(0, 2)
f.Seek(r.offset, 0)
r.b = bufio.NewReader(f)
r.pkgprefix = importPathToPrefix(p.ImportPath) + "."
}
// error records that an error occurred.
// It returns only the first error, so that an error
// caused by an earlier error does not discard information
// about the earlier error.
func (r *objReader) error(err error) error {
if r.err == nil {
if err == io.EOF {
err = io.ErrUnexpectedEOF
}
r.err = err
}
// panic("corrupt") // useful for debugging
return r.err
}
// readByte reads and returns a byte from the input file.
// On I/O error or EOF, it records the error but returns byte 0.
// A sequence of 0 bytes will eventually terminate any
// parsing state in the object file. In particular, it ends the
// reading of a varint.
func (r *objReader) readByte() byte {
if r.err != nil {
return 0
}
if r.offset >= r.limit {
r.error(io.ErrUnexpectedEOF)
return 0
}
b, err := r.b.ReadByte()
if err != nil {
if err == io.EOF {
err = io.ErrUnexpectedEOF
}
r.error(err)
b = 0
} else {
r.offset++
}
return b
}
// read reads exactly len(b) bytes from the input file.
// If an error occurs, read returns the error but also
// records it, so it is safe for callers to ignore the result
// as long as delaying the report is not a problem.
func (r *objReader) readFull(b []byte) error {
if r.err != nil {
return r.err
}
if r.offset+int64(len(b)) > r.limit {
return r.error(io.ErrUnexpectedEOF)
}
n, err := io.ReadFull(r.b, b)
r.offset += int64(n)
if err != nil {
return r.error(err)
}
return nil
}
// readInt reads a zigzag varint from the input file.
func (r *objReader) readInt() int {
var u uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
r.error(errCorruptObject)
return 0
}
c := r.readByte()
u |= uint64(c&0x7F) << shift
if c&0x80 == 0 {
break
}
}
v := int64(u>>1) ^ (int64(u) << 63 >> 63)
if int64(int(v)) != v {
r.error(errCorruptObject) // TODO
return 0
}
return int(v)
}
// readString reads a length-delimited string from the input file.
func (r *objReader) readString() string {
n := r.readInt()
buf := make([]byte, n)
r.readFull(buf)
return string(buf)
}
// readSymID reads a SymID from the input file.
func (r *objReader) readSymID() SymID {
name, vers := r.readString(), r.readInt()
// In a symbol name in an object file, "". denotes the
// prefix for the package in which the object file has been found.
// Expand it.
name = strings.Replace(name, `"".`, r.pkgprefix, -1)
// An individual object file only records version 0 (extern) or 1 (static).
// To make static symbols unique across all files being read, we
// replace version 1 with the version corresponding to the current
// file number. The number is incremented on each call to parseObject.
if vers != 0 {
vers = r.p.MaxVersion
}
return SymID{name, vers}
}
// readData reads a data reference from the input file.
func (r *objReader) readData() Data {
n := r.readInt()
d := Data{Offset: r.offset, Size: int64(n)}
r.skip(int64(n))
return d
}
// skip skips n bytes in the input.
func (r *objReader) skip(n int64) {
if n < 0 {
r.error(fmt.Errorf("debug/goobj: internal error: misuse of skip"))
}
if n < int64(len(r.tmp)) {
// Since the data is so small, a just reading from the buffered
// reader is better than flushing the buffer and seeking.
r.readFull(r.tmp[:n])
} else if n <= int64(r.b.Buffered()) {
// Even though the data is not small, it has already been read.
// Advance the buffer instead of seeking.
for n > int64(len(r.tmp)) {
r.readFull(r.tmp[:])
n -= int64(len(r.tmp))
}
r.readFull(r.tmp[:n])
} else {
// Seek, giving up buffered data.
_, err := r.f.Seek(r.offset+n, 0)
if err != nil {
r.error(err)
}
r.offset += n
r.b.Reset(r.f)
}
}
// Parse parses an object file or archive from r,
// assuming that its import path is pkgpath.
func Parse(r io.ReadSeeker, pkgpath string) (*Package, error) {
if pkgpath == "" {
pkgpath = `""`
}
p := new(Package)
p.ImportPath = pkgpath
var rd objReader
rd.init(r, p)
err := rd.readFull(rd.tmp[:8])
if err != nil {
if err == io.EOF {
err = io.ErrUnexpectedEOF
}
return nil, err
}
switch {
default:
return nil, errNotObject
case bytes.Equal(rd.tmp[:8], archiveHeader):
if err := rd.parseArchive(); err != nil {
return nil, err
}
case bytes.Equal(rd.tmp[:8], goobjHeader):
if err := rd.parseObject(goobjHeader); err != nil {
return nil, err
}
}
return p, nil
}
// trimSpace removes trailing spaces from b and returns the corresponding string.
// This effectively parses the form used in archive headers.
func trimSpace(b []byte) string {
return string(bytes.TrimRight(b, " "))
}
// parseArchive parses a Unix archive of Go object files.
// TODO(rsc): Need to skip non-Go object files.
// TODO(rsc): Maybe record table of contents in r.p so that
// linker can avoid having code to parse archives too.
func (r *objReader) parseArchive() error {
for r.offset < r.limit {
if err := r.readFull(r.tmp[:60]); err != nil {
return err
}
data := r.tmp[:60]
// Each file is preceded by this text header (slice indices in first column):
// 0:16 name
// 16:28 date
// 28:34 uid
// 34:40 gid
// 40:48 mode
// 48:58 size
// 58:60 magic - `\n
// We only care about name, size, and magic.
// The fields are space-padded on the right.
// The size is in decimal.
// The file data - size bytes - follows the header.
// Headers are 2-byte aligned, so if size is odd, an extra padding
// byte sits between the file data and the next header.
// The file data that follows is padded to an even number of bytes:
// if size is odd, an extra padding byte is inserted betw the next header.
if len(data) < 60 {
return errTruncatedArchive
}
if !bytes.Equal(data[58:60], archiveMagic) {
return errCorruptArchive
}
name := trimSpace(data[0:16])
size, err := strconv.ParseInt(trimSpace(data[48:58]), 10, 64)
if err != nil {
return errCorruptArchive
}
data = data[60:]
fsize := size + size&1
if fsize < 0 || fsize < size {
return errCorruptArchive
}
switch name {
case "__.SYMDEF", "__.GOSYMDEF", "__.PKGDEF":
r.skip(size)
default:
oldLimit := r.limit
r.limit = r.offset + size
if err := r.parseObject(nil); err != nil {
return fmt.Errorf("parsing archive member %q: %v", name, err)
}
r.skip(r.limit - r.offset)
r.limit = oldLimit
}
if size&1 != 0 {
r.skip(1)
}
}
return nil
}
// parseObject parses a single Go object file.
// The prefix is the bytes already read from the file,
// typically in order to detect that this is an object file.
// The object file consists of a textual header ending in "\n!\n"
// and then the part we want to parse begins.
// The format of that part is defined in a comment at the top
// of src/liblink/objfile.c.
func (r *objReader) parseObject(prefix []byte) error {
// TODO(rsc): Maybe use prefix and the initial input to
// record the header line from the file, which would
// give the architecture and other version information.
r.p.MaxVersion++
var c1, c2, c3 byte
for {
c1, c2, c3 = c2, c3, r.readByte()
if c3 == 0 { // NUL or EOF, either is bad
return errCorruptObject
}
if c1 == '\n' && c2 == '!' && c3 == '\n' {
break
}
}
r.readFull(r.tmp[:8])
if !bytes.Equal(r.tmp[:8], []byte("\x00\x00go13ld")) {
return r.error(errCorruptObject)
}
// Direct package dependencies.
for {
s := r.readString()
if s == "" {
break
}
r.p.Imports = append(r.p.Imports, s)
}
// Symbols.
for {
if b := r.readByte(); b != 0xfe {
if b != 0xff {
return r.error(errCorruptObject)
}
break
}
typ := r.readInt()
s := &Sym{SymID: r.readSymID()}
r.p.Syms = append(r.p.Syms, s)
s.Kind = SymKind(typ)
s.DupOK = r.readInt() != 0
s.Size = r.readInt()
s.Type = r.readSymID()
s.Data = r.readData()
s.Reloc = make([]Reloc, r.readInt())
for i := range s.Reloc {
rel := &s.Reloc[i]
rel.Offset = r.readInt()
rel.Size = r.readInt()
rel.Type = r.readInt()
rel.Add = r.readInt()
r.readInt() // Xadd - ignored
rel.Sym = r.readSymID()
r.readSymID() // Xsym - ignored
}
if s.Kind == STEXT {
f := new(Func)
s.Func = f
f.Args = r.readInt()
f.Frame = r.readInt()
f.Var = make([]Var, r.readInt())
for i := range f.Var {
v := &f.Var[i]
v.Name = r.readSymID().Name
v.Offset = r.readInt()
v.Kind = r.readInt()
v.Type = r.readSymID()
}
f.PCSP = r.readData()
f.PCFile = r.readData()
f.PCLine = r.readData()
f.PCData = make([]Data, r.readInt())
for i := range f.PCData {
f.PCData[i] = r.readData()
}
f.FuncData = make([]FuncData, r.readInt())
for i := range f.FuncData {
f.FuncData[i].Sym = r.readSymID()
}
for i := range f.FuncData {
f.FuncData[i].Offset = int64(r.readInt()) // TODO
}
f.File = make([]string, r.readInt())
for i := range f.File {
f.File[i] = r.readSymID().Name
}
}
}
r.readFull(r.tmp[:7])
if !bytes.Equal(r.tmp[:7], []byte("\xffgo13ld")) {
return r.error(errCorruptObject)
}
return nil
}

View File

@ -1,28 +0,0 @@
// Copyright 2013 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 goobj
import "testing"
var importPathToPrefixTests = []struct {
in string
out string
}{
{"runtime", "runtime"},
{"sync/atomic", "sync/atomic"},
{"code.google.com/p/go.tools/godoc", "code.google.com/p/go.tools/godoc"},
{"foo.bar/baz.quux", "foo.bar/baz%2equux"},
{"", ""},
{"%foo%bar", "%25foo%25bar"},
{"\x01\x00\x7F☺", "%01%00%7f%e2%98%ba"},
}
func TestImportPathToPrefix(t *testing.T) {
for _, tt := range importPathToPrefixTests {
if out := importPathToPrefix(tt.in); out != tt.out {
t.Errorf("importPathToPrefix(%q) = %q, want %q", tt.in, out, tt.out)
}
}
}

View File

@ -11,7 +11,6 @@ import (
"bytes"
"debug/dwarf"
"encoding/binary"
"errors"
"fmt"
"io"
"os"
@ -481,7 +480,7 @@ func (f *File) DWARF() (*dwarf.Data, error) {
name = "__debug_" + name
s := f.Section(name)
if s == nil {
return nil, errors.New("missing Mach-O section " + name)
continue
}
b, err := s.Data()
if err != nil && uint64(len(b)) < s.Size {

View File

@ -184,7 +184,7 @@ func TestOpenFat(t *testing.T) {
ftArch := &fileTests[i]
if arch.Cpu != ftArch.hdr.Cpu || arch.SubCpu != ftArch.hdr.SubCpu {
t.Error("OpenFat: architecture #%d got cpu=%#x subtype=%#x, expected cpu=%#x, subtype=%#x", i, arch.Cpu, arch.SubCpu, ftArch.hdr.Cpu, ftArch.hdr.SubCpu)
t.Errorf("OpenFat: architecture #%d got cpu=%#x subtype=%#x, expected cpu=%#x, subtype=%#x", i, arch.Cpu, arch.SubCpu, ftArch.hdr.Cpu, ftArch.hdr.SubCpu)
}
if !reflect.DeepEqual(arch.FileHeader, ftArch.hdr) {
@ -202,9 +202,9 @@ func TestOpenFatFailure(t *testing.T) {
filename = "testdata/gcc-386-darwin-exec" // not a fat Mach-O
ff, err := OpenFat(filename)
if err != ErrNotFat {
t.Errorf("OpenFat %s: got %v, want ErrNotFat", err)
t.Errorf("OpenFat %s: got %v, want ErrNotFat", filename, err)
}
if ff != nil {
t.Errorf("OpenFat %s: got %v, want nil", ff)
t.Errorf("OpenFat %s: got %v, want nil", filename, ff)
}
}

View File

@ -44,14 +44,22 @@ const (
// A Cpu is a Mach-O cpu type.
type Cpu uint32
const cpuArch64 = 0x01000000
const (
Cpu386 Cpu = 7
CpuAmd64 Cpu = Cpu386 + 1<<24
CpuAmd64 Cpu = Cpu386 | cpuArch64
CpuArm Cpu = 12
CpuPpc Cpu = 18
CpuPpc64 Cpu = CpuPpc | cpuArch64
)
var cpuStrings = []intName{
{uint32(Cpu386), "Cpu386"},
{uint32(CpuAmd64), "CpuAmd64"},
{uint32(CpuArm), "CpuArm"},
{uint32(CpuPpc), "CpuPpc"},
{uint32(CpuPpc64), "CpuPpc64"},
}
func (i Cpu) String() string { return stringName(uint32(i), cpuStrings, false) }

Some files were not shown because too many files have changed in this diff Show More