Hello,

OpenSLP 2.0 fails to build with OpenSSL 1.1.0. The API of OpenSSL
changed and it made few datatypes opaque.

Attached patch resolves the issue.

Best regards,
Vitezslav Crhonek
diff -up openslp-2.0.0/common/slp_crypto.c.orig openslp-2.0.0/common/slp_crypto.c
--- openslp-2.0.0/common/slp_crypto.c.orig	2012-12-07 21:13:28.000000000 +0100
+++ openslp-2.0.0/common/slp_crypto.c	2017-02-22 11:16:11.620835724 +0100
@@ -88,11 +88,16 @@ SLPCryptoDSAKey * SLPCryptoDSAKeyDup(SLP
    result =  DSA_new();
    if (result)
    {
-      result->p = BN_dup(dsa->p);
-      result->q = BN_dup(dsa->q);
-      result->g = BN_dup(dsa->g);
-      result->priv_key = BN_dup(dsa->priv_key);
-      result->pub_key = BN_dup(dsa->pub_key);
+      const BIGNUM *p, *q, *g;
+      const BIGNUM *priv_key, *pub_key;
+
+      DSA_get0_pqg(dsa, &p, &q, &g);
+      DSA_get0_key(dsa, &pub_key, &priv_key);
+
+      /* would be nice to check return values,
+       * but original code didn't do that either... */
+      DSA_set0_pqg(result, BN_dup(p), BN_dup(q), BN_dup(g));
+      DSA_set0_key(result, BN_dup(pub_key), BN_dup(priv_key));
    }
    return result;
 }

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openslp-devel mailing list
Openslp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openslp-devel

Reply via email to