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

This commit is contained in:
Karl-Heinz Zimmer 2002-10-31 14:19:47 +00:00
parent 29b7d7ad0b
commit e5210c298a

View File

@ -453,14 +453,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 );
@ -508,7 +509,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;
}