Re: Getting compilation errors after upgrade to openssl 1.1.1d, errors pointing to openssl header files

2020-02-06 Thread Venkata Ramaraju Vana via openssl-users
Thanks for the suggestion Michael. We  have removed all duplicates of
"opensslconf.h" from our code stack. With those changes, we see all errors
related to "DEPRECATEDIN_1_1_0" are gone. Now, we are not seeing any errors
pointing to "bio.h". However, we have some other errors, where it points to
"x509.h and x509_vfy.h". Following are a few of the errors, I am seeing:

Error 209 error C2143: syntax error : missing ';' before '{'
x\thirdparty\openssl\include\openssl\opensslconf.h 16 1 mycrypto
Error 210 error C2447: '{' : missing function header (old-style formal
list?) xx\thirdparty\openssl\include\openssl\opensslconf.h 16 1 mycrypto
Error 179 error C2079: 'LPCSTR' uses undefined struct 'stack_st_'
xx\thirdparty\openssl\include\openssl\x509.h 77 1 mycrypto
Error 184 error C4430: missing type specifier - int assumed. Note: C++ does
not support default-int xx\thirdparty\openssl\include\openssl\x509.h 77
1 mycrypto
Error 186 error C2370: 'LPCSTR' : redefinition; different storage class
xx\thirdparty\openssl\include\openssl\x509.h 77 1 mycrypto
Error 188 error C2365: 'sk_' : redefinition; previous definition was
'function' xx\thirdparty\openssl\include\openssl\x509.h 77 1 mycrypto
Error 200 error C2065: 'X509_EXTENSION' : undeclared identifier
xx\thirdparty\openssl\include\openssl\x509.h 85 1 mycrypto
Error 213 error C4430: missing type specifier - int assumed. Note: C++ does
not support default-int
xx\thirdparty\openssl\include\openssl\x509_vfy.h 77 1 mycrypto
Error 245 error C2061: syntax error : identifier
'X509_STORE_CTX_lookup_certs_fn'
xx\thirdparty\openssl\include\openssl\x509_vfy.h 315 1 mycrypto
Error 252 error C2373: 'X509_STORE_CTX_lookup_crls_fn' : redefinition;
different type modifiers
xx\thirdparty\openssl\include\openssl\x509_vfy.h 321 1 mycrypto
Error 274 error C2377: 'ASN1_INTEGER' : redefinition; typedef cannot be
overloaded with any other symbol
xx\thirdparty\openssl\include\openssl\x509_vfy.h 386 1 mycrypto


Error in "opensslconf.h" points to 'extern "C"' statement the following
code:
#ifdef  __cplusplus
extern "C" {
#endif

Can you please suggest us to remove these errors.
Appreciate your help on this.


Regards,
Ramaraju



On Thu, Feb 6, 2020 at 12:27 AM Michael Wojcik <
michael.woj...@microfocus.com> wrote:

> > From: openssl-users [mailto:openssl-users-boun...@openssl.org] On
> Behalf Of Venkata Ramaraju Vana via openssl-users
> > Sent: Wednesday, February 05, 2020 00:40
>
> > Error 300 error C3646: 'DEPRECATEDIN_1_1_0' : unknown override specifier
> xx\thirdparty\openssl\include\openssl\bio.h 689 1 x
>
> You seem to be failing to include the opensslconf.h that was created as
> part of the build process (before including bio.h, etc). opensslconf.h is
> included by many of the OpenSSL headers, but not bio.h.
>
> So either you need an explicit #include  before
> including any other OpenSSL headers; or you have one, but you're picking up
> the wrong opensslconf.h. (The latter is an easy mistake to make, as not
> everyone realizes opensslconf.h is a generated file and applications must
> include the one corresponding to the precise build they're using.)
>
> --
> Michael Wojcik
> Distinguished Engineer, Micro Focus
>
>
>
>


Re: Getting compilation errors after upgrade to openssl 1.1.1d, errors pointing to openssl header files

2020-02-04 Thread Venkata Ramaraju Vana via openssl-users
Hi All,
 We have recently upgraded openssl from 1.0.1h to 1.1.1d. We have
compiled OpenSSL using "no-asm no-shared no-deprecated" as input to
configure.

When compiling our application (in Visual Studio 2013) by including these
headers and libraries, we are seeing many errors which are pointing to
header files of OpenSSL. Below are few errors:

Error 300 error C3646: 'DEPRECATEDIN_1_1_0' : unknown override specifier
xx\thirdparty\openssl\include\openssl\bio.h 689 1 x

Error 301 error C2091: function returns function
x\thirdparty\openssl\include\openssl\bio.h 689 1 x

Error 304 error C4430: missing type specifier - int assumed. Note: C++ does
not support default-int \thirdparty\openssl\include\openssl\bio.h 691 1


Error 41 error C2370: 'LPCSTR' : redefinition; different storage class
x\thirdparty\openssl\include\openssl\x509.h 77 1 myCrypto

Error 68 error C4430: missing type specifier - int assumed. Note: C++ does
not support default-int \thirdparty\openssl\include\openssl\x509_vfy.h
77 1 myCrypto

Error 283 error C2270: 'DEPRECATEDIN_1_1_0' : modifiers not allowed on
nonmember functions x\thirdparty\openssl\include\openssl\asn1.h 555 1
xx

Error 284 error C4430: missing type specifier - int assumed. Note: C++ does
not support default-int \thirdparty\openssl\include\openssl\asn1.h 555
1 x

Error 514 error C2370: 'LPCSTR' : redefinition; different storage class
xx\thirdparty\openssl\include\openssl\x509.h 77 1 x

Error 516 error C2365: 'sk_' : redefinition; previous definition was
'function' x\thirdparty\openssl\include\openssl\x509.h 77 1 xxx

We are getting hundreds of such error pointing to these header files.


Can you please help me get rid of these errors? Please let me know if I
have define any flags in Visual Studio.  Compilation of our application is
successful in Linux, with the same process. Build in Windows is the main
issue.


Regards,

Ramaraju