From: Nikos Mavrogiannopoulos Date: Wed, 12 Feb 2003 19:13:27 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: gnutls_0_8_3~44 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=de4f0cd49f2d75b474d7fdcbe5070ee703643529;p=thirdparty%2Fgnutls.git *** empty log message *** --- diff --git a/doc/tex/appendix.tex b/doc/tex/appendix.tex index 928195d3d2..f1204fa88c 100644 --- a/doc/tex/appendix.tex +++ b/doc/tex/appendix.tex @@ -6,7 +6,7 @@ This appendix contains some example output of the XML convertion functions: \begin{itemize} -\item \printfunc{gnutls_x509_certificate_to_xml}{gnutls\_x509\_certificate\_to\_xml} +\item \printfunc{gnutls_x509_crt_to_xml}{gnutls\_x509\_crt\_to\_xml} \item \printfunc{gnutls_openpgp_key_to_xml}{gnutls\_openpgp\_key\_to\_xml} \end{itemize} diff --git a/doc/tex/certificate.tex b/doc/tex/certificate.tex index c4cf82a66b..d4e1c5ea31 100644 --- a/doc/tex/certificate.tex +++ b/doc/tex/certificate.tex @@ -23,11 +23,11 @@ authorities are acceptable. See figure \ref{fig:x509-1} for a typical example. assist in parsing them. \gnutls{} includes functions which extract parameters from given X.509 certificates. Some of them are: \begin{itemize} -\item \printfunc{gnutls_x509_certificate_init}{gnutls\_x509\_certificate\_init} -\item \printfunc{gnutls_x509_certificate_import}{gnutls\_x509\_certificate\_import} -\item \printfunc{gnutls_x509_certificate_get_dn}{gnutls\_x509\_certificate\_get\_dn} -\item \printfunc{gnutls_x509_certificate_get_serial}{gnutls\_x509\_certificate\_get\_serial} -\item \printfunc{gnutls_x509_certificate_get_subject_alt_name}{gnutls\_x509\_certificate\_get\_subject\_alt\_name} +\item \printfunc{gnutls_x509_crt_init}{gnutls\_x509\_crt\_init} +\item \printfunc{gnutls_x509_crt_import}{gnutls\_x509\_crt\_import} +\item \printfunc{gnutls_x509_crt_get_dn}{gnutls\_x509\_crt\_get\_dn} +\item \printfunc{gnutls_x509_crt_get_serial}{gnutls\_x509\_crt\_get\_serial} +\item \printfunc{gnutls_x509_crt_get_subject_alt_name}{gnutls\_x509\_crt\_get\_subject\_alt\_name} \end{itemize} The API for handling X.509 certificates is described at section \ref{sec:x509api} @@ -39,7 +39,7 @@ more information. \par Verifying certificate\index{Verifying certificate paths} paths is important in X.509 authentication. For this purpose you should use functions like -\printfunc{gnutls_x509_verify_certificate}{gnutls\_x509\_verify\_certificate}. +\printfunc{gnutls_x509_crt_verify}{gnutls\_x509\_crt\_verify}. A more generic one is also provided and can be used with all of the certificate authentication methods, but is limited to a session. See the \printfunc{gnutls_certificate_verify_peers}{gnutls\_certificate\_verify\_peers} diff --git a/doc/tex/ex-info.tex b/doc/tex/ex-info.tex index 12597b355e..0616d22df4 100644 --- a/doc/tex/ex-info.tex +++ b/doc/tex/ex-info.tex @@ -97,7 +97,7 @@ static void print_x509_certificate_info(gnutls_session session) time_t expiration_time, activation_time; const gnutls_datum *cert_list; int cert_list_size = 0; - gnutls_x509_certificate cert; + gnutls_x509_crt cert; cert_list = gnutls_certificate_get_peers(session, &cert_list_size); @@ -106,14 +106,14 @@ static void print_x509_certificate_info(gnutls_session session) /* no error checking */ - gnutls_x509_certificate_init( &cert); + gnutls_x509_crt_init( &cert); - gnutls_x509_certificate_import( cert, &cert_list[0]); + gnutls_x509_crt_import( cert, &cert_list[0]); printf(" - Certificate info:\n"); - expiration_time = gnutls_x509_certificate_get_expiration_time( cert); - activation_time = gnutls_x509_certificate_get_activation_time( cert); + expiration_time = gnutls_x509_crt_get_expiration_time( cert); + activation_time = gnutls_x509_crt_get_activation_time( cert); printf(" - Certificate is valid since: %s", ctime(&activation_time)); printf(" - Certificate expires: %s", ctime(&expiration_time)); @@ -132,7 +132,7 @@ static void print_x509_certificate_info(gnutls_session session) /* Print the serial number of the certificate. */ - if (gnutls_x509_certificate_get_serial(cert, serial, &serial_size) >= 0) + if (gnutls_x509_crt_get_serial(cert, serial, &serial_size) >= 0) { print = printable; for (i = 0; i < serial_size; i++) { @@ -145,7 +145,7 @@ static void print_x509_certificate_info(gnutls_session session) /* Extract some of the public key algorithm's parameters */ algo = - gnutls_x509_certificate_get_pk_algorithm(cert, &bits); + gnutls_x509_crt_get_pk_algorithm(cert, &bits); printf("Certificate public key: "); @@ -163,17 +163,17 @@ static void print_x509_certificate_info(gnutls_session session) * certificate. */ printf(" - Certificate version: #%d\n", - gnutls_x509_certificate_get_version( cert)); + gnutls_x509_crt_get_version( cert)); printable_size = sizeof(printable); - gnutls_x509_certificate_get_dn( cert, printable, &printable_size); + gnutls_x509_crt_get_dn( cert, printable, &printable_size); printf(" - DN: %s\n", printable); printable_size = sizeof(printable); - gnutls_x509_certificate_get_issuer_dn( cert, printable, &printable_size); + gnutls_x509_crt_get_issuer_dn( cert, printable, &printable_size); printf(" - Certificate Issuer's DN: %s\n", printable); - gnutls_x509_certificate_deinit( cert); + gnutls_x509_crt_deinit( cert); } } diff --git a/doc/tex/ex-rfc2818.tex b/doc/tex/ex-rfc2818.tex index 7dd9c3e341..74b35f0a1c 100644 --- a/doc/tex/ex-rfc2818.tex +++ b/doc/tex/ex-rfc2818.tex @@ -33,9 +33,9 @@ void verify_certificate( gnutls_session session, const char* hostname) if ( gnutls_certificate_type_get(session) == GNUTLS_CRT_X509) { const gnutls_datum* cert_list; int cert_list_size; - gnutls_x509_certificate cert; + gnutls_x509_crt cert; - if ( gnutls_x509_certificate_init( &cert) < 0) { + if ( gnutls_x509_crt_init( &cert) < 0) { printf("error in initialization\n"); return; } @@ -49,29 +49,29 @@ void verify_certificate( gnutls_session session, const char* hostname) /* Here we only check the first certificate in the given * chain. */ - if ( gnutls_x509_certificate_import( cert, &cert_list[0], GNUTLS_X509_FMT_DER) < 0) { + if ( gnutls_x509_crt_import( cert, &cert_list[0], GNUTLS_X509_FMT_DER) < 0) { printf("error parsing certificate\n"); return; } /* Beware here we do not check for errors. */ - if ( gnutls_x509_certificate_get_expiration( cert) < time(0)) { + if ( gnutls_x509_crt_get_expiration( cert) < time(0)) { printf("The certificate has expired\n"); return; } - if ( gnutls_x509_certificate_get_activation_time( cert) > time(0)) { + if ( gnutls_x509_crt_get_activation_time( cert) > time(0)) { printf("The certificate is not yet activated\n"); return; } - if ( !gnutls_x509_certificate_check_hostname( cert, hostname)) { + if ( !gnutls_x509_crt_check_hostname( cert, hostname)) { printf("The certificate does not match hostname\n"); return; } - gnutls_x509_certificate_deinit( cert); + gnutls_x509_crt_deinit( cert); } diff --git a/doc/tex/funcs.tex b/doc/tex/funcs.tex index c1f8cedd5f..04ab42e2c8 100644 --- a/doc/tex/funcs.tex +++ b/doc/tex/funcs.tex @@ -9,8 +9,8 @@ in ``gnutls/gnutls.h''. \section{\gnutls{} X.509 certificate handling\index{Function reference!for X.509 certificates}} \label{sec:x509api} -The prototypes for the following functions lie -in ``gnutls/x509.h''. +The following functions are to be used for X.509 certificate handling. +Their prototypes lie in ``gnutls/x509.h''. \input{x509-api} diff --git a/doc/tex/gnutls.bib b/doc/tex/gnutls.bib index 25e861e687..0021915424 100644 --- a/doc/tex/gnutls.bib +++ b/doc/tex/gnutls.bib @@ -30,8 +30,8 @@ title = "Transport Layer Security (TLS) Extensions", month = "July", year = {2002}, - note = "Internet draft, work in progress. Available from http://www.normos.org/ietf/draft/draft-ietf-tls-extensions-05.txt", - url = "http://www.normos.org/ietf/draft/draft-ietf-tls-extensions-05.txt" + note = "Internet draft, work in progress. Available from http://www.normos.org/ietf/draft/draft-ietf-tls-extensions-06.txt", + url = "http://www.normos.org/ietf/draft/draft-ietf-tls-extensions-06.txt" } @Misc{TLSSRP, diff --git a/doc/tex/x509cert.xml.tex b/doc/tex/x509cert.xml.tex index 874ba10ba2..331284b879 100644 --- a/doc/tex/x509cert.xml.tex +++ b/doc/tex/x509cert.xml.tex @@ -2,13 +2,13 @@ - + 02 01 - 1 2 840 113549 1 1 4 + 1.2.840.113549.1.1.4 0500 @@ -17,7 +17,7 @@ - 2 5 4 6 + 2.5.4.6 GR @@ -25,7 +25,7 @@ - 2 5 4 8 + 2.5.4.8 Attiki @@ -33,7 +33,7 @@ - 2 5 4 7 + 2.5.4.7 Athina @@ -41,7 +41,7 @@ - 2 5 4 10 + 2.5.4.10 GNUTLS @@ -49,7 +49,7 @@ - 2 5 4 11 + 2.5.4.11 GNUTLS dev. @@ -57,7 +57,7 @@ - 2 5 4 3 + 2.5.4.3 GNUTLS TEST CA @@ -65,7 +65,7 @@ - 1 2 840 113549 1 9 1 + 1.2.840.113549.1.9.1 gnutls-dev@gnupg.org @@ -85,7 +85,7 @@ - 2 5 4 6 + 2.5.4.6 GR @@ -93,7 +93,7 @@ - 2 5 4 8 + 2.5.4.8 Attiki @@ -101,7 +101,7 @@ - 2 5 4 7 + 2.5.4.7 Athina @@ -109,7 +109,7 @@ - 2 5 4 10 + 2.5.4.10 GNUTLS @@ -117,7 +117,7 @@ - 2 5 4 11 + 2.5.4.11 GNUTLS dev. @@ -125,7 +125,7 @@ - 2 5 4 3 + 2.5.4.3 localhost @@ -133,7 +133,7 @@ - 1 2 840 113549 1 9 1 + 1.2.840.113549.1.9.1 root@localhost @@ -143,7 +143,7 @@ - 1 2 840 113549 1 1 1 + 1.2.840.113549.1.1.1 0500 @@ -152,24 +152,24 @@ - 2 5 29 35 + 2.5.29.35 FALSE EFEE94ABC8CA577F5313DB76DC1A950093BAF3C9 - 2 5 29 37 + 2.5.29.37 FALSE - 1 3 6 1 5 5 7 3 1 - 1 3 6 1 5 5 7 3 2 - 1 3 6 1 4 1 311 10 3 3 - 2 16 840 1 113730 4 1 + 1.3.6.1.5.5.7.3.1 + 1.3.6.1.5.5.7.3.2 + 1.3.6.1.4.1.311.10.3.3 + 2.16.840.1.113730.4.1 - 2 5 29 19 + 2.5.29.19 TRUE FALSE @@ -178,7 +178,7 @@ - 1 2 840 113549 1 1 4 + 1.2.840.113549.1.1.4 0500