EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Signing Certificate Request....

Posted: 09/28/2006 12:26:33
by 'sNick" Pik (Standard support level)
Joined: 04/20/2006
Posts: 2


It has been a while since I was working on the project that requires the use of PKIBlackbox, but I'm having the same problem as when I left the project. I have updated to the latest version on PKIBlackbox (This project happens to be in ActiveX but I have updated my other components [.NET & VCL] as well as the help files.)

The the documentation does not clearly (to me) explain the process, and the sample programs do not include an example on creating, signing and returning the certificate. I have seemingly successfully created a cert request, and saved it to a file to be loaded and signed on the CA machine, however when trying to generate the certificate I'm getting a Invalid Certificate Request error. I am using GetCertificate, which is a not a documented function of ElWinCertStorage to populate the CACert object with "hopefully" both the private and private key to the CACert object. I am not sure how to pull key data (Public/Private) from ElWinCertStorage that I can load into a buffer to use the SetCACertificate and SetCAPrivateKey functions of the CACert object. Here is the relevent portion of the code I'm using to create the CA signed cert...

Set CACert = frmMain.ElWinCertStorageX1(0).GetCertificate(longLooper)

'// Load cert request buffer data...
elFileObject.Open strCertReqPath, elFileMode, elFileAccess, elFileShare
Buffer = elFileObject.Read(0, 186)

CertReq.LoadFromBuffer Buffer

'// Not using unless necessary...
'//CACert.SetCACertificate bufferPublic
'//CACert.SetCAPrivateKey bufferPrivate

CACert.SetValidFrom CDate("03/20/2006")
CACert.SetValidTo CDate("12/31/2010")

CACert.GenerateByRequest CertReq, Cert

Buffer = Empty
Cert.SaveToBuffer Buffer

I'm getting a [-2147418113(8000ffff) Invalid Certificate Request] error on the line
CACert.GenerateByRequest CertReq, Cert

If this is not intitializing the CACert certificate correctly please explain how to extract the Private and Public CA keys in the appropriate buffer array format to alow it's use with the CACert.SetCACertificate CACert.SetCAPrivateKey subroutines. Also please verify that the implementation of the commented out code:

CACert.SetCACertificate bufferPublic
CACert.SetCAPrivateKey bufferPivate

will work as expected if the proper buffer data is passed, and the code uncommented if that is the route I need to go... Any other comments welcome...

Thanks in advance...
Posted: 09/30/2006 03:01:54
by Eugene Mayevski (Team)

I will pass your question to HelpDesk.

Sincerely yours
Eugene Mayevski



Topic viewed 4788 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!