diff options
author | David Shaw <[email protected]> | 2003-11-21 01:11:25 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2003-11-21 01:11:25 +0000 |
commit | 85a80265c7cac8f04faf54c9ed1d263846d6c150 (patch) | |
tree | 0eccd6ba1422e472564d8221b05e755db277950d /g10/seskey.c | |
parent | * util.h: Add prototype for match_multistr(). (diff) | |
download | gnupg-85a80265c7cac8f04faf54c9ed1d263846d6c150.tar.gz gnupg-85a80265c7cac8f04faf54c9ed1d263846d6c150.zip |
* seskey.c (do_encode_md): Comment about earlier (pre-PGP 2.3) encodings.
* misc.c (compress_algo_to_string): Translate "Uncompressed". Requested by
Tommi Vainikainen. (string_to_compress_algo): Include multi-string for
"uncompressed|none".
Diffstat (limited to 'g10/seskey.c')
-rw-r--r-- | g10/seskey.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/g10/seskey.c b/g10/seskey.c index fc912eeb5..881dd2c04 100644 --- a/g10/seskey.c +++ b/g10/seskey.c @@ -175,6 +175,16 @@ do_encode_md( MD_HANDLE md, int algo, size_t len, unsigned nbits, : mpi_alloc( (nframe+BYTES_PER_MPI_LIMB-1) / BYTES_PER_MPI_LIMB ); mpi_set_buffer( a, frame, nframe, 0 ); m_free(frame); + + /* Note that PGP before version 2.3 encoded the MD as: + * + * 0 1 MD(16 bytes) 0 PAD(n bytes) 1 + * + * The MD is always 16 bytes here because it's always MD5. We do + * not support pre-v2.3 signatures, but I'm including this comment + * so the information is easily found in the future. + */ + return a; } @@ -214,4 +224,3 @@ encode_md_value( int pubkey_algo, MD_HANDLE md, int hash_algo, } return frame; } - |