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. |