diff options
Diffstat (limited to 'common/util.h')
-rw-r--r-- | common/util.h | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/common/util.h b/common/util.h index f06701fc0..fc3dd02df 100644 --- a/common/util.h +++ b/common/util.h @@ -42,6 +42,12 @@ #ifndef GPG_ERR_FULLY_CANCELED #define GPG_ERR_FULLY_CANCELED 198 #endif +#ifndef GPG_ERR_INV_CURVE +#define GPG_ERR_INV_CURVE 187 +#endif +#ifndef GPG_ERR_UNKNOWN_CURVE +#define GPG_ERR_UNKNOWN_CURVE 188 +#endif /* Hash function used with libksba. */ @@ -75,10 +81,10 @@ /* GCC attributes. */ -#if __GNUC__ >= 4 +#if __GNUC__ >= 4 # define GNUPG_GCC_A_SENTINEL(a) __attribute__ ((sentinel(a))) #else -# define GNUPG_GCC_A_SENTINEL(a) +# define GNUPG_GCC_A_SENTINEL(a) #endif @@ -132,14 +138,14 @@ int answer_is_yes_no_quit (const char *s); int answer_is_okay_cancel (const char *s, int def_answer); /*-- xreadline.c --*/ -ssize_t read_line (FILE *fp, +ssize_t read_line (FILE *fp, char **addr_of_buffer, size_t *length_of_buffer, size_t *max_length); /*-- b64enc.c and b64dec.c --*/ -struct b64state -{ +struct b64state +{ unsigned int flags; int idx; int quad_count; @@ -184,9 +190,9 @@ unsigned char *make_canon_sexp_from_rsa_pk (const void *m, size_t mlen, size_t *r_len); gpg_error_t get_rsa_pk_from_canon_sexp (const unsigned char *keydata, size_t keydatalen, - unsigned char const **r_n, + unsigned char const **r_n, size_t *r_nlen, - unsigned char const **r_e, + unsigned char const **r_e, size_t *r_elen); gpg_error_t get_pk_algo_from_canon_sexp (const unsigned char *keydata, size_t keydatalen, @@ -209,6 +215,11 @@ char *percent_unescape (const char *string, int nulrepl); size_t percent_plus_unescape_inplace (char *string, int nulrepl); size_t percent_unescape_inplace (char *string, int nulrepl); +/*-- openpgp-oid.c --*/ +gpg_error_t openpgp_oid_from_str (const char *string, gcry_mpi_t *r_mpi); +char *openpgp_oid_to_str (gcry_mpi_t a); + + /*-- homedir.c --*/ const char *standard_homedir (void); @@ -226,7 +237,7 @@ const char *dirmngr_socket_name (void); gpgconf. */ #define GNUPG_MODULE_NAME_AGENT 1 #define GNUPG_MODULE_NAME_PINENTRY 2 -#define GNUPG_MODULE_NAME_SCDAEMON 3 +#define GNUPG_MODULE_NAME_SCDAEMON 3 #define GNUPG_MODULE_NAME_DIRMNGR 4 #define GNUPG_MODULE_NAME_PROTECT_TOOL 5 #define GNUPG_MODULE_NAME_CHECK_PATTERN 6 @@ -281,7 +292,7 @@ int gnupg_compare_version (const char *a, const char *b); #ifndef HAVE_TTYNAME /* Systems without ttyname (W32) will merely return NULL. */ static inline char * -ttyname (int fd) +ttyname (int fd) { (void)fd; return NULL; |