github.com/sean-/go@v0.0.0-20151219100004-97f854cd7bb6/src/crypto/x509/sha2_windows_test.go (about)

     1  // Copyright 2015 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package x509
     6  
     7  import "syscall"
     8  
     9  func init() {
    10  	v, err := syscall.GetVersion()
    11  	if err != nil {
    12  		return
    13  	}
    14  	if major := byte(v); major < 6 {
    15  		// Windows XP SP2 and Windows 2003 do not support SHA2.
    16  		// http://blogs.technet.com/b/pki/archive/2010/09/30/sha2-and-windows.aspx
    17  		supportSHA2 = false
    18  	}
    19  }