Make openVMS seeding less dependent of OpenVMS version
authorRichard Levitte <levitte@openssl.org>
Wed, 6 Jul 2022 04:09:01 +0000 (06:09 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 27 Oct 2022 10:32:13 +0000 (12:32 +0200)
commitaa542d271fdf4761f5ae32694d6a5111941b09bf
tree1f5600f6eb98cc9abd94cb4c5f7645bc45099982
parent9b3219ba544db82cdad3058b9872058739559944
Make openVMS seeding less dependent of OpenVMS version

SYS$GETTIM_PREC is a very new function, only available on OpenVMS v8.4.
OpenSSL binaries built on OpenVMS v8.4 become unusable on older OpenVM
versions, but building for the older CRTL version will make the high
precision time functions unavailable.

Tests have shown that on Alpha and Itanium, the time update granularity
between SYS$GETTIM and SYS$GETTIM_PREC is marginal, so the former plus
a sequence number turns out to be better to guarantee a unique nonce.

Fixes #18727

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18730)
crypto/rand/rand_vms.c