2003-04-27 Marcus Brinkmann <marcus@g10code.de>
* encrypt-sign.c: Do not include <stddef.h>, <stdio.h>, <stdlib.h>, <string.h>, <assert.h> and "util.h", but "gpgme.h". (_gpgme_op_encrypt_sign_start): Rename to ... (encrypt_sign_start): ... this. (gpgme_op_encrypt_sign_start): Use encrypt_sign_start, not _gpgme_op_encrypt_sign_start. (gpgme_op_encrypt_sign): Likewise.
This commit is contained in:
parent
e1e10b0c95
commit
32096efd58
@ -1,5 +1,13 @@
|
|||||||
2003-04-27 Marcus Brinkmann <marcus@g10code.de>
|
2003-04-27 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
|
* encrypt-sign.c: Do not include <stddef.h>, <stdio.h>,
|
||||||
|
<stdlib.h>, <string.h>, <assert.h> and "util.h", but "gpgme.h".
|
||||||
|
(_gpgme_op_encrypt_sign_start): Rename to ...
|
||||||
|
(encrypt_sign_start): ... this.
|
||||||
|
(gpgme_op_encrypt_sign_start): Use encrypt_sign_start, not
|
||||||
|
_gpgme_op_encrypt_sign_start.
|
||||||
|
(gpgme_op_encrypt_sign): Likewise.
|
||||||
|
|
||||||
* gpgme.h (GpgmeEncryptResult): New data type.
|
* gpgme.h (GpgmeEncryptResult): New data type.
|
||||||
(gpgme_op_encrypt_result): New prototype.
|
(gpgme_op_encrypt_result): New prototype.
|
||||||
* ops.h (_gpgme_op_encrypt_init_result): New prototype.
|
* ops.h (_gpgme_op_encrypt_init_result): New prototype.
|
||||||
|
@ -21,17 +21,12 @@
|
|||||||
#if HAVE_CONFIG_H
|
#if HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stddef.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#include "util.h"
|
#include "gpgme.h"
|
||||||
#include "context.h"
|
#include "context.h"
|
||||||
#include "ops.h"
|
#include "ops.h"
|
||||||
|
|
||||||
|
|
||||||
static GpgmeError
|
static GpgmeError
|
||||||
encrypt_sign_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
encrypt_sign_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||||
{
|
{
|
||||||
@ -41,8 +36,7 @@ encrypt_sign_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
|||||||
|
|
||||||
|
|
||||||
static GpgmeError
|
static GpgmeError
|
||||||
_gpgme_op_encrypt_sign_start (GpgmeCtx ctx, int synchronous,
|
encrypt_sign_start (GpgmeCtx ctx, int synchronous, GpgmeRecipients recp,
|
||||||
GpgmeRecipients recp,
|
|
||||||
GpgmeData plain, GpgmeData cipher)
|
GpgmeData plain, GpgmeData cipher)
|
||||||
{
|
{
|
||||||
GpgmeError err;
|
GpgmeError err;
|
||||||
@ -80,32 +74,26 @@ _gpgme_op_encrypt_sign_start (GpgmeCtx ctx, int synchronous,
|
|||||||
ctx->use_armor, ctx /* FIXME */);
|
ctx->use_armor, ctx /* FIXME */);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Encrypt plaintext PLAIN within CTX for the recipients RECP and
|
||||||
|
store the resulting ciphertext in CIPHER. Also sign the ciphertext
|
||||||
|
with the signers in CTX. */
|
||||||
GpgmeError
|
GpgmeError
|
||||||
gpgme_op_encrypt_sign_start (GpgmeCtx ctx, GpgmeRecipients recp,
|
gpgme_op_encrypt_sign_start (GpgmeCtx ctx, GpgmeRecipients recp,
|
||||||
GpgmeData plain, GpgmeData cipher)
|
GpgmeData plain, GpgmeData cipher)
|
||||||
{
|
{
|
||||||
return _gpgme_op_encrypt_sign_start (ctx, 0, recp, plain, cipher);
|
return encrypt_sign_start (ctx, 0, recp, plain, cipher);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/* Encrypt plaintext PLAIN within CTX for the recipients RECP and
|
||||||
* gpgme_op_encrypt_sign:
|
store the resulting ciphertext in CIPHER. Also sign the ciphertext
|
||||||
* @ctx: The context
|
with the signers in CTX. */
|
||||||
* @recp: The set of recipients
|
|
||||||
* @plain: plaintext input
|
|
||||||
* @cipher: signed ciphertext
|
|
||||||
*
|
|
||||||
* This function encrypts @plain for all recipients in recp, signs it,
|
|
||||||
* and returns the ciphertext in @out. The function does wait for the
|
|
||||||
* result.
|
|
||||||
*
|
|
||||||
* Return value: 0 on success or an errorcode.
|
|
||||||
**/
|
|
||||||
GpgmeError
|
GpgmeError
|
||||||
gpgme_op_encrypt_sign (GpgmeCtx ctx, GpgmeRecipients recp,
|
gpgme_op_encrypt_sign (GpgmeCtx ctx, GpgmeRecipients recp,
|
||||||
GpgmeData plain, GpgmeData cipher)
|
GpgmeData plain, GpgmeData cipher)
|
||||||
{
|
{
|
||||||
GpgmeError err = _gpgme_op_encrypt_sign_start (ctx, 1, recp, plain, cipher);
|
GpgmeError err = encrypt_sign_start (ctx, 1, recp, plain, cipher);
|
||||||
if (!err)
|
if (!err)
|
||||||
err = _gpgme_wait_one (ctx);
|
err = _gpgme_wait_one (ctx);
|
||||||
return err;
|
return err;
|
||||||
|
Loading…
Reference in New Issue
Block a user