PinRequest_undef = 0,
PinRequest_Always = 1,
- PinRequest_OncePerMail = 2,
- PinRequest_OncePerSession = 3 // may be changed ...
+ PinRequest_WhenAddingCerts = 2,
+ PinRequest_AlwaysWhenSigning = 3,
+ PinRequest_OncePerSession = 4,
+ PinRequest_AfterMinutes = 5
} PinRequests;
// dummy values:
*/
SignEmail signEmail( void );
+
+/*! \ingroup groupConfigSign
+ \brief Specifies whether a warning should be emitted when the user
+ tries to send an email message unsigned.
+*/
+void setWarnSendUnsigned( bool );
+
+
+/*! \ingroup groupConfigSign
+ \brief Returns whether a warning should be emitted when the user
+ tries to send an email message unsigned.
+*/
+bool warnSendUnsigned( void );
+
+
/*! \ingroup groupConfigSign
\brief Specifies whether sent email messages should be stored
with or without their signatures.
*/
bool saveSentSignatures( void );
-/*! \ingroup groupConfigSign
- \brief Specifies whether a warning should be emitted if any
- of the certificates involved in the signing process
- expires in the near future.
-*/
-void setCertificateExpiryNearWarning( bool );
-
-/*! \ingroup groupConfigSign
- \brief Returns whether a warning should be emitted if any
- of the certificates involved in the signing process
- expires in the near future.
-*/
-bool certificateExpiryNearWarning( void );
-
/*! \ingroup groupConfigSign
\brief Specifies whether a warning should be emitted if the
email address of the sender is not contained in the
*/
PinRequests numPINRequests( void );
+/*! \ingroup groupConfigSign
+ \brief Specifies the interval in minutes the PIN must be reentered if
+ numPINRequests() is PinRequest_AfterMinutes.
+*/
+void setNumPINRequestsInterval( int );
+
+
+/*! \ingroup groupConfigSign
+ \brief Returns the interval in minutes the PIN must be reentered if
+ numPINRequests() is PinRequest_AfterMinutes.
+*/
+int numPINRequestsInterval( void );
+
+
/*! \ingroup groupConfigSign
\brief Specifies whether the certificate path should be
followed to the root certificate or whether locally stored
bool signatureUseCRLs( void );
/*! \ingroup groupConfigSign
- \brief Specifies whether a warning should be emitted if any
- of the certificates involved in the signing process
- expires in the near future.
+ \brief Specifies whether a warning should be emitted if the
+ signature certificate expires in the near future.
*/
-void setSignatureCRLExpiryNearWarning( bool );
+void setSignatureCertificateExpiryNearWarning( bool );
/*! \ingroup groupConfigSign
- \brief Returns whether a warning should be emitted if any
- of the certificates involved in the signing process
- expires in the near future.
+ \brief Returns whether a warning should be emitted if
+ the signature certificate expires in the near future.
*/
-bool signatureCRLExpiryNearWarning( void );
+bool signatureCertificateExpiryNearWarning( void );
/*! \ingroup groupConfigSign
- \brief Specifies the number of days which a certificate must
+ \brief Specifies the number of days which a signature certificate must
+ be valid before it is considered to expire in the near
+ future.
+*/
+void setSignatureCertificateExpiryNearInterval( int );
+
+/*! \ingroup groupConfigSign
+ \brief Returns the number of days which a signature certificate must
be valid before it is considered to expire in the near
future.
*/
-void setSignatureCRLNearExpiryInterval( int );
+int signatureCertificateExpiryNearInterval( void );
/*! \ingroup groupConfigSign
- \brief Returns the number of days which a certificate must
+ \brief Specifies whether a warning should be emitted if the
+ CA certificate expires in the near future.
+*/
+void setCACertificateExpiryNearWarning( bool );
+
+/*! \ingroup groupConfigSign
+ \brief Returns whether a warning should be emitted if
+ the CA certificate expires in the near future.
+*/
+bool caCertificateExpiryNearWarning( void );
+
+/*! \ingroup groupConfigSign
+ \brief Specifies the number of days which a CA certificate must
+ be valid before it is considered to expire in the near
+ future.
+*/
+void setCACertificateExpiryNearInterval( int );
+
+/*! \ingroup groupConfigSign
+ \brief Returns the number of days which a CA certificate must
+ be valid before it is considered to expire in the near
+ future.
+*/
+int caCertificateExpiryNearInterval( void );
+
+/*! \ingroup groupConfigSign
+ \brief Specifies whether a warning should be emitted if the
+ root certificate expires in the near future.
+*/
+void setRootCertificateExpiryNearWarning( bool );
+
+/*! \ingroup groupConfigSign
+ \brief Returns whether a warning should be emitted if
+ the root certificate expires in the near future.
+*/
+bool rootCertificateExpiryNearWarning( void );
+
+/*! \ingroup groupConfigSign
+ \brief Specifies the number of days which a root certificate must
+ be valid before it is considered to expire in the near
+ future.
+*/
+void setRootCertificateExpiryNearInterval( int );
+
+/*! \ingroup groupConfigSign
+ \brief Returns the number of days which a signature certificate must
be valid before it is considered to expire in the near
future.
*/
-int signatureCRLNearExpiryInterval( void );
+int rootCertificateExpiryNearInterval( void );
+
+
/*! \ingroup groupConfigCrypt
\brief This function returns an XML representation of a
*/
EncryptEmail encryptEmail( void );
+/*! \ingroup groupConfigSign
+ \brief Specifies whether a warning should be emitted when the user
+ tries to send an email message unencrypted.
+*/
+void setWarnSendUnencrypted( bool );
+
+
+/*! \ingroup groupConfigSign
+ \brief Returns whether a warning should be emitted when the user
+ tries to send an email message unencrypted.
+*/
+bool warnSendUnencrypted( void );
+
+
/*! \ingroup groupConfigCrypt
\brief Specifies whether encrypted email messages should be
stored encrypted or decrypted.
*/
bool saveMessagesEncrypted( void );
+
+/*! \ingroup groupConfigCrypt
+ \brief Specifies whether the certificate path should be checked
+ during encryption.
+*/
+void setCheckCertificatePath( bool );
+
+/*! \ingroup groupConfigCrypt
+ \brief Returns whether the certificate path should be checked
+ during encryption.
+*/
+bool checkCertificatePath( void );
+
+
/*! \ingroup groupConfigCrypt
\brief Specifies whether the certificate path should be
followed to the root certificate or whether locally stored
*/
bool checkEncryptionCertificatePathToRoot( void );
+
+/*! \ingroup groupConfigCrypt
+ \brief Specifies whether a warning should be emitted if the
+ certificate of the receiver expires in the near future.
+*/
+void setReceiverCertificateExpiryNearWarning( bool );
+
+/*! \ingroup groupConfigCrypt
+ \brief Returns whether a warning should be emitted if the
+ certificate of the receiver expires in the near future.
+*/
+bool receiverCertificateExpiryNearWarning( void );
+
+
+/*! \ingroup groupConfigCrypt
+ \brief Specifies the number of days which a receiver certificate
+ must be valid before it is considered to expire in the near future.
+*/
+void setReceiverCertificateExpiryNearWarningInterval( int );
+
+/*! \ingroup groupConfigCrypt
+ \brief Returns the number of days which a receiver certificate
+ must be valid before it is considered to expire in the near future.
+*/
+int receiverCertificateExpiryNearWarningInterval( void );
+
+/*! \ingroup groupConfigCrypt
+ \brief Specifies whether a warning should be emitted if
+ a certificate in the chain expires in the near future.
+*/
+void setCertificateInChainExpiryNearWarning( bool );
+
+
+/*! \ingroup groupConfigCrypt
+ \brief Returns whether a warning should be emitted if a
+ certificate in the chain expires in the near future.
+*/
+bool certificateInChainExpiryNearWarning( void );
+
+
+
+/*! \ingroup groupConfigCrypt
+ \brief Specifies the number of days which a certificate in the chain
+ must be valid before it is considered to expire in the near future.
+*/
+void setCertificateInChainExpiryNearWarningInterval( int );
+
+/*! \ingroup groupConfigCrypt
+ \brief Returns the number of days which a certificate in the chain
+ must be valid before it is considered to expire in the near future.
+*/
+int certificateInChainExpiryNearWarningInterval( void );
+
+
+/*! \ingroup groupConfigCrypt
+ \brief Specifies whether a warning is emitted if the email address
+ of the receiver does not appear in the certificate.
+*/
+void setReceiverEmailAddressNotInCertificateWarning( bool );
+
+/*! \ingroup groupConfigCrypt
+ \brief Returns whether a warning is emitted if the email address
+ of the receiver does not appear in the certificate.
+*/
+bool receiverEmailAddressNotInCertificateWarning( void );
+
+
/*! \ingroup groupConfigCrypt
\brief Specifies whether certificate revocation lists should
be used.
SendCertificates sendCertificates;
SignEmail signEmail;
bool saveSentSignatures;
- bool certificateExpiryNearWarning;
bool warnNoCertificate;
PinRequests numPINRequests;
bool checkSignatureCertificatePathToRoot;
bool signatureUseCRLs;
- bool signatureCRLExpiryNearWarning;
- int signatureCRLNearExpiryInterval;
EncryptionAlgorithm encryptionAlgorithm;
EncryptEmail encryptEmail;
bool saveMessagesEncrypted;
unsigned int numDirectoryServers;
CertificateSource certificateSource;
CertificateSource cRLSource;
+ bool warnSendUnsigned;
+ int numPINRequestsInterval;
+ bool signatureCertificateExpiryNearWarning;
+ int signatureCertificateExpiryNearInterval;
+ bool cACertificateExpiryNearWarning;
+ int cACertificateExpiryNearInterval;
+ bool rootCertificateExpiryNearWarning;
+ int rootCertificateExpiryNearInterval;
+ bool warnSendUnencrypted;
+ bool checkCertificatePath;
+ bool receiverCertificateExpiryNearWarning;
+ int receiverCertificateExpiryNearWarningInterval;
+ bool certificateInChainExpiryNearWarning;
+ int certificateInChainExpiryNearWarningInterval;
+ bool receiverEmailAddressNotInCertificateWarning;
} Config;
Config config;
-#define NEAR_EXPIRY 21
+#define NEAR_EXPIRY 14
bool initialize()
{
config.sendCertificates = SendCert_SendChainWithRoot;
config.signEmail = SignEmail_SignAll;
config.saveSentSignatures = true;
- config.certificateExpiryNearWarning = true;
config.warnNoCertificate = true;
config.numPINRequests = PinRequest_Always;
config.checkSignatureCertificatePathToRoot = true;
config.signatureUseCRLs = true;
- config.signatureCRLExpiryNearWarning = true;
- config.signatureCRLNearExpiryInterval = NEAR_EXPIRY;
config.encryptionAlgorithm = EncryptAlg_RSA;
config.encryptEmail = EncryptEmail_Ask;
config.saveMessagesEncrypted = true;
config.numDirectoryServers = 0;
config.certificateSource = CertSrc_Server;
config.cRLSource = CertSrc_Server;
+ config.warnSendUnsigned = true;
+ config.numPINRequestsInterval = NEAR_EXPIRY;
+ config.signatureCertificateExpiryNearWarning = true;
+ config.signatureCertificateExpiryNearInterval = NEAR_EXPIRY;
+ config.cACertificateExpiryNearWarning = true;
+ config.cACertificateExpiryNearInterval = NEAR_EXPIRY;
+ config.rootCertificateExpiryNearWarning = true;
+ config.rootCertificateExpiryNearInterval = NEAR_EXPIRY;
+ config.warnSendUnencrypted = false;
+ config.checkCertificatePath = true;
+ config.receiverCertificateExpiryNearWarning = true;
+ config.receiverCertificateExpiryNearWarningInterval = NEAR_EXPIRY;
+ config.certificateInChainExpiryNearWarning = true;
+ config.certificateInChainExpiryNearWarningInterval = NEAR_EXPIRY;
+ config.receiverEmailAddressNotInCertificateWarning = true;
+
return true;
};
return config.signEmail;
}
-void setSaveSentSignatures( bool flag )
+
+
+
+
+void setWarnSendUnsigned( bool flag )
{
- config.saveSentSignatures = flag;
+ config.warnSendUnsigned = flag;
}
-bool saveSentSignatures()
+bool warnSendUnsigned()
{
- return config.saveSentSignatures;
+ return config.warnSendUnsigned;
}
-void setCertificateExpiryNearWarning( bool flag )
+
+
+
+
+
+void setSaveSentSignatures( bool flag )
{
- config.certificateExpiryNearWarning = flag;
+ config.saveSentSignatures = flag;
}
-bool certificateExpiryNearWarning()
+bool saveSentSignatures()
{
- return config.certificateExpiryNearWarning;
+ return config.saveSentSignatures;
}
void setWarnNoCertificate( bool flag )
return config.numPINRequests;
}
+
+
+
+
+void setNumPINRequestsInterval( int interval )
+{
+ config.numPINRequestsInterval = interval;
+}
+
+int numPINRequestsInterval()
+{
+ return config.numPINRequestsInterval;
+}
+
+
+
+
+
+
+
void setCheckSignatureCertificatePathToRoot( bool flag )
{
config.checkSignatureCertificatePathToRoot = flag;
return config.signatureUseCRLs;
}
-void setSignatureCRLExpiryNearWarning( bool flag )
+
+
+
+
+
+void setSignatureCertificateExpiryNearWarning( bool flag )
+{
+ config.signatureCertificateExpiryNearWarning = flag;
+}
+
+bool signatureCertificateExpiryNearWarning( void )
+{
+ return config.signatureCertificateExpiryNearWarning;
+}
+
+void setSignatureCertificateExpiryNearInterval( int interval )
{
- config.signatureCRLExpiryNearWarning = flag;
+ config.signatureCertificateExpiryNearInterval = interval;
}
-bool signatureCRLExpiryNearWarning()
+int signatureCertificateExpiryNearInterval( void )
{
- return config.signatureCRLExpiryNearWarning;
+ return config.signatureCertificateExpiryNearInterval;
}
-void setSignatureCRLNearExpiryInterval( int interval )
+void setCACertificateExpiryNearWarning( bool flag )
{
- config.signatureCRLNearExpiryInterval = interval;
+ config.cACertificateExpiryNearWarning = flag;
}
-int signatureCRLNearExpiryInterval()
+bool caCertificateExpiryNearWarning( void )
{
- return config.signatureCRLNearExpiryInterval;
+ return config.cACertificateExpiryNearWarning;
}
+void setCACertificateExpiryNearInterval( int interval )
+{
+ config.cACertificateExpiryNearInterval = interval;
+}
+
+int caCertificateExpiryNearInterval( void )
+{
+ return config.cACertificateExpiryNearInterval;
+}
+
+void setRootCertificateExpiryNearWarning( bool flag )
+{
+ config.rootCertificateExpiryNearWarning = flag;
+}
+
+bool rootCertificateExpiryNearWarning( void )
+{
+ return config.rootCertificateExpiryNearWarning;
+}
+
+void setRootCertificateExpiryNearInterval( int interval )
+{
+ config.rootCertificateExpiryNearInterval = interval;
+}
+
+int rootCertificateExpiryNearInterval( void )
+{
+ return config.rootCertificateExpiryNearInterval;
+}
+
+
+
+
+
+
+
const char* encryptionConfigurationDialog(){ return 0; }
return config.encryptEmail;
}
+
+
+
+
+
+void setWarnSendUnencrypted( bool flag )
+{
+ config.warnSendUnencrypted = flag;
+}
+
+bool warnSendUnencrypted()
+{
+ return config.warnSendUnencrypted;
+}
+
+
+
+
+
+
+
+
+
void setSaveMessagesEncrypted( bool flag )
{
config.saveMessagesEncrypted = flag;
return config.saveMessagesEncrypted;
}
+
+
+
+
+
+
+void setCheckCertificatePath( bool flag )
+{
+ config.checkCertificatePath = flag;
+}
+
+bool checkCertificatePath()
+{
+ return config.checkCertificatePath;
+}
+
+
+
+
+
+
+
+
void setCheckEncryptionCertificatePathToRoot( bool flag )
{
config.checkEncryptionCertificatePathToRoot = flag;
return config.checkEncryptionCertificatePathToRoot;
}
+
+
+
+
+
+
+void setReceiverCertificateExpiryNearWarning( bool flag )
+{
+ config.receiverCertificateExpiryNearWarning = flag;
+}
+
+bool receiverCertificateExpiryNearWarning()
+{
+ return config.receiverCertificateExpiryNearWarning;
+}
+
+void setReceiverCertificateExpiryNearWarningInterval( int interval )
+{
+ config.receiverCertificateExpiryNearWarningInterval = interval;
+}
+
+int receiverCertificateExpiryNearWarningInterval()
+{
+ return config.receiverCertificateExpiryNearWarningInterval;
+}
+
+void setCertificateInChainExpiryNearWarning( bool flag )
+{
+ config.certificateInChainExpiryNearWarning = flag;
+}
+
+bool certificateInChainExpiryNearWarning()
+{
+ return config.certificateInChainExpiryNearWarning;
+}
+
+void setCertificateInChainExpiryNearWarningInterval( int interval )
+{
+ config.certificateInChainExpiryNearWarningInterval = interval;
+}
+
+int certificateInChainExpiryNearWarningInterval()
+{
+ return config.certificateInChainExpiryNearWarningInterval;
+}
+
+void setReceiverEmailAddressNotInCertificateWarning( bool flag )
+{
+ config.receiverEmailAddressNotInCertificateWarning = flag;
+}
+
+bool receiverEmailAddressNotInCertificateWarning()
+{
+ return config.receiverEmailAddressNotInCertificateWarning;
+}
+
+
+
+
+
+
+
+
void setEncryptionUseCRLs( bool flag )
{
config.encryptionUseCRLs = flag;