From: Marcus Brinkmann Date: Sat, 9 Feb 2002 00:06:32 +0000 (+0000) Subject: 2002-02-09 Marcus Brinkmann X-Git-Tag: gpgme-1.2.0@1385~1101 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a0ce950557eb90fd61f8955bd7816ac632010f39;p=gpgme.git 2002-02-09 Marcus Brinkmann * genkey.c (gpgme_op_genkey_start): Fix logic in validity check. (gpgme_op_genkey_start): Skip newlines after opening tag. * engine-gpgsm.c (_gpgme_gpgsm_start): Remove cruft. --- diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index 9912cb4..13cd50f 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,3 +1,10 @@ +2002-02-09 Marcus Brinkmann + + * genkey.c (gpgme_op_genkey_start): Fix logic in validity check. + (gpgme_op_genkey_start): Skip newlines after opening tag. + + * engine-gpgsm.c (_gpgme_gpgsm_start): Remove cruft. + 2002-02-08 Marcus Brinkmann * genkey.c (gpgme_op_genkey_start): Allow PUBKEY and SECKEY to be diff --git a/trunk/gpgme/engine-gpgsm.c b/trunk/gpgme/engine-gpgsm.c index 0be5215..7852a1a 100644 --- a/trunk/gpgme/engine-gpgsm.c +++ b/trunk/gpgme/engine-gpgsm.c @@ -1006,7 +1006,7 @@ _gpgme_gpgsm_set_colon_line_handler (GpgsmObject gpgsm, GpgmeError -_gpgme_gpgsm_start (GpgsmObject gpgsm, void *opaque, GpgmeError *errorp) +_gpgme_gpgsm_start (GpgsmObject gpgsm, void *opaque) { return mk_error (Invalid_Engine); } diff --git a/trunk/gpgme/genkey.c b/trunk/gpgme/genkey.c index 9c65400..e8017f2 100644 --- a/trunk/gpgme/genkey.c +++ b/trunk/gpgme/genkey.c @@ -140,12 +140,12 @@ gpgme_op_genkey_start (GpgmeCtx ctx, const char *parms, if (!pubkey && !seckey) ; /* okay: Add key to the keyrings */ - else if (!pubkey || gpgme_data_get_type (pubkey) != GPGME_DATA_TYPE_NONE) + else if (pubkey && gpgme_data_get_type (pubkey) != GPGME_DATA_TYPE_NONE) { err = mk_error (Invalid_Value); goto leave; } - else if (!seckey || gpgme_data_get_type (seckey) != GPGME_DATA_TYPE_NONE) + else if (seckey && gpgme_data_get_type (seckey) != GPGME_DATA_TYPE_NONE) { err = mk_error (Invalid_Value); goto leave; @@ -166,7 +166,10 @@ gpgme_op_genkey_start (GpgmeCtx ctx, const char *parms, && (s2 = strstr (s+1, ""))) { /* FIXME: Check that there are no control statements inside. */ - err = gpgme_data_new_from_mem (&ctx->help_data_1, s+1, s2-s-1, 1); + s++; /* Skip '>'. */ + while (*s == '\n') + s++; + err = gpgme_data_new_from_mem (&ctx->help_data_1, s, s2-s, 1); } else err = mk_error (Invalid_Value);