Index: /trunk/src/libs/openssl-3.0.1/crypto/Makefile.kmk
===================================================================
--- /trunk/src/libs/openssl-3.0.1/crypto/Makefile.kmk	(revision 94099)
+++ /trunk/src/libs/openssl-3.0.1/crypto/Makefile.kmk	(revision 94100)
@@ -53,14 +53,28 @@
 	init.c \
 	mem.c \
-	mem_dbg.c \
+	mem_clr.c \
 	mem_sec.c \
 	o_dir.c \
-	o_fips.c \
 	o_fopen.c \
 	o_init.c \
 	o_str.c \
 	o_time.c \
-	uid.c \
-	threads_iprt.c
+	packet.c \
+	param_build.c \
+	param_build_set.c \
+	params.c \
+	params_dup.c \
+	params_from_text.c \
+	passphrase.c \
+	provider.c \
+	provider_child.c \
+	provider_conf.c \
+	provider_core.c \
+	provider_predefined.c \
+	punycode.c \
+	sparse_array.c \
+	threads_iprt.c \
+	trace.c \
+	uid.c
 
 ifdef VBOX_WITH_CRYPTO_ASM
Index: /trunk/src/libs/openssl-3.0.1/crypto/asn1/Makefile.kmk
===================================================================
--- /trunk/src/libs/openssl-3.0.1/crypto/asn1/Makefile.kmk	(revision 94099)
+++ /trunk/src/libs/openssl-3.0.1/crypto/asn1/Makefile.kmk	(revision 94100)
@@ -42,5 +42,5 @@
 	asn1_item_list.c \
 	asn1_lib.c \
-	asn1_par.c \
+	asn1_parse.c \
 	asn_mime.c \
 	asn_moid.c \
@@ -54,6 +54,4 @@
 	f_int.c \
 	f_string.c \
-	i2d_pr.c \
-	i2d_pu.c \
 	n_pkey.c \
 	nsseq.c \
Index: /trunk/src/libs/openssl-3.0.1/crypto/bio/Makefile.kmk
===================================================================
--- /trunk/src/libs/openssl-3.0.1/crypto/bio/Makefile.kmk	(revision 94099)
+++ /trunk/src/libs/openssl-3.0.1/crypto/bio/Makefile.kmk	(revision 94100)
@@ -18,9 +18,9 @@
 crypto_bio_DEFS = OPENSSL_NO_DEPRECATED
 crypto_bio_SOURCES = \
-	b_addr.c \
-	b_dump.c \
-	b_print.c \
-	b_sock.c \
-	b_sock2.c \
+	bio_addr.c \
+	bio_dump.c \
+	bio_print.c \
+	bio_sock.c \
+	bio_sock2.c \
 	bf_buff.c \
 	bf_lbuf.c \
Index: /trunk/src/libs/openssl-3.0.1/crypto/cmac/Makefile.kmk
===================================================================
--- /trunk/src/libs/openssl-3.0.1/crypto/cmac/Makefile.kmk	(revision 94099)
+++ /trunk/src/libs/openssl-3.0.1/crypto/cmac/Makefile.kmk	(revision 94100)
@@ -18,6 +18,4 @@
 crypto_cmac_DEFS = OPENSSL_NO_DEPRECATED
 crypto_cmac_SOURCES = \
-	cm_ameth.c \
-	cm_pmeth.c \
 	cmac.c
 $(evalcall VBOX_OPENSSL_X86,crypto_cmac)
Index: /trunk/src/libs/openssl-3.0.1/crypto/dh/Makefile.kmk
===================================================================
--- /trunk/src/libs/openssl-3.0.1/crypto/dh/Makefile.kmk	(revision 94099)
+++ /trunk/src/libs/openssl-3.0.1/crypto/dh/Makefile.kmk	(revision 94100)
@@ -30,6 +30,5 @@
 	dh_pmeth.c \
 	dh_prn.c \
-	dh_rfc5114.c \
-	dh_rfc7919.c
+	dh_rfc5114.c
 $(evalcall VBOX_OPENSSL_X86,crypto_dh)
 
