summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2004-06-13 21:32:00 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2004-06-13 21:32:00 +0000
commit933c12dd1b0b7af1e6b0d9de9a5037d0990d2be0 (patch)
tree353eda85d53bbac1a632cc59004bd86674818adf /doc
parent906958f81d6057f2bbc0bb628c9b6425f45a4779 (diff)
downloadgnutls-933c12dd1b0b7af1e6b0d9de9a5037d0990d2be0.tar.gz
Added the '_t' suffix to all exported symbols.
Diffstat (limited to 'doc')
-rw-r--r--doc/TODO1
-rw-r--r--doc/tex/auth.tex4
-rw-r--r--doc/tex/certificate.tex14
-rw-r--r--doc/tex/ex-alert.tex2
-rw-r--r--doc/tex/ex-cert-select.tex32
-rw-r--r--doc/tex/ex-client-resume.tex8
-rw-r--r--doc/tex/ex-client-srp.tex10
-rw-r--r--doc/tex/ex-client2.tex6
-rw-r--r--doc/tex/ex-crq.tex4
-rw-r--r--doc/tex/ex-pkcs12.tex8
-rw-r--r--doc/tex/ex-serv-export.tex28
-rw-r--r--doc/tex/ex-serv-pgp.tex10
-rw-r--r--doc/tex/ex-serv-srp.tex12
-rw-r--r--doc/tex/ex-serv1.tex12
-rw-r--r--doc/tex/ex-session-info.tex8
-rw-r--r--doc/tex/ex-verify.tex30
-rw-r--r--doc/tex/ex-x509-info.tex6
17 files changed, 98 insertions, 97 deletions
diff --git a/doc/TODO b/doc/TODO
index c11db3a340..9916fa1efd 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -3,6 +3,7 @@ anything), contact the developer's mailing list (gnutls-dev@lists.gnupg.org),
in order to avoid having people working on the same thing.
Current list:
+* Do not store the Anon/DHE parameters in the resume DB.
* Make the current ciphering code a bit more abstract to
allow easy integration with TLS hardware.
* Allow adding multiple subject alternative names.
diff --git a/doc/tex/auth.tex b/doc/tex/auth.tex
index 7e925ed62c..5dddd552ed 100644
--- a/doc/tex/auth.tex
+++ b/doc/tex/auth.tex
@@ -118,7 +118,7 @@ gnutls_dh_params dh_params;
* or RSA parameters. The parameters returned (if any) will
* be used for the first handshake only.
*/
-static int get_params( gnutls_session session, gnutls_params_type type,
+static int get_params( gnutls_session session, gnutls_params_type_t type,
gnutls_params_st *st)
{
if (type == GNUTLS_PARAMS_RSA_EXPORT)
@@ -137,7 +137,7 @@ static int get_params( gnutls_session session, gnutls_params_type type,
int main()
{
- gnutls_certificate_credentials cert_cred;
+ gnutls_certificate_credentials_t cert_cred;
initialize_params();
diff --git a/doc/tex/certificate.tex b/doc/tex/certificate.tex
index 5c05233055..b3ecfc8d2c 100644
--- a/doc/tex/certificate.tex
+++ b/doc/tex/certificate.tex
@@ -105,8 +105,8 @@ CRL distribution points & 2.5.29.31 & This extension is set by the CA, in order
\\
\par
In \gnutls{} the X.509 certificate structures are handled using the
-\emph{gnutls\_x509\_crt} type and the corresponding private keys with
-the \emph{gnutls\_x509\_privkey} type.
+\emph{gnutls\_x509\_crt\_t} type and the corresponding private keys with
+the \emph{gnutls\_x509\_privkey\_t} type.
All the available functions for X.509 certificate handling have their
prototypes in \emph{gnutls/x509.h}. An example program to demonstrate the
X.509 parsing capabilities can be found at section \ref{ex:x509-info} on
@@ -159,7 +159,7 @@ defined in PKCS \#10 \cite{RFC2986}. Other certificate request's format such as
PKIX's RFC2511 \cite{RFC2511} are not currently supported.
In \gnutls{} the PKCS \#10 structures are handled using the
-\emph{gnutls\_x509\_crq} type.
+\emph{gnutls\_x509\_crq\_t} type.
An example of a certificate request generation can be found at section \ref{ex:crq}
on page \pageref{ex:crq}.
@@ -169,8 +169,8 @@ certificates. It is commonly used in browsers to export and import
the user's identities.
\par
In \gnutls{} the PKCS \#12 structures are handled using the
-\emph{gnutls\_pkcs12} type. This is an abstract type that
-may hold several \emph{gnutls\_pkcs12\_bag} types. The Bag types are the
+\emph{gnutls\_pkcs12\_t} type. This is an abstract type that
+may hold several \emph{gnutls\_pkcs12\_bag\_t} types. The Bag types are the
holders of the actual data, which may be certificates, private
keys or encrypted data. An Bag of type encrypted should be decrypted
in order for its data to be accessed.
@@ -211,8 +211,8 @@ actual owner.
\subsection*{OpenPGP keys}
In \gnutls{} the OpenPGP key structures \cite{RFC2440} are handled using the
-\emph{gnutls\_openpgp\_key} type and the corresponding private keys with
-the \emph{gnutls\_openpgp\_privkey} type. All the prototypes for the key handling
+\emph{gnutls\_openpgp\_key\_t} type and the corresponding private keys with
+the \emph{gnutls\_openpgp\_privkey\_t} type. All the prototypes for the key handling
functions can be found at \emph{gnutls/openpgp.h}.
\subsection*{Verifying an OpenPGP key}
diff --git a/doc/tex/ex-alert.tex b/doc/tex/ex-alert.tex
index b5cd0f9cfb..464a652f66 100644
--- a/doc/tex/ex-alert.tex
+++ b/doc/tex/ex-alert.tex
@@ -8,7 +8,7 @@
* a gnutls function (recv/send), is an alert, and will print
* that alert.
*/
-void check_alert(gnutls_session session, int ret)
+void check_alert(gnutls_session_t session, int ret)
{
int last_alert;
diff --git a/doc/tex/ex-cert-select.tex b/doc/tex/ex-cert-select.tex
index 35b829c524..999320cc30 100644
--- a/doc/tex/ex-cert-select.tex
+++ b/doc/tex/ex-cert-select.tex
@@ -24,21 +24,21 @@
#define KEY_FILE "key.pem"
#define CAFILE "ca.pem"
-static int cert_callback(gnutls_session session,
- const gnutls_datum* req_ca_rdn, int nreqs,
- const gnutls_pk_algorithm* sign_algos, int sign_algos_length,
+static int cert_callback(gnutls_session_t session,
+ const gnutls_datum_t* req_ca_rdn, int nreqs,
+ const gnutls_pk_algorithm_t* sign_algos, int sign_algos_length,
gnutls_retr_st * st);
-gnutls_x509_crt crt;
-gnutls_x509_privkey key;
+gnutls_x509_crt_t crt;
+gnutls_x509_privkey_t key;
/* Helper functions to load a certificate and key
* files into memory. They use mmap for simplicity.
*/
-static gnutls_datum mmap_file( const char* file)
+static gnutls_datum_t mmap_file( const char* file)
{
int fd;
-gnutls_datum mmaped_file = { NULL, 0 };
+gnutls_datum_t mmaped_file = { NULL, 0 };
struct stat stat_st;
void* ptr;
@@ -56,7 +56,7 @@ void* ptr;
return mmaped_file;
}
-static void munmap_file( gnutls_datum data)
+static void munmap_file( gnutls_datum_t data)
{
munmap( data.data, data.size);
}
@@ -66,7 +66,7 @@ static void munmap_file( gnutls_datum data)
static void load_keys( void)
{
int ret;
-gnutls_datum data;
+gnutls_datum_t data;
data = mmap_file( CERT_FILE);
if (data.data == NULL) {
@@ -104,9 +104,9 @@ gnutls_datum data;
int main()
{
int ret, sd, ii;
- gnutls_session session;
+ gnutls_session_t session;
char buffer[MAX_BUF + 1];
- gnutls_certificate_credentials xcred;
+ gnutls_certificate_credentials_t xcred;
/* Allow connections to servers that have OpenPGP keys as well.
*/
@@ -138,7 +138,7 @@ int main()
*/
sd = tcp_connect();
- gnutls_transport_set_ptr( session, (gnutls_transport_ptr)sd);
+ gnutls_transport_set_ptr( session, (gnutls_transport_ptr_t)sd);
/* Perform the TLS handshake
*/
@@ -191,15 +191,15 @@ int main()
* before a handshake.
*/
-static int cert_callback(gnutls_session session,
- const gnutls_datum* req_ca_rdn, int nreqs,
- const gnutls_pk_algorithm* sign_algos, int sign_algos_length,
+static int cert_callback(gnutls_session_t session,
+ const gnutls_datum_t* req_ca_rdn, int nreqs,
+ const gnutls_pk_algorithm_t* sign_algos, int sign_algos_length,
gnutls_retr_st * st)
{
char issuer_dn[256];
int i, ret;
size_t len;
- gnutls_certificate_type type;
+ gnutls_certificate_type_t type;
/* Print the server's trusted CAs
*/
diff --git a/doc/tex/ex-client-resume.tex b/doc/tex/ex-client-resume.tex
index f3eb4b2b91..26c403b5b8 100644
--- a/doc/tex/ex-client-resume.tex
+++ b/doc/tex/ex-client-resume.tex
@@ -6,7 +6,7 @@
/* Those functions are defined in other examples.
*/
-extern void check_alert(gnutls_session session, int ret);
+extern void check_alert(gnutls_session_t session, int ret);
extern int tcp_connect( void);
extern void tcp_close( int sd);
@@ -20,9 +20,9 @@ int main()
{
int ret;
int sd, ii, alert;
- gnutls_session session;
+ gnutls_session_t session;
char buffer[MAX_BUF + 1];
- gnutls_certificate_credentials xcred;
+ gnutls_certificate_credentials_t xcred;
/* variables used in session resuming
*/
@@ -52,7 +52,7 @@ int main()
free(session_data);
}
- gnutls_transport_set_ptr( session, (gnutls_transport_ptr)sd);
+ gnutls_transport_set_ptr( session, (gnutls_transport_ptr_t)sd);
/* Perform the TLS handshake
*/
diff --git a/doc/tex/ex-client-srp.tex b/doc/tex/ex-client-srp.tex
index 777ee92f7a..548c3e541f 100644
--- a/doc/tex/ex-client-srp.tex
+++ b/doc/tex/ex-client-srp.tex
@@ -7,7 +7,7 @@
/* Those functions are defined in other examples.
*/
-extern void check_alert(gnutls_session session, int ret);
+extern void check_alert(gnutls_session_t session, int ret);
extern int tcp_connect( void);
extern void tcp_close( int sd);
@@ -25,10 +25,10 @@ int main()
{
int ret;
int sd, ii;
- gnutls_session session;
+ gnutls_session_t session;
char buffer[MAX_BUF + 1];
- gnutls_srp_client_credentials srp_cred;
- gnutls_certificate_client_credentials cert_cred;
+ gnutls_srp_client_credentials_t srp_cred;
+ gnutls_certificate_client_credentials_t cert_cred;
gnutls_global_init();
@@ -63,7 +63,7 @@ int main()
gnutls_credentials_set(session, GNUTLS_CRD_SRP, srp_cred);
gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, cert_cred);
- gnutls_transport_set_ptr( session, (gnutls_transport_ptr)sd);
+ gnutls_transport_set_ptr( session, (gnutls_transport_ptr_t)sd);
/* Perform the TLS handshake
*/
diff --git a/doc/tex/ex-client2.tex b/doc/tex/ex-client2.tex
index c46413a4ae..9be2bf4037 100644
--- a/doc/tex/ex-client2.tex
+++ b/doc/tex/ex-client2.tex
@@ -57,9 +57,9 @@ void tcp_close( int sd)
int main()
{
int ret, sd, ii;
- gnutls_session session;
+ gnutls_session_t session;
char buffer[MAX_BUF + 1];
- gnutls_certificate_credentials xcred;
+ gnutls_certificate_credentials_t xcred;
/* Allow connections to servers that have OpenPGP keys as well.
*/
const int cert_type_priority[3] = { GNUTLS_CRT_X509,
@@ -90,7 +90,7 @@ int main()
*/
sd = tcp_connect();
- gnutls_transport_set_ptr( session, (gnutls_transport_ptr)sd);
+ gnutls_transport_set_ptr( session, (gnutls_transport_ptr_t)sd);
/* Perform the TLS handshake
*/
diff --git a/doc/tex/ex-crq.tex b/doc/tex/ex-crq.tex
index 55eb85cea7..a307a935c3 100644
--- a/doc/tex/ex-crq.tex
+++ b/doc/tex/ex-crq.tex
@@ -12,8 +12,8 @@
int main()
{
- gnutls_x509_crq crq;
- gnutls_x509_privkey key;
+ gnutls_x509_crq_t crq;
+ gnutls_x509_privkey_t key;
unsigned char buffer[10*1024];
int buffer_size = sizeof(buffer);
int ret;
diff --git a/doc/tex/ex-pkcs12.tex b/doc/tex/ex-pkcs12.tex
index 71fba2fa24..4ba81b9535 100644
--- a/doc/tex/ex-pkcs12.tex
+++ b/doc/tex/ex-pkcs12.tex
@@ -13,12 +13,12 @@
* encrypted using a PKCS #12 cipher, or some browsers will crash)
* password: is the password used to encrypt the PKCS #12 packet.
*/
-int write_pkcs12(const gnutls_datum * cert, const gnutls_datum * pkcs8_key,
+int write_pkcs12(const gnutls_datum_t * cert, const gnutls_datum_t * pkcs8_key,
const char *password)
{
- gnutls_pkcs12 pkcs12;
+ gnutls_pkcs12_t pkcs12;
int ret, bag_index;
- gnutls_pkcs12_bag bag, key_bag;
+ gnutls_pkcs12_bag_t bag, key_bag;
char pkcs12_struct[10 * 1024];
int pkcs12_struct_size;
FILE *fd;
@@ -26,7 +26,7 @@ int write_pkcs12(const gnutls_datum * cert, const gnutls_datum * pkcs8_key,
/* A good idea might be to use gnutls_x509_privkey_get_key_id()
* to obtain a unique ID.
*/
- gnutls_datum key_id = { "\x00\x00\x07", 3 };
+ gnutls_datum_t key_id = { "\x00\x00\x07", 3 };
gnutls_global_init();
diff --git a/doc/tex/ex-serv-export.tex b/doc/tex/ex-serv-export.tex
index 3b5e33f839..b83d3cda3d 100644
--- a/doc/tex/ex-serv-export.tex
+++ b/doc/tex/ex-serv-export.tex
@@ -27,19 +27,19 @@
#define DH_BITS 1024
/* These are global */
-gnutls_certificate_credentials cert_cred;
+gnutls_certificate_credentials_t cert_cred;
static void wrap_db_init(void);
static void wrap_db_deinit(void);
-static int wrap_db_store(void *dbf, gnutls_datum key, gnutls_datum data);
-static gnutls_datum wrap_db_fetch(void *dbf, gnutls_datum key);
-static int wrap_db_delete(void *dbf, gnutls_datum key);
+static int wrap_db_store(void *dbf, gnutls_datum_t key, gnutls_datum_t data);
+static gnutls_datum_t wrap_db_fetch(void *dbf, gnutls_datum_t key);
+static int wrap_db_delete(void *dbf, gnutls_datum_t key);
#define TLS_SESSION_CACHE 50
-gnutls_session initialize_tls_session()
+gnutls_session_t initialize_tls_session()
{
- gnutls_session session;
+ gnutls_session_t session;
gnutls_init(&session, GNUTLS_SERVER);
@@ -65,11 +65,11 @@ gnutls_session initialize_tls_session()
return session;
}
-gnutls_dh_params dh_params;
+gnutls_dh_params_t dh_params;
/* Export-grade cipher suites require temporary RSA
* keys.
*/
-gnutls_rsa_params rsa_params;
+gnutls_rsa_params_t rsa_params;
int generate_dh_params(void)
{
@@ -107,7 +107,7 @@ int main()
struct sockaddr_in sa_cli;
int client_len;
char topbuf[512];
- gnutls_session session;
+ gnutls_session_t session;
char buffer[MAX_BUF + 1];
int optval = 1;
char name[256];
@@ -168,7 +168,7 @@ int main()
inet_ntop(AF_INET, &sa_cli.sin_addr, topbuf,
sizeof(topbuf)), ntohs(sa_cli.sin_port));
- gnutls_transport_set_ptr(session, (gnutls_transport_ptr)sd);
+ gnutls_transport_set_ptr(session, (gnutls_transport_ptr_t)sd);
ret = gnutls_handshake(session);
if (ret < 0) {
close(sd);
@@ -251,7 +251,7 @@ static void wrap_db_deinit(void)
return;
}
-static int wrap_db_store(void *dbf, gnutls_datum key, gnutls_datum data)
+static int wrap_db_store(void *dbf, gnutls_datum_t key, gnutls_datum_t data)
{
if (cache_db == NULL)
@@ -274,9 +274,9 @@ static int wrap_db_store(void *dbf, gnutls_datum key, gnutls_datum data)
return 0;
}
-static gnutls_datum wrap_db_fetch(void *dbf, gnutls_datum key)
+static gnutls_datum_t wrap_db_fetch(void *dbf, gnutls_datum_t key)
{
- gnutls_datum res = { NULL, 0 };
+ gnutls_datum_t res = { NULL, 0 };
int i;
if (cache_db == NULL)
@@ -301,7 +301,7 @@ static gnutls_datum wrap_db_fetch(void *dbf, gnutls_datum key)
return res;
}
-static int wrap_db_delete(void *dbf, gnutls_datum key)
+static int wrap_db_delete(void *dbf, gnutls_datum_t key)
{
int i;
diff --git a/doc/tex/ex-serv-pgp.tex b/doc/tex/ex-serv-pgp.tex
index c9792a930f..44f98ad231 100644
--- a/doc/tex/ex-serv-pgp.tex
+++ b/doc/tex/ex-serv-pgp.tex
@@ -29,13 +29,13 @@
#define DH_BITS 1024
/* These are global */
-gnutls_certificate_credentials cred;
+gnutls_certificate_credentials_t cred;
const int cert_type_priority[2] = { GNUTLS_CRT_OPENPGP, 0 };
-gnutls_dh_params dh_params;
+gnutls_dh_params_t dh_params;
/* Defined in a previous example */
extern int generate_dh_params( void);
-extern gnutls_session initialize_tls_session( void);
+extern gnutls_session_t initialize_tls_session( void);
int main()
{
@@ -45,7 +45,7 @@ int main()
struct sockaddr_in sa_cli;
int client_len;
char topbuf[512];
- gnutls_session session;
+ gnutls_session_t session;
char buffer[MAX_BUF + 1];
int optval = 1;
char name[256];
@@ -95,7 +95,7 @@ int main()
inet_ntop(AF_INET, &sa_cli.sin_addr, topbuf,
sizeof(topbuf)), ntohs(sa_cli.sin_port));
- gnutls_transport_set_ptr( session, (gnutls_transport_ptr)sd);
+ gnutls_transport_set_ptr( session, (gnutls_transport_ptr_t)sd);
ret = gnutls_handshake( session);
if (ret < 0) {
close(sd);
diff --git a/doc/tex/ex-serv-srp.tex b/doc/tex/ex-serv-srp.tex
index e671c182ed..5fb7ba2796 100644
--- a/doc/tex/ex-serv-srp.tex
+++ b/doc/tex/ex-serv-srp.tex
@@ -28,12 +28,12 @@
#define PORT 5556 /* listen to 5556 port */
/* These are global */
-gnutls_srp_server_credentials srp_cred;
-gnutls_certificate_credentials cert_cred;
+gnutls_srp_server_credentials_t srp_cred;
+gnutls_certificate_credentials_t cert_cred;
-gnutls_session initialize_tls_session()
+gnutls_session_t initialize_tls_session()
{
- gnutls_session session;
+ gnutls_session_t session;
const int kx_priority[] = { GNUTLS_KX_SRP, GNUTLS_KX_SRP_DSS,
GNUTLS_KX_SRP_RSA, 0 };
@@ -62,7 +62,7 @@ int main()
struct sockaddr_in sa_cli;
int client_len;
char topbuf[512];
- gnutls_session session;
+ gnutls_session_t session;
char buffer[MAX_BUF + 1];
int optval = 1;
char name[256];
@@ -113,7 +113,7 @@ int main()
inet_ntop(AF_INET, &sa_cli.sin_addr, topbuf,
sizeof(topbuf)), ntohs(sa_cli.sin_port));
- gnutls_transport_set_ptr( session, (gnutls_transport_ptr)sd);
+ gnutls_transport_set_ptr( session, (gnutls_transport_ptr_t)sd);
ret = gnutls_handshake( session);
if (ret < 0) {
close(sd);
diff --git a/doc/tex/ex-serv1.tex b/doc/tex/ex-serv1.tex
index 8b5febb916..8b935a2b1d 100644
--- a/doc/tex/ex-serv1.tex
+++ b/doc/tex/ex-serv1.tex
@@ -27,11 +27,11 @@
#define DH_BITS 1024
/* These are global */
-gnutls_certificate_credentials x509_cred;
+gnutls_certificate_credentials_t x509_cred;
-gnutls_session initialize_tls_session()
+gnutls_session_t initialize_tls_session()
{
- gnutls_session session;
+ gnutls_session_t session;
gnutls_init(&session, GNUTLS_SERVER);
@@ -51,7 +51,7 @@ gnutls_session initialize_tls_session()
return session;
}
-static gnutls_dh_params dh_params;
+static gnutls_dh_params_t dh_params;
static int generate_dh_params(void) {
@@ -74,7 +74,7 @@ int main()
struct sockaddr_in sa_cli;
int client_len;
char topbuf[512];
- gnutls_session session;
+ gnutls_session_t session;
char buffer[MAX_BUF + 1];
int optval = 1;
@@ -125,7 +125,7 @@ int main()
inet_ntop(AF_INET, &sa_cli.sin_addr, topbuf,
sizeof(topbuf)), ntohs(sa_cli.sin_port));
- gnutls_transport_set_ptr( session, (gnutls_transport_ptr)sd);
+ gnutls_transport_set_ptr( session, (gnutls_transport_ptr_t)sd);
ret = gnutls_handshake( session);
if (ret < 0) {
close(sd);
diff --git a/doc/tex/ex-session-info.tex b/doc/tex/ex-session-info.tex
index 243469c2c1..cc0ffb8b8e 100644
--- a/doc/tex/ex-session-info.tex
+++ b/doc/tex/ex-session-info.tex
@@ -5,16 +5,16 @@
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
-extern void print_x509_certificate_info(gnutls_session);
+extern void print_x509_certificate_info(gnutls_session_t);
/* This function will print some details of the
* given session.
*/
-int print_info(gnutls_session session)
+int print_info(gnutls_session_t session)
{
const char *tmp;
- gnutls_credentials_type cred;
- gnutls_kx_algorithm kx;
+ gnutls_credentials_type_t cred;
+ gnutls_kx_algorithm_t kx;
/* print the key exchange's algorithm name
*/
diff --git a/doc/tex/ex-verify.tex b/doc/tex/ex-verify.tex
index 2be398b473..164ee58e03 100644
--- a/doc/tex/ex-verify.tex
+++ b/doc/tex/ex-verify.tex
@@ -9,29 +9,29 @@
/* All the available CRLs
*/
-extern gnutls_x509_crl* crl_list;
+extern gnutls_x509_crl_t* crl_list;
extern int crl_list_size;
/* All the available trusted CAs
*/
-extern gnutls_x509_crt* ca_list;
+extern gnutls_x509_crt_t* ca_list;
extern int ca_list_size;
-static void verify_cert2(gnutls_x509_crt crt,
- gnutls_x509_crt issuer, gnutls_x509_crl * crl_list, int crl_list_size);
-static void verify_last_cert(gnutls_x509_crt crt,
- gnutls_x509_crt *ca_list, int ca_list_size,
- gnutls_x509_crl * crl_list, int crl_list_size);
+static void verify_cert2(gnutls_x509_crt_t crt,
+ gnutls_x509_crt_t issuer, gnutls_x509_crl_t * crl_list, int crl_list_size);
+static void verify_last_cert(gnutls_x509_crt_t crt,
+ gnutls_x509_crt_t *ca_list, int ca_list_size,
+ gnutls_x509_crl_t * crl_list, int crl_list_size);
/* This function will try to verify the peer's certificate chain, and
* also check if the hostname matches, and the activation, expiration dates.
*/
-void verify_certificate_chain( gnutls_session session, const char* hostname,
- const gnutls_datum* cert_chain, int cert_chain_length)
+void verify_certificate_chain( gnutls_session_t session, const char* hostname,
+ const gnutls_datum_t* cert_chain, int cert_chain_length)
{
int i, ret;
- gnutls_x509_crt cert[cert_chain_length];
+ gnutls_x509_crt_t cert[cert_chain_length];
/* Import all the certificates in the chain to
* native certificate format.
@@ -71,8 +71,8 @@ void verify_certificate_chain( gnutls_session session, const char* hostname,
* which is supposed to be it's issuer. Also checks the
* crl_list if the certificate is revoked.
*/
-static void verify_cert2(gnutls_x509_crt crt,
- gnutls_x509_crt issuer, gnutls_x509_crl * crl_list, int crl_list_size)
+static void verify_cert2(gnutls_x509_crt crt_t,
+ gnutls_x509_crt_t issuer, gnutls_x509_crl_t * crl_list, int crl_list_size)
{
unsigned int output;
int ret;
@@ -137,9 +137,9 @@ static void verify_cert2(gnutls_x509_crt crt,
/* Verifies a certificate against the trusted CA list.
* Also checks the crl_list if the certificate is revoked.
*/
-static void verify_last_cert(gnutls_x509_crt crt,
- gnutls_x509_crt *ca_list, int ca_list_size,
- gnutls_x509_crl * crl_list, int crl_list_size)
+static void verify_last_cert(gnutls_x509_crt_t crt,
+ gnutls_x509_crt_t *ca_list, int ca_list_size,
+ gnutls_x509_crl_t * crl_list, int crl_list_size)
{
unsigned int output;
int ret;
diff --git a/doc/tex/ex-x509-info.tex b/doc/tex/ex-x509-info.tex
index e7dd772059..a6b27a4c37 100644
--- a/doc/tex/ex-x509-info.tex
+++ b/doc/tex/ex-x509-info.tex
@@ -25,7 +25,7 @@ char* print;
/* This function will print information about this session's peer
* certificate.
*/
-static void print_x509_certificate_info(gnutls_session session)
+static void print_x509_certificate_info(gnutls_session_t session)
{
char serial[40];
char dn[128];
@@ -33,9 +33,9 @@ static void print_x509_certificate_info(gnutls_session session)
size_t size;
unsigned int algo, bits;
time_t expiration_time, activation_time;
- const gnutls_datum *cert_list;
+ const gnutls_datum_t *cert_list;
int cert_list_size = 0;
- gnutls_x509_crt cert;
+ gnutls_x509_crt_t cert;
/* This function only works for X.509 certificates.
*/