src/pEpEngine.h
branchkeysync
changeset 1103 aba4f9ea5bce
parent 1101 a9e46b630bf4
child 1105 3fbdd80f0e52
     1.1 --- a/src/pEpEngine.h	Wed Aug 31 10:15:19 2016 +0200
     1.2 +++ b/src/pEpEngine.h	Wed Aug 31 11:50:49 2016 +0200
     1.3 @@ -42,6 +42,7 @@
     1.4      PEP_KEY_NOT_FOUND                               = 0x0201,
     1.5      PEP_KEY_HAS_AMBIG_NAME                          = 0x0202,
     1.6      PEP_GET_KEY_FAILED                              = 0x0203,
     1.7 +    PEP_CANNOT_EXPORT_KEY                           = 0x0204,
     1.8      
     1.9      PEP_CANNOT_FIND_IDENTITY                        = 0x0301,
    1.10      PEP_CANNOT_SET_PERSON                           = 0x0381,
    1.11 @@ -641,6 +642,30 @@
    1.12      );
    1.13  
    1.14  
    1.15 +// export_secret_key() - export secret key ascii armored
    1.16 +//
    1.17 +//  parameters:
    1.18 +//      session (in)            session handle
    1.19 +//      fpr (in)                fingerprint of key, at least 16 hex digits
    1.20 +//      key_data (out)          ASCII armored OpenPGP secret key
    1.21 +//      size (out)              amount of data to handle
    1.22 +//
    1.23 +//  return value:
    1.24 +//      PEP_STATUS_OK = 0       key was successfully exported
    1.25 +//      PEP_OUT_OF_MEMORY       out of memory
    1.26 +//      PEP_KEY_NOT_FOUND       key not found
    1.27 +//      PEP_CANNOT_EXPORT_KEY   cannot export secret key (i.e. it's on an HKS)
    1.28 +//
    1.29 +//  caveat:
    1.30 +//      the key_data goes to the ownership of the caller
    1.31 +//      the caller is responsible to free() it (on Windoze use pEp_free())
    1.32 +//      beware of leaking secret key data - overwrite it in memory after use
    1.33 +
    1.34 +DYNAMIC_API PEP_STATUS export_secrect_key(
    1.35 +        PEP_SESSION session, const char *fpr, char **key_data, size_t *size
    1.36 +    );
    1.37 +
    1.38 +
    1.39  // recv_key() - update key(s) from keyserver
    1.40  //
    1.41  //  parameters: