Re: [openssl-users] What to do with deprecation errors

2018-10-22 Thread pgndev
The "which package depends on which openssl ver" issue's been around a long
time.

FWIW, in general, I *never* touch openssl libs/headers in the default
distro path, /usr.
Just leave that alone -- too many distro packages (still) make (invalid)
assumptions about that being the only/preferred openssl version.

Also, some-not-all distros include /usr/local/ libs & headers in search
path; with a higher priority than /usr.  Drop the 'wrong version' there,
and you can cause yourself similar headaches.

Instead, I build openssl versions into standalone-dirs. E.g.,

  /usr/local/openssl102
  /usr/local/openssl110
  /usr/local/openssl111

and then build any apps I want/need to use a specific version with
appropriate CFLAGS/CPPFLAGS/INCLUDE, as well as LIBS with rpath.
Yes, it's a slog.  But for my use, it's been the only way to manage the
mess.

With the release of openssl 111, I suspect/hope things will begin to
stabilize in app-land; but, I'm not holding my breath.

And, of course, different strokes ...
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-22 Thread Richard Levitte
If the compiler found opensslconf.h in
/usr/include/x86_64-linux-gnu/openssl/, that usually means you have an
distribution openssl package installed, one that other programs are
relying on.

Depending on the version of that package, you may have screwed things
up or not.  If you're lucky, things will go smoothly, but be warning
that your "installation" probably will get overwritten next time you
do an update that affects the openssl package.

For custom installations, I'd suggest using the /usr/local tree.  This
is what the default OpenSSL configuration + make install does.

Cheers,
Richard

In message <1540233767.4886.24.ca...@taygeta.com> on Mon, 22 Oct 2018 11:42:47 
-0700, Skip Carter  said:

> Found the problem!
> Thanks to Selva for pointing the way.
> 
> The compiler was looking for opensslconf.h (and only this file, not any
> other header files) at /usr/include/x86_64-linux-
> gnu/openssl/opensslconf.h  when I copied
> /usr/include/openssl/opensslconf.h to that location, everything worked.
>   The -E flag gave it away (it was buried in the cpp output too, but
> was easy to miss).
> 
> 
> On Mon, 2018-10-22 at 14:00 -0400, Selva Nair wrote:
> > On Mon, Oct 22, 2018 at 1:51 PM Skip Carter  wrote:
> > > 
> > > Yes the macro is there, its just not being expanded by the pre-
> > > compiler.
> > 
> > All these tests say the same thing that you are picking up a wrong
> > (old) header.
> > 
> > So do:
> > 
> > gcc -E your-program.c | grep opensslconf.h
> > 
> > Then check whether the one it picks up is the right one and has
> > the macro defined.
> > 
> > Selva
> -- 
> Skip Carter
> Taygeta Scientific Inc.
> 
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-22 Thread Jakob Bohm via openssl-users

Ah, I guess it wanted you to also compile OpenSSL for i386 and putting
that (different!) opensslconf.h in the i386-specific directory.

That also means you should have moved opensslconf.h to the subdir, not
copied it.

On 22/10/2018 20:42, Skip Carter wrote:

Found the problem!
Thanks to Selva for pointing the way.

The compiler was looking for opensslconf.h (and only this file, not any
other header files) at /usr/include/x86_64-linux-
gnu/openssl/opensslconf.h  when I copied
/usr/include/openssl/opensslconf.h to that location, everything worked.
   The -E flag gave it away (it was buried in the cpp output too, but
was easy to miss).


On Mon, 2018-10-22 at 14:00 -0400, Selva Nair wrote:

On Mon, Oct 22, 2018 at 1:51 PM Skip Carter  wrote:

Yes the macro is there, its just not being expanded by the pre-
compiler.

All these tests say the same thing that you are picking up a wrong
(old) header.

So do:

gcc -E your-program.c | grep opensslconf.h

Then check whether the one it picks up is the right one and has
the macro defined.



Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S.  https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-22 Thread Skip Carter
Found the problem!
Thanks to Selva for pointing the way.

The compiler was looking for opensslconf.h (and only this file, not any
other header files) at /usr/include/x86_64-linux-
gnu/openssl/opensslconf.h  when I copied
/usr/include/openssl/opensslconf.h to that location, everything worked.
  The -E flag gave it away (it was buried in the cpp output too, but
was easy to miss).


