Lingyan
2005-04-02 09:17:01 UTC
I am using the SSL sample code (Microsoft
SDK\Samples\security\SSPI\SSL\WebClient) to establish SSL tunnels with a
server. I have been able to use client certificate without any problem until
today I have to try a USB-token. From the trace it looks like I got the
certificate by:
pChainContext = CertFindChainInStore(m_hMyCertStore,
X509_ASN_ENCODING,
0,
CERT_CHAIN_FIND_BY_ISSUER,
&FindByIssuerPara,
pChainContext);
But when I try to call the following function to create the new credential
with the certificate it fails with error code 0x8009030D.
Status = g_pSSPI->AcquireCredentialsHandleA(
NULL, // Name of principal
UNISP_NAME_A, // Name of package
SECPKG_CRED_OUTBOUND, // Flags indicating use
NULL, // Pointer to logon ID
&m_SchannelCred, // Package specific data
NULL, // Pointer to GetKey()
func
NULL, // Value to pass to
GetKey()
&hCreds, // (out) Cred Handle
&tsExpiry); // (out) Lifetime
(optional)
Any thoughts? Thanks!
SDK\Samples\security\SSPI\SSL\WebClient) to establish SSL tunnels with a
server. I have been able to use client certificate without any problem until
today I have to try a USB-token. From the trace it looks like I got the
certificate by:
pChainContext = CertFindChainInStore(m_hMyCertStore,
X509_ASN_ENCODING,
0,
CERT_CHAIN_FIND_BY_ISSUER,
&FindByIssuerPara,
pChainContext);
But when I try to call the following function to create the new credential
with the certificate it fails with error code 0x8009030D.
Status = g_pSSPI->AcquireCredentialsHandleA(
NULL, // Name of principal
UNISP_NAME_A, // Name of package
SECPKG_CRED_OUTBOUND, // Flags indicating use
NULL, // Pointer to logon ID
&m_SchannelCred, // Package specific data
NULL, // Pointer to GetKey()
func
NULL, // Value to pass to
GetKey()
&hCreds, // (out) Cred Handle
&tsExpiry); // (out) Lifetime
(optional)
Any thoughts? Thanks!