Support for various warnings about expiring encryption certificates.
Support for checking encryption certificate paths. Needs GPGME support.
This commit is contained in:
parent
a86b6932a9
commit
06cc124c5c
@ -771,6 +771,14 @@ void setReceiverCertificateExpiryNearWarning( bool );
|
|||||||
bool receiverCertificateExpiryNearWarning( void );
|
bool receiverCertificateExpiryNearWarning( void );
|
||||||
|
|
||||||
|
|
||||||
|
/*! \ingroup groupConfigCrypt
|
||||||
|
\brief Returns the number of days until the specified receiver
|
||||||
|
certificate expires.
|
||||||
|
*/
|
||||||
|
int receiverCertificateDaysLeftToExpiry( const char* certificate );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*! \ingroup groupConfigCrypt
|
/*! \ingroup groupConfigCrypt
|
||||||
\brief Specifies the number of days which a receiver certificate
|
\brief Specifies the number of days which a receiver certificate
|
||||||
must be valid before it is considered to expire in the near future.
|
must be valid before it is considered to expire in the near future.
|
||||||
@ -811,6 +819,13 @@ void setCertificateInChainExpiryNearWarningInterval( int );
|
|||||||
int certificateInChainExpiryNearWarningInterval( void );
|
int certificateInChainExpiryNearWarningInterval( void );
|
||||||
|
|
||||||
|
|
||||||
|
/*! \ingroup groupConfigCrypt
|
||||||
|
\brief Returns the number of days until the first certificate in
|
||||||
|
the chain of the receiver certificate expires.
|
||||||
|
*/
|
||||||
|
int certificateInChainDaysLeftToExpiry( const char* certificate );
|
||||||
|
|
||||||
|
|
||||||
/*! \ingroup groupConfigCrypt
|
/*! \ingroup groupConfigCrypt
|
||||||
\brief Specifies whether a warning is emitted if the email address
|
\brief Specifies whether a warning is emitted if the email address
|
||||||
of the receiver does not appear in the certificate.
|
of the receiver does not appear in the certificate.
|
||||||
|
@ -632,6 +632,17 @@ bool receiverCertificateExpiryNearWarning()
|
|||||||
return config.receiverCertificateExpiryNearWarning;
|
return config.receiverCertificateExpiryNearWarning;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int receiverCertificateDaysLeftToExpiry( const char* certificate )
|
||||||
|
{
|
||||||
|
/* PENDING(g10)
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void setReceiverCertificateExpiryNearWarningInterval( int interval )
|
void setReceiverCertificateExpiryNearWarningInterval( int interval )
|
||||||
{
|
{
|
||||||
config.receiverCertificateExpiryNearWarningInterval = interval;
|
config.receiverCertificateExpiryNearWarningInterval = interval;
|
||||||
@ -652,6 +663,18 @@ bool certificateInChainExpiryNearWarning()
|
|||||||
return config.certificateInChainExpiryNearWarning;
|
return config.certificateInChainExpiryNearWarning;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int certificateInChainDaysLeftToExpiry( const char* certificate )
|
||||||
|
{
|
||||||
|
/* PENDING(g10)
|
||||||
|
Please return the number of days that are left until the
|
||||||
|
the first certificate in the chain of the specified certificate
|
||||||
|
expires.
|
||||||
|
*/
|
||||||
|
return 10; // dummy that triggers a warning in the MUA
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void setCertificateInChainExpiryNearWarningInterval( int interval )
|
void setCertificateInChainExpiryNearWarningInterval( int interval )
|
||||||
{
|
{
|
||||||
config.certificateInChainExpiryNearWarningInterval = interval;
|
config.certificateInChainExpiryNearWarningInterval = interval;
|
||||||
@ -1169,6 +1192,19 @@ bool encryptMessage( const char* cleartext,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PENDING(g10) Implement this
|
||||||
|
// Possible values: RSA = 1, SHA1 = 2, TripleDES = 3
|
||||||
|
//gpgme_set_encryption_algorithm( ctx, config.encryptionAlgorithm );
|
||||||
|
|
||||||
|
|
||||||
|
// 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 )
|
||||||
|
|
||||||
|
|
||||||
err = gpgme_op_encrypt (ctx, rset, gPlaintext, gCiphertext );
|
err = gpgme_op_encrypt (ctx, rset, gPlaintext, gCiphertext );
|
||||||
if( err )
|
if( err )
|
||||||
|
Loading…
Reference in New Issue
Block a user