From: Harlan Stenn Date: Sat, 28 Jun 2014 07:48:23 +0000 (+0000) Subject: ntp_crypto.c, ChangeLog: X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=e8a49587d28fd2fd14ba3ba189cf75efc03cf272;p=thirdparty%2Fntp.git ntp_crypto.c, ChangeLog: [Bug 2619] Save a signed int copy of the return value of i2d_DSA_SIG(). Provide missing msyslog() message in crypto_alice(). bk: 53ae7347eOQG-6IlIQvyZIULr4xekA --- diff --git a/ChangeLog b/ChangeLog index 51432cbf6e..b8d12d66cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ * [Bug 2597] leap file processing -- loose ends. +* [Bug 2619] Save a signed int copy of the return value of i2d_DSA_SIG(). + Provide missing msyslog() message in crypto_alice(). * Fix a variable lifetime issue. (4.2.7p445) 2014/06/12 Released by Harlan Stenn * [Bug 2556] mrulist isn't mentioned in the ntpq man page. diff --git a/ntpd/ntp_crypto.c b/ntpd/ntp_crypto.c index 0035c53cd2..010bf2daf3 100644 --- a/ntpd/ntp_crypto.c +++ b/ntpd/ntp_crypto.c @@ -2038,8 +2038,10 @@ crypto_alice( /* * The identity parameters must have correct format and content. */ - if (peer->ident_pkey == NULL) + if (peer->ident_pkey == NULL) { + msyslog(LOG_NOTICE, "crypto_alice: scheme unavailable"); return (XEVNT_ID); + } if ((dsa = peer->ident_pkey->pkey->pkey.dsa) == NULL) { msyslog(LOG_NOTICE, "crypto_alice: defective key"); @@ -2405,6 +2407,7 @@ crypto_bob2( BIGNUM *r, *k, *g, *y; u_char *ptr; u_int len; + int s_len; /* * If the GQ parameters are not valid, something awful @@ -2451,8 +2454,8 @@ crypto_bob2( * Encode the values in ASN.1 and sign. The filestamp is from * the local file. */ - len = i2d_DSA_SIG(sdsa, NULL); - if (len <= 0) { + len = s_len = i2d_DSA_SIG(sdsa, NULL); + if (s_len <= 0) { msyslog(LOG_ERR, "crypto_bob2: %s", ERR_error_string(ERR_get_error(), NULL)); DSA_SIG_free(sdsa);