Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Raal Goff committed Nov 24, 2021
1 parent 6f1f814 commit 53431b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions capi/wincapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ func certGetCertificateContextProperty(context *syscall.CertContext, dwPropId ui
return int(r0)
}

// nCryptSetPropertyString sets a string value for a named property for a CNG key storage object.
func nCryptSetPropertyString(hObject uintptr, pszProperty string, pbInput string, dwFlags uint32) (err error) {

pszPropertyPtr, _ := syscall.UTF16PtrFromString(pszProperty)
Expand Down Expand Up @@ -154,6 +155,8 @@ func nCryptSetPropertyString(hObject uintptr, pszProperty string, pbInput string
return nil
}

// cryptAcquireCertificatePrivateKey obtains the private key for a certificateContext, returning a CNG NCRYPT_KEY_HANDLE
// or a HCRYPTPROV depending on the flags given.
func cryptAcquireCertificatePrivateKey(certContext uintptr, flags uint32) (provContext uintptr, err error) {
pvParameters := uint32(0)
phCryptProvOrNCryptKey := uintptr(0)
Expand Down

0 comments on commit 53431b7

Please sign in to comment.