aboutsummaryrefslogtreecommitdiff
path: root/doc/microhttpd.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/microhttpd.texi')
-rw-r--r--doc/microhttpd.texi56
1 files changed, 9 insertions, 47 deletions
diff --git a/doc/microhttpd.texi b/doc/microhttpd.texi
index aaeb5da9..fd646fef 100644
--- a/doc/microhttpd.texi
+++ b/doc/microhttpd.texi
@@ -690,14 +690,9 @@ Takes no extra arguments. Allows finding out the TLS/SSL protocol used
690(HTTPS connections only). 690(HTTPS connections only).
691 691
692@item MHD_CONNECTION_INFO_GNUTLS_SESSION, 692@item MHD_CONNECTION_INFO_GNUTLS_SESSION,
693Takes no extra arguments. Allows access to the underlying GNUtls session 693Takes no extra arguments. Allows access to the underlying GNUtls session,
694(HTTPS connections only). 694including access to the underlying GNUtls client certificate
695 695(HTTPS connections only). Takes no extra arguments.
696@item MHD_CONNECTION_INFO_GNUTLS_CLIENT_CERT
697Allows access to the underlying GNUtls client certificate.
698Equivalent to calling directly MHD_cert_auth_get_certificate.
699Takes no extra arguments.
700(HTTPS connections only).
701 696
702@end table 697@end table
703@end deftp 698@end deftp
@@ -1497,15 +1492,15 @@ when https is not used to encrypt the session.
1497 1492
1498Client certificate authentication uses a X.509 certificate from 1493Client certificate authentication uses a X.509 certificate from
1499the client. This is the strongest authentication mechanism but it 1494the client. This is the strongest authentication mechanism but it
1500requires the use of https. Client certificate authentication can 1495requires the use of HTTPS. Client certificate authentication can
1501be used simultaneously with Basic or Digest Authentication in order 1496be used simultaneously with Basic or Digest Authentication in order
1502to provide a two levels authentication (like for instance separate 1497to provide a two levels authentication (like for instance separate
1503machine and user authentication). 1498machine and user authentication). A code example for using
1499client certificates is presented in the @mhd{} tutorial.
1504 1500
1505@menu 1501@menu
1506* microhttpd-dauth basic:: Using Basic Authentication. 1502* microhttpd-dauth basic:: Using Basic Authentication.
1507* microhttpd-dauth digest:: Using Digest Authentication. 1503* microhttpd-dauth digest:: Using Digest Authentication.
1508* microhttpd-dauth cert:: Using Client Certificate Authentication.
1509@end menu 1504@end menu
1510 1505
1511@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1506@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -1517,10 +1512,10 @@ machine and user authentication).
1517@deftypefun {char *} MHD_basic_auth_get_username_password (struct MHD_Connection *connection, char** password) 1512@deftypefun {char *} MHD_basic_auth_get_username_password (struct MHD_Connection *connection, char** password)
1518Get the username and password from the basic authorization header sent by the client. 1513Get the username and password from the basic authorization header sent by the client.
1519Return @mynull{} if no username could be found, a pointer to the username if found. 1514Return @mynull{} if no username could be found, a pointer to the username if found.
1520If returned value is not @mynull{}, the value must be free()'ed. 1515If returned value is not @mynull{}, the value must be @code{free()}'ed.
1521 1516
1522@var{password} reference a buffer to store the password. It can be @mynull{}. 1517@var{password} reference a buffer to store the password. It can be @mynull{}.
1523If returned value is not @mynull{}, the value must be free()'ed. 1518If returned value is not @mynull{}, the value must be @code{free()}'ed.
1524@end deftypefun 1519@end deftypefun
1525 1520
1526@deftypefun {int} MHD_queue_basic_auth_fail_response (struct MHD_Connection *connection, const char *realm, struct MHD_Response *response) 1521@deftypefun {int} MHD_queue_basic_auth_fail_response (struct MHD_Connection *connection, const char *realm, struct MHD_Response *response)
@@ -1542,7 +1537,7 @@ client with a 401 HTTP status.
1542@deftypefun {char *} MHD_digest_auth_get_username (struct MHD_Connection *connection) 1537@deftypefun {char *} MHD_digest_auth_get_username (struct MHD_Connection *connection)
1543Find and return a pointer to the username value from the request header. 1538Find and return a pointer to the username value from the request header.
1544Return @mynull{} if the value is not found or header does not exist. 1539Return @mynull{} if the value is not found or header does not exist.
1545If returned value is not @mynull{}, the value must be free()'ed. 1540If returned value is not @mynull{}, the value must be @code{free()}'ed.
1546@end deftypefun 1541@end deftypefun
1547 1542
1548@deftypefun int MHD_digest_auth_check (struct MHD_Connection *connection, const char *realm, const char *username, const char *password, unsigned int nonce_timeout) 1543@deftypefun int MHD_digest_auth_check (struct MHD_Connection *connection, const char *realm, const char *username, const char *password, unsigned int nonce_timeout)
@@ -1645,39 +1640,6 @@ ahc_echo (void *cls,
1645@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1640@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1646 1641
1647@c ------------------------------------------------------------ 1642@c ------------------------------------------------------------
1648@node microhttpd-dauth cert
1649@section Using Client Certificate Authentication
1650
1651@deftypefun {void *} MHD_cert_auth_get_certificate (struct MHD_Connection *connection)
1652Get the client's X.509 certificate.
1653Return @mynull{} if no valid client certificate was found, a pointer to the certificate
1654(which can be casted to gnutls_x509_crt_t) if found.
1655The certificate is cached between calls for a same https session and must not but
1656manually modified or free()'ed.
1657@end deftypefun
1658
1659@deftypefun {char *} MHD_cert_auth_get_dn (struct MHD_Connection *connection)
1660Get the distinguished name from the client's certificate.
1661Return @mynull{} if the certificate doesn't contain a dn or if no valid certificate was
1662found, a pointer to the dn if found. If returned value is not @mynull{}, the value must
1663be free()'ed.
1664@end deftypefun
1665
1666@deftypefun {char *} MHD_cert_auth_get_alt_name (struct MHD_Connection *connection, int nametype, unsigned int index)
1667Get the alternative name of specified type from the client's certificate.
1668Return @mynull{} if the certificate doesn't contain a matching alternative name or if no
1669valid certificate was found, a pointer to the alternative name if found. If returned
1670value is not @mynull{}, the value must be free()'ed.
1671
1672@var{nametype} The requested name type (of type 'enum gnutls_x509_subject_alt_name_t')
1673
1674@var{index} The position of the alternative name if multiple names are matching the
1675requested type, 0 for the first matching name
1676@end deftypefun
1677
1678@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1679
1680@c ------------------------------------------------------------
1681@node microhttpd-post 1643@node microhttpd-post
1682@chapter Adding a @code{POST} processor 1644@chapter Adding a @code{POST} processor
1683@cindex POST method 1645@cindex POST method