mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* parse-packet.c (parse_key): Support a SHA1 checksum as per
draft-rfc2440-bis04. * packet.h (PKT_secret_key): Add field sha1chk. * seckey-cert.c (do_check): Check the SHA1 checksum (protect_secret_key): And create it. * build-packet.c (do_secret_key): Mark it as sha-1 protected. * g10.c, options.h: New option --simple-sk-checksum.
This commit is contained in:
parent
e906ef5f5b
commit
60e0b2ad92
8 changed files with 113 additions and 34 deletions
|
@ -218,6 +218,7 @@ enum cmd_and_opt_values { aNull = 0,
|
|||
oS2KMode,
|
||||
oS2KDigest,
|
||||
oS2KCipher,
|
||||
oSimpleSKChecksum,
|
||||
oCharset,
|
||||
oNotDashEscaped,
|
||||
oEscapeFrom,
|
||||
|
@ -412,6 +413,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||
N_("|NAME|use message digest algorithm NAME for passphrases")},
|
||||
{ oS2KCipher, "s2k-cipher-algo",2,
|
||||
N_("|NAME|use cipher algorithm NAME for passphrases")},
|
||||
{ oSimpleSKChecksum, "simple-sk-checksum", 0, "@"},
|
||||
{ oCipherAlgo, "cipher-algo", 2 , N_("|NAME|use cipher algorithm NAME")},
|
||||
{ oDigestAlgo, "digest-algo", 2 , N_("|NAME|use message digest algorithm NAME")},
|
||||
{ oCompressAlgo, "compress-algo", 1 , N_("|N|use compress algorithm N")},
|
||||
|
@ -1132,7 +1134,7 @@ main( int argc, char **argv )
|
|||
case oS2KMode: opt.s2k_mode = pargs.r.ret_int; break;
|
||||
case oS2KDigest: s2k_digest_string = m_strdup(pargs.r.ret_str); break;
|
||||
case oS2KCipher: s2k_cipher_string = m_strdup(pargs.r.ret_str); break;
|
||||
|
||||
case oSimpleSKChecksum: opt.simple_sk_checksum = 1; break;
|
||||
case oNoEncryptTo: opt.no_encrypt_to = 1; break;
|
||||
case oEncryptTo: /* store the recipient in the second list */
|
||||
sl = add_to_strlist2( &remusr, pargs.r.ret_str, utf8_strings );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue