#define GPGMEPLUG_PROTOCOL GPGME_PROTOCOL_OpenPGP
#endif
-// definitions for signing
+/* definitions for signing */
#ifndef GPGMEPLUG_SIGN_MAKE_MIME_OBJECT
#define GPGMEPLUG_SIGN_INCLUDE_CLEARTEXT true
#define GPGMEPLUG_SIGN_MAKE_MIME_OBJECT true
#define GPGMEPLUG_SIGN_FLAT_POSTFIX ""
#define __GPGMEPLUG_SIGNATURE_CODE_IS_BINARY false
#endif
-// definitions for encoding
+/* definitions for encoding */
#ifndef GPGMEPLUG_ENC_MAKE_MIME_OBJECT
#define GPGMEPLUG_ENC_INCLUDE_CLEARTEXT false
#define GPGMEPLUG_ENC_MAKE_MIME_OBJECT true
#define GPGMEPLUG_ENC_FLAT_POSTFIX ""
#define __GPGMEPLUG_ENCRYPTED_CODE_IS_BINARY false
#endif
-// Note: The following specification will result in
-// function encryptAndSignMessage() producing
-// _empty_ mails.
-// This must be changed as soon as our plugin
-// is supporting the encryptAndSignMessage() function.
+/* Note: The following specification will result in
+ function encryptAndSignMessage() producing
+ _empty_ mails.
+ This must be changed as soon as our plugin
+ is supporting the encryptAndSignMessage() function. */
#ifndef GPGMEPLUG_ENCSIGN_MAKE_MIME_OBJECT
#define GPGMEPLUG_ENCSIGN_INCLUDE_CLEARTEXT false
#define GPGMEPLUG_ENCSIGN_MAKE_MIME_OBJECT false
bool hasFeature( Feature flag )
{
- // our own plugins are supposed to support everything
+ /* our own plugins are supposed to support everything */
switch ( flag ) {
case Feature_SignMessages: return true;
case Feature_VerifySignatures: return true;
case Feature_CheckCertificatePath: return true;
case Feature_CertificateDirectoryService: return true;
case Feature_CRLDirectoryService: return true;
- // undefined or not yet implemented:
+ /* undefined or not yet implemented: */
case Feature_undef: return false;
default: return false;
}
Another note: OK, OK, we'll handle that in the MUA. You can
assume that you only get the email address.
*/
- return false; // dummy
+ return false; /* dummy*/
}
Please return the number of days that are left until the
certificate specified in the parameter certificate expires.
*/
- return 10; // dummy that triggers a warning in the MUA
+ return 10; /* dummy that triggers a warning in the MUA */
}
CA certificate for the certificate specified in the parameter
certificate expires.
*/
- return 10; // dummy that triggers a warning in the MUA
+ return 10; /* dummy that triggers a warning in the MUA */
}
void setCACertificateExpiryNearInterval( int interval )
root certificate for the certificate specified in the parameter
certificate expires.
*/
- return 10; // dummy that triggers a warning in the MUA
+ return 10; /* dummy that triggers a warning in the MUA */
}
Please return the number of days that are left until the
certificate specified in the parameter certificate expires.
*/
- return 10; // dummy that triggers a warning in the MUA
+ return 10; /* dummy that triggers a warning in the MUA */
}
the first certificate in the chain of the specified certificate
expires.
*/
- return 10; // dummy that triggers a warning in the MUA
+ return 10; /* dummy that triggers a warning in the MUA */
}
Please return the number of days that are left until the
CRL used for encryption expires.
*/
- return 10; // dummy that triggers a warning in the MUA
+ return 10; /* dummy that triggers a warning in the MUA */
}
void setEncryptionCRLExpiryNearWarning( bool flag )
gpgme_set_protocol (ctx, GPGMEPLUG_PROTOCOL);
gpgme_set_armor (ctx, __GPGMEPLUG_SIGNATURE_CODE_IS_BINARY ? 0 : 1);
-// gpgme_set_textmode (ctx, 1);
+ /* gpgme_set_textmode (ctx, 1); */
switch ( config.sendCertificates ) {
case SendCert_undef:
}
gpgme_set_include_certs (ctx, sendCerts);
- // PENDING(g10) Implement this
- //gpgme_set_signature_algorithm( ctx, config.signatureAlgorithm );
+ /* PENDING(g10) Implement this
+
+ gpgme_set_signature_algorithm( ctx, config.signatureAlgorithm )
+ --> This does not make sense. The algorithm is a property of
+ the certificate used [wk 2002-03-23] */
gpgme_data_new_from_mem (&data, cleartext,
strlen( cleartext ), 1 );
else {
gpgme_data_release( sig );
*ciphertext = 0;
- // hier fehlt eine Fehlerbehandlung, falls das
- // Signieren schiefging
+ /* erro handling missing to detect wther signing failed (hier
+ fehlt eine Fehlerbehandlung, falls das Signieren schiefging) */
}
gpgme_data_release( data );
gpgme_release (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_set_textmode (ctx, signatureIsBinary ? 0 : 1); */
gpgme_data_new_from_mem( &datapart, ciphertext,
strlen( ciphertext ), 1 );
strcpy( sigmeta->status, statusStr );
sigmeta->status[strlen( statusStr )] = '\0';
} else
- ; // nothing to do, is already 0
+ ; /* nothing to do, is already 0 */
- // Extended information for any number of signatures.
+ /* Extended information for any number of signatures. */
fpr = gpgme_get_sig_status( ctx, sig_idx, &status, &created );
sigmeta->extended_info = 0;
while( fpr != NULL ) {
sizeof( struct SignatureMetaDataExtendedInfo ) * ( sig_idx + 1 ) );
if( realloc_return ) {
sigmeta->extended_info = realloc_return;
- // the creation time
+ /* the creation time */
sigmeta->extended_info[sig_idx].creation_time = malloc( sizeof( struct tm ) );
if( sigmeta->extended_info[sig_idx].creation_time ) {
ctime_val = localtime( &created );
sigmeta->extended_info[sig_idx].fingerprint[strlen( fpr )] = '\0';
}
} else
- break; // if allocation fails once, it isn't likely to
- // succeed the next time either
+ break; /* if allocation fails once, it isn't likely to
+ succeed the next time either */
fpr = gpgme_get_sig_status (ctx, ++sig_idx, &status, &created);
}
gpgme_set_protocol (ctx, GPGMEPLUG_PROTOCOL);
gpgme_set_armor (ctx, __GPGMEPLUG_ENCRYPTED_CODE_IS_BINARY ? 0 : 1);
-// gpgme_set_textmode (ctx, 1);
+ /* gpgme_set_textmode (ctx, 1); */
gpgme_data_new_from_mem (&gPlaintext, cleartext,
1+strlen( cleartext ), 1 );
}
}
- // PENDING(g10) Implement this
- // Possible values: RSA = 1, SHA1 = 2, TripleDES = 3
- //gpgme_set_encryption_algorithm( ctx, config.encryptionAlgorithm );
+ /* PENDING(g10) Implement this
+ Possible values: RSA = 1, SHA1 = 2, TripleDES = 3
+ gpgme_set_encryption_algorithm( ctx, config.encryptionAlgorithm );
+
+ -> Your are mixing public key and symmetric algorithms. The
+ latter may be configured but the sphix specifications do opnly
+ allow 3-DES so this is not nothing we need to do. The proper way
+ to select the symmetric algorithm is anyway by looking at the
+ capabilities of the certificate because this is the only way to
+ know what the recipient can accept. [wk 2002-03-23]
+
+ PENDING(g10) Implement this
+ gpgme_set_encryption_check_certificate_path(
+ config.checkCertificatePath )
+ PENDING(g10) Implement this
+ gpgme_set_encryption_check_certificate_path_to_root(
+ config.checkEncryptionCertificatePathToRoot )
- // PENDING(g10) Implement this
- // gpgme_set_encryption_check_certificate_path(
- // config.checkCertificatePath )
+ -> Not checking a certificate up to the ROOT CA is dangerous and
+ stupid. There is no need for those options. [wk 2002-03-23] */
- // PENDING(g10) Implement this
- // gpgme_set_encryption_check_certificate_path_to_root(
- // config.checkEncryptionCertificatePathToRoot )
err = gpgme_op_encrypt (ctx, rset, gPlaintext, gCiphertext );
else {
gpgme_data_release ( gCiphertext );
*ciphertext = 0;
- // hier fehlt eine Fehlerbehandlung: fuer einen Recipient nur ein
- // untrusted key (oder gar keiner) gefunden wurde, verweigert gpg
- // das signieren.
+ /* error handling is missing: if only one untrusted key was found
+ (or none at all), gpg won't sign the message. (hier fehlt eine
+ Fehlerbehandlung: fuer einen Recipient nur ein untrusted key
+ (oder gar keiner) gefunden wurde, verweigert gpg das signieren.)
+ */
}
gpgme_release (ctx);
bOk = false;
- // implementation of this function is still missing
+ /* implementation of this function is still missing */
if( bOk && structuring ) {
structuring->includeCleartext = GPGMEPLUG_ENCSIGN_INCLUDE_CLEARTEXT;
gpgme_set_protocol (ctx, GPGMEPLUG_PROTOCOL);
gpgme_set_armor (ctx, cipherIsBinary ? 0 : 1);
-// gpgme_set_textmode (ctx, cipherIsBinary ? 0 : 1);
+ /* gpgme_set_textmode (ctx, cipherIsBinary ? 0 : 1); */
/*
gpgme_data_new_from_mem( &gCiphertext, ciphertext,
- 1+strlen( ciphertext ), 1 );
- */
+ 1+strlen( ciphertext ), 1 ); */
gpgme_data_new_from_mem( &gCiphertext,
ciphertext,
cipherIsBinary