*/
void setWarnSendUnsigned( bool );
-
+
/*! \ingroup groupConfigSign
\brief Returns whether a warning should be emitted when the user
tries to send an email message unsigned.
*/
bool checkMessageSignature( const char* ciphertext,
const char* signaturetext,
+ bool signatureIsBinary,
+ int signatureLen,
struct SignatureMetaData* sigmeta );
/*! \ingroup groupSignAct
break;
}
gpgme_set_include_certs (ctx, sendCerts);
-
+
// PENDING(g10) Implement this
//gpgme_set_signature_algorithm( ctx, config.signatureAlgorithm );
bool checkMessageSignature( const char* ciphertext,
const char* signaturetext,
+ bool signatureIsBinary,
+ int signatureLen,
struct SignatureMetaData* sigmeta )
{
GpgmeCtx ctx;
gpgme_new( &ctx );
gpgme_set_protocol (ctx, GPGMEPLUG_PROTOCOL);
+ gpgme_set_armor (ctx, signatureIsBinary ? 0 : 1);
+// gpgme_set_textmode (ctx, signatureIsBinary ? 0 : 1);
+
gpgme_data_new_from_mem( &datapart, ciphertext,
1+strlen( ciphertext ), 1 );
- gpgme_data_new_from_mem( &sigpart, signaturetext,
- 1+strlen( signaturetext ), 1 );
+
+ gpgme_data_new_from_mem( &sigpart,
+ signaturetext,
+ signatureIsBinary
+ ? signatureLen
+ : (1+strlen( signaturetext )),
+ 1 );
gpgme_op_verify( ctx, sigpart, datapart, &status );
gpgme_data_release( datapart );