ptr_sysptr_windows.go 517 B

123456789101112131415161718192021
  1. // Copyright 2018 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. //go:build go1.11
  5. // +build go1.11
  6. package x509
  7. import (
  8. "syscall"
  9. "unsafe"
  10. )
  11. // For Go versions >= 1.11, the ExtraPolicyPara field in
  12. // syscall.CertChainPolicyPara is of type syscall.Pointer. See:
  13. // https://github.com/golang/go/commit/4869ec00e87ef
  14. func convertToPolicyParaType(p unsafe.Pointer) syscall.Pointer {
  15. return (syscall.Pointer)(p)
  16. }