diff options
Diffstat (limited to 'kbx/keybox-blob.c')
-rw-r--r-- | kbx/keybox-blob.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/kbx/keybox-blob.c b/kbx/keybox-blob.c index 0fced7e1c..b953e8c57 100644 --- a/kbx/keybox-blob.c +++ b/kbx/keybox-blob.c @@ -67,7 +67,6 @@ - u16 Blob flags bit 0 = contains secret key material (not used) bit 1 = ephemeral blob (e.g. used while querying external resources) - bit 2 = blob has an UBID field. - u32 Offset to the OpenPGP keyblock or the X.509 DER encoded certificate - u32 The length of the keyblock or certificate @@ -145,9 +144,6 @@ - bN Space for the keyblock or certificate. - bN RFU. This is the remaining space after keyblock and before the checksum. Not part of the SHA-1 checksum. - - bN Only if blob flags bit 2 is set: 20 octet Unique Blob-ID (UBID). - This is the SHA-1 checksum of the keyblock or certificate. - This is not part of the SHA-1 checksum below. - b20 SHA-1 checksum (useful for KS synchronization?) Note, that KBX versions before GnuPG 2.1 used an MD5 checksum. However it was only created but never checked. @@ -694,8 +690,8 @@ create_blob_finish (KEYBOXBLOB blob) unsigned char *pp; size_t n; - /* Write placeholders for the UBID and the checksum */ - put_membuf (a, NULL, 40); + /* Write placeholders for the checksum. */ + put_membuf (a, NULL, 20); /* get the memory area */ n = 0; /* (Just to avoid compiler warning.) */ @@ -729,9 +725,6 @@ create_blob_finish (KEYBOXBLOB blob) blob->fixups = NULL; } - /* Compute and store the UBID. (image_off) (image_len) */ - gcry_md_hash_buffer (GCRY_MD_SHA1, p + n - 40, p + get32 (p+8), get32 (p+12)); - /* Compute and store the SHA-1 checksum. */ gcry_md_hash_buffer (GCRY_MD_SHA1, p + n - 20, p, n - 40); |