Commit 44027ec6 authored by Niels Möller's avatar Niels Möller

(enum pgp_subpacket_tag): New enum. Definition is bogus

and needs to be fixed.
Added forward declarations of structs, and prototypes for
pgp_put_public_rsa_key and pgp_put_rsa_sha1_signature.

Rev: src/nettle/pgp.h:1.3
parent fef95db8
...@@ -44,6 +44,9 @@ ...@@ -44,6 +44,9 @@
#define pgp_armor nettle_pgp_armor #define pgp_armor nettle_pgp_armor
struct nettle_buffer; struct nettle_buffer;
struct rsa_public_key;
struct rsa_private_key;
struct sha1_ctx;
int int
pgp_put_uint32(struct nettle_buffer *buffer, uint32_t i); pgp_put_uint32(struct nettle_buffer *buffer, uint32_t i);
...@@ -52,7 +55,7 @@ int ...@@ -52,7 +55,7 @@ int
pgp_put_uint16(struct nettle_buffer *buffer, unsigned i); pgp_put_uint16(struct nettle_buffer *buffer, unsigned i);
int int
pgp_put_mpi(struct nettle_buffer *buffer, mpz_t x); pgp_put_mpi(struct nettle_buffer *buffer, const mpz_t x);
int int
pgp_put_string(struct nettle_buffer *buffer, pgp_put_string(struct nettle_buffer *buffer,
...@@ -85,6 +88,17 @@ pgp_put_sub_packet(struct nettle_buffer *buffer, ...@@ -85,6 +88,17 @@ pgp_put_sub_packet(struct nettle_buffer *buffer,
void void
pgp_sub_packet_end(struct nettle_buffer *buffer, unsigned start); pgp_sub_packet_end(struct nettle_buffer *buffer, unsigned start);
int
pgp_put_public_rsa_key(struct nettle_buffer *,
const struct rsa_public_key *key,
time_t timestamp);
int
pgp_put_rsa_sha1_signature(struct nettle_buffer *buffer,
const struct rsa_private_key *key,
const uint8_t *keyid,
unsigned type,
struct sha1_ctx *hash);
int int
pgp_put_userid(struct nettle_buffer *buffer, pgp_put_userid(struct nettle_buffer *buffer,
...@@ -185,4 +199,10 @@ enum pgp_signature_type ...@@ -185,4 +199,10 @@ enum pgp_signature_type
PGP_SIGN_TIMESTAMP = 0x40, PGP_SIGN_TIMESTAMP = 0x40,
}; };
enum pgp_subpacket_tag
{
/* FIXME: XXX just to it by the compiler */
PGP_SUBPACKET_ISSUER = 0,
};
#endif /* NETTLE_PGP_H_INCLUDED */ #endif /* NETTLE_PGP_H_INCLUDED */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment