[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Fri Mar 11 13:48:29 UTC 2016


The branch master has been updated
       via  39dbb990a06753c0ab74d56098218d41780a9053 (commit)
      from  773fd0bad487fe8f1cf722ca14cec2c4a2da3e21 (commit)


- Log -----------------------------------------------------------------
commit 39dbb990a06753c0ab74d56098218d41780a9053
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri Mar 11 11:38:14 2016 +0100

    Avoid getting unresolved referense to bn_expand2 in test/bntest.c
    
    Issue identified on Solaris by Erik Forsberg <erik at efca.com>
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 test/bntest.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/test/bntest.c b/test/bntest.c
index 082cf4c..53769aa 100644
--- a/test/bntest.c
+++ b/test/bntest.c
@@ -80,6 +80,19 @@
 #include <openssl/x509.h>
 #include <openssl/err.h>
 
+/*
+ * In bn_lcl.h, bn_expand() is defined as a static ossl_inline function.
+ * This is fine in itself, it will end up as an unused static function in
+ * the worst case.  However, it referenses bn_expand2(), which is a private
+ * function in libcrypto and therefore unavailable on some systems.  This
+ * may result in a linker error because of unresolved symbols.
+ *
+ * To avoid this, we define a dummy variant of bn_expand2() here, and to
+ * avoid possible clashes with libcrypto, we rename it first, using a macro.
+ */
+#define bn_expand2 dummy_bn_expand2
+static BIGNUM *bn_expand2(BIGNUM *b, int words) { return NULL; }
+
 #include "../crypto/bn/bn_lcl.h"
 
 static const int num0 = 100;           /* number of tests */


More information about the openssl-commits mailing list