diff options
Diffstat (limited to 'doc/microhttpd.texi')
-rw-r--r-- | doc/microhttpd.texi | 56 |
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, |
693 | Takes no extra arguments. Allows access to the underlying GNUtls session | 693 | Takes no extra arguments. Allows access to the underlying GNUtls session, |
694 | (HTTPS connections only). | 694 | including access to the underlying GNUtls client certificate |
695 | 695 | (HTTPS connections only). Takes no extra arguments. | |
696 | @item MHD_CONNECTION_INFO_GNUTLS_CLIENT_CERT | ||
697 | Allows access to the underlying GNUtls client certificate. | ||
698 | Equivalent to calling directly MHD_cert_auth_get_certificate. | ||
699 | Takes 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 | ||
1498 | Client certificate authentication uses a X.509 certificate from | 1493 | Client certificate authentication uses a X.509 certificate from |
1499 | the client. This is the strongest authentication mechanism but it | 1494 | the client. This is the strongest authentication mechanism but it |
1500 | requires the use of https. Client certificate authentication can | 1495 | requires the use of HTTPS. Client certificate authentication can |
1501 | be used simultaneously with Basic or Digest Authentication in order | 1496 | be used simultaneously with Basic or Digest Authentication in order |
1502 | to provide a two levels authentication (like for instance separate | 1497 | to provide a two levels authentication (like for instance separate |
1503 | machine and user authentication). | 1498 | machine and user authentication). A code example for using |
1499 | client 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) |
1518 | Get the username and password from the basic authorization header sent by the client. | 1513 | Get the username and password from the basic authorization header sent by the client. |
1519 | Return @mynull{} if no username could be found, a pointer to the username if found. | 1514 | Return @mynull{} if no username could be found, a pointer to the username if found. |
1520 | If returned value is not @mynull{}, the value must be free()'ed. | 1515 | If 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{}. |
1523 | If returned value is not @mynull{}, the value must be free()'ed. | 1518 | If 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) |
1543 | Find and return a pointer to the username value from the request header. | 1538 | Find and return a pointer to the username value from the request header. |
1544 | Return @mynull{} if the value is not found or header does not exist. | 1539 | Return @mynull{} if the value is not found or header does not exist. |
1545 | If returned value is not @mynull{}, the value must be free()'ed. | 1540 | If 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) | ||
1652 | Get the client's X.509 certificate. | ||
1653 | Return @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. | ||
1655 | The certificate is cached between calls for a same https session and must not but | ||
1656 | manually modified or free()'ed. | ||
1657 | @end deftypefun | ||
1658 | |||
1659 | @deftypefun {char *} MHD_cert_auth_get_dn (struct MHD_Connection *connection) | ||
1660 | Get the distinguished name from the client's certificate. | ||
1661 | Return @mynull{} if the certificate doesn't contain a dn or if no valid certificate was | ||
1662 | found, a pointer to the dn if found. If returned value is not @mynull{}, the value must | ||
1663 | be free()'ed. | ||
1664 | @end deftypefun | ||
1665 | |||
1666 | @deftypefun {char *} MHD_cert_auth_get_alt_name (struct MHD_Connection *connection, int nametype, unsigned int index) | ||
1667 | Get the alternative name of specified type from the client's certificate. | ||
1668 | Return @mynull{} if the certificate doesn't contain a matching alternative name or if no | ||
1669 | valid certificate was found, a pointer to the alternative name if found. If returned | ||
1670 | value 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 | ||
1675 | requested 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 |