1. 12 Nov, 2017 2 commits
  2. 11 Nov, 2017 2 commits
  3. 10 Nov, 2017 21 commits
  4. 09 Nov, 2017 9 commits
  5. 08 Nov, 2017 6 commits
    • filewalkwithme's avatar
      crypto/tls: limit number of consecutive warning alerts · d8ee5d11
      filewalkwithme authored
      In the current implementation, it is possible for a client to
      continuously send warning alerts, which are just dropped on the floor
      inside readRecord.
      
      This can enable scenarios in where someone can try to continuously
      send warning alerts to the server just to keep it busy.
      
      This CL implements a simple counter that triggers an error if
      we hit the warning alert limit.
      
      Fixes #22543
      
      Change-Id: Ief0ca10308cf5a4dea21a5a67d3e8f6501912da6
      Reviewed-on: https://go-review.googlesource.com/75750Reviewed-by: default avatarAdam Langley <agl@golang.org>
      Reviewed-by: default avatarFilippo Valsorda <hi@filippo.io>
      Run-TryBot: Adam Langley <agl@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      d8ee5d11
    • David Chase's avatar
      cmd/compile: adjust Pos setting for "empty" blocks · a042221c
      David Chase authored
      Plain blocks that contain only uninteresting instructions
      (that do not have reliable Pos information themselves)
      need to have their Pos left unset so that they can
      inherit it from their successors.  The "uninteresting"
      test was not properly applied and not properly defined.
      OpFwdRef does not appear in the ssa.html debugging output,
      but at the time of the test these instructions did appear,
      and it needs to be part of the test.
      
      Fixes #22365.
      
      Change-Id: I99e5b271acd8f6bcfe0f72395f905c7744ea9a02
      Reviewed-on: https://go-review.googlesource.com/74252
      Run-TryBot: David Chase <drchase@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      a042221c
    • Filippo Valsorda's avatar
      crypto/tls: advertise support for SHA-512 signatures in 1.2 · 96cd66b2
      Filippo Valsorda authored
      This is the equivalent change to 1c105980 but for SHA-512.
      
      SHA-512 certificates are already supported by default since b53bb2ca,
      but some servers will refuse connections if the algorithm is not
      advertised in the overloaded signatureAndHash extension (see 09b238f1).
      
      This required adding support for SHA-512 signatures on CertificateVerify
      and ServerKeyExchange messages, because of said overloading.
      
      Some testdata/Client-TLSv1{0,1} files changed because they send a 1.2
      ClientHello even if the server picks a lower version.
      
      Closes #22422
      
      Change-Id: I16282d03a3040260d203711ec21e6b20a0e1e105
      Reviewed-on: https://go-review.googlesource.com/74950
      Run-TryBot: Filippo Valsorda <hi@filippo.io>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAdam Langley <agl@golang.org>
      96cd66b2
    • Agniva De Sarker's avatar
      strings: optimize ToLower · 65fbf0e8
      Agniva De Sarker authored
      Handling the ASCII case inline and call unicode.ToLower only
      for non-ASCII cases.
      
      Gives good improvements for the ASCII case and minor perf
      degrade for non-ASCII case
      
      name                                     old time/op    new time/op    delta
      ToLower/#00                                10.8ns ± 1%     9.0ns ± 1%  -16.83%  (p=0.008 n=5+5)
      ToLower/abc                                23.3ns ± 4%    12.6ns ± 1%  -46.01%  (p=0.008 n=5+5)
      ToLower/AbC123                             91.0ns ± 2%    70.4ns ± 0%  -22.59%  (p=0.008 n=5+5)
      ToLower/azAZ09_                             104ns ± 3%      75ns ± 1%  -28.35%  (p=0.008 n=5+5)
      ToLower/longStrinGwitHmixofsmaLLandcAps     254ns ± 4%     157ns ± 0%  -38.19%  (p=0.016 n=5+4)
      ToLower/LONGⱯSTRINGⱯWITHⱯNONASCIIⱯCHARS     446ns ± 1%     451ns ± 1%     ~     (p=0.056 n=5+5)
      ToLower/ⱭⱭⱭⱭⱭ                               345ns ± 1%     348ns ± 0%   +0.93%  (p=0.016 n=5+5)
      
      name                                     old alloc/op   new alloc/op   delta
      ToLower/#00                                 0.00B          0.00B          ~     (all equal)
      ToLower/abc                                 0.00B          0.00B          ~     (all equal)
      ToLower/AbC123                              16.0B ± 0%     16.0B ± 0%     ~     (all equal)
      ToLower/azAZ09_                             24.0B ± 0%     16.0B ± 0%  -33.33%  (p=0.008 n=5+5)
      ToLower/longStrinGwitHmixofsmaLLandcAps     80.0B ± 0%     64.0B ± 0%  -20.00%  (p=0.008 n=5+5)
      ToLower/LONGⱯSTRINGⱯWITHⱯNONASCIIⱯCHARS     96.0B ± 0%     96.0B ± 0%     ~     (all equal)
      ToLower/ⱭⱭⱭⱭⱭ                               48.0B ± 0%     48.0B ± 0%     ~     (all equal)
      
      Ran on a machine with Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
      
      Fixes #17859
      
      Change-Id: Iacc1e6b77e1aedba9447a6e94352606f131ea597
      Reviewed-on: https://go-review.googlesource.com/76470Reviewed-by: default avatarMarvin Stenger <marvin.stenger94@gmail.com>
      Reviewed-by: default avatarJoe Tsai <thebrokentoaster@gmail.com>
      65fbf0e8
    • Matthew Dempsky's avatar
      cmd/compile: optimize noding of long summation expressions · 506386fd
      Matthew Dempsky authored
      Fixes #16394.
      
      Change-Id: I7108c9e8e67d86678bdb6015f0862e5c92bcf911
      Reviewed-on: https://go-review.googlesource.com/76450Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      506386fd
    • Ian Lance Taylor's avatar
      encoding/json: permit encoding uintptr as a string · ed3d6727
      Ian Lance Taylor authored
      Fixes #22629
      
      Change-Id: I31e85f9faa125ee0dfd6d3c5fa89334b00d61e6e
      Reviewed-on: https://go-review.googlesource.com/76530
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
      Reviewed-by: default avatarJoe Tsai <joetsai@google.com>
      ed3d6727