Index: /trunk/src/libs/openssl-3.0.1/crypto/ec/Makefile.kmk
===================================================================
--- /trunk/src/libs/openssl-3.0.1/crypto/ec/Makefile.kmk	(revision 94099)
+++ /trunk/src/libs/openssl-3.0.1/crypto/ec/Makefile.kmk	(revision 94100)
@@ -19,5 +19,6 @@
 crypto_ec_SOURCES = \
 	curve25519.c \
-	curve448/arch_32/f_impl.c \
+	curve448/arch_32/f_impl32.c \
+	curve448/arch_64/f_impl64.c \
 	curve448/curve448.c \
 	curve448/curve448_tables.c \
Index: /trunk/src/libs/openssl-3.0.1/crypto/evp/Makefile.kmk
===================================================================
--- /trunk/src/libs/openssl-3.0.1/crypto/evp/Makefile.kmk	(revision 94099)
+++ /trunk/src/libs/openssl-3.0.1/crypto/evp/Makefile.kmk	(revision 94100)
@@ -53,15 +53,14 @@
 	evp_pbe.c \
 	evp_pkey.c \
-	m_md2.c \
-	m_md4.c \
-	m_md5.c \
-	m_md5_sha1.c \
-	m_mdc2.c \
+	legacy_md2.c \
+	legacy_md4.c \
+	legacy_md5.c \
+	legacy_md5_sha1.c \
+	legacy_mdc2.c \
+	legacy_ripemd.c \
+	legacy_sha.c \
+	legacy_wp.c \
 	m_null.c \
-	m_ripemd.c \
-	m_sha1.c \
-	m_sha3.c \
 	m_sigver.c \
-	m_wp.c \
 	names.c \
 	p5_crpt.c \
@@ -75,7 +74,8 @@
 	p_verify.c \
 	pbe_scrypt.c \
-	pmeth_fn.c \
+	pmeth_check.c \
 	pmeth_gn.c \
-	pmeth_lib.c
+	pmeth_lib.c \
+	signature.c
 $(evalcall VBOX_OPENSSL_X86,crypto_evp)
 
Index: /trunk/src/libs/openssl-3.0.1/crypto/hmac/Makefile.kmk
===================================================================
--- /trunk/src/libs/openssl-3.0.1/crypto/hmac/Makefile.kmk	(revision 94099)
+++ /trunk/src/libs/openssl-3.0.1/crypto/hmac/Makefile.kmk	(revision 94100)
@@ -18,6 +18,4 @@
 crypto_hmac_DEFS = OPENSSL_NO_DEPRECATED
 crypto_hmac_SOURCES = \
-	hm_ameth.c \
-	hm_pmeth.c \
 	hmac.c
 $(evalcall VBOX_OPENSSL_X86,crypto_hmac)
Index: /trunk/src/libs/openssl-3.0.1/crypto/kdf/Makefile.kmk
===================================================================
--- /trunk/src/libs/openssl-3.0.1/crypto/kdf/Makefile.kmk	(revision 94099)
+++ /trunk/src/libs/openssl-3.0.1/crypto/kdf/Makefile.kmk	(revision 94100)
@@ -18,8 +18,5 @@
 crypto_kdf_DEFS = OPENSSL_NO_DEPRECATED
 crypto_kdf_SOURCES = \
-	hkdf.c \
-	kdf_err.c \
-	scrypt.c \
-	tls1_prf.c
+	kdf_err.c
 $(evalcall VBOX_OPENSSL_X86,crypto_kdf)
 
Index: /trunk/src/libs/openssl-3.0.1/crypto/mem_sec.c
===================================================================
--- /trunk/src/libs/openssl-3.0.1/crypto/mem_sec.c	(revision 94099)
+++ /trunk/src/libs/openssl-3.0.1/crypto/mem_sec.c	(revision 94100)
@@ -22,4 +22,7 @@
 
 #ifndef OPENSSL_NO_SECURE_MEMORY
+# if defined(VBOX)
+#  include <iprt/memsafer.h>
+# else
 # if defined(_WIN32)
 #  include <windows.h>
@@ -50,6 +53,5 @@
 # include <sys/stat.h>
 # include <fcntl.h>
-#elif defined(VBOX)
-# include <iprt/memsafer.h>
+# endif /* !VBOX */
 #endif
 
