Skip to content

General clean-up 3#296

Merged
sjaeckel merged 7 commits intorelease/1.18.0from
cleanup/3
Sep 21, 2017
Merged

General clean-up 3#296
sjaeckel merged 7 commits intorelease/1.18.0from
cleanup/3

Conversation

@sjaeckel
Copy link
Copy Markdown
Member

Next (and hopefully last) general clean-up

Comment thread src/misc/crypt/crypt.c Outdated
#if defined(LTC_MKAT)
" Katja\n"
#endif
#if defined(LTC_FILE_READ_BUFSIZE)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo? LTC_PK_MAX_RETRIES

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yippie c&p

@sjaeckel
Copy link
Copy Markdown
Member Author

looks like my changes in hashsum broke coverage.sh

@karel-m
Copy link
Copy Markdown
Member

karel-m commented Sep 21, 2017

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

@karel-m
Copy link
Copy Markdown
Member

karel-m commented Sep 21, 2017

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
Copy link
Copy Markdown
Member

karel-m commented Sep 21, 2017

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");

@karel-m
Copy link
Copy Markdown
Member

karel-m commented Sep 21, 2017

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.

Comment thread src/misc/crypt/crypt.c Outdated
" Katja\n"
#endif
#if defined(LTC_PK_MAX_RETRIES)
" " NAME_VALUE(LTC_PK_MAX_RETRIES) " "
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe:

-    " " NAME_VALUE(LTC_PK_MAX_RETRIES) " "
+    "   " NAME_VALUE(LTC_PK_MAX_RETRIES) "\n"

Copy link
Copy Markdown
Member

@karel-m karel-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 do merge

@sjaeckel sjaeckel merged commit 91a1031 into release/1.18.0 Sep 21, 2017
@sjaeckel sjaeckel deleted the cleanup/3 branch September 21, 2017 18:46
@sjaeckel sjaeckel restored the cleanup/3 branch September 21, 2017 18:47
@sjaeckel sjaeckel deleted the cleanup/3 branch September 21, 2017 18:49
@sjaeckel sjaeckel added this to the v1.18.0 milestone Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants