Browse Source

...

generate_api
Volker Birk 3 years ago
parent
commit
67a831783c
5 changed files with 17 additions and 18 deletions
  1. +6
    -14
      src/message_api.c
  2. +3
    -3
      src/message_api.h
  3. +3
    -1
      test/genscripts.py
  4. +3
    -0
      test/gensuitemaker.py
  5. +2
    -0
      test/gentestshell.py

+ 6
- 14
src/message_api.c View File

@ -121,8 +121,8 @@ static const char * rating_to_string(PEP_rating rating)
return "have_no_key";
case PEP_rating_unencrypted:
return "unencrypted";
case PEP_rating_unencrypted_for_some:
return "unencrypted_for_some";
case PEP_rating_unencrypted_for_some: // don't use this any more
return "undefined";
case PEP_rating_unreliable:
return "unreliable";
case PEP_rating_reliable:
@ -1279,15 +1279,7 @@ static PEP_rating keylist_rating(PEP_SESSION session, stringlist_t *keylist, cha
if (_rating_ <= PEP_rating_mistrust)
return _rating_;
if (_rating_ == PEP_rating_unencrypted)
{
if (rating > PEP_rating_unencrypted_for_some)
rating = worst_rating(rating, PEP_rating_unencrypted_for_some);
}
else
{
rating = worst_rating(rating, _rating_);
}
rating = worst_rating(rating, _rating_);
}
return rating;
@ -4566,7 +4558,7 @@ static PEP_rating string_to_rating(const char * rating)
if (strcmp(rating, "unencrypted") == 0)
return PEP_rating_unencrypted;
if (strcmp(rating, "unencrypted_for_some") == 0)
return PEP_rating_unencrypted_for_some;
return PEP_rating_undefined; // don't use this any more
if (strcmp(rating, "unreliable") == 0)
return PEP_rating_unreliable;
if (strcmp(rating, "reliable") == 0)
@ -4716,8 +4708,8 @@ pEp_error:
DYNAMIC_API PEP_STATUS get_key_rating_for_user(
PEP_SESSION session,
char *user_id,
char *fpr,
const char *user_id,
const char *fpr,
PEP_rating *rating
)
{


+ 3
- 3
src/message_api.h View File

@ -236,7 +236,7 @@ typedef enum _PEP_rating {
PEP_rating_cannot_decrypt,
PEP_rating_have_no_key,
PEP_rating_unencrypted,
PEP_rating_unencrypted_for_some,
PEP_rating_unencrypted_for_some, // don't use this any more
PEP_rating_unreliable,
PEP_rating_reliable,
PEP_rating_trusted,
@ -602,8 +602,8 @@ DYNAMIC_API PEP_STATUS re_evaluate_message_rating(
DYNAMIC_API PEP_STATUS get_key_rating_for_user(
PEP_SESSION session,
char *user_id,
char *fpr,
const char *user_id,
const char *fpr,
PEP_rating *rating
);


+ 3
- 1
test/genscripts.py View File

@ -1,3 +1,5 @@
#! /usr/bin/env python3
# This file is under GNU General Public License 3.0
# see LICENSE.txt
@ -24,4 +26,4 @@ for f in ls:
outfile.write(output)
os.chmod(suite,
(stat.S_IRWXU | stat.S_IRGRP | stat.S_IROTH | stat.S_IXGRP | stat.S_IXOTH))
outfile.close()
outfile.close()

+ 3
- 0
test/gensuitemaker.py View File

@ -1,5 +1,8 @@
#! /usr/bin/env python3
# This file is under GNU General Public License 3.0
# see LICENSE.txt
import argparse
from os import listdir, getcwd
from os.path import isfile, join


+ 2
- 0
test/gentestshell.py View File

@ -1,3 +1,5 @@
#! /usr/bin/env python3
import argparse
import os
import subprocess


Loading…
Cancel
Save