File: sha2_windows_test.go

package info (click to toggle)
golang-github-avast-apkverifier 0.0~git20191015.7330a51-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,224 kB
  • sloc: makefile: 11; sh: 8
file content (19 lines) | stat: -rw-r--r-- 467 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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 x509andr

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
	}
}