/* pgp.h
- *
- * PGP related functions.
- */
-
-/* nettle, low-level cryptographics library
- *
- * Copyright (C) 2001, 2002 Niels Möller
- *
- * The nettle library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or (at your
- * option) any later version.
- *
- * The nettle library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with the nettle library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- * MA 02111-1307, USA.
- */
+
+ PGP related functions.
+
+ Copyright (C) 2001, 2002 Niels Möller
+
+ This file is part of GNU Nettle.
+
+ GNU Nettle is free software: you can redistribute it and/or
+ modify it under the terms of either:
+
+ * the GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 3 of the License, or (at your
+ option) any later version.
+
+ or
+
+ * the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ or both in parallel, as here.
+
+ GNU Nettle is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received copies of the GNU General Public License and
+ the GNU Lesser General Public License along with this program. If
+ not, see http://www.gnu.org/licenses/.
+*/
#ifndef NETTLE_PGP_H_INCLUDED
#define NETTLE_PGP_H_INCLUDED
+#include <time.h>
+
+#include "nettle-types.h"
#include "bignum.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Name mangling */
#define pgp_put_uint32 nettle_pgp_put_uint32
#define pgp_put_uint16 nettle_pgp_put_uint16
#define pgp_sub_packet_start nettle_pgp_sub_packet_start
#define pgp_put_sub_packet nettle_pgp_put_sub_packet
#define pgp_sub_packet_end nettle_pgp_sub_packet_end
+#define pgp_put_public_rsa_key nettle_pgp_put_public_rsa_key
+#define pgp_put_rsa_sha1_signature nettle_pgp_put_rsa_sha1_signature
#define pgp_put_userid nettle_pgp_put_userid
#define pgp_crc24 nettle_pgp_crc24
#define pgp_armor nettle_pgp_armor
enum pgp_subpacket_tag
{
- /* FIXME: XXX just to it by the compiler */
- PGP_SUBPACKET_ISSUER = 0,
+ PGP_SUBPACKET_CREATION_TIME = 2,
+ PGP_SUBPACKET_SIGNATURE_EXPIRATION_TIME = 3,
+ PGP_SUBPACKET_EXPORTABLE_CERTIFICATION = 4,
+ PGP_SUBPACKET_TRUST_SIGNATURE = 5,
+ PGP_SUBPACKET_REGULAR_EXPRESSION = 6,
+ PGP_SUBPACKET_REVOCABLE = 7,
+ PGP_SUBPACKET_KEY_EXPIRATION_TIME = 9,
+ PGP_SUBPACKET_PLACEHOLDER = 10 ,
+ PGP_SUBPACKET_PREFERRED_SYMMETRIC_ALGORITHMS = 11,
+ PGP_SUBPACKET_REVOCATION_KEY = 12,
+ PGP_SUBPACKET_ISSUER_KEY_ID = 16,
+ PGP_SUBPACKET_NOTATION_DATA = 20,
+ PGP_SUBPACKET_PREFERRED_HASH_ALGORITHMS = 21,
+ PGP_SUBPACKET_PREFERRED_COMPRESSION_ALGORITHMS = 22,
+ PGP_SUBPACKET_KEY_SERVER_PREFERENCES = 23,
+ PGP_SUBPACKET_PREFERRED_KEY_SERVER = 24,
+ PGP_SUBPACKET_PRIMARY_USER_ID = 25,
+ PGP_SUBPACKET_POLICY_URL = 26,
+ PGP_SUBPACKET_KEY_FLAGS = 27,
+ PGP_SUBPACKET_SIGNERS_USER_ID = 28,
+ PGP_SUBPACKET_REASON_FOR_REVOCATION = 29,
};
+#ifdef __cplusplus
+}
+#endif
+
#endif /* NETTLE_PGP_H_INCLUDED */