EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Public Key - Ver 4.x upgrade to v5.x

Posted: 03/25/2007 22:47:39
by Paul McIntyre (Standard support level)
Joined: 01/11/2007
Posts: 14

Hi there,

I have just upgraded from Blackbox V4.x to V5.x. And I am now receiving the following error when trying to connect to my server (Indy SSL client/ server app).

:class EElPublicKeyCryptoError with message "Public Key not found".

I have not changed anything from the previous version that was working.

What may have changed in the latest version that can cause such an issue?

I am loading the certificates as follow:
Filenames are *.cer and *.key.

procedure xxxx.HandlerCertificateNeededEx(
Sender: TObject; var Certificate: TElX509Certificate);
Stream : TFileStream ;
privateKeyFile, publicCertificateFile: WideString ;

if NoMoreCert then
Certificate := nil
privateKeyFile := certKeysDirectory + lowercase(dscUsername) + KEYS_FILENAME_EXT ;
publicCertificateFile := frmSecureSplash.certKeysDirectory + lowercase(dscUsername) + CERTIFICATE_FILENAME_EXT ;
if (fileExists(privateKeyFile)
and fileExists(publicCertificateFile)) then
Certificate := TElX509Certificate.Create(nil);
Stream := TFileStream.Create(publicCertificateFile,
fmOpenRead or fmShareDenyWrite);
Certificate.LoadFromStream(Stream) ;
Stream := TFileStream.Create(privateKeyFile,
fmOpenRead or fmShareDenyWrite) ;
Certificate.LoadKeyFromStream(Stream) ;
Stream.Free ;
end ;
// Certificate files have not been found
displayInformation('Client Certificate Files',
NoMoreCert := true ;
end ;

end ;

Thanks in advance for your assistance.

Posted: 03/26/2007 00:16:12
by Eugene Mayevski (Team)

Is the problem reproducible with some SecureBlackbox sample? If yes, please tell us it's name. If no, we would need a sample project.
Also, please test the sample certificate and key, included with SecureBlackbox (see <SecureBlackbox>\Certificates folder for them). We need to reproduce the problem, and in order to do this it's necessary to have some test and the certificate/key that expose the problem.

Sincerely yours
Eugene Mayevski
Posted: 03/26/2007 01:14:47
by Paul McIntyre (Standard support level)
Joined: 01/11/2007
Posts: 14

Hi Eugene,
I can re-produce it using the Indy10Chat example
"Samples\SSL\Indy10Chat\Delphi\Client" and "Samples\SSL\Indy10Chat\Delphi\Server".

I am using D2007, WinXP, SBB 5.0.107 and Indy 10.1.6.

The client loads the cert.pfx file as provided in the samples and the Server loads "cert.cer" and "key.der". When I try to connect I get the same message that theh Public Key isn't available.

Let me know what further information is required.

The previous working version of SBB I used was 4.4.88 on D7.

Posted: 03/26/2007 04:07:09
by Ken Ivanov (Team)

Please note, that you should replace the SecureBlackbox license key in your code with a V5 one too.

BTW, does the issue occur if evaluation license key is used?
Posted: 03/26/2007 05:24:52
by Paul McIntyre (Standard support level)
Joined: 01/11/2007
Posts: 14

Evaluation licenses provide the result as above (I didn't change the sample code).

I am now getting the SSL error 75784 when I have updated the license keys.

Any other suggestions?
Posted: 03/26/2007 12:20:42
by Ken Ivanov (Team)

It would be excellent if you try to compile your project using SBB source code (not precompiled .DCU files). The problem is related to license key processing routines at first glance.
Posted: 03/26/2007 17:45:31
by Paul McIntyre (Standard support level)
Joined: 01/11/2007
Posts: 14

I have used the Source code version, compiled all the packages and installed them into the IDE (all .dcu files have a mod date in the last day or two).

What are you asking above? Do you want me to add the SecBB files into my project and then compile?
Posted: 03/26/2007 18:44:29
by Ken Ivanov (Team)

SBB (VCL edition) can be used in two different ways, either in precompiled (.DCU files) or source code (.PAS files) form. Using SBB in source code form does not require dealing with license key, so this might help us check if our assumption about reason for the problem is correct.

However, if you are building SBB from source code, this is not the case. We will try to reproduce the issue in our conditions and answer you a bit later.
Posted: 03/26/2007 20:02:12
by Paul McIntyre (Standard support level)
Joined: 01/11/2007
Posts: 14

OK thanks. This is an urgent requirement so I hope there's a quick fix available.
Posted: 03/27/2007 01:00:09
by Eugene Mayevski (Team)

There will be no quick fix for evaluation version, so please use the source code.

Sincerely yours
Eugene Mayevski



Topic viewed 10461 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!