[openssl-users] Can you suggest any technical name for changing sources from openssl-1.0.2 to openssl-1.1.0?

Viktor Dukhovni openssl-users at dukhovni.org
Mon Nov 28 21:15:16 UTC 2016


On Mon, Nov 28, 2016 at 04:06:33PM -0500, Ken Goldman wrote:
> On 11/28/2016 3:40 PM, Salz, Rich wrote:
> >Perhaps I didn't understand the original question.  If all you want
> >to do is compare 1.0.2 and 1.1.0, then look at
> >OPENSSL_VERSION_NUMBER; if defined at it's 0x10101000L or greater,
> >then you;'re on the 1.1.x branch, otherwise you are not and therefore
> >on 1.0.2 or earlier.
> 
> I want to compare pre 1.1 (typically 1.0) and 1.1 and up.
> 
> My 1.0 has
> 
> ./opensslv.h:#define OPENSSL_VERSION_NUMBER	0x1000105fL
> 
> My 1.1 has
> 
> ./openssl/opensslv.h:# define OPENSSL_VERSION_NUMBER  0x1010003fL
> 
> Neither agree with your example, but would comparing to 0x10100000  work?

To test for 1.1.0 and up:

	#if OPENSSL_VERSION_NUMBER > 0x10100000
	...
	#endif

(testing for equality is not needed, that would be a a dev release
that predates all the betas).

-- 
	Viktor.


More information about the openssl-users mailing list