[openssl-dev] Definitions for some structures are strangely missing from 'evp.h' or other header files in OpenSSL 1.1.0a

J Liu jingmliu at sina.com
Sat Sep 24 00:37:04 UTC 2016


Dear Salz,

I don't know how to use accessors/settor functions. And I still don't know
how to correct the compiling error in Visual Studio 2010. 

Specifically, for this line of code: EVP_ENCODE_CTX base64, I got the
following error:

error C2079: "base64"use undefined struct"evp_Encode_Ctx_st".

 

My code is as follows:

 

//base64 encoding

void encode(unsigned char* outData,

            int * outlen,

            const unsigned char* data,

            int datalen)

{

    int tmp=0;

    EVP_ENCODE_CTX base64;

    base64 = EVP_ENCODE_CTX_new();

    EVP_EncodeInit(&base64); 

    

    EVP_EncodeUpdate(&base64,

        outData,

        outlen,

        data,

        datalen

    );

    tmp=*outlen;

    EVP_EncodeFinal(&base64,outData+*outlen,outlen);

    EVP_ENCODE_CTX_free(&base64);

    *outlen+=tmp;

    outData[*outlen]=0;

    print("base64 encoded:",outData,*outlen);

}

 

Cheers,

Jing

 

From: openssl-dev [mailto:openssl-dev-bounces at openssl.org] On Behalf Of
Salz, Rich
Sent: Friday, September 23, 2016 9:55 PM
To: openssl-dev at openssl.org
Subject: Re: [openssl-dev] Definitions for some structures are strangely
missing from 'evp.h' or other header files in OpenSSL 1.1.0a

 

Yes, in 1.1.0 we =ade many structures opaque.  You will have to use
accessors/settor =unctions.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-dev/attachments/20160924/776e04d6/attachment.html>


More information about the openssl-dev mailing list