... sync
authorVolker Birk <vb@pep-project.org>
Mon, 28 Jan 2019 16:50:43 +0100
branchsync
changeset 324903119f76ea35
parent 3247 7019b507538c
child 3250 32211c0ba931
...
src/message_api.c
src/message_api.h
test/genscripts.py
test/gensuitemaker.py
test/gentestshell.py
     1.1 --- a/src/message_api.c	Mon Jan 28 14:05:43 2019 +0100
     1.2 +++ b/src/message_api.c	Mon Jan 28 16:50:43 2019 +0100
     1.3 @@ -121,8 +121,8 @@
     1.4          return "have_no_key";
     1.5      case PEP_rating_unencrypted:
     1.6          return "unencrypted";
     1.7 -    case PEP_rating_unencrypted_for_some:
     1.8 -        return "unencrypted_for_some";
     1.9 +    case PEP_rating_unencrypted_for_some: // don't use this any more
    1.10 +        return "undefined";
    1.11      case PEP_rating_unreliable:
    1.12          return "unreliable";
    1.13      case PEP_rating_reliable:
    1.14 @@ -1279,15 +1279,7 @@
    1.15          if (_rating_ <= PEP_rating_mistrust)
    1.16              return _rating_;
    1.17              
    1.18 -        if (_rating_ == PEP_rating_unencrypted)
    1.19 -        {
    1.20 -            if (rating > PEP_rating_unencrypted_for_some)
    1.21 -                rating = worst_rating(rating, PEP_rating_unencrypted_for_some);
    1.22 -        }
    1.23 -        else
    1.24 -        {
    1.25 -            rating = worst_rating(rating, _rating_);
    1.26 -        }
    1.27 +        rating = worst_rating(rating, _rating_);
    1.28      }
    1.29  
    1.30      return rating;
    1.31 @@ -4566,7 +4558,7 @@
    1.32      if (strcmp(rating, "unencrypted") == 0)
    1.33          return PEP_rating_unencrypted;
    1.34      if (strcmp(rating, "unencrypted_for_some") == 0)
    1.35 -        return PEP_rating_unencrypted_for_some;
    1.36 +        return PEP_rating_undefined; // don't use this any more
    1.37      if (strcmp(rating, "unreliable") == 0)
    1.38          return PEP_rating_unreliable;
    1.39      if (strcmp(rating, "reliable") == 0)
    1.40 @@ -4716,8 +4708,8 @@
    1.41  
    1.42  DYNAMIC_API PEP_STATUS get_key_rating_for_user(
    1.43          PEP_SESSION session,
    1.44 -        char *user_id,
    1.45 -        char *fpr,
    1.46 +        const char *user_id,
    1.47 +        const char *fpr,
    1.48          PEP_rating *rating
    1.49      )
    1.50  {
     2.1 --- a/src/message_api.h	Mon Jan 28 14:05:43 2019 +0100
     2.2 +++ b/src/message_api.h	Mon Jan 28 16:50:43 2019 +0100
     2.3 @@ -236,7 +236,7 @@
     2.4      PEP_rating_cannot_decrypt,
     2.5      PEP_rating_have_no_key,
     2.6      PEP_rating_unencrypted,
     2.7 -    PEP_rating_unencrypted_for_some,
     2.8 +    PEP_rating_unencrypted_for_some, // don't use this any more
     2.9      PEP_rating_unreliable,
    2.10      PEP_rating_reliable,
    2.11      PEP_rating_trusted,
    2.12 @@ -602,8 +602,8 @@
    2.13  
    2.14  DYNAMIC_API PEP_STATUS get_key_rating_for_user(
    2.15          PEP_SESSION session,
    2.16 -        char *user_id,
    2.17 -        char *fpr,
    2.18 +        const char *user_id,
    2.19 +        const char *fpr,
    2.20          PEP_rating *rating
    2.21      );
    2.22  
     3.1 --- a/test/genscripts.py	Mon Jan 28 14:05:43 2019 +0100
     3.2 +++ b/test/genscripts.py	Mon Jan 28 16:50:43 2019 +0100
     3.3 @@ -1,3 +1,5 @@
     3.4 +#! /usr/bin/env python3
     3.5 +
     3.6  # This file is under GNU General Public License 3.0
     3.7  # see LICENSE.txt
     3.8  
     3.9 @@ -24,4 +26,4 @@
    3.10              outfile.write(output)
    3.11              os.chmod(suite, 
    3.12                       (stat.S_IRWXU | stat.S_IRGRP | stat.S_IROTH | stat.S_IXGRP | stat.S_IXOTH))
    3.13 -            outfile.close()
    3.14 \ No newline at end of file
    3.15 +            outfile.close()
     4.1 --- a/test/gensuitemaker.py	Mon Jan 28 14:05:43 2019 +0100
     4.2 +++ b/test/gensuitemaker.py	Mon Jan 28 16:50:43 2019 +0100
     4.3 @@ -1,5 +1,8 @@
     4.4 +#! /usr/bin/env python3
     4.5 +
     4.6  # This file is under GNU General Public License 3.0
     4.7  # see LICENSE.txt
     4.8 +
     4.9  import argparse
    4.10  from os import listdir, getcwd
    4.11  from os.path import isfile, join
     5.1 --- a/test/gentestshell.py	Mon Jan 28 14:05:43 2019 +0100
     5.2 +++ b/test/gentestshell.py	Mon Jan 28 16:50:43 2019 +0100
     5.3 @@ -1,3 +1,5 @@
     5.4 +#! /usr/bin/env python3
     5.5 +
     5.6  import argparse
     5.7  import os
     5.8  import subprocess