VMS: only use the high precision on VMS v8.4 and up
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Fri, 15 Mar 2019 00:48:51 +0000 (01:48 +0100)
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Fri, 15 Mar 2019 07:46:29 +0000 (08:46 +0100)
Fixes #8487
Amends #7230

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8488)

(cherry picked from commit 355417eb4611014767480e5d3e96b1b08eb02700)

crypto/rand/rand_vms.c

index bfcf6f0a86c508e9b0c23411f67c6ae2ac2d77d4..e84429170095ea7efdf1419e9539042abe4694aa 100644 (file)
@@ -507,7 +507,11 @@ int rand_pool_add_additional_data(RAND_POOL *pool)
      * concurrently (which is the case for the <master> drbg).
      */
     data.tid = CRYPTO_THREAD_get_current_id();
+#if __CRTL_VER >= 80400000
     sys$gettim_prec(&data.time);
+#else
+    sys$gettim((void*)&data.time);
+#endif
 
     return rand_pool_add(pool, (unsigned char *)&data, sizeof(data), 0);
 }