@@ -82,4 +84,5 @@
 int CRYPTO_secure_malloc_init(size_t size, size_t minsize)
 {
+#ifndef VBOX
 #ifndef OPENSSL_NO_SECURE_MEMORY
     int ret = 0;
@@ -101,8 +104,12 @@
     return 0;
 #endif /* OPENSSL_NO_SECURE_MEMORY */
+#else
+    return 0;
+#endif /* VBOX */
 }
 
 int CRYPTO_secure_malloc_done(void)
 {
+#ifndef VBOX
 #ifndef OPENSSL_NO_SECURE_MEMORY
     if (secure_mem_used == 0) {
@@ -114,4 +121,5 @@
     }
 #endif /* OPENSSL_NO_SECURE_MEMORY */
+#endif /* VBOX */
     return 0;
 }
@@ -119,4 +127,5 @@
 int CRYPTO_secure_malloc_initialized(void)
 {
+#ifndef VBOX
 #ifndef OPENSSL_NO_SECURE_MEMORY
     return secure_mem_initialized;
@@ -124,8 +133,12 @@
     return 0;
 #endif /* OPENSSL_NO_SECURE_MEMORY */
+#else
+    return 0;
+#endif /* VBOX */
 }
 
 void *CRYPTO_secure_malloc(size_t num, const char *file, int line)
 {
+#ifndef VBOX
 #ifndef OPENSSL_NO_SECURE_MEMORY
     void *ret;
@@ -142,10 +155,11 @@
     CRYPTO_THREAD_unlock(sec_malloc_lock);
     return ret;
-#elif defined(VBOX)
+#else
+    return CRYPTO_malloc(num, file, line);
+#endif /* OPENSSL_NO_SECURE_MEMORY */
+#else
     RT_NOREF(line);
     return RTMemSaferAllocZTag(num, file);
-#else
-    return CRYPTO_malloc(num, file, line);
-#endif /* OPENSSL_NO_SECURE_MEMORY */
+#endif /* VBOX */
 }
 
@@ -157,5 +171,5 @@
         return CRYPTO_secure_malloc(num, file, line);
 #endif
-#if !defined(OPENSSL_SECURE_MEMORY) && defined(VBOX)
+#if defined(OPENSSL_NO_SECURE_MEMORY) && defined(VBOX)
     RT_NOREF(line);
     return RTMemSaferAllocZTag(num, file);
@@ -167,4 +181,5 @@
 void CRYPTO_secure_free(void *ptr, const char *file, int line)
 {
+#ifndef VBOX
 #ifndef OPENSSL_NO_SECURE_MEMORY
     size_t actual_size;
@@ -183,10 +198,11 @@
     sh_free(ptr);
     CRYPTO_THREAD_unlock(sec_malloc_lock);
-#elif defined(VBOX)
+#else
+    CRYPTO_free(ptr, file, line);
+#endif /* OPENSSL_NO_SECURE_MEMORY */
+#else
     RT_NOREF(line);
     RTMemSaferFree(ptr, 0);
-#else
-    CRYPTO_free(ptr, file, line);
-#endif /* OPENSSL_NO_SECURE_MEMORY */
+#endif /* VBOX */
 }
 
