Re: Can you suggest any technical name for changing sources from openssl-1.0.2 to openssl-1.1.0?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Nov 29, 2016, at 10:12 AM, Jakob Bohm <jb-openssl@xxxxxxxxxx> wrote:
> 
>>     /*
>>      * OPENSSL_VERSION_NUMBER(3):
>>      *
>>      * OPENSSL_VERSION_NUMBER is a numeric release version identifier:
>>      *
>>      * MMNNFFPPS: major minor fix patch status
>>      *
> 
> Shouldn't this be
> MNNFFPPS: major minor fix patch status (only 1 nibble for major)

Yes, the comment in that file has an extra nibble for the major number,
but for portability reasons the version number is only 32 bits.

The code below the comment parses the unsigned long version number as
follows:

    if (version < 0x0930) {
        info->status = 0;
        info->patch = version & 0x0f;
        version >>= 4;
        info->micro = version & 0x0f;
        version >>= 4;
        info->minor = version & 0x0f;
        version >>= 4;
        info->major = version & 0x0f;
    } else if (version < 0x00905800L) {
        info->patch = version & 0xff;
        version >>= 8;
        info->status = version & 0xf;
        version >>= 4;
        info->micro = version & 0xff;
        version >>= 8;
        info->minor = version & 0xff;
        version >>= 8;
        info->major = version & 0xff;
    } else {
        info->status = version & 0xf;
        version >>= 4;
        info->patch = version & 0xff;
        version >>= 8;
        info->micro = version & 0xff;
        version >>= 8;
        info->minor = version & 0xff;
        version >>= 8;
        info->major = version & 0xff;
        if (version < 0x00906000L)
            info->patch &= ~0x80;
    }

So it could produce a major version > 15 on systems where long
is > 32 bits, but that's unlikely on the OpenSSL side at present.

-- 
	Viktor.

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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux