+ sha1_update(&sha_ctx, sizeof(c), &c);
+ c = packet->length >> 8;
+ sha1_update(&sha_ctx, sizeof(c), &c);
+ c = packet->length & 0xFF;
+ sha1_update(&sha_ctx, sizeof(c), &c);
+ sha1_update(&sha_ctx, packet->length,
+ packet->data);
+ fingerprint->length = 20;
+ sha1_digest(&sha_ctx, fingerprint->length, fingerprint->fp);
+
+ break;
+#ifdef HAVE_NETTLE
+ case 5:
+ sha256_init(&sha2_ctx);
+ /* RFC4880bis 12.2 */
+ c = 0x9A;
+ sha256_update(&sha2_ctx, sizeof(c), &c);
+ c = packet->length >> 24;
+ sha256_update(&sha2_ctx, sizeof(c), &c);
+ c = packet->length >> 16;
+ sha256_update(&sha2_ctx, sizeof(c), &c);