How to initialize a HCRYPTPROV_OR_NCRYPT_KEY_HANDLE in pure go?

0

Is there a way to initialize a HCRYPTPROV_OR_NCRYPT_KEY_HANDLE handle in pure go so that it can be passed to the CryptAcquireCertificatePrivateKey ( https://docs.microsoft.com/en-us/windows/desktop/api/wincrypt/nf-wincrypt-cryptacquirecertificateprivatekey ) function using syscall ?

Microsoft documentation state that this is a type ULONG_PTR ( https://docs.microsoft.com/en-us/windows/desktop/SecCrypto/hcryptprov-or-ncrypt-key-handle ) and I am unsure as to how to represent this in go. I thought it should have been a pointer of type syscall.Handle but it produces a 0xc0000005 exception.

windows
go
cryptoapi
cng
asked on Stack Overflow Oct 6, 2018 by Tacu

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0