diff options
author | Karl-Heinz Zimmer <[email protected]> | 2001-12-18 21:11:03 +0000 |
---|---|---|
committer | Karl-Heinz Zimmer <[email protected]> | 2001-12-18 21:11:03 +0000 |
commit | 44023ddfb2f536732c28f9abfe5e20fe9bf092b0 (patch) | |
tree | 94aeec305592595bbaaf291bc9629d0dc62a5958 /gpgmeplug | |
parent | 2001-12-18 Marcus Brinkmann <[email protected]> (diff) | |
download | gpgme-44023ddfb2f536732c28f9abfe5e20fe9bf092b0.tar.gz gpgme-44023ddfb2f536732c28f9abfe5e20fe9bf092b0.zip |
corrected specification of Aegypten test key in encrypt() function
Diffstat (limited to 'gpgmeplug')
-rw-r--r-- | gpgmeplug/gpgmeplug.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/gpgmeplug/gpgmeplug.c b/gpgmeplug/gpgmeplug.c index 73a47040..35c723c0 100644 --- a/gpgmeplug/gpgmeplug.c +++ b/gpgmeplug/gpgmeplug.c @@ -928,20 +928,24 @@ bool encryptMessage( const char* cleartext, gpgme_recipients_new (&rset); -if( GPGMEPLUG_PROTOCOL == GPGME_PROTOCOL_CMS ) -{ - gpgme_recipients_add_name (rset, "CN=test cert 1,OU=Aegypten Project,O=g10 Code GmbH,L=Düsseldorf,C=DE"); -fputs( "GPGSMPLUG encryptMessage() using test key of Aegypten Project\n", stderr ); -} -else -{ - gpgme_recipients_add_name (rset, addressee); -fprintf( stderr, "GPGMEPLUG encryptMessage() using addressee %s\n", addressee ); -} -fflush( stderr ); + if( GPGMEPLUG_PROTOCOL == GPGME_PROTOCOL_CMS ) + { + gpgme_recipients_add_name_with_validity (rset, + "/CN=test cert 1,OU=Aegypten Project,O=g10 Code GmbH,L=Düsseldorf,C=DE", + GPGME_VALIDITY_FULL ); + fputs( "\nGPGSMPLUG encryptMessage() using test key of Aegypten Project\n", stderr ); + } + else + { + gpgme_recipients_add_name (rset, addressee); + fprintf( stderr, "\nGPGMEPLUG encryptMessage() using addressee %s\n", addressee ); + } err = gpgme_op_encrypt (ctx, rset, gPlaintext, gCiphertext ); + if( err ) + fprintf( stderr, "gpgme_op_encrypt() returned this error code: %i\n\n", err ); + gpgme_recipients_release (rset); gpgme_data_release (gPlaintext); @@ -967,6 +971,8 @@ fflush( stderr ); gpgme_release (ctx); + fflush( stderr ); + return bOk; } |