From 770116c84f69105daeedd2cbad2af18b59fcce20 Mon Sep 17 00:00:00 2001 From: Matthias Kalle Dalheimer Date: Thu, 21 Mar 2002 13:14:20 +0000 Subject: [PATCH] More feature selectors Plugin says which features it supports --- gpgmeplug/cryptplug.h | 25 ++++++++++++++++++------- gpgmeplug/gpgmeplug.c | 27 ++++++++++++++++++++------- 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/gpgmeplug/cryptplug.h b/gpgmeplug/cryptplug.h index ce2e75a..ed936f7 100644 --- a/gpgmeplug/cryptplug.h +++ b/gpgmeplug/cryptplug.h @@ -161,14 +161,25 @@ typedef char bool; */ -// dummy values: typedef enum { - CryptPlugFeat_undef = 0, - - CryptPlugFeat_SignMessages = 1, - CryptPlugFeat_VerifySignatures = 2, - CryptPlugFeat_EncryptMessages = 3, - CryptPlugFeat_DecryptMessages = 4 // more to follow ... + Feature_undef = 0, + + Feature_SignMessages = 1, + Feature_VerifySignatures = 2, + Feature_EncryptMessages = 3, + Feature_DecryptMessages = 4, + Feature_SendCertificates = 5, + Feature_WarnSignCertificateExpiry = 6, + Feature_WarnSignEmailNotInCertificate = 7, + Feature_PinEntrySettings = 8, + Feature_StoreMessagesWithSigs = 9, + Feature_EncryptionCRLs = 10, + Feature_WarnEncryptCertificateExpiry = 11, + Feature_WarnEncryptEmailNotInCertificate = 12, + Feature_StoreMessagesEncrypted = 13, + Feature_CheckCertificatePath = 14, + Feature_CertificateDirectoryService = 15, + Feature_CRLDirectoryService = 16 } Feature; // dummy values diff --git a/gpgmeplug/gpgmeplug.c b/gpgmeplug/gpgmeplug.c index 8a7772b..474e439 100644 --- a/gpgmeplug/gpgmeplug.c +++ b/gpgmeplug/gpgmeplug.c @@ -228,14 +228,27 @@ void deinitialize() bool hasFeature( Feature flag ) { + // our own plugins are supposed to support everything switch ( flag ) { - case CryptPlugFeat_SignMessages: return true; - case CryptPlugFeat_VerifySignatures: return true; - case CryptPlugFeat_EncryptMessages: return true; - case CryptPlugFeat_DecryptMessages: return true; - // undefined or not yet implemented: - case CryptPlugFeat_undef: return false; - default: return false; + case Feature_SignMessages: return true; + case Feature_VerifySignatures: return true; + case Feature_EncryptMessages: return true; + case Feature_DecryptMessages: return true; + case Feature_SendCertificates: return true; + case Feature_WarnSignCertificateExpiry: return true; + case Feature_WarnSignEmailNotInCertificate: return true; + case Feature_PinEntrySettings: return true; + case Feature_StoreMessagesWithSigs: return true; + case Feature_EncryptionCRLs: return true; + case Feature_WarnEncryptCertificateExpiry: return true; + case Feature_WarnEncryptEmailNotInCertificate: return true; + case Feature_StoreMessagesEncrypted: return true; + case Feature_CheckCertificatePath: return true; + case Feature_CertificateDirectoryService: return true; + case Feature_CRLDirectoryService: return true; + // undefined or not yet implemented: + case Feature_undef: return false; + default: return false; } } -- 2.26.2