General clean-up 3 #296

Merged
sjaeckel merged 7 commits from cleanup/3 into release/1.18.0 2017-09-21 13:46:42 -05:00
sjaeckel commented 2017-09-21 09:22:18 -05:00 (Migrated from github.com)

Next (and hopefully last) general clean-up

Next (and hopefully last) general clean-up
karel-m (Migrated from github.com) reviewed 2017-09-21 10:30:57 -05:00
@ -329,6 +329,9 @@ const char *crypt_build_settings =
#if defined(LTC_MKAT)
karel-m (Migrated from github.com) commented 2017-09-21 10:30:56 -05:00

typo? LTC_PK_MAX_RETRIES

typo? `LTC_PK_MAX_RETRIES`
sjaeckel (Migrated from github.com) reviewed 2017-09-21 10:31:40 -05:00
@ -329,6 +329,9 @@ const char *crypt_build_settings =
#if defined(LTC_MKAT)
sjaeckel (Migrated from github.com) commented 2017-09-21 10:31:40 -05:00

yippie c&p

yippie c&p
sjaeckel commented 2017-09-21 10:37:24 -05:00 (Migrated from github.com)

looks like my changes in hashsum broke coverage.sh

looks like my changes in hashsum broke coverage.sh
karel-m commented 2017-09-21 10:37:57 -05:00 (Migrated from github.com)

I'd put LTC_PK_MAX_RETRIES here:

#if defined(LTC_MECC) || defined(LTC_MRSA) || defined(LTC_MDSA) || defined(LTC_MKAT)
   /* Include the MPI functionality?  (required by the PK algorithms) */
   #define LTC_MPI
   #ifndef LTC_PK_MAX_RETRIES
      /* iterations limit for retry-loops */
      #define LTC_PK_MAX_RETRIES  20
   #endif
#endif
I'd put `LTC_PK_MAX_RETRIES` here: ```C #if defined(LTC_MECC) || defined(LTC_MRSA) || defined(LTC_MDSA) || defined(LTC_MKAT) /* Include the MPI functionality? (required by the PK algorithms) */ #define LTC_MPI #ifndef LTC_PK_MAX_RETRIES /* iterations limit for retry-loops */ #define LTC_PK_MAX_RETRIES 20 #endif #endif ```
karel-m commented 2017-09-21 10:45:20 -05:00 (Migrated from github.com)

Do we care about warnings in demos/openssl-enc.c?

Try:

make V=1 CFLAGS="-Wall -Wextra -Wwrite-strings -Werror -DLTM_DESC -I../libtommath" EXTRALIBS=../libtommath/libtommath.a all
Do we care about warnings in `demos/openssl-enc.c`? Try: ``` make V=1 CFLAGS="-Wall -Wextra -Wwrite-strings -Werror -DLTM_DESC -I../libtommath" EXTRALIBS=../libtommath/libtommath.a all ```
karel-m commented 2017-09-21 10:47:29 -05:00 (Migrated from github.com)

The fix is easy:

diff --git a/demos/openssl-enc.c b/demos/openssl-enc.c
index 21121017..3aca04f4 100644
--- a/demos/openssl-enc.c
+++ b/demos/openssl-enc.c
@@ -89,7 +89,7 @@ union paddable {
  * Output:       <no return>
  * Side Effects: print messages and barf (does exit(3))
  */
-void barf(char *pname, char *err)
+void barf(const char *pname, const char *err)
 {
    printf("Usage: %s <enc|dec> infile outfile passphrase [salt]\n", pname);
    printf("\n");
The fix is easy: ```diff diff --git a/demos/openssl-enc.c b/demos/openssl-enc.c index 21121017..3aca04f4 100644 --- a/demos/openssl-enc.c +++ b/demos/openssl-enc.c @@ -89,7 +89,7 @@ union paddable { * Output: <no return> * Side Effects: print messages and barf (does exit(3)) */ -void barf(char *pname, char *err) +void barf(const char *pname, const char *err) { printf("Usage: %s <enc|dec> infile outfile passphrase [salt]\n", pname); printf("\n"); ```
karel-m commented 2017-09-21 10:52:23 -05:00 (Migrated from github.com)

The LTC_PK_MAX_RETRIES is sort of unaligned:

PRNG:
   Yarrow (LTC_YARROW_AES=2)
   SPRNG
   RC4
   ChaCha20
   Fortuna (LTC_FORTUNA_POOLS=32, LTC_FORTUNA_WD=10)
   SOBER128

PK Crypto:
   RSA (with blinding and CRT hardening)
   DH
   ECC (with blinding)
   DSA
 LTC_PK_MAX_RETRIES=20
MPI (Math):
   LTC_MPI
   LTM_DESC
   LTC_MILLER_RABIN_REPS=35

Compiler:
   CYGWIN Detected.
   GCC compiler 5.4.0.
   x86-64 detected.
The `LTC_PK_MAX_RETRIES` is sort of unaligned: ``` PRNG: Yarrow (LTC_YARROW_AES=2) SPRNG RC4 ChaCha20 Fortuna (LTC_FORTUNA_POOLS=32, LTC_FORTUNA_WD=10) SOBER128 PK Crypto: RSA (with blinding and CRT hardening) DH ECC (with blinding) DSA LTC_PK_MAX_RETRIES=20 MPI (Math): LTC_MPI LTM_DESC LTC_MILLER_RABIN_REPS=35 Compiler: CYGWIN Detected. GCC compiler 5.4.0. x86-64 detected. ```
karel-m (Migrated from github.com) reviewed 2017-09-21 10:55:00 -05:00
@ -329,6 +329,9 @@ const char *crypt_build_settings =
#if defined(LTC_MKAT)
karel-m (Migrated from github.com) commented 2017-09-21 10:55:00 -05:00

maybe:

-    " " NAME_VALUE(LTC_PK_MAX_RETRIES) " "
+    "   " NAME_VALUE(LTC_PK_MAX_RETRIES) "\n"
maybe: ``` - " " NAME_VALUE(LTC_PK_MAX_RETRIES) " " + " " NAME_VALUE(LTC_PK_MAX_RETRIES) "\n" ```
karel-m (Migrated from github.com) approved these changes 2017-09-21 13:15:26 -05:00
karel-m (Migrated from github.com) left a comment

👍 do merge

👍 do merge
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libtom/libtomcrypt!296
No description provided.