On Mon, 2018-10-22 at 14:00 -0400, Selva Nair wrote:
> On Mon, Oct 22, 2018 at 1:51 PM Skip Carter  wrote:
> > 
> > Yes the macro is there, its just not being expanded by the pre-
> > compiler.
> 
> All these tests say the same thing that you are picking up a wrong
> (old) header.
> 
> So do:
> 
> gcc -E your-program.c | grep opensslconf.h
> 
> Then check whether the one it picks up is the right one and has
> the macro defined.
> 
> Selva
-- 
Skip Carter
Taygeta Scientific Inc.
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-22 Thread Skip Carter
On Mon, 2018-10-22 at 17:52 +, Salz, Rich via openssl-users wrote:
> >    Yes the macro is there, its just not being expanded by the pre-
> 
> compiler.
>   
> That makes no sense.

I am stumped,  FYI here is the the relevant output of the precompiler
(cpp)

# 261 "/usr/include/openssl/ec.h" 3 4
DEPRECATEDIN_1_2_0(int EC_GROUP_set_curve_GFp(EC_GROUP *group, const
BIGNUM *p,
  const BIGNUM *a, const
BIGNUM *b,
  BN_CTX *ctx))

obviously when the actual compiler gets to this, its not happy.

I have checked the precompiler version matches the compiler version.
gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)

> Something is strange in your environment 

 I am thinking the same but I haven't a clue what it is.  I do lots of
code development but this has me at a loss



-- 
Skip Carter
Taygeta Scientific Inc.
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-22 Thread Richard Levitte
That's very odd.  Are you *sure* the one you're looking at is the one
actually included?

Cheers,
Richard

In message <1540230631.4886.20.ca...@taygeta.com> on Mon, 22 Oct 2018 10:50:31 
-0700, Skip Carter  said:

> Yes the macro is there, its just not being expanded by the pre-
> compiler.
> 
> 
> On Mon, 2018-10-22 at 08:55 +0100, Matt Caswell wrote:
> > 
> > On 21/10/2018 20:01, Skip Carter wrote:
> > 
> > Does your opensslconf.h have the DEPRECATEDIN_1_2_0 macro defined in
> > it?
> > 
> > Matt
> -- 
> Skip Carter
> Taygeta Scientific Inc.
> 
> 
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-22 Thread Selva Nair
On Mon, Oct 22, 2018 at 1:51 PM Skip Carter  wrote:
>
> Yes the macro is there, its just not being expanded by the pre-
> compiler.

All these tests say the same thing that you are picking up a wrong (old) header.

So do:

gcc -E your-program.c | grep opensslconf.h

Then check whether the one it picks up is the right one and has
the macro defined.

Selva
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-22 Thread Viktor Dukhovni
You're surely looking in the wrong header file.  The compiler
is using a different one in which the macro is NOT defined.

> On Oct 22, 2018, at 1:50 PM, Skip Carter  wrote:
> 
> Yes the macro is there, its just not being expanded by the pre-
> compiler.
> 
> 
> On Mon, 2018-10-22 at 08:55 +0100, Matt Caswell wrote:
>> 
>> On 21/10/2018 20:01, Skip Carter wrote:
>> 
>> Does your opensslconf.h have the DEPRECATEDIN_1_2_0 macro defined in
>> it?

-- 
Viktor.

-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-22 Thread Salz, Rich via openssl-users
>Yes the macro is there, its just not being expanded by the pre-
compiler.
  
That makes no sense.

Please look at your compiler manpages and figure out how to turn on verbose 
compiler output.  Something is strange in your environment.


 

-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-22 Thread Skip Carter
Yes the macro is there, its just not being expanded by the pre-
compiler.


On Mon, 2018-10-22 at 08:55 +0100, Matt Caswell wrote:
> 
> On 21/10/2018 20:01, Skip Carter wrote:
> 
> Does your opensslconf.h have the DEPRECATEDIN_1_2_0 macro defined in
> it?
> 
> Matt
-- 
Skip Carter
Taygeta Scientific Inc.

-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-22 Thread Matt Caswell


