diff -ur openssl-1.0.2p/crypto/o_init.c openssl-1.0.2p-new/crypto/o_init.c
--- openssl-1.0.2p/crypto/o_init.c	2018-08-14 05:48:58.000000000 -0700
+++ openssl-1.0.2p-new/crypto/o_init.c	2018-08-18 21:44:23.341747529 -0700
@@ -57,6 +57,7 @@
 #include <openssl/err.h>
 #ifdef OPENSSL_FIPS
 # include <openssl/fips.h>
+# include <openssl/fips_rand.h>
 # include <openssl/rand.h>
 
 # ifndef OPENSSL_NO_DEPRECATED
@@ -66,6 +67,51 @@
 #endif
 
 /*
+ *
+ * Enable FIPS mode based on host FIPS mode / env variable.
+ */
+#if defined(OPENSSL_FIPS)
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+#include <stdlib.h>
+
+#define FIPS_MODE_SWITCH_FILE "/proc/sys/crypto/fips_enabled"
+#define FIPS_MODE_SWITCH_FILE2 "/etc/vmware/system_fips"
+
+static void init_fips_mode(void)
+{
+    char buf[2] = "0";
+    int fd;
+
+    if (getenv("OPENSSL_FORCE_FIPS_MODE") != NULL)
+    {
+        buf[0] = '1';
+    }
+    else if (access(FIPS_MODE_SWITCH_FILE2, F_OK) != -1)
+    {
+        buf[0] = '1';
+    }
+    else if ((fd = open(FIPS_MODE_SWITCH_FILE, O_RDONLY)) >= 0)
+    {
+        while (read(fd, buf, sizeof(buf)) < 0 && errno == EINTR);
+        close(fd);
+    }
+    /* Failure reading the fips mode switch file means just not
+     * switching into FIPS mode. We would break too many things
+     * otherwise.
+     */
+
+    if (buf[0] == '1')
+    {
+        FIPS_mode_set(1);
+    }
+}
+#endif
+
+/*
  * Perform any essential OpenSSL initialization operations. Currently only
  * sets FIPS callbacks
  */
@@ -84,6 +130,17 @@
     FIPS_set_error_callbacks(ERR_put_error, ERR_add_error_vdata);
     FIPS_set_malloc_callbacks(CRYPTO_malloc, CRYPTO_free);
     RAND_init_fips();
+    /*
+     * VMware patch
+     *
+     * Calling RAND_init_fips() followed by
+     * RAND_set_rand_method(FIPS_rand_get_method()) will
+     * cause OpenSSL to use the FIPS default DRBG
+     * in lieu of the non-compliant OpenSSL default RAND. This
+     * requires FIPS-capable OpenSSL.
+     */
+    RAND_set_rand_method(FIPS_rand_get_method());
+    init_fips_mode(); /* VMware patch -- check a system file */
 #endif
 #if 0
     fprintf(stderr, "Called OPENSSL_init\n");