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