Add error checking for isEmailInCertificate being called with invalid fingerprint parameter.

This commit is contained in:
Karl-Heinz Zimmer 2002-10-31 14:20:47 +00:00
parent 05f1c81b60
commit f1750eee8a

View File

@ -456,14 +456,15 @@ bool warnNoCertificate()
bool isEmailInCertificate( const char* email, const char* fingerprint )
{
bool bOk = false;
if( fingerprint ){
GpgmeCtx ctx;
GpgmeError err;
GpgmeKey rKey;
int UID_idx;
const char* attr_string;
int emailCount = 0;
bool bOk = false;
int fprLen = strlen( fingerprint );
int emailCount = 0;
fprintf( stderr, "gpgmeplug isEmailInCertificate looking for fingerprint %s\n", fingerprint );
@ -511,7 +512,9 @@ bool isEmailInCertificate( const char* email, const char* fingerprint )
fprintf( stderr, "gpgmeplug isEmailInCertificate could NOT open KEYLIST for fingerprint %s\n", fingerprint );
}
gpgme_release( ctx );
}else{
fprintf( stderr, "gpgmeplug isEmailInCertificate called with parameter FINGERPRINT being EMPTY\n" );
}
return bOk;
}