On 21/10/2018 20:01, Skip Carter wrote:
> Thats what I originally thought.
> 
> I experimented with manually invoking the pre-compiler (cpp) and this
> is what I get:
> 
> 
> DEPRECATEDIN_1_2_0(int EC_GROUP_get_curve_GF2m(const EC_GROUP *group,  
>   
> BIGNUM *p,
>    BIGNUM *a, BIGNUM *b,
>    BN_CTX *ctx))
> the macro is not firing, shouldn't I get:
> 
> extern int EC_GROUP_get_curve_GF2m(const EC_GROUP *group,  
>    BIGNUM *p,
>    BIGNUM *a, BIGNUM *b,
>    
> BN_CTX *ctx);
> 
> 
> On Sun, 2018-10-21 at 18:28 +, Salz, Rich via openssl-users wrote:
>>>    And I still have the problem with those macros.
>>
>>   
>> The problem is almost definitely this:  the files that you are
>> compiling (not openssl) are picking up the wrong header files from
>> openssl.
>>

Does your opensslconf.h have the DEPRECATEDIN_1_2_0 macro defined in it?

Matt
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-21 Thread Salz, Rich via openssl-users
>DEPRECATEDIN_1_2_0(int EC_GROUP_get_curve_GF2m(const EC_GROUP *group,  

That is "proof" that the pre-processor doesn’t have the right -I flags.  Try 
running with the -v option or something.

-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-21 Thread Skip Carter
Thats what I originally thought.

I experimented with manually invoking the pre-compiler (cpp) and this
is what I get:


DEPRECATEDIN_1_2_0(int EC_GROUP_get_curve_GF2m(const EC_GROUP *group,  
  
BIGNUM *p,
   BIGNUM *a, BIGNUM *b,
   BN_CTX *ctx))
the macro is not firing, shouldn't I get:

extern int EC_GROUP_get_curve_GF2m(const EC_GROUP *group,  
   BIGNUM *p,
   BIGNUM *a, BIGNUM *b,
   
BN_CTX *ctx);


On Sun, 2018-10-21 at 18:28 +, Salz, Rich via openssl-users wrote:
> >    And I still have the problem with those macros.
> 
>   
> The problem is almost definitely this:  the files that you are
> compiling (not openssl) are picking up the wrong header files from
> openssl.
> 
-- 
Skip Carter
Taygeta Scientific Inc.

-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-21 Thread Salz, Rich via openssl-users
>And I still have the problem with those macros.
  
The problem is almost definitely this:  the files that you are compiling (not 
openssl) are picking up the wrong header files from openssl.

-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-21 Thread Skip Carter

On Sun, 2018-10-21 at 02:10 +, Blumenthal, Uri - 0553 - MITLL
wrote:
> On 10/20/2018, 21:41, "openssl-users on behalf of Skip Carter"  sl-users-boun...@openssl.org on behalf of s...@taygeta.com> wrote:
> Yes, that works just fine for me too.  But if I include ssl.h I
> have
> the problem.  The various DEPRECATED.. macros don't get pre-
> compiled
> and get handed to the compiler.  I think I improperly installed
> the
> headers.
> 
> I think so too, because adding ssl.h doesn't break compilation/run
> for me:
> 

I started from 0:


tar xvf openssl-1.1.1.tar.gz
cd openssl-1.1.1/
./Configure --prefix=/usr --openssldir=/usr/lib/ssl shared linux
generic64
make
sudo make install

...no errors, no complications
 
And I still have the problem with those macros.

I am using gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)


-- 
Skip Carter
Taygeta Scientific Inc.

-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-20 Thread Blumenthal, Uri - 0553 - MITLL
On 10/20/2018, 21:41, "openssl-users on behalf of Skip Carter" 
 wrote:
Yes, that works just fine for me too.  But if I include ssl.h I have
the problem.  The various DEPRECATED.. macros don't get pre-compiled
and get handed to the compiler.  I think I improperly installed the
headers.

I think so too, because adding ssl.h doesn't break compilation/run for me:

$ cat ttt.c
#include 
#include 
#include 

int main(void)
{
  printf("OPENSSL_VERSION_NUMBER %lx\n",OPENSSL_VERSION_NUMBER);
  return 0;
}
$ gcc -o ttt -I$HOME/openssl-1.1/include ttt.c -L$HOME/openssl-1.1/lib -lcrypto
$ ./ttt
OPENSSL_VERSION_NUMBER 10101010
$ gcc -o ttt ttt.c -lcrypto
$ ./ttt
OPENSSL_VERSION_NUMBER 1000210f
$


On Sun, 2018-10-21 at 00:36 +, Blumenthal, Uri - 0553 - MITLL
wrote:
> I'm not sure I understand what you're doing, but:
> 
> $ cat ttt.c
> #include 
> #include 
> 
> int main(void)
> {
>   printf("OPENSSL_VERSION_NUMBER %lx\n",OPENSSL_VERSION_NUMBER);
>   return 0;
> }
> $ gcc -o ttt ttt.c -lcrypto
> $ ./ttt
> OPENSSL_VERSION_NUMBER 1000210f
> $ gcc -o ttt -I$HOME/openssl-1.1/include ttt.c -L$HOME/openssl-
> 1.1/lib -lcrypto
> $ ./ttt
> OPENSSL_VERSION_NUMBER 10101010
> $
> 
> --
> Regards,
> Uri 
> 
> 


-- 
Skip Carter
Taygeta Scientific Inc.

-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users



smime.p7s
Description: S/MIME cryptographic signature
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-20 Thread Salz, Rich via openssl-users
You probably do not have the headers installed into the right include path.  
You should do "make install" and not cp things by hand, as you'll need the 
headers and the libraries, etc. 

-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-20 Thread Skip Carter
Uri,

Yes, that works just fine for me too.  But if I include ssl.h I have
the problem.  The various DEPRECATED.. macros don't get pre-compiled
and get handed to the compiler.  I think I improperly installed the
headers.

On Sun, 2018-10-21 at 00:36 +, Blumenthal, Uri - 0553 - MITLL
wrote:
> I'm not sure I understand what you're doing, but:
> 
> $ cat ttt.c
> #include 
> #include 
> 
> int main(void)
> {
>   printf("OPENSSL_VERSION_NUMBER %lx\n",OPENSSL_VERSION_NUMBER);
>   return 0;
> }
> $ gcc -o ttt ttt.c -lcrypto
> $ ./ttt
> OPENSSL_VERSION_NUMBER 1000210f
> $ gcc -o ttt -I$HOME/openssl-1.1/include ttt.c -L$HOME/openssl-
> 1.1/lib -lcrypto
> $ ./ttt
> OPENSSL_VERSION_NUMBER 10101010
> $
> 
> --
> Regards,
> Uri 
> 
> 


-- 
Skip Carter
Taygeta Scientific Inc.

-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-20 Thread Blumenthal, Uri - 0553 - MITLL
I'm not sure I understand what you're doing, but:

$ cat ttt.c
#include 
#include 

int main(void)
{
  printf("OPENSSL_VERSION_NUMBER %lx\n",OPENSSL_VERSION_NUMBER);
  return 0;
}
$ gcc -o ttt ttt.c -lcrypto
$ ./ttt
OPENSSL_VERSION_NUMBER 1000210f
$ gcc -o ttt -I$HOME/openssl-1.1/include ttt.c -L$HOME/openssl-1.1/lib -lcrypto
$ ./ttt
OPENSSL_VERSION_NUMBER 10101010
$

--
Regards,
Uri 

On 10/20/2018, 15:36, "openssl-users on behalf of Skip Carter" 
 wrote:

All,

I am thinking that the DEPRECATED... macros are not expanded by the
pre-parser so the compiler sees them as a weirdly formed function and
doesn't like it.

I "installed" the header files with 'cp' was there a make command that
I was supposed to use ?

 
On Fri, 2018-10-19 at 16:54 -0700, Skip Carter wrote:
> On Fri, 2018-10-19 at 22:54 +0100, Matt Caswell wrote:
> > 
> > 
> > It looks like its not picking up the definition of the
> > DEPRECATEDIN_1_2_0 macro for some reason.
> > 
> > That macro should be defined in opensslconf.h (which is included
> > from
> > ec.h), and looks like this:
> > 
> > /*
> >  * Do not deprecate things to be deprecated in version 1.2.0 before
> > the
> >  * OpenSSL version number matches.
> >  */
> > #if OPENSSL_VERSION_NUMBER < 0x1020L
> > # define DEPRECATEDIN_1_2_0(f)   f;
> > #elif OPENSSL_API_COMPAT < 0x1020L
> > # define DEPRECATEDIN_1_2_0(f)   DECLARE_DEPRECATED(f)
> > #else
> > # define DEPRECATEDIN_1_2_0(f)
> > #endif
> > 
> > And where OPENSSL_VERSION_NUMBER is declared in opensslv.h (which
> > is
> > included from opensslconf.h). Since 1.1.1 is less than 1.2.0, the
> > first
> > definition of DEPRECATEDIN_1_2_0 should apply, i.e. this macro
> > should
> > effectively be ignored and the parameter should be processed just
> > like
> > any other function declaration.
> > 
> > So do you have an opensslconf.h? And does it have that macro
> > defined
> > in
> > it? My theory is that somehow or other you are picking up an old
> > version
> > of that header (maybe the system version) which doesn't have the
> > macro
> > defined.
> > 
> > Matt
> > 
> 
> I found:
> 
> opensslv.h:# define OPENSSL_VERSION_NUMBER  0x1010100fL
> 
> Also to be sure my compilation environment isn't doing anything
> funky:
> 
> #include 
> 
> #include 
> 
> int main(void)
> {
>   
>   printf("OPENSSL_VERSION_NUMBER %lx\n",OPENSSL_VERSION_NUMBER);
>   
>   return 0;
> }
> 
> gave me the same thing.
> 
> 
> 
> -- 
> Skip Carter
> Taygeta Scientific Inc.
-- 
Skip Carter
Taygeta Scientific Inc.

-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users



smime.p7s
Description: S/MIME cryptographic signature
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-20 Thread Skip Carter
All,

I am thinking that the DEPRECATED... macros are not expanded by the
pre-parser so the compiler sees them as a weirdly formed function and
doesn't like it.

I "installed" the header files with 'cp' was there a make command that
I was supposed to use ?

 
On Fri, 2018-10-19 at 16:54 -0700, Skip Carter wrote:
> On Fri, 2018-10-19 at 22:54 +0100, Matt Caswell wrote:
> > 
> > 
> > It looks like its not picking up the definition of the
> > DEPRECATEDIN_1_2_0 macro for some reason.
> > 
> > That macro should be defined in opensslconf.h (which is included
> > from
> > ec.h), and looks like this:
> > 
> > /*
> >  * Do not deprecate things to be deprecated in version 1.2.0 before
> > the
> >  * OpenSSL version number matches.
> >  */
> > #if OPENSSL_VERSION_NUMBER < 0x1020L
> > # define DEPRECATEDIN_1_2_0(f)   f;
> > #elif OPENSSL_API_COMPAT < 0x1020L
> > # define DEPRECATEDIN_1_2_0(f)   DECLARE_DEPRECATED(f)
> > #else
> > # define DEPRECATEDIN_1_2_0(f)
> > #endif
> > 
> > And where OPENSSL_VERSION_NUMBER is declared in opensslv.h (which
> > is
> > included from opensslconf.h). Since 1.1.1 is less than 1.2.0, the
> > first
> > definition of DEPRECATEDIN_1_2_0 should apply, i.e. this macro
> > should
> > effectively be ignored and the parameter should be processed just
> > like
> > any other function declaration.
> > 
> > So do you have an opensslconf.h? And does it have that macro
> > defined
> > in
> > it? My theory is that somehow or other you are picking up an old
> > version
> > of that header (maybe the system version) which doesn't have the
> > macro
> > defined.
> > 
> > Matt
> > 
> 
> I found:
> 
> opensslv.h:# define OPENSSL_VERSION_NUMBER  0x1010100fL
> 
> Also to be sure my compilation environment isn't doing anything
> funky:
> 
> #include 
> 
> #include 
> 
> int main(void)
> {
>   
>   printf("OPENSSL_VERSION_NUMBER %lx\n",OPENSSL_VERSION_NUMBER);
>   
>   return 0;
> }
> 
> gave me the same thing.
> 
> 
> 
> -- 
> Skip Carter
> Taygeta Scientific Inc.
-- 
Skip Carter
Taygeta Scientific Inc.

-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-19 Thread Skip Carter
On Fri, 2018-10-19 at 22:54 +0100, Matt Caswell wrote:
> 
> 
> It looks like its not picking up the definition of the
> DEPRECATEDIN_1_2_0 macro for some reason.
> 
> That macro should be defined in opensslconf.h (which is included from
> ec.h), and looks like this:
> 
> /*
>  * Do not deprecate things to be deprecated in version 1.2.0 before
> the
>  * OpenSSL version number matches.
>  */
> #if OPENSSL_VERSION_NUMBER < 0x1020L
> # define DEPRECATEDIN_1_2_0(f)   f;
> #elif OPENSSL_API_COMPAT < 0x1020L
> # define DEPRECATEDIN_1_2_0(f)   DECLARE_DEPRECATED(f)
> #else
> # define DEPRECATEDIN_1_2_0(f)
> #endif

> 
> And where OPENSSL_VERSION_NUMBER is declared in opensslv.h (which is
> included from opensslconf.h). Since 1.1.1 is less than 1.2.0, the
> first
> definition of DEPRECATEDIN_1_2_0 should apply, i.e. this macro should
> effectively be ignored and the parameter should be processed just
> like
> any other function declaration.
> 
> So do you have an opensslconf.h? And does it have that macro defined
> in
> it? My theory is that somehow or other you are picking up an old
> version
> of that header (maybe the system version) which doesn't have the
> macro
> defined.
> 
> Matt
> 

I found:

opensslv.h:# define OPENSSL_VERSION_NUMBER  0x1010100fL

Also to be sure my compilation environment isn't doing anything funky:

#include 

#include 

int main(void)
{
  
  printf("OPENSSL_VERSION_NUMBER %lx\n",OPENSSL_VERSION_NUMBER);
  
  return 0;
}

gave me the same thing.



-- 
Skip Carter
Taygeta Scientific Inc.
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] What to do with deprecation errors

