From 131635eac0479b5b283f01107a8e07a61a610261 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sat, 17 Aug 2019 01:18:34 +0100 Subject: [PATCH] [crypto] Drag in configured digestInfo prefixes for any use of RSA Ensure that the configured RSA digestInfo prefixes are included in any build that includes rsa.o (rather than relying on x509.o or tls.o also being present in the final binary). This allows the RSA self-tests to be run in isolation. Signed-off-by: Michael Brown --- src/crypto/rsa.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/crypto/rsa.c b/src/crypto/rsa.c index 7ac0bca59..2c5cf67dd 100644 --- a/src/crypto/rsa.c +++ b/src/crypto/rsa.c @@ -635,3 +635,9 @@ struct pubkey_algorithm rsa_algorithm = { .final = rsa_final, .match = rsa_match, }; + +/* Drag in objects via rsa_algorithm */ +REQUIRING_SYMBOL ( rsa_algorithm ); + +/* Drag in crypto configuration */ +REQUIRE_OBJECT ( config_crypto );