X509 certificate problems

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
w1ngnut
Posts: 5
Joined: Thu 29 Jan 2009 00:26

X509 certificate problems

Post by w1ngnut » Sat 24 Sep 2016 18:26

Hi,

I think there is something broken when it comes to decoding X509 certificates with sbridge in C++.
I can't pull the values for KeyUsage from the certificate.
I've tried to get the KeyUsage like this...

Code: Select all

TScCertKeyUsageExtension *ux = new TScCertKeyUsageExtension(ext->Oid->Value,false,ext->RawData);  
TTypeInfo *ti = __delphirtti(TScKeyUsageFlag);
TScKeyUsageFlag *flag = new TScKeyUsageFlag();
for(int I = GetTypeData(ti)->MinValue; I <= GetTypeData(ti)->MaxValue; I++)
   {
    if(ux->KeyUsages.Contains(flag[I]))  // << gets to here but always evaluates false?
	{
	dText = dText + GetEnumName(ti,I);  // this works when the if statement is negated
	}
}
Am I missing something here?
ux->KeyUsages is returning 0 so it will never evaluate as true???
The help is no help whatsoever and I've had to read through the source files to find out what is going on...
Obtuse and terse are understatements when it comes to the help - and NO support for C++?
Unimpressed as always!
CBuilder XE4 - SB 6.3.5

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: X509 certificate problems

Post by ViktorV » Thu 29 Sep 2016 12:59

This behavior is related to C++ Builder specificity, not to SecureBridge. We will try to avoid this restriction in one of the next SecureBridge releases.

w1ngnut
Posts: 5
Joined: Thu 29 Jan 2009 00:26

Re: X509 certificate problems

Post by w1ngnut » Fri 30 Sep 2016 11:23

This behavior is related to C++ Builder specificity, not to SecureBridge. We will try to avoid this restriction in one of the next SecureBridge releases.
So much for the claim of C++ support in the advertising and not much use to me if I have to use another library just to be able to parse X509 certificates.

I'll find an alternate solution.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: X509 certificate problems

Post by ViktorV » Tue 04 Oct 2016 09:51

Thank you for being interested in our products.
We will continue investigation of the behavior of SecureBridge and inform you as soon as we get any results, but we can't tell any timeframe at the moment.

w1ngnut
Posts: 5
Joined: Thu 29 Jan 2009 00:26

Re: X509 certificate problems

Post by w1ngnut » Tue 04 Oct 2016 16:50

Typical.....

But another question - why does the SSHClient require a username to be entered before it will connect?
I would have expected to be prompted to accept the server key before the need for a username to be entered not as soon as I try to connect?
Is this another bug or something wrong with the C++ implementation?

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: X509 certificate problems

Post by ViktorV » Wed 05 Oct 2016 14:20

If you mean setting the TScSSHClient.User property, then post to server and username check occur exclusively after server key check and confirmation, and not on setting the property.
If you mean anything else, please provide more details on your question.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: X509 certificate problems

Post by ViktorV » Wed 23 Nov 2016 15:03

The new build of SecureBridge 7.2.3 where we improved SecureBridge work for C++ Builder is already available for download.

Post Reply