2018-10-19 Thread Matt Caswell


On 19/10/2018 20:03, Skip Carter wrote:
> Hello all,
> 
> I recently installed from source, openssl-1.1.1 on a Debian box (like
> most distributions the Debian version is quite old and my application
> needs very recent libraries).  It built and installed without warnings
> or errors (Thanks to all concerned in creating software that can do
> that).
> 
> However when I try to compile an application that uses the library, I
> get the following compile time error:
> 
> /usr/include/openssl/ec.h:274:1: error: expected constructor,
> destructor, or type conversion before ‘DEPRECATEDIN_1_2_0’
>  DEPRECATEDIN_1_2_0(int EC_GROUP_get_curve_GFp(const EC_GROUP *group,
> BIGNUM *p,

It looks like its not picking up the definition of the
DEPRECATEDIN_1_2_0 macro for some reason.

That macro should be defined in opensslconf.h (which is included from
ec.h), and looks like this:

/*
 * Do not deprecate things to be deprecated in version 1.2.0 before the
 * OpenSSL version number matches.
 */
#if OPENSSL_VERSION_NUMBER < 0x1020L
# define DEPRECATEDIN_1_2_0(f)   f;
#elif OPENSSL_API_COMPAT < 0x1020L
# define DEPRECATEDIN_1_2_0(f)   DECLARE_DEPRECATED(f)
#else
# define DEPRECATEDIN_1_2_0(f)
#endif


And where OPENSSL_VERSION_NUMBER is declared in opensslv.h (which is
included from opensslconf.h). Since 1.1.1 is less than 1.2.0, the first
definition of DEPRECATEDIN_1_2_0 should apply, i.e. this macro should
effectively be ignored and the parameter should be processed just like
any other function declaration.

So do you have an opensslconf.h? And does it have that macro defined in
it? My theory is that somehow or other you are picking up an old version
of that header (maybe the system version) which doesn't have the macro
defined.

Matt

> 
> (and other similar errors)
> 
> Can anybody tell me what is wrong ?
> 
> I it feels like I am missing some compiler flags (I am using nothing
> special: -Wall -Wextra -Wpedantic).
> 
> Thanks,
> 
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


[openssl-users] What to do with deprecation errors

2018-10-19 Thread Skip Carter
Hello all,

I recently installed from source, openssl-1.1.1 on a Debian box (like
most distributions the Debian version is quite old and my application
needs very recent libraries).  It built and installed without warnings
or errors (Thanks to all concerned in creating software that can do
that).

However when I try to compile an application that uses the library, I
get the following compile time error:

/usr/include/openssl/ec.h:274:1: error: expected constructor,
destructor, or type conversion before ‘DEPRECATEDIN_1_2_0’
 DEPRECATEDIN_1_2_0(int EC_GROUP_get_curve_GFp(const EC_GROUP *group,
BIGNUM *p,

(and other similar errors)

Can anybody tell me what is wrong ?

I it feels like I am missing some compiler flags (I am using nothing
special: -Wall -Wextra -Wpedantic).

Thanks,

-- 
Skip Carter
Taygeta Scientific Inc.
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users