]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
ntp_crypto.c, ChangeLog:
authorHarlan Stenn <stenn@ntp.org>
Sat, 28 Jun 2014 07:48:23 +0000 (07:48 +0000)
committerHarlan Stenn <stenn@ntp.org>
Sat, 28 Jun 2014 07:48:23 +0000 (07:48 +0000)
  [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

ChangeLog
ntpd/ntp_crypto.c

index 51432cbf6e8f42031bc0fa7a403c781e7d2a61b9..b8d12d66cc02f0f25956a345c51294639fa6fa07 100644 (file)
--- 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 <stenn@ntp.org>
 * [Bug 2556] mrulist isn't mentioned in the ntpq man page.
index 0035c53cd2f01f76796087c1d37872d800df1e05..010bf2daf33028721ead870a2c603552e2e28e46 100644 (file)
@@ -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);