mirror of
https://github.com/golang/go
synced 2024-11-13 20:30:27 -07:00
34ee744d00
cl8167 introduced internal/syscall/windows.GetVersion, but we already have that function in syscall.GetVersion. Use that instead. Also revert all internal/syscall/windows cl8167 changes. Change-Id: I512a5bf4b3b696e93aaf69e9e8b7df7022670ec0 Reviewed-on: https://go-review.googlesource.com/8302 Reviewed-by: Daniel Theophanes <kardianos@gmail.com> Reviewed-by: Minux Ma <minux@golang.org>
20 lines
463 B
Go
20 lines
463 B
Go
// Copyright 2015 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package x509
|
|
|
|
import "syscall"
|
|
|
|
func init() {
|
|
v, err := syscall.GetVersion()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if major := byte(v); major < 6 {
|
|
// Windows XP SP2 and Windows 2003 do not support SHA2.
|
|
// http://blogs.technet.com/b/pki/archive/2010/09/30/sha2-and-windows.aspx
|
|
supportSHA2 = false
|
|
}
|
|
}
|