diff options
-rw-r--r-- | lib/auth_anon.c | 4 | ||||
-rw-r--r-- | lib/auth_anon.h | 4 | ||||
-rw-r--r-- | lib/auth_cert.c | 20 | ||||
-rw-r--r-- | lib/auth_cert.h | 2 | ||||
-rw-r--r-- | lib/auth_dhe.c | 4 | ||||
-rw-r--r-- | lib/auth_rsa.c | 2 | ||||
-rw-r--r-- | lib/auth_rsa_export.c | 2 | ||||
-rw-r--r-- | lib/gnutls.h.in.in | 2 | ||||
-rw-r--r-- | lib/gnutls_anon_cred.c | 22 | ||||
-rw-r--r-- | lib/gnutls_auth.c | 13 | ||||
-rw-r--r-- | lib/gnutls_cert.c | 14 | ||||
-rw-r--r-- | lib/gnutls_handshake.c | 2 | ||||
-rw-r--r-- | lib/gnutls_ui.c | 14 | ||||
-rw-r--r-- | lib/gnutls_x509.c | 46 | ||||
-rw-r--r-- | libextra/auth_srp.c | 4 | ||||
-rw-r--r-- | libextra/auth_srp.h | 4 | ||||
-rw-r--r-- | libextra/auth_srp_passwd.c | 2 | ||||
-rw-r--r-- | libextra/ext_srp.c | 2 | ||||
-rw-r--r-- | libextra/gnutls_extra.h | 2 | ||||
-rw-r--r-- | libextra/gnutls_openpgp.c | 30 | ||||
-rw-r--r-- | libextra/gnutls_openpgp.h | 8 | ||||
-rw-r--r-- | libextra/gnutls_srp.c | 48 | ||||
-rw-r--r-- | src/cli.c | 6 | ||||
-rw-r--r-- | src/serv.c | 10 | ||||
-rw-r--r-- | src/tests.c | 6 | ||||
-rw-r--r-- | src/tls_test.c | 6 |
26 files changed, 140 insertions, 139 deletions
diff --git a/lib/auth_anon.c b/lib/auth_anon.c index c66395261c..8875f2ff50 100644 --- a/lib/auth_anon.c +++ b/lib/auth_anon.c @@ -70,7 +70,7 @@ int gen_anon_server_kx( gnutls_session session, opaque** data) { uint8 *data_g; uint8 *data_X; ANON_SERVER_AUTH_INFO info; - const GNUTLS_ANON_SERVER_CREDENTIALS cred; + const gnutls_anon_server_credentials cred; cred = _gnutls_get_cred(session->gnutls_key, GNUTLS_CRD_ANON, NULL); if (cred == NULL) { @@ -285,7 +285,7 @@ int proc_anon_client_kx( gnutls_session session, opaque* data, int data_size) { size_t _n_Y; GNUTLS_MPI g, p; int bits, ret; - const GNUTLS_ANON_SERVER_CREDENTIALS cred; + const gnutls_anon_server_credentials cred; cred = _gnutls_get_cred(session->gnutls_key, GNUTLS_CRD_ANON, NULL); if (cred == NULL) { diff --git a/lib/auth_anon.h b/lib/auth_anon.h index a58c1264ce..2bfd0f53e5 100644 --- a/lib/auth_anon.h +++ b/lib/auth_anon.h @@ -4,9 +4,9 @@ typedef struct { gnutls_dh_params dh_params; } ANON_SERVER_CREDENTIALS_INT; -#define GNUTLS_ANON_SERVER_CREDENTIALS ANON_SERVER_CREDENTIALS_INT* +#define gnutls_anon_server_credentials ANON_SERVER_CREDENTIALS_INT* -#define GNUTLS_ANON_CLIENT_CREDENTIALS void* +#define gnutls_anon_client_credentials void* typedef struct ANON_CLIENT_AUTH_INFO_INT { int dh_prime_bits; diff --git a/lib/auth_cert.c b/lib/auth_cert.c index 080708626f..eb9a9bb3d1 100644 --- a/lib/auth_cert.c +++ b/lib/auth_cert.c @@ -164,7 +164,7 @@ inline /* Locates the most appropriate x509 certificate using the * given DN. If indx == -1 then no certificate was found. */ -static int _find_x509_cert(const GNUTLS_CERTIFICATE_CREDENTIALS cred, +static int _find_x509_cert(const gnutls_certificate_credentials cred, opaque * _data, int _data_size, gnutls_pk_algorithm * pk_algos, int pk_algos_length, int *indx) @@ -234,7 +234,7 @@ static int _find_x509_cert(const GNUTLS_CERTIFICATE_CREDENTIALS cred, /* Locates the most appropriate openpgp cert */ -static int _find_openpgp_cert(const GNUTLS_CERTIFICATE_CREDENTIALS cred, +static int _find_openpgp_cert(const gnutls_certificate_credentials cred, gnutls_pk_algorithm * pk_algos, int pk_algos_length, int *indx) { @@ -281,7 +281,7 @@ static int _gnutls_find_acceptable_client_cert(gnutls_session session, int result, size; int indx = -1; int i, j, try = 0, *ij_map = NULL; - const GNUTLS_CERTIFICATE_CREDENTIALS cred; + const gnutls_certificate_credentials cred; opaque *data = _data; int data_size = _data_size; @@ -666,7 +666,7 @@ int _gnutls_proc_x509_server_certificate(gnutls_session session, opaque * data, int size, len, ret; opaque *p = data; CERTIFICATE_AUTH_INFO info; - const GNUTLS_CERTIFICATE_CREDENTIALS cred; + const gnutls_certificate_credentials cred; int dsize = data_size; int i, j, x; gnutls_cert *peer_certificate_list; @@ -800,7 +800,7 @@ int _gnutls_proc_openpgp_server_certificate(gnutls_session session, int size, ret, len; opaque *p = data; CERTIFICATE_AUTH_INFO info; - const GNUTLS_CERTIFICATE_CREDENTIALS cred; + const gnutls_certificate_credentials cred; int dsize = data_size; int i, x; gnutls_cert *peer_certificate_list; @@ -1003,7 +1003,7 @@ int _gnutls_proc_cert_cert_req(gnutls_session session, opaque * data, { int size, ret; opaque *p = data; - const GNUTLS_CERTIFICATE_CREDENTIALS cred; + const gnutls_certificate_credentials cred; CERTIFICATE_AUTH_INFO info; int dsize = data_size; int i, j, ind; @@ -1197,7 +1197,7 @@ int _gnutls_proc_cert_client_cert_vrfy(gnutls_session session, opaque * data, #define CERTTYPE_SIZE 3 int _gnutls_gen_cert_server_cert_req(gnutls_session session, opaque ** data) { - const GNUTLS_CERTIFICATE_CREDENTIALS cred; + const gnutls_certificate_credentials cred; int size; opaque *pdata; @@ -1250,7 +1250,7 @@ int _gnutls_find_apr_cert(gnutls_session session, gnutls_cert ** apr_cert_list, int *apr_cert_list_length, gnutls_private_key ** apr_pkey) { - const GNUTLS_CERTIFICATE_CREDENTIALS cred; + const gnutls_certificate_credentials cred; int ind; cred = @@ -1329,7 +1329,7 @@ const gnutls_cert *_gnutls_server_find_cert(gnutls_session session, gnutls_pk_algorithm requested_algo) { int i; - const GNUTLS_CERTIFICATE_CREDENTIALS x509_cred; + const gnutls_certificate_credentials x509_cred; x509_cred = _gnutls_get_cred(session->gnutls_key, GNUTLS_CRD_CERTIFICATE, @@ -1361,7 +1361,7 @@ int _gnutls_server_find_cert_list_index(gnutls_session session, gnutls_pk_algorithm requested_algo) { int i, index = -1, j; - const GNUTLS_CERTIFICATE_CREDENTIALS cred; + const gnutls_certificate_credentials cred; int my_certs_length; int *ij_map = NULL; diff --git a/lib/auth_cert.h b/lib/auth_cert.h index 7d9fedafd3..adeb6a8c1c 100644 --- a/lib/auth_cert.h +++ b/lib/auth_cert.h @@ -53,7 +53,7 @@ typedef struct { } CERTIFICATE_CREDENTIALS_INT; /* typedef CERTIFICATE_CREDENTIALS_INT * CERTIFICATE_CREDENTIALS; */ -#define GNUTLS_CERTIFICATE_CREDENTIALS CERTIFICATE_CREDENTIALS_INT* +#define gnutls_certificate_credentials CERTIFICATE_CREDENTIALS_INT* typedef struct CERTIFICATE_AUTH_INFO_INT { int certificate_requested; /* if the peer requested certificate diff --git a/lib/auth_dhe.c b/lib/auth_dhe.c index 26925b200b..5f61104e81 100644 --- a/lib/auth_dhe.c +++ b/lib/auth_dhe.c @@ -97,7 +97,7 @@ static int gen_dhe_server_kx(gnutls_session session, opaque ** data) int apr_cert_list_length; gnutls_datum signature, ddata; CERTIFICATE_AUTH_INFO info; - const GNUTLS_CERTIFICATE_CREDENTIALS cred; + const gnutls_certificate_credentials cred; cred = _gnutls_get_cred(session->gnutls_key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL) { @@ -439,7 +439,7 @@ static int proc_dhe_client_kx(gnutls_session session, opaque * data, size_t _n_Y; GNUTLS_MPI g, p; int bits, ret; - const GNUTLS_CERTIFICATE_CREDENTIALS cred; + const gnutls_certificate_credentials cred; cred = _gnutls_get_cred(session->gnutls_key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL) { diff --git a/lib/auth_rsa.c b/lib/auth_rsa.c index 57c838c865..84a2f08317 100644 --- a/lib/auth_rsa.c +++ b/lib/auth_rsa.c @@ -161,7 +161,7 @@ int i; int _gnutls_get_private_rsa_params(gnutls_session session, GNUTLS_MPI **params, int* params_size) { int index; -const GNUTLS_CERTIFICATE_CREDENTIALS cred; +const gnutls_certificate_credentials cred; cred = _gnutls_get_cred(session->gnutls_key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL) { diff --git a/lib/auth_rsa_export.c b/lib/auth_rsa_export.c index f6cfbd134a..5967c9c7b3 100644 --- a/lib/auth_rsa_export.c +++ b/lib/auth_rsa_export.c @@ -83,7 +83,7 @@ static int gen_rsa_export_server_kx(gnutls_session session, opaque ** data) int apr_cert_list_length; gnutls_datum signature, ddata; CERTIFICATE_AUTH_INFO info; - const GNUTLS_CERTIFICATE_CREDENTIALS cred; + const gnutls_certificate_credentials cred; cred = _gnutls_get_cred(session->gnutls_key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL) { diff --git a/lib/gnutls.h.in.in b/lib/gnutls.h.in.in index 003c48c989..efa8cff3e8 100644 --- a/lib/gnutls.h.in.in +++ b/lib/gnutls.h.in.in @@ -248,6 +248,8 @@ typedef struct DSTRUCT* gnutls_anon_client_credentials; void gnutls_anon_free_server_credentials( gnutls_anon_server_credentials sc); int gnutls_anon_allocate_server_credentials( gnutls_anon_server_credentials *sc); +void gnutls_anon_set_server_dh_params( gnutls_anon_server_credentials res, gnutls_dh_params dh_params); + void gnutls_anon_free_client_credentials( gnutls_anon_server_credentials sc); int gnutls_anon_allocate_client_credentials( gnutls_anon_server_credentials *sc); diff --git a/lib/gnutls_anon_cred.c b/lib/gnutls_anon_cred.c index 39ce5dede1..761ea78677 100644 --- a/lib/gnutls_anon_cred.c +++ b/lib/gnutls_anon_cred.c @@ -33,27 +33,27 @@ static int anon_tmp; /** - * gnutls_anon_free_server_credentials - Used to free an allocated GNUTLS_ANON_SERVER_CREDENTIALS structure - * @sc: is an &GNUTLS_ANON_SERVER_CREDENTIALS structure. + * gnutls_anon_free_server_credentials - Used to free an allocated gnutls_anon_server_credentials structure + * @sc: is an &gnutls_anon_server_credentials structure. * * This structure is complex enough to manipulate directly thus * this helper function is provided in order to free (deallocate) * the structure. **/ -void gnutls_anon_free_server_credentials( GNUTLS_ANON_SERVER_CREDENTIALS sc) { +void gnutls_anon_free_server_credentials( gnutls_anon_server_credentials sc) { gnutls_free( sc); } /** - * gnutls_anon_allocate_server_credentials - Used to allocate an GNUTLS_ANON_SERVER CREDENTIALS structure - * @sc: is a pointer to an &GNUTLS_ANON_SERVER_CREDENTIALS structure. + * gnutls_anon_allocate_server_credentials - Used to allocate an gnutls_anon_server_credentials structure + * @sc: is a pointer to an &gnutls_anon_server_credentials structure. * * This structure is complex enough to manipulate directly thus * this helper function is provided in order to allocate * the structure. **/ -int gnutls_anon_allocate_server_credentials( GNUTLS_ANON_SERVER_CREDENTIALS *sc) { +int gnutls_anon_allocate_server_credentials( gnutls_anon_server_credentials *sc) { *sc = gnutls_calloc( 1, sizeof(ANON_SERVER_CREDENTIALS_INT)); (*sc)->dh_params = &_gnutls_dh_default_params; @@ -63,26 +63,26 @@ int gnutls_anon_allocate_server_credentials( GNUTLS_ANON_SERVER_CREDENTIALS *sc) /** - * gnutls_anon_free_client_credentials - Used to free an allocated GNUTLS_ANON_CLIENT_CREDENTIALS structure - * @sc: is an &GNUTLS_ANON_CLIENT_CREDENTIALS structure. + * gnutls_anon_free_client_credentials - Used to free an allocated gnutls_anon_client_credentials structure + * @sc: is an &gnutls_anon_client_credentials structure. * * This structure is complex enough to manipulate directly thus * this helper function is provided in order to free (deallocate) * the structure. **/ -void gnutls_anon_free_client_credentials( GNUTLS_ANON_CLIENT_CREDENTIALS sc) { +void gnutls_anon_free_client_credentials( gnutls_anon_client_credentials sc) { return; } /** * gnutls_allocate_anon_client_credentials - Used to allocate an GNUTLS_ANON_CLIENT CREDENTIALS structure - * @sc: is a pointer to an &GNUTLS_ANON_CLIENT_CREDENTIALS structure. + * @sc: is a pointer to an &gnutls_anon_client_credentials structure. * * This structure is complex enough to manipulate directly thus * this helper function is provided in order to allocate * the structure. **/ -int gnutls_anon_allocate_client_credentials( GNUTLS_ANON_CLIENT_CREDENTIALS *sc) +int gnutls_anon_allocate_client_credentials( gnutls_anon_client_credentials *sc) { /* anon_tmp is only there for *sc not to be null. * it is not used at all; diff --git a/lib/gnutls_auth.c b/lib/gnutls_auth.c index 7f3f344a18..ec293618bf 100644 --- a/lib/gnutls_auth.c +++ b/lib/gnutls_auth.c @@ -69,16 +69,15 @@ int gnutls_clear_creds( gnutls_session session) { * structure. Thus you will have to keep the structure allocated until * you call gnutls_deinit(). ] * - * For GNUTLS_CRD_ANON cred should be ANON_CLIENT_CREDENTIALS in case of a client. - * In case of a server it should be ANON_SERVER_CREDENTIALS. + * For GNUTLS_CRD_ANON cred should be gnutls_anon_client_credentials in case of a client. + * In case of a server it should be gnutls_anon_server_credentials. * - * For GNUTLS_CRD_SRP cred should be SRP_CLIENT_CREDENTIALS - * in case of a client, and SRP_SERVER_CREDENTIALS, in case + * For GNUTLS_CRD_SRP cred should be gnutls_srp_client_credentials + * in case of a client, and gnutls_srp_server_credentials, in case * of a server. * - * For GNUTLS_CRD_CERTIFICATE cred should be CERTIFICATE_CLIENT_CREDENTIALS - * in case of a client, and CERTIFICATE_SERVER_CREDENTIALS, in case - * of a server. + * For GNUTLS_CRD_CERTIFICATE cred should be gnutls_certificate_credentials. + * **/ int gnutls_credentials_set( gnutls_session session, gnutls_credentials_type type, void* cred) { AUTH_CRED * ccred=NULL, *pcred=NULL; diff --git a/lib/gnutls_cert.c b/lib/gnutls_cert.c index eeb83d6a51..3113fc04ba 100644 --- a/lib/gnutls_cert.c +++ b/lib/gnutls_cert.c @@ -95,14 +95,14 @@ void _gnutls_free_cert(gnutls_cert cert) } /** - * gnutls_certificate_free_credentials - Used to free an allocated CERTIFICATE CREDENTIALS structure - * @sc: is an &GNUTLS_CERTIFICATE_CREDENTIALS structure. + * gnutls_certificate_free_credentials - Used to free an allocated gnutls_certificate_credentials structure + * @sc: is an &gnutls_certificate_credentials structure. * * This structure is complex enough to manipulate directly thus * this helper function is provided in order to free (deallocate) * the structure. **/ -void gnutls_certificate_free_credentials(GNUTLS_CERTIFICATE_CREDENTIALS sc) +void gnutls_certificate_free_credentials(gnutls_certificate_credentials sc) { int i, j; @@ -135,14 +135,14 @@ void gnutls_certificate_free_credentials(GNUTLS_CERTIFICATE_CREDENTIALS sc) /** - * gnutls_certificate_allocate_credentials - Used to allocate an x509 SERVER CREDENTIALS structure - * @res: is a pointer to an &GNUTLS_CERTIFICATE_CREDENTIALS structure. + * gnutls_certificate_allocate_credentials - Used to allocate an gnutls_certificate_credentials structure + * @res: is a pointer to an &gnutls_certificate_credentials structure. * * This structure is complex enough to manipulate directly thus * this helper function is provided in order to allocate * the structure. **/ -int gnutls_certificate_allocate_credentials(GNUTLS_CERTIFICATE_CREDENTIALS * res) +int gnutls_certificate_allocate_credentials(gnutls_certificate_credentials * res) { *res = gnutls_calloc(1, sizeof(CERTIFICATE_CREDENTIALS_INT)); @@ -322,7 +322,7 @@ OPENPGP_VERIFY_KEY_FUNC _E_gnutls_openpgp_verify_key = NULL; int _gnutls_openpgp_cert_verify_peers(gnutls_session session) { CERTIFICATE_AUTH_INFO info; - const GNUTLS_CERTIFICATE_CREDENTIALS cred; + const gnutls_certificate_credentials cred; gnutls_certificate_status verify; int peer_certificate_list_size; diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c index a1e063ce3e..5dcc83dbf6 100644 --- a/lib/gnutls_handshake.c +++ b/lib/gnutls_handshake.c @@ -2341,7 +2341,7 @@ int _gnutls_remove_unwanted_ciphersuites(gnutls_session session, int ret = 0; GNUTLS_CipherSuite *newSuite; int newSuiteSize = 0, i, j, keep; - const GNUTLS_CERTIFICATE_CREDENTIALS x509_cred; + const gnutls_certificate_credentials x509_cred; const gnutls_cert *cert = NULL; gnutls_kx_algorithm *alg; int alg_size; diff --git a/lib/gnutls_ui.c b/lib/gnutls_ui.c index de4ff24d31..5779268e56 100644 --- a/lib/gnutls_ui.c +++ b/lib/gnutls_ui.c @@ -190,7 +190,7 @@ int gnutls_dh_get_peers_public_bits(gnutls_session session) **/ const gnutls_datum *gnutls_certificate_get_ours(gnutls_session session) { - const GNUTLS_CERTIFICATE_CREDENTIALS cred; + const gnutls_certificate_credentials cred; int index; CHECK_AUTH(GNUTLS_CRD_CERTIFICATE, NULL); @@ -295,7 +295,7 @@ int gnutls_x509_fingerprint(GNUTLS_DigestAlgorithm algo, const gnutls_datum* dat /** * gnutls_anon_set_server_dh_params - This function will set the DH parameters for a server to use - * @res: is a GNUTLS_ANON_SERVER_CREDENTIALS structure + * @res: is a gnutls_anon_server_credentials structure * @dh_params: is a structure that holds diffie hellman parameters. * * This function will set the diffie hellman parameters for an anonymous @@ -303,13 +303,13 @@ int gnutls_x509_fingerprint(GNUTLS_DigestAlgorithm algo, const gnutls_datum* dat * cipher suites. * **/ -void gnutls_anon_set_server_dh_params( GNUTLS_ANON_SERVER_CREDENTIALS res, gnutls_dh_params dh_params) { +void gnutls_anon_set_server_dh_params( gnutls_anon_server_credentials res, gnutls_dh_params dh_params) { res->dh_params = dh_params; } /** * gnutls_certificate_set_dh_params - This function will set the DH parameters for a server to use - * @res: is a GNUTLS_CERTIFICATE_CREDENTIALS structure + * @res: is a gnutls_certificate_credentials structure * @dh_params: is a structure that holds diffie hellman parameters. * * This function will set the diffie hellman parameters for a certificate @@ -317,14 +317,14 @@ void gnutls_anon_set_server_dh_params( GNUTLS_ANON_SERVER_CREDENTIALS res, gnutl * cipher suites. * **/ -int gnutls_certificate_set_dh_params(GNUTLS_CERTIFICATE_CREDENTIALS res, gnutls_dh_params dh_params) { +int gnutls_certificate_set_dh_params(gnutls_certificate_credentials res, gnutls_dh_params dh_params) { res->dh_params = dh_params; return 0; } /** * gnutls_certificate_set_rsa_params - This function will set the RSA parameters for a server to use - * @res: is a GNUTLS_CERTIFICATE_CREDENTIALS structure + * @res: is a gnutls_certificate_credentials structure * @rsa_params: is a structure that holds temporary RSA parameters. * * This function will set the temporary RSA parameters for a certificate @@ -332,7 +332,7 @@ int gnutls_certificate_set_dh_params(GNUTLS_CERTIFICATE_CREDENTIALS res, gnutls_ * cipher suites. * **/ -int gnutls_certificate_set_rsa_params(GNUTLS_CERTIFICATE_CREDENTIALS res, gnutls_rsa_params rsa_params) { +int gnutls_certificate_set_rsa_params(gnutls_certificate_credentials res, gnutls_rsa_params rsa_params) { res->rsa_params = rsa_params; return 0; } diff --git a/lib/gnutls_x509.c b/lib/gnutls_x509.c index dd815b7b8f..3309053cf7 100644 --- a/lib/gnutls_x509.c +++ b/lib/gnutls_x509.c @@ -825,7 +825,7 @@ int gnutls_x509_extract_certificate_version(const gnutls_datum * cert) int _gnutls_x509_cert_verify_peers(gnutls_session session) { CERTIFICATE_AUTH_INFO info; - const GNUTLS_CERTIFICATE_CREDENTIALS cred; + const gnutls_certificate_credentials cred; gnutls_certificate_status verify; gnutls_cert *peer_certificate_list; int peer_certificate_list_size, i, x, ret; @@ -1070,7 +1070,7 @@ int gnutls_x509_extract_certificate_serial(const gnutls_datum * cert, char* resu /* returns error if the certificate has different algorithm than * the given key parameters. */ -static int _gnutls_check_key_cert_match( GNUTLS_CERTIFICATE_CREDENTIALS res) { +static int _gnutls_check_key_cert_match( gnutls_certificate_credentials res) { if (res->pkey[res->ncerts-1].pk_algorithm != res->cert_list[res->ncerts-1][0].subject_pk_algorithm) { gnutls_assert(); @@ -1298,7 +1298,7 @@ static int parse_pem_cert_mem( gnutls_cert** cert_list, int* ncerts, /* Reads a DER or PEM certificate from memory */ -static int read_cert_mem(GNUTLS_CERTIFICATE_CREDENTIALS res, const char *cert, int cert_size, +static int read_cert_mem(gnutls_certificate_credentials res, const char *cert, int cert_size, gnutls_x509_certificate_format type) { int ret; @@ -1339,7 +1339,7 @@ static int read_cert_mem(GNUTLS_CERTIFICATE_CREDENTIALS res, const char *cert, i /* Reads a base64 encoded CA list from memory * This is to be called once. */ -static int read_ca_mem(GNUTLS_CERTIFICATE_CREDENTIALS res, const char *ca, int ca_size, +static int read_ca_mem(gnutls_certificate_credentials res, const char *ca, int ca_size, gnutls_x509_certificate_format type) { @@ -1396,7 +1396,7 @@ int _gnutls_der_check_if_rsa_key(const gnutls_datum * key_struct) * 2002-01-26: Added ability to read DSA keys. * type indicates the certificate format. */ -static int read_key_mem(GNUTLS_CERTIFICATE_CREDENTIALS res, const char *key, int key_size, +static int read_key_mem(gnutls_certificate_credentials res, const char *key, int key_size, gnutls_x509_certificate_format type) { int ret; @@ -1499,7 +1499,7 @@ static int read_key_mem(GNUTLS_CERTIFICATE_CREDENTIALS res, const char *key, int /* Reads a certificate file */ -static int read_cert_file(GNUTLS_CERTIFICATE_CREDENTIALS res, const char *certfile, +static int read_cert_file(gnutls_certificate_credentials res, const char *certfile, gnutls_x509_certificate_format type) { int siz; @@ -1522,7 +1522,7 @@ static int read_cert_file(GNUTLS_CERTIFICATE_CREDENTIALS res, const char *certfi /* Reads a base64 encoded CA file (file contains multiple certificate * authorities). This is to be called once. */ -static int read_ca_file(GNUTLS_CERTIFICATE_CREDENTIALS res, const char *cafile, +static int read_ca_file(gnutls_certificate_credentials res, const char *cafile, gnutls_x509_certificate_format type) { int siz; @@ -1547,7 +1547,7 @@ static int read_ca_file(GNUTLS_CERTIFICATE_CREDENTIALS res, const char *cafile, /* Reads PKCS-1 RSA private key file or a DSA file (in the format openssl * stores it). */ -static int read_key_file(GNUTLS_CERTIFICATE_CREDENTIALS res, const char *keyfile, +static int read_key_file(gnutls_certificate_credentials res, const char *keyfile, gnutls_x509_certificate_format type) { int siz; @@ -1567,14 +1567,14 @@ static int read_key_file(GNUTLS_CERTIFICATE_CREDENTIALS res, const char *keyfile } /** - * gnutls_certificate_set_x509_key_mem - Used to set keys in a GNUTLS_CERTIFICATE_CREDENTIALS structure - * @res: is an &GNUTLS_CERTIFICATE_CREDENTIALS structure. + * gnutls_certificate_set_x509_key_mem - Used to set keys in a gnutls_certificate_credentials structure + * @res: is an &gnutls_certificate_credentials structure. * @CERT: contains a certificate list (path) for the specified private key * @KEY: is the private key * @type: is PEM or DER * * This function sets a certificate/private key pair in the - * GNUTLS_CERTIFICATE_CREDENTIALS structure. This function may be called + * gnutls_certificate_credentials structure. This function may be called * more than once (in case multiple keys/certificates exist for the * server). * @@ -1592,7 +1592,7 @@ static int read_key_file(GNUTLS_CERTIFICATE_CREDENTIALS res, const char *keyfile * then the strings that hold their values must be null terminated. * **/ -int gnutls_certificate_set_x509_key_mem(GNUTLS_CERTIFICATE_CREDENTIALS res, const gnutls_datum* CERT, +int gnutls_certificate_set_x509_key_mem(gnutls_certificate_credentials res, const gnutls_datum* CERT, const gnutls_datum* KEY, gnutls_x509_certificate_format type) { int ret; @@ -1614,15 +1614,15 @@ int gnutls_certificate_set_x509_key_mem(GNUTLS_CERTIFICATE_CREDENTIALS res, cons } /** - * gnutls_certificate_set_x509_key_file - Used to set keys in a GNUTLS_CERTIFICATE_CREDENTIALS structure - * @res: is an &GNUTLS_CERTIFICATE_CREDENTIALS structure. + * gnutls_certificate_set_x509_key_file - Used to set keys in a gnutls_certificate_credentials structure + * @res: is an &gnutls_certificate_credentials structure. * @CERTFILE: is a file that containing the certificate list (path) for * the specified private key, in PKCS7 format, or a list of certificates * @KEYFILE: is a file that contains the private key * @type: is PEM or DER * * This function sets a certificate/private key pair in the - * GNUTLS_CERTIFICATE_CREDENTIALS structure. This function may be called + * gnutls_certificate_credentials structure. This function may be called * more than once (in case multiple keys/certificates exist for the * server). * @@ -1630,7 +1630,7 @@ int gnutls_certificate_set_x509_key_mem(GNUTLS_CERTIFICATE_CREDENTIALS res, cons * this function. * **/ -int gnutls_certificate_set_x509_key_file(GNUTLS_CERTIFICATE_CREDENTIALS res, const char *CERTFILE, +int gnutls_certificate_set_x509_key_file(gnutls_certificate_credentials res, const char *CERTFILE, const char *KEYFILE, gnutls_x509_certificate_format type) { int ret; @@ -1653,7 +1653,7 @@ int gnutls_certificate_set_x509_key_file(GNUTLS_CERTIFICATE_CREDENTIALS res, con return 0; } -static int generate_rdn_seq( GNUTLS_CERTIFICATE_CREDENTIALS res) { +static int generate_rdn_seq( gnutls_certificate_credentials res) { gnutls_datum tmp; int ret, size, i; opaque *pdata; @@ -1706,8 +1706,8 @@ opaque *pdata; } /** - * gnutls_certificate_set_x509_trust_mem - Used to add trusted CAs in a GNUTLS_CERTIFICATE_CREDENTIALS structure - * @res: is an &GNUTLS_CERTIFICATE_CREDENTIALS structure. + * gnutls_certificate_set_x509_trust_mem - Used to add trusted CAs in a gnutls_certificate_credentials structure + * @res: is an &gnutls_certificate_credentials structure. * @CA: is a list of trusted CAs or a DER certificate * @type: is DER or PEM * @@ -1715,7 +1715,7 @@ opaque *pdata; * certificates. This function may be called multiple times. * **/ -int gnutls_certificate_set_x509_trust_mem(GNUTLS_CERTIFICATE_CREDENTIALS res, +int gnutls_certificate_set_x509_trust_mem(gnutls_certificate_credentials res, const gnutls_datum *CA, gnutls_x509_certificate_format type) { int ret, ret2; @@ -1730,8 +1730,8 @@ int gnutls_certificate_set_x509_trust_mem(GNUTLS_CERTIFICATE_CREDENTIALS res, } /** - * gnutls_certificate_set_x509_trust_file - Used to add trusted CAs in a GNUTLS_CERTIFICATE_CREDENTIALS structure - * @res: is an &GNUTLS_CERTIFICATE_CREDENTIALS structure. + * gnutls_certificate_set_x509_trust_file - Used to add trusted CAs in a gnutls_certificate_credentials structure + * @res: is an &gnutls_certificate_credentials structure. * @CAFILE: is a file containing the list of trusted CAs (DER or PEM list) * @type: is PEM or DER * @@ -1740,7 +1740,7 @@ int gnutls_certificate_set_x509_trust_mem(GNUTLS_CERTIFICATE_CREDENTIALS res, * Returns the number of certificate processed. * **/ -int gnutls_certificate_set_x509_trust_file(GNUTLS_CERTIFICATE_CREDENTIALS res, +int gnutls_certificate_set_x509_trust_file(gnutls_certificate_credentials res, const char *CAFILE, gnutls_x509_certificate_format type) { int ret, ret2; diff --git a/libextra/auth_srp.c b/libextra/auth_srp.c index 93cc2b445f..4fbbc22e46 100644 --- a/libextra/auth_srp.c +++ b/libextra/auth_srp.c @@ -237,7 +237,7 @@ int gen_srp_client_kx0(gnutls_session state, opaque ** data) uint8 *data_a; char *username; char *password; - const GNUTLS_SRP_CLIENT_CREDENTIALS cred = + const gnutls_srp_client_credentials cred = _gnutls_get_cred(state->gnutls_key, GNUTLS_CRD_SRP, NULL); if (cred == NULL) { @@ -296,7 +296,7 @@ int proc_srp_server_hello(gnutls_session state, const opaque * data, int data_si opaque hd[SRP_MAX_HASH_SIZE]; char *username; char *password; - const GNUTLS_SRP_CLIENT_CREDENTIALS cred = + const gnutls_srp_client_credentials cred = _gnutls_get_cred(state->gnutls_key, GNUTLS_CRD_SRP, NULL); if (cred == NULL) { diff --git a/libextra/auth_srp.h b/libextra/auth_srp.h index 2bb74b8108..baa7dc3eb3 100644 --- a/libextra/auth_srp.h +++ b/libextra/auth_srp.h @@ -6,7 +6,7 @@ typedef struct { char* password; } SRP_CLIENT_CREDENTIALS_INT; -#define GNUTLS_SRP_CLIENT_CREDENTIALS SRP_CLIENT_CREDENTIALS_INT* +#define gnutls_srp_client_credentials SRP_CLIENT_CREDENTIALS_INT* typedef struct { char** password_file; @@ -14,7 +14,7 @@ typedef struct { int password_files; } SRP_SERVER_CREDENTIALS_INT; -#define GNUTLS_SRP_SERVER_CREDENTIALS SRP_SERVER_CREDENTIALS_INT* +#define gnutls_srp_server_credentials SRP_SERVER_CREDENTIALS_INT* /* these structures should not use allocated data */ typedef struct SRP_SERVER_AUTH_INFO_INT { diff --git a/libextra/auth_srp_passwd.c b/libextra/auth_srp_passwd.c index b647d36db1..a39bbd44ba 100644 --- a/libextra/auth_srp_passwd.c +++ b/libextra/auth_srp_passwd.c @@ -229,7 +229,7 @@ static int pwd_read_conf( const char* pconf_file, GNUTLS_SRP_PWD_ENTRY* entry, i GNUTLS_SRP_PWD_ENTRY *_gnutls_srp_pwd_read_entry( gnutls_session state, char* username, int *err) { - const GNUTLS_SRP_SERVER_CREDENTIALS cred; + const gnutls_srp_server_credentials cred; FILE * fd; char line[2*1024]; int i, len; diff --git a/libextra/ext_srp.c b/libextra/ext_srp.c index 1447d456b1..9bdb737ca9 100644 --- a/libextra/ext_srp.c +++ b/libextra/ext_srp.c @@ -75,7 +75,7 @@ int _gnutls_srp_send_params( gnutls_session state, opaque* data, int data_size) /* this function sends the client extension data (username) */ if (state->security_parameters.entity == GNUTLS_CLIENT) { - const GNUTLS_SRP_CLIENT_CREDENTIALS cred = _gnutls_get_cred( state->gnutls_key, GNUTLS_CRD_SRP, NULL); + const gnutls_srp_client_credentials cred = _gnutls_get_cred( state->gnutls_key, GNUTLS_CRD_SRP, NULL); if (cred==NULL) return 0; diff --git a/libextra/gnutls_extra.h b/libextra/gnutls_extra.h index 4707f2d9e1..3793363001 100644 --- a/libextra/gnutls_extra.h +++ b/libextra/gnutls_extra.h @@ -4,6 +4,6 @@ typedef int (*OPENPGP_VERIFY_KEY_FUNC)( const char *, const gnutls_datum *, const gnutls_datum*, int); typedef time_t (*OPENPGP_KEY_CREATION_TIME_FUNC)( const gnutls_datum*); typedef time_t (*OPENPGP_KEY_EXPIRATION_TIME_FUNC)( const gnutls_datum*); -typedef int (*OPENPGP_KEY_REQUEST)(gnutls_datum*, const GNUTLS_CERTIFICATE_CREDENTIALS, opaque*,int); +typedef int (*OPENPGP_KEY_REQUEST)(gnutls_datum*, const gnutls_certificate_credentials, opaque*,int); typedef int (*OPENPGP_FINGERPRINT)(const gnutls_datum*, char*, size_t*); typedef int (*OPENPGP_CERT2GNUTLS_CERT)(gnutls_cert*, gnutls_datum); diff --git a/libextra/gnutls_openpgp.c b/libextra/gnutls_openpgp.c index 07a3b2708c..4544e2279b 100644 --- a/libextra/gnutls_openpgp.c +++ b/libextra/gnutls_openpgp.c @@ -586,7 +586,7 @@ leave: } int -gnutls_certificate_set_openpgp_key_mem( GNUTLS_CERTIFICATE_CREDENTIALS res, +gnutls_certificate_set_openpgp_key_mem( gnutls_certificate_credentials res, gnutls_datum *cert, gnutls_datum *key ) { @@ -671,7 +671,7 @@ leave: * should only contain one key which should not be encrypted. **/ int -gnutls_certificate_set_openpgp_key_file(GNUTLS_CERTIFICATE_CREDENTIALS res, +gnutls_certificate_set_openpgp_key_file(gnutls_certificate_credentials res, char* CERTFILE, char* KEYFILE) { @@ -1314,7 +1314,7 @@ gnutls_openpgp_add_keyring_mem(gnutls_datum *keyring, * **/ int -gnutls_certificate_set_openpgp_keyring_file(GNUTLS_CERTIFICATE_CREDENTIALS c, +gnutls_certificate_set_openpgp_keyring_file(gnutls_certificate_credentials c, const char *file) { if (!c || !file) @@ -1327,7 +1327,7 @@ gnutls_certificate_set_openpgp_keyring_file(GNUTLS_CERTIFICATE_CREDENTIALS c, } int -gnutls_certificate_set_openpgp_keyring_mem( GNUTLS_CERTIFICATE_CREDENTIALS c, +gnutls_certificate_set_openpgp_keyring_mem( gnutls_certificate_credentials c, const opaque *data, size_t dlen ) { CDK_IOBUF out = NULL; @@ -1475,7 +1475,7 @@ leave: /*- * _gnutls_openpgp_request_key - Receives a key from a database, key server etc * @ret - a pointer to gnutls_datum structure. - * @cred - a GNUTLS_CERTIFICATE_CREDENTIALS structure. + * @cred - a gnutls_certificate_credentials structure. * @key_fingerprint - The keyFingerprint * @key_fingerprint_size - the size of the fingerprint * @@ -1485,7 +1485,7 @@ leave: -*/ int _gnutls_openpgp_request_key( gnutls_datum* ret, - const GNUTLS_CERTIFICATE_CREDENTIALS cred, + const gnutls_certificate_credentials cred, opaque* key_fpr, int key_fpr_size) { @@ -1525,7 +1525,7 @@ leave: * **/ int -gnutls_certificate_set_openpgp_keyserver(GNUTLS_CERTIFICATE_CREDENTIALS res, +gnutls_certificate_set_openpgp_keyserver(gnutls_certificate_credentials res, char* keyserver, int port) { @@ -1907,7 +1907,7 @@ gnutls_openpgp_key_to_xml( const gnutls_datum *cert, * **/ int -gnutls_certificate_set_openpgp_trustdb( GNUTLS_CERTIFICATE_CREDENTIALS res, +gnutls_certificate_set_openpgp_trustdb( gnutls_certificate_credentials res, char* trustdb ) { if ( !res || !trustdb ) @@ -1943,7 +1943,7 @@ _gnutls_openpgp_cert2gnutls_cert(gnutls_cert *cert, gnutls_datum raw) } int -gnutls_certificate_set_openpgp_key_mem(GNUTLS_CERTIFICATE_CREDENTIALS res, +gnutls_certificate_set_openpgp_key_mem(gnutls_certificate_credentials res, gnutls_datum *cert, gnutls_datum *key) { @@ -1951,7 +1951,7 @@ gnutls_certificate_set_openpgp_key_mem(GNUTLS_CERTIFICATE_CREDENTIALS res, } int -gnutls_certificate_set_openpgp_key_file( GNUTLS_CERTIFICATE_CREDENTIALS res, +gnutls_certificate_set_openpgp_key_file( gnutls_certificate_credentials res, char* CERTFILE, char* KEYFILE ) { @@ -2017,14 +2017,14 @@ gnutls_openpgp_add_keyring_mem( gnutls_datum *keyring, } int -gnutls_certificate_set_openpgp_keyring_file( GNUTLS_CERTIFICATE_CREDENTIALS c, +gnutls_certificate_set_openpgp_keyring_file( gnutls_certificate_credentials c, const char *file ) { return GNUTLS_E_UNIMPLEMENTED_FEATURE; } int -gnutls_certificate_set_openpgp_keyring_mem( GNUTLS_CERTIFICATE_CREDENTIALS c, +gnutls_certificate_set_openpgp_keyring_mem( gnutls_certificate_credentials c, const opaque* data, size_t dlen) { @@ -2033,7 +2033,7 @@ gnutls_certificate_set_openpgp_keyring_mem( GNUTLS_CERTIFICATE_CREDENTIALS c, int _gnutls_openpgp_request_key( gnutls_datum* ret, - const GNUTLS_CERTIFICATE_CREDENTIALS cred, + const gnutls_certificate_credentials cred, opaque* key_fpr, int key_fpr_size ) { @@ -2041,7 +2041,7 @@ _gnutls_openpgp_request_key( gnutls_datum* ret, } int -gnutls_certificate_set_openpgp_keyserver( GNUTLS_CERTIFICATE_CREDENTIALS res, +gnutls_certificate_set_openpgp_keyserver( gnutls_certificate_credentials res, char* keyserver, int port ) { @@ -2049,7 +2049,7 @@ gnutls_certificate_set_openpgp_keyserver( GNUTLS_CERTIFICATE_CREDENTIALS res, } int -gnutls_certificate_set_openpgp_trustdb( GNUTLS_CERTIFICATE_CREDENTIALS res, +gnutls_certificate_set_openpgp_trustdb( gnutls_certificate_credentials res, char* trustdb ) { return GNUTLS_E_UNIMPLEMENTED_FEATURE; diff --git a/libextra/gnutls_openpgp.h b/libextra/gnutls_openpgp.h index fb0c5ba5ea..2041d68bb3 100644 --- a/libextra/gnutls_openpgp.h +++ b/libextra/gnutls_openpgp.h @@ -12,7 +12,7 @@ typedef enum { } key_attr_t; int gnutls_certificate_set_openpgp_key_file( - GNUTLS_CERTIFICATE_CREDENTIALS res, + gnutls_certificate_credentials res, char* CERTFILE, char* KEYFILE); @@ -62,11 +62,11 @@ int gnutls_openpgp_add_keyring_file( const char *name ); int gnutls_certificate_set_openpgp_keyring_file( - GNUTLS_CERTIFICATE_CREDENTIALS c, + gnutls_certificate_credentials c, const char *file ); int gnutls_certificate_set_openpgp_keyring_mem( - GNUTLS_CERTIFICATE_CREDENTIALS c, + gnutls_certificate_credentials c, const opaque *data, size_t dlen ); @@ -98,7 +98,7 @@ int _gnutls_openpgp_cert2gnutls_cert( int _gnutls_openpgp_request_key( gnutls_datum* ret, - const GNUTLS_CERTIFICATE_CREDENTIALS cred, + const gnutls_certificate_credentials cred, opaque* key_fpr, int key_fpr_size ); diff --git a/libextra/gnutls_srp.c b/libextra/gnutls_srp.c index e6588e9e8a..1390e1cfd0 100644 --- a/libextra/gnutls_srp.c +++ b/libextra/gnutls_srp.c @@ -304,28 +304,28 @@ GNUTLS_MPI _gnutls_calc_srp_S2(GNUTLS_MPI B, GNUTLS_MPI g, GNUTLS_MPI x, GNUTLS_ } /** - * gnutls_srp_free_server_credentials - Used to free an allocated GNUTLS_SRP_CLIENT_CREDENTIALS structure - * @sc: is an &GNUTLS_SRP_CLIENT_CREDENTIALS structure. + * gnutls_srp_free_server_credentials - Used to free an allocated gnutls_srp_client_credentials structure + * @sc: is an &gnutls_srp_client_credentials structure. * * This structure is complex enough to manipulate directly thus * this helper function is provided in order to free (deallocate) * the structure. **/ -void gnutls_srp_free_client_credentials( GNUTLS_SRP_CLIENT_CREDENTIALS sc) { +void gnutls_srp_free_client_credentials( gnutls_srp_client_credentials sc) { gnutls_free( sc->username); gnutls_free( sc->password); gnutls_free( sc); } /** - * gnutls_srp_allocate_server_credentials - Used to allocate an GNUTLS_SRP_SERVER_CREDENTIALS structure - * @sc: is a pointer to an &GNUTLS_SRP_SERVER_CREDENTIALS structure. + * gnutls_srp_allocate_server_credentials - Used to allocate an gnutls_srp_server_credentials structure + * @sc: is a pointer to an &gnutls_srp_server_credentials structure. * * This structure is complex enough to manipulate directly thus * this helper function is provided in order to allocate * the structure. **/ -int gnutls_srp_allocate_client_credentials( GNUTLS_SRP_CLIENT_CREDENTIALS *sc) { +int gnutls_srp_allocate_client_credentials( gnutls_srp_client_credentials *sc) { *sc = gnutls_calloc( 1, sizeof(SRP_CLIENT_CREDENTIALS_INT)); if (*sc==NULL) return GNUTLS_E_MEMORY_ERROR; @@ -334,13 +334,13 @@ int gnutls_srp_allocate_client_credentials( GNUTLS_SRP_CLIENT_CREDENTIALS *sc) { } /** - * gnutls_srp_set_client_credentials - Used to set the username/password, in a GNUTLS_SRP_CLIENT_CREDENTIALS structure - * @res: is an &GNUTLS_SRP_CLIENT_CREDENTIALS structure. + * gnutls_srp_set_client_credentials - Used to set the username/password, in a gnutls_srp_client_credentials structure + * @res: is an &gnutls_srp_client_credentials structure. * @username: is the user's userid * @password: is the user's password * **/ -int gnutls_srp_set_client_credentials( GNUTLS_SRP_CLIENT_CREDENTIALS res, char *username, char * password) { +int gnutls_srp_set_client_credentials( gnutls_srp_client_credentials res, char *username, char * password) { if (username==NULL || password == NULL) { gnutls_assert(); @@ -360,14 +360,14 @@ int gnutls_srp_set_client_credentials( GNUTLS_SRP_CLIENT_CREDENTIALS res, char * } /** - * gnutls_srp_free_server_credentials - Used to free an allocated GNUTLS_SRP_SERVER_CREDENTIALS structure - * @sc: is an &GNUTLS_SRP_SERVER_CREDENTIALS structure. + * gnutls_srp_free_server_credentials - Used to free an allocated gnutls_srp_server_credentials structure + * @sc: is an &gnutls_srp_server_credentials structure. * * This structure is complex enough to manipulate directly thus * this helper function is provided in order to free (deallocate) * the structure. **/ -void gnutls_srp_free_server_credentials( GNUTLS_SRP_SERVER_CREDENTIALS sc) { +void gnutls_srp_free_server_credentials( gnutls_srp_server_credentials sc) { int i; for (i=0;i<sc->password_files;i++) { gnutls_free( sc->password_file[i]); @@ -380,14 +380,14 @@ int i; } /** - * gnutls_srp_allocate_server_credentials - Used to allocate an GNUTLS_SRP_SERVER_CREDENTIALS structure - * @sc: is a pointer to an &GNUTLS_SRP_SERVER_CREDENTIALS structure. + * gnutls_srp_allocate_server_credentials - Used to allocate an gnutls_srp_server_credentials structure + * @sc: is a pointer to an &gnutls_srp_server_credentials structure. * * This structure is complex enough to manipulate directly thus * this helper function is provided in order to allocate * the structure. **/ -int gnutls_srp_allocate_server_credentials( GNUTLS_SRP_SERVER_CREDENTIALS *sc) { +int gnutls_srp_allocate_server_credentials( gnutls_srp_server_credentials *sc) { *sc = gnutls_calloc( 1, sizeof(SRP_SERVER_CREDENTIALS_INT)); if (*sc==NULL) return GNUTLS_E_MEMORY_ERROR; @@ -407,13 +407,13 @@ FILE* fd; } /** - * gnutls_srp_set_server_credentials_file - Used to set the password files, in a GNUTLS_SRP_SERVER_CREDENTIALS structure - * @res: is an &GNUTLS_SRP_SERVER_CREDENTIALS structure. + * gnutls_srp_set_server_credentials_file - Used to set the password files, in a gnutls_srp_server_credentials structure + * @res: is an &gnutls_srp_server_credentials structure. * @password_file: is the SRP password file (tpasswd) * @password_conf_file: is the SRP password conf file (tpasswd.conf) * **/ -int gnutls_srp_set_server_credentials_file( GNUTLS_SRP_SERVER_CREDENTIALS res, char *password_file, char * password_conf_file) { +int gnutls_srp_set_server_credentials_file( gnutls_srp_server_credentials res, char *password_file, char * password_conf_file) { int i; if (password_file==NULL || password_conf_file==NULL) { @@ -521,29 +521,29 @@ const char *gnutls_srp_server_get_username(gnutls_session session) /* FIXME: Functions for backwards compatibility */ -void gnutls_srp_free_client_cred( GNUTLS_SRP_CLIENT_CREDENTIALS sc) { +void gnutls_srp_free_client_cred( gnutls_srp_client_credentials sc) { return gnutls_srp_free_client_credentials( sc); } -void gnutls_srp_free_server_cred( GNUTLS_SRP_SERVER_CREDENTIALS sc) { +void gnutls_srp_free_server_cred( gnutls_srp_server_credentials sc) { return gnutls_srp_free_server_credentials( sc); } -int gnutls_srp_allocate_client_cred( GNUTLS_SRP_CLIENT_CREDENTIALS *sc) { +int gnutls_srp_allocate_client_cred( gnutls_srp_client_credentials *sc) { return gnutls_srp_allocate_client_credentials( sc); } -int gnutls_srp_allocate_server_cred( GNUTLS_SRP_SERVER_CREDENTIALS *sc) +int gnutls_srp_allocate_server_cred( gnutls_srp_server_credentials *sc) { return gnutls_srp_allocate_server_credentials( sc); } -int gnutls_srp_set_server_cred_file( GNUTLS_SRP_SERVER_CREDENTIALS res, char *password_file, char * password_conf_file) +int gnutls_srp_set_server_cred_file( gnutls_srp_server_credentials res, char *password_file, char * password_conf_file) { return gnutls_srp_set_server_credentials_file( res, password_file, password_conf_file); } -int gnutls_srp_set_client_cred( GNUTLS_SRP_CLIENT_CREDENTIALS res, char *username, char * password) +int gnutls_srp_set_client_cred( gnutls_srp_client_credentials res, char *username, char * password) { return gnutls_srp_set_client_credentials( res, username, password); } @@ -121,9 +121,9 @@ int main(int argc, char **argv) int maxfd; struct timeval tv; int user_term = 0; - GNUTLS_SRP_CLIENT_CREDENTIALS cred; - GNUTLS_ANON_CLIENT_CREDENTIALS anon_cred; - GNUTLS_CERTIFICATE_CLIENT_CREDENTIALS xcred; + gnutls_srp_client_credentials cred; + gnutls_anon_client_credentials anon_cred; + gnutls_certificate_credentials xcred; struct hostent *server_host; gaa_parser(argc, argv); diff --git a/src/serv.c b/src/serv.c index a33f2d3325..074c86c646 100644 --- a/src/serv.c +++ b/src/serv.c @@ -100,9 +100,9 @@ char *x509_crlfile = NULL; #define RENEGOTIATE /* These are global */ -GNUTLS_SRP_SERVER_CREDENTIALS srp_cred; -GNUTLS_ANON_SERVER_CREDENTIALS dh_cred; -GNUTLS_CERTIFICATE_SERVER_CREDENTIALS cert_cred; +gnutls_srp_server_credentials srp_cred; +gnutls_anon_server_credentials dh_cred; +gnutls_certificate_credentials cert_cred; #ifdef HAVE_LIBGDBM @@ -153,8 +153,8 @@ static void listener_free (listener_item * j) */ static int prime_nums[] = { 768, 1024, 0 }; -GNUTLS_DH_PARAMS dh_params; -GNUTLS_RSA_PARAMS rsa_params; +gnutls_dh_params dh_params; +gnutls_rsa_params rsa_params; static int generate_dh_primes(void) { diff --git a/src/tests.c b/src/tests.c index 3a64a53469..c42e51dd57 100644 --- a/src/tests.c +++ b/src/tests.c @@ -27,9 +27,9 @@ #include <string.h> #include <common.h> -extern GNUTLS_SRP_CLIENT_CREDENTIALS srp_cred; -extern GNUTLS_ANON_CLIENT_CREDENTIALS anon_cred; -extern GNUTLS_CERTIFICATE_CLIENT_CREDENTIALS xcred; +extern gnutls_srp_client_credentials srp_cred; +extern gnutls_anon_client_credentials anon_cred; +extern gnutls_certificate_credentials xcred; extern int more_info; diff --git a/src/tls_test.c b/src/tls_test.c index 55b8db810a..07670a942e 100644 --- a/src/tls_test.c +++ b/src/tls_test.c @@ -54,9 +54,9 @@ int port; int record_max_size; int fingerprint; -GNUTLS_SRP_CLIENT_CREDENTIALS srp_cred; -GNUTLS_ANON_CLIENT_CREDENTIALS anon_cred; -GNUTLS_CERTIFICATE_CLIENT_CREDENTIALS xcred; +gnutls_srp_client_credentials srp_cred; +gnutls_anon_client_credentials anon_cred; +gnutls_certificate_credentials xcred; /* end of global stuff */ |