News  [SoftwareSite

Latest News
Older News
RSS Feed
 
Complete Projects
Useful Classes
Top Downloads
Message Board
AllAPI.net
 
Send Comments
Software License
Mentalis.org Buttons
Donate
 
Forums -> Security Library Forum
 
PFX password problem  
by Rupert [rupert at brighton dot co dot uk]
posted on 2004/07/27

I am using the following vb.net code to get a PFX buffer:

Dim bCert() As Byte = cert.ToPfxBuffer("password", True, False)

the cert object has already been set and is correct. This all works fine.

When I later try and load the byte array into a certifcate store using:

[vb6 now]

Dim capiCert As New CAPICOM.Certificate
capiCert.Load m_tempFile, pwd

where m_tempfile is a temporary file created from the pfx bytes and pwd = "password".

I get an "The specified network password is not correct" error (-2147024810). If I import the PFX file using the standard W2K wizard the PFX will install correctly without specifying a password.

Setting pwd="" doesn't help either.

Is there any reason why the password would not be correctly imbedded in the export PFX buffer.

Any help greatly appreciated.

regards

Rupert

ps Other then this problem (which may or may not be realted to the seclib) I love this library.

by Pieter Philippaerts [Pieter at mentalis dot org]
posted on 2004/08/17

Unfortunately, I can't reproduce the problem. I tried exporting a certificate (with and without an associated private key) and it always generated a password protected PFX file. If I try to import it with the default import wizard it complains about an invalid password when I enter no password.

 

Copyright © 2002-2007, The Mentalis.org Team. All rights reserved.
This site is located at http://www.mentalis.org/
Send comments to the webmaster.