Bugfix #949: (a) call gpgme_check_version(NULL) during initialization and (b) provide additional function libVersion(void) to retrieve the library version used - this function has been added to the CryptPlug API as new *MUST* function for all implementations.
This commit is contained in:
parent
6798c68f2f
commit
c445a85ff2
@ -300,6 +300,19 @@ typedef unsigned long SigStatusFlags;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*! \ingroup groupGeneral
|
||||||
|
\brief This function returns the version string of this cryptography
|
||||||
|
plug-in.
|
||||||
|
|
||||||
|
If the plugins initialization fails the calling process might want
|
||||||
|
to display the library version number to the user for checking if
|
||||||
|
there is an old version of the library installed...
|
||||||
|
|
||||||
|
\note This function <b>must</b> be implemented by each plug-in using
|
||||||
|
this API specification.
|
||||||
|
*/
|
||||||
|
const char* libVersion( void );
|
||||||
|
|
||||||
/*! \ingroup groupGeneral
|
/*! \ingroup groupGeneral
|
||||||
\brief This function returns a URL to be used for reporting a bug that
|
\brief This function returns a URL to be used for reporting a bug that
|
||||||
you found (or suspect, resp.) in this cryptography plug-in.
|
you found (or suspect, resp.) in this cryptography plug-in.
|
||||||
|
@ -192,6 +192,7 @@ typedef struct {
|
|||||||
bool certificateInChainExpiryNearWarning;
|
bool certificateInChainExpiryNearWarning;
|
||||||
int certificateInChainExpiryNearWarningInterval;
|
int certificateInChainExpiryNearWarningInterval;
|
||||||
bool receiverEmailAddressNotInCertificateWarning;
|
bool receiverEmailAddressNotInCertificateWarning;
|
||||||
|
const char* libVersion; // a statically allocated string with the GPGME Version used
|
||||||
} Config;
|
} Config;
|
||||||
|
|
||||||
|
|
||||||
@ -243,8 +244,8 @@ bool initialize()
|
|||||||
config.certificateInChainExpiryNearWarning = true;
|
config.certificateInChainExpiryNearWarning = true;
|
||||||
config.certificateInChainExpiryNearWarningInterval = NEAR_EXPIRY;
|
config.certificateInChainExpiryNearWarningInterval = NEAR_EXPIRY;
|
||||||
config.receiverEmailAddressNotInCertificateWarning = true;
|
config.receiverEmailAddressNotInCertificateWarning = true;
|
||||||
|
config.libVersion = gpgme_check_version (NULL);
|
||||||
return true;
|
return (gpgme_engine_check_version (GPGMEPLUG_PROTOCOL) == GPGME_No_Error);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -286,6 +287,9 @@ bool hasFeature( Feature flag )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const char* libVersion(){ return config.libVersion; }
|
||||||
|
|
||||||
|
|
||||||
const char* bugURL(){ return config.bugURL; }
|
const char* bugURL(){ return config.bugURL; }
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user