@@ -194,4 +210,5 @@
                               const char *file, int line)
 {
+#ifndef VBOX
 #ifndef OPENSSL_NO_SECURE_MEMORY
     size_t actual_size;
@@ -211,17 +228,19 @@
     sh_free(ptr);
     CRYPTO_THREAD_unlock(sec_malloc_lock);
-#elif defined(VBOX)
+#else
+    if (ptr == NULL)
+        return;
+    OPENSSL_cleanse(ptr, num);
+    CRYPTO_free(ptr, file, line);
+#endif /* OPENSSL_NO_SECURE_MEMORY */
+#else
     RT_NOREF(line);
     RTMemSaferFree(ptr, 0);
-#else
-    if (ptr == NULL)
-        return;
-    OPENSSL_cleanse(ptr, num);
-    CRYPTO_free(ptr, file, line);
-#endif /* OPENSSL_NO_SECURE_MEMORY */
+#endif /* VBOX */
 }
 
 int CRYPTO_secure_allocated(const void *ptr)
 {
+#ifndef VBOX
 #ifndef OPENSSL_NO_SECURE_MEMORY
     if (!secure_mem_initialized)
@@ -233,13 +252,15 @@
      */
     return sh_allocated(ptr);
-#elif defined(VBOX)
-    return RTMemSaferGetSize(ptr) > 0;
-#else
-    return 0;
-#endif /* OPENSSL_NO_SECURE_MEMORY */
+#else
+    return 0;
+#endif /* OPENSSL_NO_SECURE_MEMORY */
+#else
+    return RTMemSaferGetSize((void *)ptr) > 0;
+#endif /* VBOX */
 }
 
 size_t CRYPTO_secure_used(void)
 {
+#ifndef VBOX
 #ifndef OPENSSL_NO_SECURE_MEMORY
     return secure_mem_used;
@@ -247,8 +268,12 @@
     return 0;
 #endif /* OPENSSL_NO_SECURE_MEMORY */
+#else
+    return 0;
+#endif /* VBOX */
 }
 
 size_t CRYPTO_secure_actual_size(void *ptr)
 {
+#ifndef VBOX
 #ifndef OPENSSL_NO_SECURE_MEMORY
     size_t actual_size;
@@ -259,11 +284,13 @@
     CRYPTO_THREAD_unlock(sec_malloc_lock);
     return actual_size;
-#elif defined(VBOX)
+#else
+    return 0;
+#endif
+#else
     return RTMemSaferGetSize(ptr);
-#else
-    return 0;
-#endif
-}
-
+#endif /* VBOX */
+}
+
+#ifndef VBOX
 /*
  * SECURE HEAP IMPLEMENTATION
@@ -727,2 +754,3 @@
 }
 #endif /* OPENSSL_NO_SECURE_MEMORY */
+#endif /* VBOX */
Index: /trunk/src/libs/openssl-3.0.1/crypto/ocsp/Makefile.kmk
===================================================================
--- /trunk/src/libs/openssl-3.0.1/crypto/ocsp/Makefile.kmk	(revision 94099)
+++ /trunk/src/libs/openssl-3.0.1/crypto/ocsp/Makefile.kmk	(revision 94100)
@@ -22,5 +22,5 @@
 	ocsp_err.c \
 	ocsp_ext.c \
-	ocsp_ht.c \
+	ocsp_http.c \
 	ocsp_lib.c \
 	ocsp_prn.c \
Index: /trunk/src/libs/openssl-3.0.1/crypto/rand/Makefile.kmk
===================================================================
--- /trunk/src/libs/openssl-3.0.1/crypto/rand/Makefile.kmk	(revision 94099)
+++ /trunk/src/libs/openssl-3.0.1/crypto/rand/Makefile.kmk	(revision 94100)
@@ -18,11 +18,11 @@
 crypto_rand_DEFS = OPENSSL_NO_DEPRECATED
 crypto_rand_SOURCES = \
-	drbg_ctr.c \
-	drbg_lib.c \
+	prov_seed.c \
+	rand_deprecated.c \
+	rand_egd.c \
 	rand_err.c \
 	rand_lib.c \
-	rand_unix.c \
-	rand_vms.c \
-	rand_win.c \
+	rand_meth.c \
+	rand_pool.c \
 	randfile.c
 $(evalcall VBOX_OPENSSL_X86,crypto_rand)
Index: /trunk/src/libs/openssl-3.0.1/crypto/rsa/Makefile.kmk
===================================================================
--- /trunk/src/libs/openssl-3.0.1/crypto/rsa/Makefile.kmk	(revision 94099)
+++ /trunk/src/libs/openssl-3.0.1/crypto/rsa/Makefile.kmk	(revision 94100)
@@ -20,4 +20,5 @@
 	rsa_ameth.c \
 	rsa_asn1.c \
+	rsa_backend.c \
 	rsa_chk.c \
 	rsa_crpt.c \
@@ -28,4 +29,5 @@
 	rsa_meth.c \
 	rsa_mp.c \
+	rsa_mp_names.c \
 	rsa_none.c \
 	rsa_oaep.c \
@@ -36,6 +38,6 @@
 	rsa_pss.c \
 	rsa_saos.c \
+	rsa_schemes.c \
 	rsa_sign.c \
-	rsa_ssl.c \
 	rsa_x931.c \
 	rsa_x931g.c
