Jump to content
Nigel Thomas

Undeclared identifiers X509_get_X509_PUBKEY, i2d_X509_PUBKEY_bio

Recommended Posts

Hi,

 

Updated my installation of ICS 9 from Subversion today, now when I compile the OverbyteIcsHttpRestTst sample compilation fails with undeclared identifiers in OverbyteIcsWSocket, in this function:

 

function TX509Base.GetX509PubKeyTB: TBytes;    { V9.1 }
var
    ABio : PBIO;
    PubKey: Pointer;
begin
    if NOT Assigned(FX509) then begin
        SetLength(Result, 0);
        Exit;
    end;
    ABio := BIO_new(BIO_s_mem);
    if Assigned(ABio) then
    try
        PubKey := X509_get_X509_PUBKEY(FX509);
        if PubKey = Nil then
            Exit;
        if i2d_X509_PUBKEY_bio(ABio, PubKey) = 0 then
            Exit;
        Result := IcsReadTBBio(ABio, 0);
    finally
        bio_free(ABio);
    end;
end;

Nigel

 

Share this post


Link to post

Sorry about that, new function added this week, tested with YuOpenSSL, but obviously need to update the DLL imports as well, will be done today.  Just use the old wsocket unit until it's done.

 

Angus

 

 

 

Share this post


Link to post

The fix was in SVN weeks ago.  If you work with ICS from SVN, you need to keep it up to date and accept things may get broken, and you may need to wait a few days for bug fixes, 

 

I try to make sure SVN always has a buildable version, but it does not always work, currently SVN is waiting for two Posix fixes from the last update, but I've changed dozens of units since then which need a lot of testing.

 

Angus

 

Share this post


Link to post

Yep! right it works. For the moment i figured it out as you suggested. Also i think that block of code should be wrapped under {$IF DEFINED(MSWINDOWS)} statement for future builds... as it is planned to introduced Android platform in ICS V10. 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×