mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-22 19:58:29 +01:00
Add pubkey letters e and E for ECC.
This does not mean we have any kind of ECC support now. It is merely to avoid printing a question mark for the algorithm. Trailing white space changes as usual.
This commit is contained in:
parent
fc1680abdf
commit
04b0b050ff
@ -1196,6 +1196,8 @@ write_header( IOBUF out, int ctb, u32 len )
|
|||||||
static int
|
static int
|
||||||
write_sign_packet_header( IOBUF out, int ctb, u32 len )
|
write_sign_packet_header( IOBUF out, int ctb, u32 len )
|
||||||
{
|
{
|
||||||
|
(void)ctb;
|
||||||
|
|
||||||
/* work around a bug in the pgp read function for signature packets,
|
/* work around a bug in the pgp read function for signature packets,
|
||||||
* which are not correctly coded and silently assume at some
|
* which are not correctly coded and silently assume at some
|
||||||
* point 2 byte length headers.*/
|
* point 2 byte length headers.*/
|
||||||
@ -1305,6 +1307,8 @@ write_new_header( IOBUF out, int ctb, u32 len, int hdrlen )
|
|||||||
static int
|
static int
|
||||||
write_version( IOBUF out, int ctb )
|
write_version( IOBUF out, int ctb )
|
||||||
{
|
{
|
||||||
|
(void)ctb;
|
||||||
|
|
||||||
if( iobuf_put( out, 3 ) )
|
if( iobuf_put( out, 3 ) )
|
||||||
return -1;
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -759,6 +759,8 @@ skip_unusable(void *dummy,u32 *keyid,PKT_user_id *uid)
|
|||||||
int unusable=0;
|
int unusable=0;
|
||||||
KBNODE keyblock;
|
KBNODE keyblock;
|
||||||
|
|
||||||
|
(void)dummy;
|
||||||
|
|
||||||
keyblock=get_pubkeyblock(keyid);
|
keyblock=get_pubkeyblock(keyid);
|
||||||
if(!keyblock)
|
if(!keyblock)
|
||||||
{
|
{
|
||||||
|
@ -3088,7 +3088,9 @@ main (int argc, char **argv )
|
|||||||
if(opt.def_cipher_algo==0 &&
|
if(opt.def_cipher_algo==0 &&
|
||||||
(ascii_strcasecmp(def_cipher_string,"idea")==0
|
(ascii_strcasecmp(def_cipher_string,"idea")==0
|
||||||
|| ascii_strcasecmp(def_cipher_string,"s1")==0))
|
|| ascii_strcasecmp(def_cipher_string,"s1")==0))
|
||||||
|
{
|
||||||
idea_cipher_warn(1);
|
idea_cipher_warn(1);
|
||||||
|
}
|
||||||
xfree(def_cipher_string); def_cipher_string = NULL;
|
xfree(def_cipher_string); def_cipher_string = NULL;
|
||||||
if( check_cipher_algo(opt.def_cipher_algo) )
|
if( check_cipher_algo(opt.def_cipher_algo) )
|
||||||
log_error(_("selected cipher algorithm is invalid\n"));
|
log_error(_("selected cipher algorithm is invalid\n"));
|
||||||
|
@ -636,6 +636,8 @@ keydb_locate_writable (KEYDB_HANDLE hd, const char *reserved)
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
(void)reserved;
|
||||||
|
|
||||||
if (!hd)
|
if (!hd)
|
||||||
return G10ERR_INV_ARG;
|
return G10ERR_INV_ARG;
|
||||||
|
|
||||||
|
@ -51,6 +51,8 @@ pubkey_letter( int algo )
|
|||||||
case PUBKEY_ALGO_ELGAMAL_E: return 'g';
|
case PUBKEY_ALGO_ELGAMAL_E: return 'g';
|
||||||
case PUBKEY_ALGO_ELGAMAL: return 'G' ;
|
case PUBKEY_ALGO_ELGAMAL: return 'G' ;
|
||||||
case PUBKEY_ALGO_DSA: return 'D' ;
|
case PUBKEY_ALGO_DSA: return 'D' ;
|
||||||
|
case PUBKEY_ALGO_ECDSA: return 'E' ; /* ECC DSA (sign only) */
|
||||||
|
case PUBKEY_ALGO_ECDH: return 'e' ; /* ECC DH (encrypt only) */
|
||||||
default: return '?';
|
default: return '?';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -264,7 +264,9 @@ symkey_decrypt_seskey( DEK *dek, byte *seskey, size_t slen )
|
|||||||
resulted in a garbage algorithm byte, but it's close enough since
|
resulted in a garbage algorithm byte, but it's close enough since
|
||||||
a bogus byte here will fail later. */
|
a bogus byte here will fail later. */
|
||||||
if(dek->algo==CIPHER_ALGO_IDEA)
|
if(dek->algo==CIPHER_ALGO_IDEA)
|
||||||
|
{
|
||||||
idea_cipher_warn(0);
|
idea_cipher_warn(0);
|
||||||
|
}
|
||||||
|
|
||||||
memcpy(dek->key, seskey + 1, dek->keylen);
|
memcpy(dek->key, seskey + 1, dek->keylen);
|
||||||
|
|
||||||
|
@ -47,8 +47,11 @@
|
|||||||
#define PUBKEY_ALGO_RSA_S 3 /* RSA sign only */
|
#define PUBKEY_ALGO_RSA_S 3 /* RSA sign only */
|
||||||
#define PUBKEY_ALGO_ELGAMAL_E 16 /* encrypt only ElGamal (but not for v3)*/
|
#define PUBKEY_ALGO_ELGAMAL_E 16 /* encrypt only ElGamal (but not for v3)*/
|
||||||
#define PUBKEY_ALGO_DSA 17
|
#define PUBKEY_ALGO_DSA 17
|
||||||
|
#define PUBKEY_ALGO_ECDH 18
|
||||||
|
#define PUBKEY_ALGO_ECDSA 19
|
||||||
#define PUBKEY_ALGO_ELGAMAL 20 /* sign and encrypt elgamal */
|
#define PUBKEY_ALGO_ELGAMAL 20 /* sign and encrypt elgamal */
|
||||||
|
|
||||||
|
|
||||||
#define PUBKEY_USAGE_SIG 1 /* key is good for signatures */
|
#define PUBKEY_USAGE_SIG 1 /* key is good for signatures */
|
||||||
#define PUBKEY_USAGE_ENC 2 /* key is good for encryption */
|
#define PUBKEY_USAGE_ENC 2 /* key is good for encryption */
|
||||||
#define PUBKEY_USAGE_CERT 4 /* key is also good to certify other keys*/
|
#define PUBKEY_USAGE_CERT 4 /* key is also good to certify other keys*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user