1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-14 21:47:19 +02:00

Bug in blowfish behoben

This commit is contained in:
Werner Koch 1998-01-06 21:01:36 +00:00
parent 6e0fd3df65
commit 0d9ffec5ef
15 changed files with 467 additions and 164 deletions

View file

@ -284,6 +284,23 @@ check_secret_key( PKT_secret_cert *cert )
return rc;
}
/****************
* check wether the secret key is protected.
* Returns: 0 not protected, -1 on error or the protection algorithm
*/
int
is_secret_key_protected( PKT_secret_cert *cert )
{
if( cert->pubkey_algo == PUBKEY_ALGO_ELGAMAL )
return cert->d.elg.is_protected? cert->d.elg.protect_algo : 0;
#ifdef HAVE_RSA_CIPHER
else if( cert->pubkey_algo == PUBKEY_ALGO_RSA )
return cert->d.rsa.is_protected? cert->d.rsa.protect_algo : 0;
#endif
else
return -1; /* unsupported */
}
/****************
* Protect the secret key certificate with the passphrase from DEK