diff options
author | Matthias Kalle Dalheimer <[email protected]> | 2002-04-17 14:16:53 +0000 |
---|---|---|
committer | Matthias Kalle Dalheimer <[email protected]> | 2002-04-17 14:16:53 +0000 |
commit | 0fc18236a296b29ac8e4e35e3ba08be8ba1a3558 (patch) | |
tree | fbe2e4401dbf465d7ee18f842340a2525a543990 /gpgmeplug/gpgmeplug.c | |
parent | 2002-04-16 Marcus Brinkmann <[email protected]> (diff) | |
download | gpgme-0fc18236a296b29ac8e4e35e3ba08be8ba1a3558.tar.gz gpgme-0fc18236a296b29ac8e4e35e3ba08be8ba1a3558.zip |
Implemented requesting certs
Diffstat (limited to 'gpgmeplug/gpgmeplug.c')
-rw-r--r-- | gpgmeplug/gpgmeplug.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/gpgmeplug/gpgmeplug.c b/gpgmeplug/gpgmeplug.c index 74fb3c26..342c7bd3 100644 --- a/gpgmeplug/gpgmeplug.c +++ b/gpgmeplug/gpgmeplug.c @@ -1510,9 +1510,24 @@ bool decryptAndCheckMessage( const char* ciphertext, const char* requestCertificateDialog(){ return 0; } -bool requestDecentralCertificate( const char* name, const char* - email, const char* organization, const char* department, - const char* ca_address ){ return true; } +bool requestDecentralCertificate( const char* certparms, char** generatedKey ) +{ + GpgmeCtx ctx; + GpgmeError err = gpgme_new (&ctx); + if( err != GPGME_No_Error ) + return false; + + gpgme_set_protocol (ctx, GPGMEPLUG_PROTOCOL); + + gpgme_set_armor (ctx, __GPGMEPLUG_SIGNATURE_CODE_IS_BINARY ? 0 : 1); + + if( gpgme_op_genkey( ctx, certparms, NULL, NULL ) == GPGME_No_Error ) + return true; + else + return false; + + gpgme_release( ctx ); +} bool requestCentralCertificateAndPSE( const char* name, const char* email, const char* organization, const char* department, |