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