EldoS | Feel safer!

Software components for data protection, secure storage and transfer

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

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#2607
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.


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

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

end ;


Thanks in advance for your assistance.

Paul
#2608
Posted: 03/26/2007 00:16:12
by Eugene Mayevski (EldoS Corp.)

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

Thanks
Paul
#2616
Posted: 03/26/2007 04:07:09
by Ken Ivanov (EldoS Corp.)

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?
#2618
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?
#2622
Posted: 03/26/2007 12:20:42
by Ken Ivanov (EldoS Corp.)

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.
#2624
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?
#2625
Posted: 03/26/2007 18:44:29
by Ken Ivanov (EldoS Corp.)

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.
#2626
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.
#2628
Posted: 03/27/2007 01:00:09
by Eugene Mayevski (EldoS Corp.)

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


Sincerely yours
Eugene Mayevski
Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.

Reply

Statistics

Topic viewed 9243 times

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




|

Back to top

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

Got it!