summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2001-07-31 19:12:08 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2001-07-31 19:12:08 +0000
commitdd2b711e9797c1183884b678527911532bdbfc09 (patch)
tree9a9722d0ab5f059f78dba716d901b8c1ca4cc5bd
parentd7c809f11eff0ea1ea07e159cb49b72e1192e6b7 (diff)
downloadgnutls-dd2b711e9797c1183884b678527911532bdbfc09.tar.gz
fixed api documentation (for srp and anon cred allocation)
-rwxr-xr-xdoc/scripts/gdoc2
-rw-r--r--doc/tex/Makefile.am5
-rw-r--r--doc/tex/gnutls.tex2
-rw-r--r--lib/auth_anon.c4
-rw-r--r--lib/auth_anon.h4
-rw-r--r--lib/auth_srp.c4
-rw-r--r--lib/auth_srp.h8
-rw-r--r--lib/auth_srp_passwd.c4
-rw-r--r--lib/ext_srp.c2
-rw-r--r--lib/gnutls_anon_cred.c2
-rw-r--r--lib/gnutls_srp.c16
11 files changed, 30 insertions, 23 deletions
diff --git a/doc/scripts/gdoc b/doc/scripts/gdoc
index 76caedbfbb..a1c314d821 100755
--- a/doc/scripts/gdoc
+++ b/doc/scripts/gdoc
@@ -329,7 +329,7 @@ sub output_tex {
print "\\end{itemize}\n";
foreach $section (@{$args{'sectionlist'}}) {
- print "\n{\\large{$section}}\n";
+ print "\n\\par{\\large{$section}}\\par\n";
print "\\begin{rmfamily}\n";
$sec = $args{'sections'}{$section};
diff --git a/doc/tex/Makefile.am b/doc/tex/Makefile.am
index 0baadbd2fb..089d80a9e2 100644
--- a/doc/tex/Makefile.am
+++ b/doc/tex/Makefile.am
@@ -1,4 +1,4 @@
-EXTRA_DIST = gnutls-api.tex gnutls.tex gnutls.ps gnutls.html ASN1.readme.txt \
+EXTRA_DIST = gnutls-api.tex gnutls.tex gnutls.ps gnutls.html \
ex1.tex ex2.tex ex3.tex srp1.tex serv1.tex gnutls.css \
nx_grp_g.png prev_g.png up_g.png
@@ -12,4 +12,5 @@ gnutls.ps: gnutls.tex gnutls-api.tex serv1.tex ex1.tex ex2.tex ex3.tex
-latex gnutls.tex && latex gnutls.tex && dvips gnutls.dvi -o gnutls.ps
gnutls.html: gnutls.tex gnutls-api.tex serv1.tex ex1.tex ex2.tex ex3.tex
- -latex2html gnutls.tex -no_subdir 1 -split 0 -local_icons -prefix ./
+ -latex2html gnutls.tex -no_subdir 1 -split 0 -local_icons -prefix ./ \
+ -info ""
diff --git a/doc/tex/gnutls.tex b/doc/tex/gnutls.tex
index eb47e85300..00ad2427d6 100644
--- a/doc/tex/gnutls.tex
+++ b/doc/tex/gnutls.tex
@@ -3,7 +3,7 @@
\begin{document}
-\title{GNU Transport Layer Security Library}
+\title{GNUTLS: a Transport Layer Security Library}
\author{Nikos Mavroyanopoulos}
\maketitle
diff --git a/lib/auth_anon.c b/lib/auth_anon.c
index bda3252962..18eaf5afaf 100644
--- a/lib/auth_anon.c
+++ b/lib/auth_anon.c
@@ -71,7 +71,7 @@ int gen_anon_server_kx( GNUTLS_KEY key, opaque** data) {
uint8 *data_p;
uint8 *data_g;
uint8 *data_X;
- const ANON_SERVER_CREDENTIALS * cred;
+ const ANON_SERVER_CREDENTIALS cred;
cred = _gnutls_get_cred( key, GNUTLS_ANON, NULL);
if (cred==NULL) {
@@ -226,7 +226,7 @@ int proc_anon_client_kx( GNUTLS_KEY key, opaque* data, int data_size) {
size_t _n_Y;
MPI g, p;
int bits, ret;
- const ANON_SERVER_CREDENTIALS * cred;
+ const ANON_SERVER_CREDENTIALS cred;
cred = _gnutls_get_cred( key, GNUTLS_ANON, NULL);
if (cred==NULL) {
diff --git a/lib/auth_anon.h b/lib/auth_anon.h
index 961feabc39..d127b35740 100644
--- a/lib/auth_anon.h
+++ b/lib/auth_anon.h
@@ -3,7 +3,9 @@ extern MOD_AUTH_STRUCT anon_auth_struct;
typedef struct {
int dh_bits;
-} ANON_SERVER_CREDENTIALS;
+} ANON_SERVER_CREDENTIALS_INT;
+
+#define ANON_SERVER_CREDENTIALS ANON_SERVER_CREDENTIALS_INT*
typedef struct {
int dh_bits;
diff --git a/lib/auth_srp.c b/lib/auth_srp.c
index e9ed1a3635..bfb74eb011 100644
--- a/lib/auth_srp.c
+++ b/lib/auth_srp.c
@@ -201,7 +201,7 @@ int gen_srp_client_kx0(GNUTLS_KEY key, opaque ** data)
uint8 *data_a;
char *username;
char *password;
- const SRP_CLIENT_CREDENTIALS *cred =
+ const SRP_CLIENT_CREDENTIALS cred =
_gnutls_get_cred(key, GNUTLS_SRP, NULL);
if (cred == NULL)
@@ -244,7 +244,7 @@ int proc_srp_server_hello(GNUTLS_KEY key, const opaque * data, int data_size)
opaque hd[SRP_MAX_HASH_SIZE];
char *username;
char *password;
- const SRP_CLIENT_CREDENTIALS *cred =
+ const SRP_CLIENT_CREDENTIALS cred =
_gnutls_get_cred(key, GNUTLS_SRP, NULL);
if (cred == NULL)
diff --git a/lib/auth_srp.h b/lib/auth_srp.h
index 767c98f714..ea7e683fe0 100644
--- a/lib/auth_srp.h
+++ b/lib/auth_srp.h
@@ -4,12 +4,16 @@ extern MOD_AUTH_STRUCT srp_auth_struct;
typedef struct {
char* username;
char* password;
-} SRP_CLIENT_CREDENTIALS;
+} SRP_CLIENT_CREDENTIALS_INT;
+
+#define SRP_CLIENT_CREDENTIALS SRP_CLIENT_CREDENTIALS_INT*
typedef struct {
char* password_file;
char* password_conf_file;
-} SRP_SERVER_CREDENTIALS;
+} SRP_SERVER_CREDENTIALS_INT;
+
+#define SRP_SERVER_CREDENTIALS SRP_SERVER_CREDENTIALS_INT*
/* these structures should not use allocated data */
typedef struct {
diff --git a/lib/auth_srp_passwd.c b/lib/auth_srp_passwd.c
index 8936a5bb73..358ee1c96d 100644
--- a/lib/auth_srp_passwd.c
+++ b/lib/auth_srp_passwd.c
@@ -193,7 +193,7 @@ int tmp_size;
/* this function opens the tpasswd.conf file
*/
-static int pwd_read_conf( const SRP_SERVER_CREDENTIALS* cred, GNUTLS_SRP_PWD_ENTRY* entry, int index) {
+static int pwd_read_conf( const SRP_SERVER_CREDENTIALS cred, GNUTLS_SRP_PWD_ENTRY* entry, int index) {
FILE * fd;
char line[5*1024];
int i;
@@ -228,7 +228,7 @@ static int pwd_read_conf( const SRP_SERVER_CREDENTIALS* cred, GNUTLS_SRP_PWD_ENT
GNUTLS_SRP_PWD_ENTRY *_gnutls_srp_pwd_read_entry( GNUTLS_KEY key, char* username, int *err) {
- const SRP_SERVER_CREDENTIALS* cred;
+ const SRP_SERVER_CREDENTIALS cred;
FILE * fd;
char line[5*1024];
int i, len;
diff --git a/lib/ext_srp.c b/lib/ext_srp.c
index c19b81e75d..50dc7e8bb7 100644
--- a/lib/ext_srp.c
+++ b/lib/ext_srp.c
@@ -74,7 +74,7 @@ int _gnutls_srp_send_params( GNUTLS_STATE state, opaque** data) {
uint8 len;
/* this function sends the client extension data (username) */
if (state->security_parameters.entity == GNUTLS_CLIENT) {
- const SRP_CLIENT_CREDENTIALS* cred = _gnutls_get_cred( state->gnutls_key, GNUTLS_SRP, NULL);
+ const SRP_CLIENT_CREDENTIALS cred = _gnutls_get_cred( state->gnutls_key, GNUTLS_SRP, NULL);
(*data) = NULL;
diff --git a/lib/gnutls_anon_cred.c b/lib/gnutls_anon_cred.c
index 4fa3b6a17d..322d321265 100644
--- a/lib/gnutls_anon_cred.c
+++ b/lib/gnutls_anon_cred.c
@@ -60,7 +60,7 @@ int gnutls_allocate_anon_server_sc( ANON_SERVER_CREDENTIALS **sc) {
*
**/
-int gnutls_set_anon_server_cred( ANON_SERVER_CREDENTIALS* res, int dh_bits) {
+int gnutls_set_anon_server_cred( ANON_SERVER_CREDENTIALS res, int dh_bits) {
res->dh_bits = dh_bits;
return 0;
}
diff --git a/lib/gnutls_srp.c b/lib/gnutls_srp.c
index 6484765cce..d93f158d21 100644
--- a/lib/gnutls_srp.c
+++ b/lib/gnutls_srp.c
@@ -346,7 +346,7 @@ MPI _gnutls_calc_srp_S2(MPI B, MPI g, MPI x, MPI a, MPI u, MPI n)
* this helper function is provided in order to free (deallocate)
* the structure.
**/
-void gnutls_free_srp_client_sc( SRP_CLIENT_CREDENTIALS* sc) {
+void gnutls_free_srp_client_sc( SRP_CLIENT_CREDENTIALS sc) {
gnutls_free(sc);
}
@@ -358,8 +358,8 @@ void gnutls_free_srp_client_sc( SRP_CLIENT_CREDENTIALS* sc) {
* this helper function is provided in order to allocate
* the structure.
**/
-int gnutls_allocate_srp_client_sc( SRP_CLIENT_CREDENTIALS **sc) {
- *sc = gnutls_malloc( sizeof(SRP_CLIENT_CREDENTIALS));
+int gnutls_allocate_srp_client_sc( SRP_CLIENT_CREDENTIALS *sc) {
+ *sc = gnutls_malloc( sizeof(SRP_CLIENT_CREDENTIALS_INT));
if (*sc==NULL) return GNUTLS_E_MEMORY_ERROR;
@@ -373,7 +373,7 @@ int gnutls_allocate_srp_client_sc( SRP_CLIENT_CREDENTIALS **sc) {
* @password: is the user's password
*
**/
-int gnutls_set_srp_client_cred( SRP_CLIENT_CREDENTIALS* res, char *username, char * password) {
+int gnutls_set_srp_client_cred( SRP_CLIENT_CREDENTIALS res, char *username, char * password) {
res->username = gnutls_strdup( username);
if (res->username == NULL) return GNUTLS_E_MEMORY_ERROR;
@@ -395,7 +395,7 @@ int gnutls_set_srp_client_cred( SRP_CLIENT_CREDENTIALS* res, char *username, cha
* this helper function is provided in order to free (deallocate)
* the structure.
**/
-void gnutls_free_srp_server_sc( SRP_SERVER_CREDENTIALS* sc) {
+void gnutls_free_srp_server_sc( SRP_SERVER_CREDENTIALS sc) {
gnutls_free(sc);
}
@@ -408,8 +408,8 @@ void gnutls_free_srp_server_sc( SRP_SERVER_CREDENTIALS* sc) {
* the structure.
**/
-int gnutls_allocate_srp_server_sc( SRP_SERVER_CREDENTIALS **sc) {
- *sc = gnutls_malloc( sizeof(SRP_SERVER_CREDENTIALS));
+int gnutls_allocate_srp_server_sc( SRP_SERVER_CREDENTIALS *sc) {
+ *sc = gnutls_malloc( sizeof(SRP_SERVER_CREDENTIALS_INT));
if (*sc==NULL) return GNUTLS_E_MEMORY_ERROR;
@@ -423,7 +423,7 @@ int gnutls_allocate_srp_server_sc( SRP_SERVER_CREDENTIALS **sc) {
* @password_conf_file: is the SRP password conf file (tpasswd.conf)
*
**/
-int gnutls_set_srp_server_cred( SRP_SERVER_CREDENTIALS* res, char *password_file, char * password_conf_file) {
+int gnutls_set_srp_server_cred( SRP_SERVER_CREDENTIALS res, char *password_file, char * password_conf_file) {
res->password_file = gnutls_strdup( password_file);
if (res->password_file==NULL) return GNUTLS_E_MEMORY_ERROR;