Browse Source

Merge pull request #279 from libtom/cleanup/2

Yet another clean-up and bugfix PR
Steffen Jaeckel 8 years ago
parent
commit
042df8ca20
3 changed files with 8 additions and 2 deletions
  1. 1 0
      demos/ltcrypt.c
  2. 6 1
      demos/timing.c
  3. 1 1
      src/misc/error_to_string.c

+ 1 - 0
demos/ltcrypt.c

@@ -47,6 +47,7 @@ int main(int argc, char *argv[])
    /* register algs, so they can be printed */
    register_all_ciphers();
    register_all_hashes();
+   register_all_prngs();
 
    if (argc < 4) {
       if ((argc > 2) && (!strcmp(argv[1], "-t"))) {

+ 6 - 1
demos/timing.c

@@ -902,7 +902,12 @@ static void time_dh(void)
    ulong64 t1, t2;
    unsigned long i, x, y;
    int           err;
-   static unsigned long sizes[] = {768/8, 1024/8, 1536/8, 2048/8, 3072/8, 4096/8, 6144/8, 8192/8, 100000};
+   static unsigned long sizes[] = {768/8, 1024/8, 1536/8, 2048/8,
+#ifndef TFM_DESC
+                                   3072/8, 4096/8, 6144/8, 8192/8,
+#endif
+                                   100000
+   };
 
    for (x = sizes[i=0]; x < 100000; x = sizes[++i]) {
        t2 = 0;

+ 1 - 1
src/misc/error_to_string.c

@@ -20,7 +20,7 @@ static const char * const err_2_str[] =
    "CRYPT_ERROR",
    "Non-fatal 'no-operation' requested.",
 
-   "Invalid keysize for block cipher.",
+   "Invalid key size.",
    "Invalid number of rounds for block cipher.",
    "Algorithm failed test vectors.",