From: Harlan Stenn Date: Thu, 29 Sep 2016 11:59:03 +0000 (+0000) Subject: X509_get_signature_nid() shim tweak X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7f3ca12617540535901e89931a7185bbf0b9733;p=thirdparty%2Fntp.git X509_get_signature_nid() shim tweak bk: 57ed0207Y1_jJclV4oRmSX0NwmVsQA --- diff --git a/ChangeLog b/ChangeLog index 5e5b2fd88..8a92c90c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,7 @@ even if it is very old - 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 d6d6bf4a3..ee30bca13 100644 --- a/NEWS +++ b/NEWS @@ -42,6 +42,7 @@ Other fixes: even if it is very old - 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/libntp/ssl_init.c b/libntp/ssl_init.c index 755a5ff35..16438ad7d 100644 --- a/libntp/ssl_init.c +++ b/libntp/ssl_init.c @@ -63,6 +63,18 @@ ssl_check_version(void) INIT_SSL(); } + +# if OPENSSL_VERSION_NUMBER < 0x10002000L +# include +# include + +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 */