mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-08 12:44:23 +01:00
common: Provide some convenient OpenPGP related constants.
* common/openpgpdefs.h (OPENPGP_MAX_NPKEY): New. (OPENPGP_MAX_NSKEY): New. (OPENPGP_MAX_NSIG): New. (OPENPGP_MAX_NENC): New. * g10/packet.h: Define PUBKEY_MAX using the new consts. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
4a1558d0c7
commit
f382984966
@ -196,7 +196,11 @@ typedef enum
|
|||||||
}
|
}
|
||||||
compress_algo_t;
|
compress_algo_t;
|
||||||
|
|
||||||
|
/* Limits to be used for static arrays. */
|
||||||
|
#define OPENPGP_MAX_NPKEY 5 /* Maximum number of public key parameters. */
|
||||||
|
#define OPENPGP_MAX_NSKEY 7 /* Maximum number of secret key parameters. */
|
||||||
|
#define OPENPGP_MAX_NSIG 2 /* Maximum number of signature parameters. */
|
||||||
|
#define OPENPGP_MAX_NENC 2 /* Maximum number of encryption parameters. */
|
||||||
|
|
||||||
|
|
||||||
/* Decode an rfc4880 encoded S2K count. */
|
/* Decode an rfc4880 encoded S2K count. */
|
||||||
|
@ -35,10 +35,10 @@
|
|||||||
|
|
||||||
|
|
||||||
/* Constants to allocate static MPI arrays. */
|
/* Constants to allocate static MPI arrays. */
|
||||||
#define PUBKEY_MAX_NPKEY 5
|
#define PUBKEY_MAX_NPKEY OPENPGP_MAX_NPKEY
|
||||||
#define PUBKEY_MAX_NSKEY 7
|
#define PUBKEY_MAX_NSKEY OPENPGP_MAX_NSKEY
|
||||||
#define PUBKEY_MAX_NSIG 2
|
#define PUBKEY_MAX_NSIG OPENPGP_MAX_NSIG
|
||||||
#define PUBKEY_MAX_NENC 2
|
#define PUBKEY_MAX_NENC OPENPGP_MAX_NENC
|
||||||
|
|
||||||
/* Usage flags */
|
/* Usage flags */
|
||||||
#define PUBKEY_USAGE_SIG GCRY_PK_USAGE_SIGN /* Good for signatures. */
|
#define PUBKEY_USAGE_SIG GCRY_PK_USAGE_SIGN /* Good for signatures. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user