diff options
author | Werner Koch <[email protected]> | 2000-11-09 16:35:35 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2000-11-09 16:35:35 +0000 |
commit | 36966ea498fe145a81f284e21a66be54af4d30ad (patch) | |
tree | be365cc282a24b7791b29950aaa175bf6de1cfbe /gpgme/encrypt.c | |
parent | Just a backup for now (diff) | |
download | gpgme-36966ea498fe145a81f284e21a66be54af4d30ad.tar.gz gpgme-36966ea498fe145a81f284e21a66be54af4d30ad.zip |
Add verify function
Diffstat (limited to '')
-rw-r--r-- | gpgme/encrypt.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/gpgme/encrypt.c b/gpgme/encrypt.c index eaf57429..501e65fd 100644 --- a/gpgme/encrypt.c +++ b/gpgme/encrypt.c @@ -39,7 +39,7 @@ encrypt_status_handler ( GpgmeCtx ctx, GpgStatusCode code, char *args ) GpgmeError -gpgme_req_encrypt ( GpgmeCtx c, GpgmeRecipientSet recp, +gpgme_start_encrypt ( GpgmeCtx c, GpgmeRecipientSet recp, GpgmeData plain, GpgmeData ciph ) { int rc = 0; @@ -87,7 +87,7 @@ gpgme_req_encrypt ( GpgmeCtx c, GpgmeRecipientSet recp, _gpgme_gpg_add_arg ( c->gpg, "--output" ); _gpgme_gpg_add_arg ( c->gpg, "-" ); _gpgme_gpg_add_data ( c->gpg, ciph, 1 ); - + _gpgme_gpg_add_arg ( c->gpg, "--" ); _gpgme_gpg_add_data ( c->gpg, plain, 0 ); /* and kick off the process */ @@ -102,18 +102,6 @@ gpgme_req_encrypt ( GpgmeCtx c, GpgmeRecipientSet recp, } -GpgmeError -gpgme_wait_encrypt ( GpgmeCtx c, GpgmeData *r_out ) -{ - wait_on_request_or_fail (c); - - fprintf (stderr,"gpgme_wait_encrypt: main\n"); - - - return 0; -} - - /** * gpgme_encrypt: * @c: The context @@ -131,9 +119,11 @@ GpgmeError gpgme_encrypt ( GpgmeCtx c, GpgmeRecipientSet recp, GpgmeData in, GpgmeData out ) { - int rc = gpgme_req_encrypt ( c, recp, in, out ); - if ( !rc ) - rc = gpgme_wait_encrypt ( c, NULL ); + int rc = gpgme_start_encrypt ( c, recp, in, out ); + if ( !rc ) { + gpgme_wait (c, 1); + c->pending = 0; + } return rc; } |