Index: /trunk/src/libs/openssl-3.0.1/crypto/siphash/Makefile.kmk
===================================================================
--- /trunk/src/libs/openssl-3.0.1/crypto/siphash/Makefile.kmk	(revision 94099)
+++ /trunk/src/libs/openssl-3.0.1/crypto/siphash/Makefile.kmk	(revision 94100)
@@ -18,7 +18,5 @@
 crypto_siphash_DEFS = OPENSSL_NO_DEPRECATED
 crypto_siphash_SOURCES = \
-	siphash.c \
-	siphash_ameth.c \
-	siphash_pmeth.c
+	siphash.c
 $(evalcall VBOX_OPENSSL_X86,crypto_siphash)
 
Index: /trunk/src/libs/openssl-3.0.1/crypto/sm3/Makefile.kmk
===================================================================
--- /trunk/src/libs/openssl-3.0.1/crypto/sm3/Makefile.kmk	(revision 94099)
+++ /trunk/src/libs/openssl-3.0.1/crypto/sm3/Makefile.kmk	(revision 94100)
@@ -18,5 +18,5 @@
 crypto_sm3_DEFS = OPENSSL_NO_DEPRECATED
 crypto_sm3_SOURCES = \
-	m_sm3.c \
+	legacy_sm3.c \
 	sm3.c
 $(evalcall VBOX_OPENSSL_X86,crypto_sm3)
Index: /trunk/src/libs/openssl-3.0.1/crypto/store/Makefile.kmk
===================================================================
--- /trunk/src/libs/openssl-3.0.1/crypto/store/Makefile.kmk	(revision 94099)
+++ /trunk/src/libs/openssl-3.0.1/crypto/store/Makefile.kmk	(revision 94100)
@@ -18,9 +18,10 @@
 crypto_store_DEFS = OPENSSL_NO_DEPRECATED
 crypto_store_SOURCES = \
-	loader_file.c \
 	store_err.c \
 	store_init.c \
 	store_lib.c \
+	store_meth.c \
 	store_register.c \
+	store_result.c \
 	store_strings.c
 $(evalcall VBOX_OPENSSL_X86,crypto_store)
Index: /trunk/src/libs/openssl-3.0.1/crypto/x509/Makefile.kmk
===================================================================
--- /trunk/src/libs/openssl-3.0.1/crypto/x509/Makefile.kmk	(revision 94099)
+++ /trunk/src/libs/openssl-3.0.1/crypto/x509/Makefile.kmk	(revision 94100)
@@ -20,7 +20,45 @@
 	by_dir.c \
 	by_file.c \
+	by_store.c \
+	pcy_cache.c \
+	pcy_data.c \
+	pcy_lib.c \
+	pcy_map.c \
+	pcy_node.c \
+	pcy_tree.c \
 	t_crl.c \
 	t_req.c \
 	t_x509.c \
+	v3_addr.c \
+	v3_admis.c \
+	v3_akeya.c \
+	v3_asid.c \
+	v3_bcons.c \
+	v3_bitst.c \
+	v3_conf.c \
+	v3_cpols.c \
+	v3_crld.c \
+	v3_enum.c \
+	v3_extku.c \
+	v3_genn.c \
+	v3_ia5.c \
+	v3_info.c \
+	v3_int.c \
+	v3_lib.c \
+	v3_ncons.c \
+	v3_pci.c \
+	v3_pcia.c \
+	v3_pcons.c \
+	v3_pku.c \
+	v3_pmaps.c \
+	v3_prn.c \
+	v3_purp.c \
+	v3_san.c \
+	v3_skid.c \
+	v3_sxnet.c \
+	v3_tlsf.c \
+	v3_utf8.c \
+	v3_utl.c \
+	v3err.c \
 	x509_att.c \
 	x509_cmp.c \
@@ -35,5 +73,5 @@
 	x509_req.c \
 	x509_set.c \
-	x509_trs.c \
+	x509_trust.c \
 	x509_txt.c \
 	x509_v3.c \
Index: /trunk/src/libs/openssl-3.0.1/ssl/Makefile.kmk
===================================================================
--- /trunk/src/libs/openssl-3.0.1/ssl/Makefile.kmk	(revision 94099)
+++ /trunk/src/libs/openssl-3.0.1/ssl/Makefile.kmk	(revision 94100)
@@ -29,5 +29,4 @@
 	d1_srtp.c \
 	methods.c \
-	packet.c \
 	pqueue.c \
 	record/dtls1_bitmap.c \
