src/message_api.h
author Roker <roker@pep-project.org>
Mon, 19 Jun 2017 10:10:31 +0200
changeset 1869 9f79dec887af
parent 1858 600dc0395ec0
child 1981 6ec63a72921d
permissions -rw-r--r--
TAB to SPACES to make it einheitlich
vb@1513
     1
// This file is under GNU General Public License 3.0
vb@1513
     2
// see LICENSE.txt
vb@1513
     3
vb@39
     4
#pragma once
vb@39
     5
vb@102
     6
#include "pEpEngine.h"
vb@102
     7
#include "keymanagement.h"
vb@101
     8
#include "message.h"
vb@259
     9
#include "cryptotech.h"
vb@101
    10
vb@37
    11
#ifdef __cplusplus
vb@37
    12
extern "C" {
vb@37
    13
#endif
vb@37
    14
vb@39
    15
Edouard@734
    16
bool import_attached_keys(
Edouard@728
    17
        PEP_SESSION session, 
Edouard@728
    18
        const message *msg,
Edouard@728
    19
        identity_list **private_idents
Edouard@728
    20
    );
roker@1869
    21
vb@236
    22
void attach_own_key(PEP_SESSION session, message *msg);
roker@1869
    23
vb@258
    24
PEP_cryptotech determine_encryption_format(message *msg);
roker@1869
    25
vb@952
    26
void add_opt_field(message *msg, const char *name, const char *value);
Edouard@736
    27
vb@939
    28
typedef enum _PEP_encrypt_flags {
krista@1639
    29
    // "default" means whatever the default behaviour for the function is.
krista@1639
    30
    PEP_encrypt_flag_default = 0x0,
markus@1633
    31
    PEP_encrypt_flag_force_encryption = 0x1,
markus@1633
    32
markus@1633
    33
    // This flag is for special use cases and should not be used
markus@1633
    34
    // by normal pEp clients!
krista@1640
    35
    PEP_encrypt_flag_force_unsigned = 0x2,
krista@1640
    36
    PEP_encrypt_flag_force_no_attached_key = 0x4
vb@939
    37
} PEP_encrypt_flags; 
vb@939
    38
vb@939
    39
typedef unsigned int PEP_encrypt_flags_t;
vb@235
    40
roker@1869
    41
vb@39
    42
// encrypt_message() - encrypt message in memory
vb@39
    43
//
vb@39
    44
//  parameters:
vb@48
    45
//      session (in)        session handle
vb@48
    46
//      src (in)            message to encrypt
vb@48
    47
//      extra (in)          extra keys for encryption
vb@83
    48
//      dst (out)           pointer to new encrypted message or NULL on failure
vb@84
    49
//      enc_format (in)     encrypted format
vb@939
    50
//      flags (in)          flags to set special encryption features
vb@39
    51
//
vb@39
    52
//  return value:
vb@48
    53
//      PEP_STATUS_OK                   on success
roker@1869
    54
//      PEP_KEY_NOT_FOUND               at least one of the receipient keys
edouard@1854
    55
//                                      could not be found
edouard@1854
    56
//      PEP_KEY_HAS_AMBIG_NAME          at least one of the receipient keys has
edouard@1854
    57
//                                      an ambiguous name
roker@1869
    58
//      PEP_GET_KEY_FAILED              cannot retrieve key
edouard@1854
    59
//      PEP_UNENCRYPTED                 no recipients with usable key, 
edouard@1854
    60
//                                      message is left unencrypted,
edouard@1854
    61
//                                      and key is attached to it
vb@83
    62
//
roker@1869
    63
//  caveat:
roker@1869
    64
//      the ownershop of src remains with the caller
roker@1869
    65
//      the ownership of dst goes to the caller
vb@44
    66
DYNAMIC_API PEP_STATUS encrypt_message(
vb@37
    67
        PEP_SESSION session,
vb@113
    68
        message *src,
vb@37
    69
        stringlist_t *extra,
vb@38
    70
        message **dst,
vb@939
    71
        PEP_enc_format enc_format,
vb@939
    72
        PEP_encrypt_flags_t flags
vb@37
    73
    );
vb@37
    74
roker@1869
    75
krista@1034
    76
// encrypt_message_for_self() - encrypt message in memory for user's identity only,
krista@1034
    77
//                              ignoring recipients and other identities from
krista@1034
    78
//                              the message
krista@994
    79
//  parameters:
krista@994
    80
//      session (in)        session handle
krista@995
    81
//      target_id (in)      self identity this message should be encrypted for
krista@994
    82
//      src (in)            message to encrypt
krista@994
    83
//      dst (out)           pointer to new encrypted message or NULL on failure
krista@994
    84
//      enc_format (in)     encrypted format
markus@1634
    85
//      flags (in)          flags to set special encryption features
krista@994
    86
//
krista@994
    87
//  return value:       (FIXME: This may not be correct or complete)
roker@1869
    88
//      PEP_STATUS_OK            on success
roker@1869
    89
//      PEP_KEY_NOT_FOUND        at least one of the receipient keys
roker@1869
    90
//                               could not be found
roker@1869
    91
//      PEP_KEY_HAS_AMBIG_NAME   at least one of the receipient keys has
roker@1869
    92
//                               an ambiguous name
roker@1869
    93
//      PEP_GET_KEY_FAILED       cannot retrieve key
krista@994
    94
//
roker@1869
    95
//  caveat:
roker@1869
    96
//      the ownership of src remains with the caller
krista@994
    97
//      the ownership of target_id remains w/ caller            
roker@1869
    98
//      the ownership of dst goes to the caller
krista@995
    99
//      message is NOT encrypted for identities other than the target_id (and then,
roker@1869
   100
//      only if the target_id refers to self!)
krista@995
   101
DYNAMIC_API PEP_STATUS encrypt_message_for_self(
krista@994
   102
        PEP_SESSION session,
krista@994
   103
        pEp_identity* target_id,
krista@994
   104
        message *src,
krista@994
   105
        message **dst,
markus@1633
   106
        PEP_enc_format enc_format,
markus@1633
   107
        PEP_encrypt_flags_t flags
krista@994
   108
    );
vb@39
   109
roker@1869
   110
krista@1325
   111
// MIME_encrypt_message() - encrypt a MIME message, with MIME output
krista@1325
   112
//
krista@1325
   113
//  parameters:
krista@1325
   114
//      session (in)            session handle
krista@1325
   115
//      mimetext (in)           MIME encoded text to encrypt
krista@1331
   116
//      size (in)               size of input mime text
krista@1325
   117
//      extra (in)              extra keys for encryption
krista@1325
   118
//      mime_ciphertext (out)   encrypted, encoded message
krista@1325
   119
//      enc_format (in)         encrypted format
krista@1325
   120
//      flags (in)              flags to set special encryption features
krista@1325
   121
//
krista@1325
   122
//  return value:
krista@1325
   123
//      PEP_STATUS_OK           if everything worked
krista@1325
   124
//      PEP_BUFFER_TOO_SMALL    if encoded message size is too big to handle
krista@1325
   125
//      PEP_CANNOT_CREATE_TEMP_FILE
krista@1325
   126
//                              if there are issues with temp files; in
krista@1325
   127
//                              this case errno will contain the underlying
krista@1325
   128
//                              error
krista@1325
   129
//      PEP_OUT_OF_MEMORY       if not enough memory could be allocated
krista@1325
   130
//
krista@1325
   131
//  caveat:
krista@1325
   132
//      the encrypted, encoded mime text will go to the ownership of the caller; mimetext
krista@1325
   133
//      will remain in the ownership of the caller
krista@1325
   134
DYNAMIC_API PEP_STATUS MIME_encrypt_message(
krista@1325
   135
    PEP_SESSION session,
krista@1325
   136
    const char *mimetext,
krista@1325
   137
    size_t size,
krista@1325
   138
    stringlist_t* extra,
krista@1325
   139
    char** mime_ciphertext,
krista@1325
   140
    PEP_enc_format enc_format,
krista@1325
   141
    PEP_encrypt_flags_t flags
krista@1325
   142
);
krista@1325
   143
roker@1869
   144
krista@1641
   145
// MIME_encrypt_message_for_self() - encrypt MIME message for user's identity only,
krista@1641
   146
//                              ignoring recipients and other identities from
krista@1641
   147
//                              the message, with MIME output
krista@1641
   148
//  parameters:
krista@1641
   149
//      session (in)            session handle
roker@1869
   150
//      target_id (in)          self identity this message should be encrypted for
krista@1641
   151
//      mimetext (in)           MIME encoded text to encrypt
krista@1641
   152
//      size (in)               size of input mime text
krista@1641
   153
//      mime_ciphertext (out)   encrypted, encoded message
krista@1641
   154
//      enc_format (in)         encrypted format
krista@1641
   155
//      flags (in)              flags to set special encryption features
krista@1641
   156
//
krista@1641
   157
//  return value:
krista@1641
   158
//      PEP_STATUS_OK           if everything worked
krista@1641
   159
//      PEP_BUFFER_TOO_SMALL    if encoded message size is too big to handle
krista@1641
   160
//      PEP_CANNOT_CREATE_TEMP_FILE
krista@1641
   161
//                              if there are issues with temp files; in
krista@1641
   162
//                              this case errno will contain the underlying
krista@1641
   163
//                              error
krista@1641
   164
//      PEP_OUT_OF_MEMORY       if not enough memory could be allocated
krista@1641
   165
//
krista@1641
   166
//  caveat:
krista@1641
   167
//      the encrypted, encoded mime text will go to the ownership of the caller; mimetext
krista@1641
   168
//      will remain in the ownership of the caller
krista@1641
   169
DYNAMIC_API PEP_STATUS MIME_encrypt_message_for_self(
krista@1641
   170
    PEP_SESSION session,
krista@1641
   171
    pEp_identity* target_id,
krista@1641
   172
    const char *mimetext,
krista@1641
   173
    size_t size,
krista@1641
   174
    char** mime_ciphertext,
krista@1641
   175
    PEP_enc_format enc_format,
krista@1641
   176
    PEP_encrypt_flags_t flags
krista@1641
   177
);
krista@1641
   178
krista@1641
   179
vb@1004
   180
typedef enum _PEP_rating {
vb@237
   181
    PEP_rating_undefined = 0,
vb@256
   182
    PEP_rating_cannot_decrypt,
vb@267
   183
    PEP_rating_have_no_key,
vb@237
   184
    PEP_rating_unencrypted,
vb@486
   185
    PEP_rating_unencrypted_for_some,
vb@237
   186
    PEP_rating_unreliable,
vb@237
   187
    PEP_rating_reliable,
vb@237
   188
    PEP_rating_trusted,
vb@237
   189
    PEP_rating_trusted_and_anonymized,
vb@237
   190
    PEP_rating_fully_anonymous,   
vb@189
   191
Edouard@442
   192
    PEP_rating_mistrust = -1,
Edouard@442
   193
    PEP_rating_b0rken = -2,
vb@436
   194
    PEP_rating_under_attack = -3
vb@1004
   195
} PEP_rating;
vb@1004
   196
vb@1004
   197
typedef enum _PEP_color {
vb@1004
   198
    PEP_color_no_color = 0,
vb@1004
   199
    PEP_color_yellow,
vb@1004
   200
    PEP_color_green,
vb@1004
   201
    PEP_color_red = -1,
vb@232
   202
} PEP_color;
vb@189
   203
roker@1869
   204
vb@1007
   205
// color_from_rating - calculate color from rating
vb@1007
   206
//
vb@1007
   207
//  parameters:
vb@1007
   208
//      rating (in)         rating
vb@1007
   209
//
vb@1007
   210
//  return value:           color representing that rating
vb@1004
   211
DYNAMIC_API PEP_color color_from_rating(PEP_rating rating);
vb@1004
   212
Edouard@728
   213
typedef enum _PEP_decrypt_flags {
edouard@1355
   214
    PEP_decrypt_flag_own_private_key = 0x1,
edouard@1369
   215
    PEP_decrypt_flag_consume = 0x2,
edouard@1369
   216
    PEP_decrypt_flag_ignore = 0x4
Edouard@728
   217
} PEP_decrypt_flags; 
Edouard@728
   218
vb@939
   219
typedef unsigned int PEP_decrypt_flags_t;
Edouard@728
   220
roker@1869
   221
vb@251
   222
// decrypt_message() - decrypt message in memory
vb@251
   223
//
vb@251
   224
//  parameters:
vb@251
   225
//      session (in)        session handle
vb@251
   226
//      src (in)            message to decrypt
vb@251
   227
//      dst (out)           pointer to new decrypted message or NULL on failure
vb@251
   228
//      keylist (out)       stringlist with keyids
roker@1218
   229
//      rating (out)        rating for the message
vb@939
   230
//      flags (out)         flags to signal special decryption features
vb@251
   231
//
vb@251
   232
//  return value:
edouard@1858
   233
//      error status 
edouard@1858
   234
//      or PEP_DECRYPTED if message decrypted but not verified
edouard@1858
   235
//      or PEP_STATUS_OK on success
vb@251
   236
//
roker@1869
   237
// caveat:
roker@1869
   238
//      the ownership of src remains with the caller
roker@1869
   239
//      the ownership of dst goes to the caller
roker@1869
   240
//      the ownership of keylist goes to the caller
roker@1869
   241
//      if src is unencrypted this function returns PEP_UNENCRYPTED and sets
roker@1869
   242
//      dst to NULL
vb@251
   243
DYNAMIC_API PEP_STATUS decrypt_message(
vb@251
   244
        PEP_SESSION session,
vb@251
   245
        message *src,
vb@251
   246
        message **dst,
vb@251
   247
        stringlist_t **keylist,
vb@1004
   248
        PEP_rating *rating,
vb@939
   249
        PEP_decrypt_flags_t *flags
Edouard@728
   250
);
vb@251
   251
roker@1869
   252
krista@1325
   253
// MIME_decrypt_message() - decrypt a MIME message, with MIME output
krista@1325
   254
//
krista@1325
   255
//  parameters:
krista@1325
   256
//      session (in)            session handle
krista@1325
   257
//      mimetext (in)           MIME encoded text to decrypt
krista@1331
   258
//      size (in)               size of mime text to decode (in order to decrypt)
krista@1325
   259
//      mime_plaintext (out)    decrypted, encoded message
krista@1325
   260
//      keylist (out)           stringlist with keyids
krista@1325
   261
//      rating (out)            rating for the message
krista@1325
   262
//      flags (out)             flags to signal special decryption features
krista@1325
   263
//
krista@1325
   264
//  return value:
krista@1644
   265
//      decrypt status          if everything worked with MIME encode/decode, 
krista@1644
   266
//                              the status of the decryption is returned 
krista@1644
   267
//                              (PEP_STATUS_OK or decryption error status)
krista@1325
   268
//      PEP_BUFFER_TOO_SMALL    if encoded message size is too big to handle
krista@1325
   269
//      PEP_CANNOT_CREATE_TEMP_FILE
krista@1325
   270
//                              if there are issues with temp files; in
krista@1325
   271
//                              this case errno will contain the underlying
krista@1325
   272
//                              error
krista@1325
   273
//      PEP_OUT_OF_MEMORY       if not enough memory could be allocated
krista@1325
   274
//
krista@1325
   275
//  caveat:
krista@1325
   276
//      the decrypted, encoded mime text will go to the ownership of the caller; mimetext
krista@1325
   277
//      will remain in the ownership of the caller
krista@1325
   278
DYNAMIC_API PEP_STATUS MIME_decrypt_message(
krista@1325
   279
    PEP_SESSION session,
krista@1325
   280
    const char *mimetext,
krista@1325
   281
    size_t size,
krista@1325
   282
    char** mime_plaintext,
krista@1325
   283
    stringlist_t **keylist,
krista@1325
   284
    PEP_rating *rating,
krista@1325
   285
    PEP_decrypt_flags_t *flags
krista@1325
   286
);
krista@1325
   287
krista@1325
   288
Edouard@728
   289
// own_message_private_key_details() - details on own key in own message
Edouard@728
   290
//
Edouard@728
   291
//  parameters:
Edouard@728
   292
//      session (in)        session handle
Edouard@728
   293
//      msg (in)            message to decrypt
Edouard@728
   294
//      ident (out)         identity containing uid, address and fpr of key
Edouard@728
   295
//
Edouard@728
   296
//  note:
Edouard@728
   297
//      In order to obtain details about key to be possibly imported
Edouard@728
   298
//      as a replacement of key currently used as own identity, 
Edouard@728
   299
//      application passes message that have been previously flagged by 
Edouard@728
   300
//      decrypt_message() as own message containing own key to this function
Edouard@728
   301
//
Edouard@728
   302
//  return value:
Edouard@728
   303
//      error status or PEP_STATUS_OK on success
Edouard@728
   304
//
roker@1869
   305
//  caveat:
roker@1869
   306
//      the ownership of msg remains with the caller
roker@1869
   307
//      the ownership of ident goes to the caller
roker@1869
   308
//      msg MUST be encrypted so that this function can check own signature
Edouard@728
   309
DYNAMIC_API PEP_STATUS own_message_private_key_details(
Edouard@728
   310
        PEP_SESSION session,
Edouard@728
   311
        message *msg,
Edouard@728
   312
        pEp_identity **ident 
Edouard@728
   313
);
vb@251
   314
roker@1869
   315
vb@1009
   316
// outgoing_message_rating() - get rating for an outgoing message
vb@189
   317
//
vb@189
   318
//  parameters:
vb@189
   319
//      session (in)        session handle
vb@1009
   320
//      msg (in)            message to get the rating for
vb@1009
   321
//      rating (out)        rating for the message
vb@189
   322
//
vb@189
   323
//  return value:
vb@189
   324
//      error status or PEP_STATUS_OK on success
vb@190
   325
//
vb@190
   326
//  caveat:
vb@190
   327
//      msg->from must point to a valid pEp_identity
vb@251
   328
//      msg->dir must be PEP_dir_outgoing
vb@251
   329
//      the ownership of msg remains with the caller
vb@1009
   330
DYNAMIC_API PEP_STATUS outgoing_message_rating(
vb@189
   331
        PEP_SESSION session,
vb@190
   332
        message *msg,
vb@1004
   333
        PEP_rating *rating
vb@189
   334
    );
vb@189
   335
vb@239
   336
vb@1009
   337
// identity_rating() - get rating for a single identity
vb@239
   338
//
vb@239
   339
//  parameters:
vb@239
   340
//      session (in)        session handle
vb@1009
   341
//      ident (in)          identity to get the rating for
vb@1009
   342
//      rating (out)        rating for the identity
vb@239
   343
//
vb@239
   344
//  return value:
vb@239
   345
//      error status or PEP_STATUS_OK on success
vb@251
   346
//
vb@251
   347
//  caveat:
vb@251
   348
//      the ownership of ident remains with the caller
vb@1009
   349
DYNAMIC_API PEP_STATUS identity_rating(
vb@239
   350
        PEP_SESSION session,
vb@239
   351
        pEp_identity *ident,
vb@1004
   352
        PEP_rating *rating
vb@239
   353
    );
vb@239
   354
vb@239
   355
vb@507
   356
// get_binary_path() - retrieve path of cryptotech binary if available
vb@507
   357
//
vb@507
   358
//  parameters:
vb@507
   359
//      tech (in)           cryptotech to get the binary for
vb@507
   360
//      path (out)          path to cryptotech binary or NULL if not available
roker@540
   361
//                          **path is owned by the library, do not change it!
vb@507
   362
DYNAMIC_API PEP_STATUS get_binary_path(PEP_cryptotech tech, const char **path);
vb@507
   363
roker@1869
   364
krista@1307
   365
// get_trustwords() - get full trustwords string for a *pair* of identities
krista@1307
   366
//
krista@1307
   367
//    parameters:
krista@1307
   368
//        session (in)        session handle
krista@1307
   369
//        id1 (in)            identity of first party in communication - fpr can't be NULL  
krista@1307
   370
//        id2 (in)            identity of second party in communication - fpr can't be NULL
krista@1307
   371
//        lang (in)           C string with ISO 639-1 language code
krista@1307
   372
//        words (out)         pointer to C string with all trustwords UTF-8 encoded,
krista@1307
   373
//                            separated by a blank each
krista@1307
   374
//                            NULL if language is not supported or trustword
krista@1307
   375
//                            wordlist is damaged or unavailable
krista@1307
   376
//        wsize (out)         length of full trustwords string
krista@1307
   377
//        full (in)           if true, generate ALL trustwords for these identities.
krista@1307
   378
//                            else, generate a fixed-size subset. (TODO: fixed-minimum-entropy
krista@1307
   379
//                            subset in next version)
krista@1307
   380
//
krista@1307
   381
//    return value:
krista@1307
   382
//        PEP_STATUS_OK            trustwords retrieved
krista@1307
   383
//        PEP_OUT_OF_MEMORY        out of memory
krista@1307
   384
//        PEP_TRUSTWORD_NOT_FOUND  at least one trustword not found
krista@1307
   385
//
krista@1307
   386
//    caveat:
krista@1307
   387
//        the word pointer goes to the ownership of the caller
krista@1307
   388
//        the caller is responsible to free() it (on Windoze use pEp_free())
krista@1307
   389
//
krista@1307
   390
DYNAMIC_API PEP_STATUS get_trustwords(
roker@1509
   391
    PEP_SESSION session, const pEp_identity* id1, const pEp_identity* id2,
krista@1307
   392
    const char* lang, char **words, size_t *wsize, bool full
krista@1307
   393
);
vb@507
   394
roker@1869
   395
edouard@1553
   396
// get_message_trustwords() - get full trustwords string for message sender and reciever identities 
edouard@1553
   397
//
edouard@1553
   398
//    parameters:
edouard@1553
   399
//        session (in)        session handle
edouard@1553
   400
//        msg (in)            message to get sender identity from
edouard@1553
   401
//        keylist (in)        NULL if message to be decrypted,
edouard@1553
   402
//                            keylist returned by decrypt_message() otherwise
edouard@1553
   403
//        received_by (in)    identity for account receiving message can't be NULL
edouard@1553
   404
//        lang (in)           C string with ISO 639-1 language code
edouard@1553
   405
//        words (out)         pointer to C string with all trustwords UTF-8 encoded,
edouard@1553
   406
//                            separated by a blank each
edouard@1553
   407
//                            NULL if language is not supported or trustword
edouard@1553
   408
//                            wordlist is damaged or unavailable
edouard@1553
   409
//        full (in)           if true, generate ALL trustwords for these identities.
edouard@1553
   410
//                            else, generate a fixed-size subset. (TODO: fixed-minimum-entropy
edouard@1553
   411
//                            subset in next version)
edouard@1553
   412
//
edouard@1553
   413
//    return value:
edouard@1553
   414
//        PEP_STATUS_OK            trustwords retrieved
edouard@1553
   415
//        PEP_OUT_OF_MEMORY        out of memory
edouard@1553
   416
//        PEP_TRUSTWORD_NOT_FOUND  at least one trustword not found
edouard@1553
   417
//        error status of decrypt_message() if decryption fails.
edouard@1553
   418
//
edouard@1553
   419
//    caveat:
edouard@1553
   420
//        the word pointer goes to the ownership of the caller
edouard@1553
   421
//        the caller is responsible to free() it (on Windoze use pEp_free())
edouard@1553
   422
//
edouard@1553
   423
DYNAMIC_API PEP_STATUS get_message_trustwords(
edouard@1553
   424
    PEP_SESSION session, 
edouard@1553
   425
    message *msg,
edouard@1553
   426
    stringlist_t *keylist,
edouard@1553
   427
    pEp_identity* received_by,
edouard@1553
   428
    const char* lang, char **words, bool full
edouard@1553
   429
);
edouard@1553
   430
edouard@1815
   431
// re_evaluate_message_rating() - re-evaluate already decrypted message rating
edouard@1815
   432
//
edouard@1815
   433
//  parameters:
edouard@1815
   434
//      session (in)            session handle
edouard@1815
   435
//      msg (in)                message to get the rating for
edouard@1815
   436
//      x_keylist (in)          decrypted message recipients keys fpr
edouard@1815
   437
//      x_enc_status (in)       original rating for the decrypted message
edouard@1815
   438
//      rating (out)            rating for the message
edouard@1815
   439
//
edouard@1815
   440
//  return value:
edouard@1815
   441
//      PEP_ILLEGAL_VALUE       if decrypted message doesn't contain 
edouard@1815
   442
//                              X-EncStatus optional field and x_enc_status is 
edouard@1815
   443
//                              pEp_rating_udefined
edouard@1815
   444
//                              or if decrypted message doesn't contain 
edouard@1815
   445
//                              X-Keylist optional field and x_keylist is NULL
edouard@1815
   446
//      PEP_OUT_OF_MEMORY       if not enough memory could be allocated
edouard@1815
   447
//
edouard@1815
   448
//  caveat:
edouard@1815
   449
//      msg->from must point to a valid pEp_identity
edouard@1815
   450
//      the ownership of msg remains with the caller
edouard@1815
   451
//	    the ownership of x_keylist remains with to the caller
edouard@1815
   452
edouard@1815
   453
DYNAMIC_API PEP_STATUS re_evaluate_message_rating(
edouard@1815
   454
    PEP_SESSION session,
edouard@1815
   455
    message *msg,
edouard@1815
   456
    stringlist_t *x_keylist,
edouard@1815
   457
    PEP_rating x_enc_status,
edouard@1815
   458
    PEP_rating *rating
edouard@1815
   459
);
vb@37
   460
#ifdef __cplusplus
vb@37
   461
}
vb@37
   462
#endif