From d5010c74d940633a49e536103408621e988038e1 Mon Sep 17 00:00:00 2001 From: Steffen Hansen Date: Mon, 10 Jun 2002 18:37:11 +0000 Subject: [PATCH] support for listing of external certs (untested) --- trunk/gpgmeplug/cryptplug.h | 2 +- trunk/gpgmeplug/gpgmeplug.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/trunk/gpgmeplug/cryptplug.h b/trunk/gpgmeplug/cryptplug.h index aa0b912..a494cc7 100644 --- a/trunk/gpgmeplug/cryptplug.h +++ b/trunk/gpgmeplug/cryptplug.h @@ -1750,7 +1750,7 @@ struct CertificateInfo { endListCertificates( it ); \endverbatim */ -struct CertIterator* startListCertificates( const char* pattern ); +struct CertIterator* startListCertificates( const char* pattern, int remote ); struct CertificateInfo* nextCertificate( struct CertIterator* ); void endListCertificates( struct CertIterator* ); diff --git a/trunk/gpgmeplug/gpgmeplug.c b/trunk/gpgmeplug/gpgmeplug.c index 7b1cc94..59150e2 100644 --- a/trunk/gpgmeplug/gpgmeplug.c +++ b/trunk/gpgmeplug/gpgmeplug.c @@ -1997,7 +1997,7 @@ struct CertIterator { struct CertificateInfo info; }; -struct CertIterator* startListCertificates( const char* pattern ) +struct CertIterator* startListCertificates( const char* pattern, int remote ) { GpgmeError err; struct CertIterator* it; @@ -2013,6 +2013,8 @@ struct CertIterator* startListCertificates( const char* pattern ) } gpgme_set_protocol (it->ctx, GPGME_PROTOCOL_CMS); + if( remote ) gpgme_set_keylist_mode ( it->ctx, GPGME_KEYLIST_MODE_EXTERN ); + else gpgme_set_keylist_mode ( it->ctx, GPGME_KEYLIST_MODE_LOCAL ); err = gpgme_op_keylist_start ( it->ctx, pattern, 0); if( err != GPGME_No_Error ) { endListCertificates( it ); -- 2.26.2