11 #include "dynamic_api.h"
12 #include "stringlist.h"
13 #include "stringpair.h"
14 #include "timestamp.h"
16 #define PEP_VERSION "1.0" // protocol version
18 #define PEP_OWN_USERID "pEp_own_userId"
23 // Unicode data has to be normalized to NFC before calling
24 // UTF-8 strings are UTF-8 encoded C strings (zero terminated)
28 typedef struct _pEpSession * PEP_SESSION;
33 PEP_INIT_CANNOT_LOAD_GPGME = 0x0110,
34 PEP_INIT_GPGME_INIT_FAILED = 0x0111,
35 PEP_INIT_NO_GPG_HOME = 0x0112,
36 PEP_INIT_NETPGP_INIT_FAILED = 0x0113,
38 PEP_INIT_SQLITE3_WITHOUT_MUTEX = 0x0120,
39 PEP_INIT_CANNOT_OPEN_DB = 0x0121,
40 PEP_INIT_CANNOT_OPEN_SYSTEM_DB = 0x0122,
42 PEP_KEY_NOT_FOUND = 0x0201,
43 PEP_KEY_HAS_AMBIG_NAME = 0x0202,
44 PEP_GET_KEY_FAILED = 0x0203,
46 PEP_CANNOT_FIND_IDENTITY = 0x0301,
47 PEP_CANNOT_SET_PERSON = 0x0381,
48 PEP_CANNOT_SET_PGP_KEYPAIR = 0x0382,
49 PEP_CANNOT_SET_IDENTITY = 0x0383,
50 PEP_CANNOT_SET_TRUST = 0x0384,
51 PEP_KEY_BLACKLISTED = 0x0385,
53 PEP_UNENCRYPTED = 0x0400,
54 PEP_VERIFIED = 0x0401,
55 PEP_DECRYPTED = 0x0402,
56 PEP_DECRYPTED_AND_VERIFIED = 0x0403,
57 PEP_DECRYPT_WRONG_FORMAT = 0x0404,
58 PEP_DECRYPT_NO_KEY = 0x0405,
59 PEP_DECRYPT_SIGNATURE_DOES_NOT_MATCH = 0x0406,
60 PEP_VERIFY_NO_KEY = 0x0407,
61 PEP_VERIFIED_AND_TRUSTED = 0x0408,
62 PEP_CANNOT_DECRYPT_UNKNOWN = 0x04ff,
64 PEP_TRUSTWORD_NOT_FOUND = 0x0501,
66 PEP_CANNOT_CREATE_KEY = 0x0601,
67 PEP_CANNOT_SEND_KEY = 0x0602,
69 PEP_PHRASE_NOT_FOUND = 0x0701,
71 PEP_SEND_FUNCTION_NOT_REGISTERED = 0x0801,
72 PEP_CONTRAINTS_VIOLATED = 0x0802,
73 PEP_CANNOT_ENCODE = 0x0803,
75 PEP_SYNC_NO_TRUSTWORDS_CALLBACK = 0x0901,
77 PEP_COMMIT_FAILED = 0xff01,
79 PEP_CANNOT_CREATE_TEMP_FILE = -5,
80 PEP_ILLEGAL_VALUE = -4,
81 PEP_BUFFER_TOO_SMALL = -3,
82 PEP_OUT_OF_MEMORY = -2,
83 PEP_UNKNOWN_ERROR = -1
87 // INIT_STATUS init() - initialize pEpEngine for a thread
90 // session (out) init() allocates session memory and returns a pointer
94 // PEP_STATUS_OK = 0 if init() succeeds
95 // PEP_INIT_SQLITE3_WITHOUT_MUTEX if SQLite3 was compiled with
96 // SQLITE_THREADSAFE 0
97 // PEP_INIT_CANNOT_LOAD_GPGME if libgpgme.dll cannot be found
98 // PEP_INIT_GPGME_INIT_FAILED if GPGME init fails
99 // PEP_INIT_CANNOT_OPEN_DB if user's management db cannot be
101 // PEP_INIT_CANNOT_OPEN_SYSTEM_DB if system's management db cannot be
105 // the pointer is valid only if the return value is PEP_STATUS_OK
106 // in other case a NULL pointer will be returned; a valid handle must
107 // be released using release() when it's no longer needed
109 // the caller has to guarantee that the first call to this function
110 // will succeed before further calls can be done
112 DYNAMIC_API PEP_STATUS init(PEP_SESSION *session);
115 // void release() - release thread session handle
118 // session (in) session handle to release
121 // the last release() can be called only when all other release() calls
124 DYNAMIC_API void release(PEP_SESSION session);
127 // config_passive_mode() - enable passive mode
130 // session (in) session handle
131 // enable (in) flag if enabled or disabled
133 DYNAMIC_API void config_passive_mode(PEP_SESSION session, bool enable);
136 // config_unencrypted_subject() - disable subject encryption
139 // session (in) session handle
140 // enable (in) flag if enabled or disabled
142 DYNAMIC_API void config_unencrypted_subject(PEP_SESSION session, bool enable);
145 // config_use_only_own_private_keys() - enable passive mode
148 // session (in) session handle
149 // enable (in) flag if enabled or disabled
151 DYNAMIC_API void config_use_only_own_private_keys(PEP_SESSION session, bool enable);
154 // decrypt_and_verify() - decrypt and/or verify a message
157 // session (in) session handle
158 // ctext (in) cipher text to decrypt and/or verify
159 // csize (in) size of cipher text
160 // ptext (out) pointer to internal buffer with plain text
161 // psize (out) size of plain text
162 // keylist (out) list of key ids which where used to encrypt
165 // PEP_UNENCRYPTED message was unencrypted and not signed
166 // PEP_VERIFIED message was unencrypted, signature matches
167 // PEP_DECRYPTED message is decrypted now, no signature
168 // PEP_DECRYPTED_AND_VERIFIED message is decrypted now and verified
169 // PEP_DECRYPT_WRONG_FORMAT message has wrong format to handle
170 // PEP_DECRYPT_NO_KEY key not available to decrypt and/or verify
171 // PEP_DECRYPT_SIGNATURE_DOES_NOT_MATCH wrong signature
174 // the ownerships of ptext as well as keylist are going to the caller
175 // the caller must use free() (or an Windoze pEp_free()) and
176 // free_stringlist() to free them
178 // if this function failes an error message may be the first element of
179 // keylist and the other elements may be the keys used for encryption
181 DYNAMIC_API PEP_STATUS decrypt_and_verify(
182 PEP_SESSION session, const char *ctext, size_t csize,
183 char **ptext, size_t *psize, stringlist_t **keylist
187 // verify_text() - verfy plain text with a digital signature
190 // session (in) session handle
191 // text (in) text to verify
192 // size (in) size of text
193 // signature (in) signature text
194 // sig_size (in) size of signature
195 // keylist (out) list of key ids which where used to encrypt or NULL on
199 // PEP_VERIFIED message was unencrypted, signature matches
200 // PEP_DECRYPT_NO_KEY key not available to decrypt and/or verify
201 // PEP_DECRYPT_SIGNATURE_DOES_NOT_MATCH wrong signature
203 DYNAMIC_API PEP_STATUS verify_text(
204 PEP_SESSION session, const char *text, size_t size,
205 const char *signature, size_t sig_size, stringlist_t **keylist
209 // encrypt_and_sign() - encrypt and sign a message
212 // session (in) session handle
213 // keylist (in) list of key ids to encrypt with as C strings
214 // ptext (in) plain text to decrypt and/or verify
215 // psize (in) size of plain text
216 // ctext (out) pointer to internal buffer with cipher text
217 // csize (out) size of cipher text
220 // PEP_STATUS_OK = 0 encryption and signing succeeded
221 // PEP_KEY_NOT_FOUND at least one of the receipient keys
222 // could not be found
223 // PEP_KEY_HAS_AMBIG_NAME at least one of the receipient keys has
225 // PEP_GET_KEY_FAILED cannot retrieve key
228 // the ownership of ctext is going to the caller
229 // the caller is responsible to free() it (on Windoze use pEp_free())
230 // the first key in keylist is being used to sign the message
231 // this implies there has to be a private key for that keypair
233 DYNAMIC_API PEP_STATUS encrypt_and_sign(
234 PEP_SESSION session, const stringlist_t *keylist, const char *ptext,
235 size_t psize, char **ctext, size_t *csize
239 // log_event() - log a user defined event defined by UTF-8 encoded strings into
243 // session (in) session handle
244 // title (in) C string with event name
245 // entity (in) C string with name of entity which is logging
246 // description (in) C string with long description for event or NULL if
248 // comment (in) C string with user defined comment or NULL if
252 // PEP_STATUS_OK log entry created
254 DYNAMIC_API PEP_STATUS log_event(
258 const char *description,
263 // trustword() - get the corresponding trustword for a 16 bit value
266 // session (in) session handle
267 // value (in) value to find a trustword for
268 // lang (in) C string with ISO 639-1 language code
269 // word (out) pointer to C string with trustword UTF-8 encoded
270 // NULL if language is not supported or trustword
271 // wordlist is damaged or unavailable
272 // wsize (out) length of trustword
275 // PEP_STATUS_OK trustword retrieved
276 // PEP_TRUSTWORD_NOT_FOUND trustword not found
279 // the word pointer goes to the ownership of the caller
280 // the caller is responsible to free() it (on Windoze use pEp_free())
282 DYNAMIC_API PEP_STATUS trustword(
283 PEP_SESSION session, uint16_t value, const char *lang,
284 char **word, size_t *wsize
288 // trustwords() - get trustwords for a string of hex values of a fingerprint
291 // session (in) session handle
292 // fingerprint (in) C string with hex values to find trustwords for
293 // lang (in) C string with ISO 639-1 language code
294 // words (out) pointer to C string with trustwords UTF-8 encoded,
295 // separated by a blank each
296 // NULL if language is not supported or trustword
297 // wordlist is damaged or unavailable
298 // wsize (out) length of trustwords string
299 // max_words (in) only generate a string with max_words;
300 // if max_words == 0 there is no such limit
303 // PEP_STATUS_OK trustwords retrieved
304 // PEP_OUT_OF_MEMORY out of memory
305 // PEP_TRUSTWORD_NOT_FOUND at least one trustword not found
308 // the word pointer goes to the ownership of the caller
309 // the caller is responsible to free() it (on Windoze use pEp_free())
311 // DON'T USE THIS FUNCTION FROM HIGH LEVEL LANGUAGES!
313 // Better implement a simple one in the adapter yourself using trustword(), and
314 // return a list of trustwords.
315 // This function is provided for being used by C and C++ programs only.
317 DYNAMIC_API PEP_STATUS trustwords(
318 PEP_SESSION session, const char *fingerprint, const char *lang,
319 char **words, size_t *wsize, int max_words
323 typedef enum _PEP_comm_type {
326 // range 0x01 to 0x09: no encryption, 0x0a to 0x0e: nothing reasonable
328 PEP_ct_no_encryption = 0x01, // generic
329 PEP_ct_no_encrypted_channel = 0x02,
330 PEP_ct_key_not_found = 0x03,
331 PEP_ct_key_expired = 0x04,
332 PEP_ct_key_revoked = 0x05,
333 PEP_ct_key_b0rken = 0x06,
334 PEP_ct_my_key_not_included = 0x09,
336 PEP_ct_security_by_obscurity = 0x0a,
337 PEP_ct_b0rken_crypto = 0x0b,
338 PEP_ct_key_too_short = 0x0c,
340 PEP_ct_compromized = 0x0e, // known compromized connection
341 PEP_ct_mistrusted = 0x0f, // known mistrusted key
343 // range 0x10 to 0x3f: unconfirmed encryption
345 PEP_ct_unconfirmed_encryption = 0x10, // generic
346 PEP_ct_OpenPGP_weak_unconfirmed = 0x11, // RSA 1024 is weak
348 PEP_ct_to_be_checked = 0x20, // generic
349 PEP_ct_SMIME_unconfirmed = 0x21,
350 PEP_ct_CMS_unconfirmed = 0x22,
352 PEP_ct_strong_but_unconfirmed = 0x30, // generic
353 PEP_ct_OpenPGP_unconfirmed = 0x38, // key at least 2048 bit RSA or EC
354 PEP_ct_OTR_unconfirmed = 0x3a,
356 // range 0x40 to 0x7f: unconfirmed encryption and anonymization
358 PEP_ct_unconfirmed_enc_anon = 0x40, // generic
359 PEP_ct_pEp_unconfirmed = 0x7f,
361 PEP_ct_confirmed = 0x80, // this bit decides if trust is confirmed
363 // range 0x81 to 0x8f: reserved
364 // range 0x90 to 0xbf: confirmed encryption
366 PEP_ct_confirmed_encryption = 0x90, // generic
367 PEP_ct_OpenPGP_weak = 0x91, // RSA 1024 is weak
369 PEP_ct_to_be_checked_confirmed = 0xa0, //generic
373 PEP_ct_strong_encryption = 0xb0, // generic
374 PEP_ct_OpenPGP = 0xb8, // key at least 2048 bit RSA or EC
377 // range 0xc0 to 0xff: confirmed encryption and anonymization
379 PEP_ct_confirmed_enc_anon = 0xc0, // generic
383 typedef enum _identity_flags {
384 PEP_idf_not_for_sync = 1, // don't use this identity for sync
385 PEP_idf_group = 2 // identity of group of persons
388 typedef struct _pEp_identity {
389 char *address; // C string with address UTF-8 encoded
390 char *fpr; // C string with fingerprint UTF-8 encoded
391 char *user_id; // C string with user ID UTF-8 encoded
392 char *username; // C string with user name UTF-8 encoded
393 PEP_comm_type comm_type; // type of communication with this ID
394 char lang[3]; // language of conversation
395 // ISO 639-1 ALPHA-2, last byte is 0
396 bool me; // if this is the local user herself/himself
397 unsigned int flags; // identity_flag1 | identity_flag2 | ...
400 typedef struct _identity_list {
402 struct _identity_list *next;
406 // new_identity() - allocate memory and set the string and size fields
409 // address (in) UTF-8 string or NULL
410 // fpr (in) UTF-8 string or NULL
411 // user_id (in) UTF-8 string or NULL
412 // username (in) UTF-8 string or NULL
415 // pEp_identity struct or NULL if out of memory
418 // the strings are copied; the original strings are still being owned by
421 DYNAMIC_API pEp_identity *new_identity(
422 const char *address, const char *fpr, const char *user_id,
427 // identity_dup() - allocate memory and duplicate
430 // src (in) identity to duplicate
433 // pEp_identity struct or NULL if out of memory
436 // the strings are copied; the original strings are still being owned by
439 DYNAMIC_API pEp_identity *identity_dup(const pEp_identity *src);
442 // free_identity() - free all memory being occupied by a pEp_identity struct
445 // identity (in) struct to release
448 // not only the struct but also all string memory referenced by the
449 // struct is being freed; all pointers inside are invalid afterwards
451 DYNAMIC_API void free_identity(pEp_identity *identity);
454 // get_identity() - get identity information
457 // session (in) session handle
458 // address (in) C string with communication address, UTF-8 encoded
459 // user_id (in) unique C string to identify person that identity
461 // identity (out) pointer to pEp_identity structure with results or
465 // the address string is being copied; the original string remains in the
466 // ownership of the caller
467 // the resulting pEp_identity structure goes to the ownership of the
468 // caller and has to be freed with free_identity() when not in use any
471 DYNAMIC_API PEP_STATUS get_identity(
475 pEp_identity **identity
478 // set_identity() - set identity information
481 // session (in) session handle
482 // identity (in) pointer to pEp_identity structure
485 // PEP_STATUS_OK = 0 encryption and signing succeeded
486 // PEP_CANNOT_SET_PERSON writing to table person failed
487 // PEP_CANNOT_SET_PGP_KEYPAIR writing to table pgp_keypair failed
488 // PEP_CANNOT_SET_IDENTITY writing to table identity failed
489 // PEP_COMMIT_FAILED SQL commit failed
490 // PEP_KEY_BLACKLISTED Key blacklisted, cannot set identity
493 // address, fpr, user_id and username must be given
495 DYNAMIC_API PEP_STATUS set_identity(
496 PEP_SESSION session, const pEp_identity *identity
500 // set_identity_flags() - update identity flags on existing identity
503 // session (in) session handle
504 // identity (in,out) pointer to pEp_identity structure
505 // flags (in) new value for flags
508 // PEP_STATUS_OK = 0 encryption and signing succeeded
509 // PEP_CANNOT_SET_IDENTITY update of identity failed
512 // address and user_id must be given in identity
514 DYNAMIC_API PEP_STATUS set_identity_flags(
516 pEp_identity *identity,
521 // mark_as_compromized() - mark key in trust db as compromized
524 // session (in) session handle
525 // fpr (in) fingerprint of key to mark
527 DYNAMIC_API PEP_STATUS mark_as_compromized(
533 // generate_keypair() - generate a new key pair and add it to the key ring
536 // session (in) session handle
537 // identity (inout) pointer to pEp_identity structure
540 // PEP_STATUS_OK = 0 encryption and signing succeeded
541 // PEP_ILLEGAL_VALUE illegal values for identity fields given
542 // PEP_CANNOT_CREATE_KEY key engine is on strike
545 // address and username fields must be set to UTF-8 strings
546 // the fpr field must be set to NULL
548 // this function allocates a string and sets set fpr field of identity
549 // the caller is responsible to call free() for that string or use
550 // free_identity() on the struct
552 DYNAMIC_API PEP_STATUS generate_keypair(
553 PEP_SESSION session, pEp_identity *identity
557 // delete_keypair() - delete a public key or a key pair from the key ring
560 // session (in) session handle
561 // fpr (in) C string with key id or fingerprint of the
565 // PEP_STATUS_OK = 0 key was successfully deleted
566 // PEP_KEY_NOT_FOUND key not found
567 // PEP_ILLEGAL_VALUE not a valid key id or fingerprint
568 // PEP_KEY_HAS_AMBIG_NAME fpr does not uniquely identify a key
569 // PEP_OUT_OF_MEMORY out of memory
571 DYNAMIC_API PEP_STATUS delete_keypair(PEP_SESSION session, const char *fpr);
574 // import_key() - import key from data
577 // session (in) session handle
578 // key_data (in) key data, i.e. ASCII armored OpenPGP key
579 // size (in) amount of data to handle
580 // private_keys (out) list of private keys that have been imported
583 // PEP_STATUS_OK = 0 key was successfully imported
584 // PEP_OUT_OF_MEMORY out of memory
585 // PEP_ILLEGAL_VALUE there is no key data to import
588 // private_keys goes to the ownership of the caller
589 // private_keys can be left NULL, it is then ignored
591 DYNAMIC_API PEP_STATUS import_key(
593 const char *key_data,
595 identity_list **private_keys
599 // export_key() - export ascii armored key
602 // session (in) session handle
603 // fpr (in) key id or fingerprint of key
604 // key_data (out) ASCII armored OpenPGP key
605 // size (out) amount of data to handle
608 // PEP_STATUS_OK = 0 key was successfully exported
609 // PEP_OUT_OF_MEMORY out of memory
610 // PEP_KEY_NOT_FOUND key not found
613 // the key_data goes to the ownership of the caller
614 // the caller is responsible to free() it (on Windoze use pEp_free())
616 DYNAMIC_API PEP_STATUS export_key(
617 PEP_SESSION session, const char *fpr, char **key_data, size_t *size
621 // recv_key() - update key(s) from keyserver
624 // session (in) session handle
625 // pattern (in) key id, user id or address to search for as
628 DYNAMIC_API PEP_STATUS recv_key(PEP_SESSION session, const char *pattern);
631 // find_keys() - find keys in keyring
634 // session (in) session handle
635 // pattern (in) key id, user id or address to search for as
637 // keylist (out) list of fingerprints found or NULL on error
640 // the ownerships of keylist isgoing to the caller
641 // the caller must use free_stringlist() to free it
644 DYNAMIC_API PEP_STATUS find_keys(
645 PEP_SESSION session, const char *pattern, stringlist_t **keylist
649 // find_keys() - find keys in keyring
652 // session (in) session handle
653 // key_email_pairs (out) list of key id/primary email address pairs for
654 // each available key (whether in management database
658 // the ownerships of keylist isgoing to the caller
659 // the caller must use free_stringlist() to free it
660 DYNAMIC_API PEP_STATUS list_keys(
661 PEP_SESSION session, stringpair_list_t** key_email_pairs
664 // send_key() - send key(s) to keyserver
667 // session (in) session handle
668 // pattern (in) key id, user id or address to search for as
671 DYNAMIC_API PEP_STATUS send_key(PEP_SESSION session, const char *pattern);
674 // pEp_free() - free memory allocated by pEp engine
677 // p (in) pointer to free
679 // The reason for this function is that heap management can be a pretty
680 // complex task with Windoze. This free() version calls the free()
681 // implementation of the C runtime library which was used to build pEp engine,
682 // so you're using the correct heap. For more information, see:
683 // <http://msdn.microsoft.com/en-us/library/windows/desktop/aa366711(v=vs.85).aspx>
685 DYNAMIC_API void pEp_free(void *p);
688 // get_trust() - get the trust level a key has for a person
691 // session (in) session handle
692 // identity (inout) user_id and fpr to check as UTF-8 strings (in)
693 // user_id and comm_type as result (out)
695 // this function modifies the given identity struct; the struct remains in
696 // the ownership of the caller
697 // if the trust level cannot be determined identity->comm_type is set
700 DYNAMIC_API PEP_STATUS get_trust(PEP_SESSION session, pEp_identity *identity);
703 // least_trust() - get the least known trust level for a key in the database
706 // session (in) session handle
707 // fpr (in) fingerprint of key to check
708 // comm_type (out) least comm_type as result (out)
710 // if the trust level cannot be determined comm_type is set to PEP_ct_unknown
712 DYNAMIC_API PEP_STATUS least_trust(
715 PEP_comm_type *comm_type
719 // get_key_rating() - get the rating a bare key has
722 // session (in) session handle
723 // fpr (in) unique identifyer for key as UTF-8 string
724 // comm_type (out) key rating
726 // if an error occurs, *comm_type is set to PEP_ct_unknown and an error
729 DYNAMIC_API PEP_STATUS get_key_rating(
732 PEP_comm_type *comm_type
736 // renew_key() - renew an expired key
739 // session (in) session handle
740 // fpr (in) ID of key to renew as UTF-8 string
741 // ts (in) timestamp when key should expire or NULL for
744 DYNAMIC_API PEP_STATUS renew_key(
751 // revoke_key() - revoke a key
754 // session (in) session handle
755 // fpr (in) ID of key to revoke as UTF-8 string
756 // reason (in) text with reason for revoke as UTF-8 string
757 // or NULL if reason unknown
760 // reason text must not include empty lines
761 // this function is meant for internal use only; better use
762 // key_compromized() of keymanagement API
764 DYNAMIC_API PEP_STATUS revoke_key(
771 // key_expired() - flags if a key is already expired
774 // session (in) session handle
775 // fpr (in) ID of key to check as UTF-8 string
776 // when (in) UTC time of when should expiry be considered
777 // expired (out) flag if key expired
779 DYNAMIC_API PEP_STATUS key_expired(
787 // key_revoked() - flags if a key is already revoked
790 // session (in) session handle
791 // fpr (in) ID of key to check as UTF-8 string
792 // revoked (out) flag if key revoked
794 DYNAMIC_API PEP_STATUS key_revoked(
801 // get_crashdump_log() - get the last log messages out
804 // session (in) session handle
805 // maxlines (in) maximum number of lines (0 for default)
806 // logdata (out) logdata as string in double quoted CSV format
809 // column3 is description
810 // column4 is comment
813 // the ownership of logdata goes to the caller
815 DYNAMIC_API PEP_STATUS get_crashdump_log(
822 // get_languagelist() - get the list of languages
825 // session (in) session handle
826 // languages (out) languages as string in double quoted CSV format
827 // column 1 is the ISO 639-1 language code
828 // column 2 is the name of the language
831 // the ownership of languages goes to the caller
833 DYNAMIC_API PEP_STATUS get_languagelist(
839 // get_phrase() - get phrase in a dedicated language through i18n
842 // session (in) session handle
843 // lang (in) C string with ISO 639-1 language code
844 // phrase_id (in) id of phrase in i18n
845 // phrase (out) phrase as UTF-8 string
848 // the ownership of phrase goes to the caller
850 DYNAMIC_API PEP_STATUS get_phrase(
858 // sequence_value() - raise the value of a named sequence and retrieve it
861 // session (in) session handle
862 // name (in) name of sequence
863 // value (out) value of sequence
865 DYNAMIC_API PEP_STATUS sequence_value(
872 // set_revoked() - records relation between a revoked key and its replacement
875 // session (in) session handle
876 // revoked_fpr (in) revoked fingerprint
877 // replacement_fpr (in) replacement key fingerprint
878 // revocation_date (in) revocation date
880 DYNAMIC_API PEP_STATUS set_revoked(
882 const char *revoked_fpr,
883 const char *replacement_fpr,
884 const uint64_t revocation_date
887 // get_revoked() - find revoked key that may have been replaced by given key, if any
890 // session (in) session handle
891 // fpr (in) given fingerprint
892 // revoked_fpr (out) revoked fingerprint
893 // revocation_date (out) revocation date
895 DYNAMIC_API PEP_STATUS get_revoked(
899 uint64_t *revocation_date
903 // get_engine_version() - returns the current version of pEpEngine (this is different
904 // from the pEp protocol version!)
908 // return_value: const char* to the engine version string constant
910 DYNAMIC_API const char* get_engine_version();
912 DYNAMIC_API PEP_STATUS reset_peptest_hack(PEP_SESSION session);