Re: how to export pfx programmatically
- From: "Andrew Tucker [MSFT]" <AndrewSTucker@xxxxxxxxx>
- Date: 14 Mar 2007 20:51:25 -0700
On Mar 14, 12:19 pm, balakrishnan.din...@xxxxxxxxx wrote:
hi frnds,
I want to import pfx to browser , I have used CAPICOM
property , Store.Load, but it not working ,
<script language="VBScript">'Option Explicit
const CAPICOM_LOCAL_MACHINE_STORE = 1
const CAPICOM_CURRENT_USER_STORE = 2
const CAPICOM_ACTIVE_DIRECTORY_USER_STORE = 3
const CAPICOM_SMART_CARD_USER_STORE = 4
const CAPICOM_STORE_OPEN_READ_ONLY = 0
const CAPICOM_STORE_OPEN_READ_WRITE = 1
const CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2
const CAPICOM_STORE_OPEN_EXISTING_ONLY = 128
const CAPICOM_STORE_OPEN_INCLUDE_ARCHIVED = 256
const CAPICOM_KEY_SPEC_KEYEXCHANGE = 1
const CAPICOM_KEY_SPEC_SIGNATURE = 2
const CAPICOM_CA_STORE = "CA"
const CAPICOM_MY_STORE = "MY"
const CAPICOM_ADDRESS_BOOK_STORE = "AddressBook"
const CAPICOM_OTHER_STORE = "other"
const CAPICOM_ROOT_STORE = "root"
const CRYPT_EXPORTABLE = 1
const CRYPT_STRING_BASE64HEADER= 0
const CAPICOM_KEY_STORAGE_EXPORTABLE = 1
const CAPICOM_KEY_STORAGE_FLAG = 0
Dim st,fso,out,szReq,privatekey,temp,test
Set st = CreateObject("CAPICOM.Store")
st.Open CAPICOM_CURRENT_USER_STORE,
"MY" ,CAPICOM_STORE_OPEN_READ_WRITE
st.Load "c:\\Desktop
\AdminL1.cer","odyssey",CAPICOM_KEY_STORAGE_FLAG.CAPICOM_KEY_STORAGE_EXPORTABLE
st.Load
"AdminL1.p12","odyssey",CAPICOM_KEY_STORAGE_FLAG.CAPICOM_KEY_STORAGE_EXPORTABLE
</script>
,Can anyone tell whts wrong in it, Or if u have sample working code
for Installing pfx, it will be more useful for me, waiting for ur
reply, thanks in Advance
Rgrds
Dinesh
The MSDN docs for Store .Load at http://msdn2.microsoft.com/en-us/library/aa388127.aspx
clearly states:
This method raises CAPICOM_E_NOT_ALLOWED when it is scripted
from a Web-based application.
.
- References:
- how to export pfx programmatically
- From: balakrishnan . dinesh
- how to export pfx programmatically
- Prev by Date: Re: TLS Handshake issue
- Next by Date: Second call to CryptSignMessage() fails:
- Previous by thread: how to export pfx programmatically
- Next by thread: Second call to CryptSignMessage() fails:
- Index(es):
Relevant Pages
|
Loading