+2002-02-09 Marcus Brinkmann <marcus@g10code.de>
+
+ * 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 <marcus@g10code.de>
* genkey.c (gpgme_op_genkey_start): Allow PUBKEY and SECKEY to be
GpgmeError
-_gpgme_gpgsm_start (GpgsmObject gpgsm, void *opaque, GpgmeError *errorp)
+_gpgme_gpgsm_start (GpgsmObject gpgsm, void *opaque)
{
return mk_error (Invalid_Engine);
}
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;
&& (s2 = strstr (s+1, "</GnupgKeyParms>")))
{
/* 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);