mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +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> (cherry picked from commit f382984966a31a4cbe572bce5370590c5490ed1e)
This commit is contained in:
parent
dddbb26155
commit
b78f293cf0
@ -184,5 +184,11 @@ typedef enum
|
||||
}
|
||||
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. */
|
||||
|
||||
|
||||
#endif /*GNUPG_COMMON_OPENPGPDEFS_H*/
|
||||
|
@ -35,10 +35,10 @@
|
||||
|
||||
|
||||
/* Constants to allocate static MPI arrays. */
|
||||
#define PUBKEY_MAX_NPKEY 5
|
||||
#define PUBKEY_MAX_NSKEY 7
|
||||
#define PUBKEY_MAX_NSIG 2
|
||||
#define PUBKEY_MAX_NENC 2
|
||||
#define PUBKEY_MAX_NPKEY OPENPGP_MAX_NPKEY
|
||||
#define PUBKEY_MAX_NSKEY OPENPGP_MAX_NSKEY
|
||||
#define PUBKEY_MAX_NSIG OPENPGP_MAX_NSIG
|
||||
#define PUBKEY_MAX_NENC OPENPGP_MAX_NENC
|
||||
|
||||
/* Usage flags */
|
||||
#define PUBKEY_USAGE_SIG GCRY_PK_USAGE_SIGN /* Good for signatures. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user