473,606 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error while proccessing certificate.Loa d

hi,

Im getting a Error while importing a PFX using Certificate.Loa d
method

My code is VBscript

const CAPICOM_KEY_STO RAGE_EXPORTABLE =1
const CAPICOM_KEY_STO RAGE_FLAG=1
const CAPICOM_KEY_STO RAGE_DEFAULT=1
const CAPICOM_KEY_LOC ATION=1
const CAPICOM_CURRENT _USER_KEY=1

Set st = CreateObject("C APICOM.Store")
st.Open CAPICOM_CURRENT _USER_STORE,"MY ",CAPICOM_STORE _OPEN_READ_WRIT E

For Each Certificate In st.Certificates
certificate.Loa d("c:\1.pfx", password,
CAPICOM_KEY_STO RAGE_FLAG.CAPIC OM_KEY_STORAGE_ DEFAULT,
CAPICOM_KEY_LOC ATION.CAPICOM_C URRENT_USER_KEY );
exit for

This is my script. So while importing It displaying a Script Error as
Object Identifier : [number: 1] in certificate.loa d line

Can anyone tellme , what will be the problem, and what ll be the
solution , or any other sample code for importing certificate is
there, plz send me that

Rgrds
Dinesh

Mar 16 '07 #1
1 2292
Hi,

I have a little different problem than you. I am trying to
automatically import Certificates using VBscript and every time I call
the function Store.Load or Store.Add , I receive "Access is Denied".
>From other messages here and MSDN docs its looks like that Web based
scripts cannot call this function (probably due to security) and
VBScript is web based scripting language. But maybe I am wrong...

ba************* ****@gmail.com כתב:
hi,

Im getting a Error while importing a PFX using Certificate.Loa d
method

My code is VBscript

const CAPICOM_KEY_STO RAGE_EXPORTABLE =1
const CAPICOM_KEY_STO RAGE_FLAG=1
const CAPICOM_KEY_STO RAGE_DEFAULT=1
const CAPICOM_KEY_LOC ATION=1
const CAPICOM_CURRENT _USER_KEY=1

Set st = CreateObject("C APICOM.Store")
st.Open CAPICOM_CURRENT _USER_STORE,"MY ",CAPICOM_STORE _OPEN_READ_WRIT E

For Each Certificate In st.Certificates
certificate.Loa d("c:\1.pfx", password,
CAPICOM_KEY_STO RAGE_FLAG.CAPIC OM_KEY_STORAGE_ DEFAULT,
CAPICOM_KEY_LOC ATION.CAPICOM_C URRENT_USER_KEY );
exit for

This is my script. So while importing It displaying a Script Error as
Object Identifier : [number: 1] in certificate.loa d line

Can anyone tellme , what will be the problem, and what ll be the
solution , or any other sample code for importing certificate is
there, plz send me that

Rgrds
Dinesh
Mar 29 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1798
by: Tetedeiench | last post by:
Hi ! I am currently changing the server for my website, and i make a heavy use of openssl functions. Both servers use PHP4.3.3 with OpenSSL 0.9.6i. I was actually testing with this code, taken out from PHP's documentation :
1
875
by: Leonard Danao | last post by:
I get this error when i run my code below "An unhandled exception of type 'System.Net.WebException' occurred in system.dll Additional information: The remote server returned an error: (401) Unauthorized." I am attempting to access a secure https site which 1-the site gives you your own certificate to use to access the site 2-a uname/password challenge i am not sure if it is basic or digest but i
0
8662
by: Johan Delimon | last post by:
Hello, I have created an ASP page that requests special V2.0 Certificates for a user. This is to use with our VPN solution. My code errors on this line: requeststr = CertEnroll.createRequest(XECR_CMC,dn, "") This ASP page/Application has anonymous disabled and has Basic Authentication Configured with SSL.
0
1107
by: Will | last post by:
It seems that I have scoured the net and came up empty handed. I have an ASP.net app that posts xml to another company's servlet. For some transactions, they do not require a certificate, but others do. I started building this app with the transactions that did not require the cert, but put in the code to use the cert anyhow. I have been running for several months thinking that I was using my cert, but now that I'm trying to build the...
4
20475
by: Matthew.DelVecchio | last post by:
hello, i am developing an ASP.NET web app that consumes a 3rd party vendor webservice. it is my first one so while ive done my homework, im not an expert on the matter. our partner's webservice operates on SSL via an "https://" url. they also gave me a .PFX certificate which ive installed via window's MMC utility, into the "Computer account"'s Personal store; as indicated by articles id found. i then export a .CER to the filesystem...
1
2693
by: | last post by:
Hi, I'd like to store X509 cetificates in a central location (file server, database, etc), and load them when needed, is it practical ? and in term of implementation, can this be achieved by subclass 'securityTokenManager'? has anyone done something similar and shed some lights on it? thanks, -Jason
0
3037
by: Ron | last post by:
Hi there, I am writing a program which need to see the certificate in trusted people store for security purpose. when I run the program, it says "couldn't find the certificate in trusted people store ". I am using VS2005 on XP sp2. I have imported a X509 certificate (c.pfx) into the store on local machine account. I wrote a small piece of code to see if the program can load cer from the store but it returns 0. here under is the code:
0
1653
by: AK | last post by:
Hi, I'm trying to load a certificate, but get an exception saying " The specified network password is not correct.". There's no password for the certificate, so I don't think it has anything to do with that. Here's the code: X509Certificate2 x509Cert = new X509Certificate2("certificate.p12"); It works fine on my machine but fails when trying it on a different
2
13394
by: =?Utf-8?B?U2NvdHQ=?= | last post by:
I have seen numerous posts, both here and google, where people are having this issue, but I have yet to see an explanation of the problem. I have a WCF service that is working fine using http. But now we need to upgrade it to use SSL. To do this we need to install and register a server certificate. I got a certificate (Web Server) from our enterprise cert server. Exported it as a cer file and installed it on my development machine...
0
8010
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7942
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8433
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8429
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8084
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8300
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6761
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5963
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2443
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.