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:35:38 +0000 (12:35 +0200)
commit7056dc9c50baa4af5152c625c4735806d51c67cd
tree5eb5fb1d03ae65f6ebe4d0686d5b2be2bbd44531
parentee05588dabeac7b9d034bf16dad122a93d1688a4
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: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18731)
providers/implementations/rands/seeding/rand_vms.c