doc_update_sequoia
vb 9 years ago
parent 1369846eee
commit d124995549

@ -840,16 +840,18 @@ DYNAMIC_API PEP_STATUS decrypt_and_verify(
default:
{
gpgme_decrypt_result_t gpgme_decrypt_result = _session->gpgme_op_decrypt_result(_session->ctx);
result = PEP_CANNOT_DECRYPT_UNKNOWN;
result = PEP_DECRYPT_NO_KEY;
if (gpgme_decrypt_result != NULL) {
*keylist = new_stringlist(gpgme_decrypt_result->unsupported_algorithm);
if (gpgme_decrypt_result->unsupported_algorithm)
*keylist = new_stringlist(gpgme_decrypt_result->unsupported_algorithm);
else
*keylist = new_stringlist("");
assert(*keylist);
if (*keylist == NULL) {
result = PEP_OUT_OF_MEMORY;
break;
}
stringlist_t *_keylist = *keylist;
for (gpgme_recipient_t r = gpgme_decrypt_result->recipients; r != NULL; r = r->next) {
_keylist = stringlist_add(_keylist, r->keyid);

@ -166,8 +166,7 @@ DYNAMIC_API void free_stringlist(stringlist_t *stringlist);
// csize (in) size of cipher text
// ptext (out) pointer to internal buffer with plain text
// psize (out) size of plain text
// keylist (out) list of key ids which where used to encrypt or NULL on
// error
// keylist (out) list of key ids which where used to encrypt
//
// return value:
// PEP_UNENCRYPTED message was unencrypted and not signed
@ -182,6 +181,9 @@ DYNAMIC_API void free_stringlist(stringlist_t *stringlist);
// the ownerships of ptext as well as keylist are going to the caller
// the caller must use free() (or an Windoze pEp_free()) and
// free_stringlist() to free them
//
// if this function failes an error message may be the first element of
// keylist and the other elements may be the keys used for encryption
DYNAMIC_API PEP_STATUS decrypt_and_verify(
PEP_SESSION session, const char *ctext, size_t csize,

Loading…
Cancel
Save