]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
X509_get_signature_nid() shim tweak
authorHarlan Stenn <stenn@ntp.org>
Thu, 29 Sep 2016 11:59:03 +0000 (11:59 +0000)
committerHarlan Stenn <stenn@ntp.org>
Thu, 29 Sep 2016 11:59:03 +0000 (11:59 +0000)
bk: 57ed0207Y1_jJclV4oRmSX0NwmVsQA

ChangeLog
NEWS
libntp/ssl_init.c

index 5e5b2fd886532e806af916145c35fa7e38425330..8a92c90c2f22031722b13658fcd352f99d564227 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -30,6 +30,7 @@
              even if it is very old <perlinger@ntp.org>
   - make sure PPS source is alive before processing samples
   - improve stability close to the 500ms phase jump (phase gate)
+* Shim X509_get_signature_nid() if needed.
 * git author attribution cleanup
 * bk ignore file cleanup
 
diff --git a/NEWS b/NEWS
index d6d6bf4a38f9da6d69a080a70dab8d0fbafdbc4b..ee30bca134ca5d6a2a89892cdd424860c37a6d8a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -42,6 +42,7 @@ Other fixes:
              even if it is very old <perlinger@ntp.org>
   - make sure PPS source is alive before processing samples
   - improve stability close to the 500ms phase jump (phase gate)
+* Shim X509_get_signature_nid() if needed
 * git author attribution cleanup
 * bk ignore file cleanup
 
index 755a5ff354cd7a26917988f7079f8ce2781ee430..16438ad7d6ee828857a4ecc24434cda2e7115306 100644 (file)
@@ -63,6 +63,18 @@ ssl_check_version(void)
 
        INIT_SSL();
 }
+
+# if OPENSSL_VERSION_NUMBER < 0x10002000L
+# include <openssl/objects.h>
+# include <openssl/x509.h>
+
+int X509_get_signature_nid(const X509 *x);
+
+int X509_get_signature_nid(const X509 *x)
+{
+    return OBJ_obj2nid(x->sig_alg->algorithm);
+}
+# endif
 #endif /* OPENSSL */