• Filippo Valsorda's avatar
    crypto/tls: replace custom equal implementations with reflect.DeepEqual · f6b554fe
    Filippo Valsorda authored
    The equal methods were only there for testing, and I remember regularly
    getting them wrong while developing tls-tris. Replace them with simple
    reflect.DeepEqual calls.
    
    The only special thing that equal() would do is ignore the difference
    between a nil and a zero-length slice. Fixed the Generate methods so
    that they create the same value that unmarshal will decode. The
    difference is not important: it wasn't tested, all checks are
    "len(slice) > 0", and all cases in which presence matters are
    accompanied by a boolean.
    
    Change-Id: Iaabf56ea17c2406b5107c808c32f6c85b611aaa8
    Reviewed-on: https://go-review.googlesource.com/c/144114
    Run-TryBot: Filippo Valsorda <filippo@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarAdam Langley <agl@golang.org>
    f6b554fe
Name
Last commit
Last update
..
aes Loading commit data...
cipher Loading commit data...
des Loading commit data...
dsa Loading commit data...
ecdsa Loading commit data...
elliptic Loading commit data...
hmac Loading commit data...
internal Loading commit data...
md5 Loading commit data...
rand Loading commit data...
rc4 Loading commit data...
rsa Loading commit data...
sha1 Loading commit data...
sha256 Loading commit data...
sha512 Loading commit data...
subtle Loading commit data...
tls Loading commit data...
x509 Loading commit data...
crypto.go Loading commit data...
issue21104_test.go Loading commit data...