| OLD | NEW |
| 1 /** | 1 /** |
| 2 * @copyright | 2 * @copyright |
| 3 * ==================================================================== | 3 * ==================================================================== |
| 4 * Copyright (c) 2000-2004 CollabNet. All rights reserved. | 4 * Copyright (c) 2002-2008 CollabNet. All rights reserved. |
| 5 * | 5 * |
| 6 * This software is licensed as described in the file COPYING, which | 6 * This software is licensed as described in the file COPYING, which |
| 7 * you should have received as part of this distribution. The terms | 7 * you should have received as part of this distribution. The terms |
| 8 * are also available at http://subversion.tigris.org/license-1.html. | 8 * are also available at http://subversion.tigris.org/license-1.html. |
| 9 * If newer versions of this license are posted there, you may use a | 9 * If newer versions of this license are posted there, you may use a |
| 10 * newer version instead, at your option. | 10 * newer version instead, at your option. |
| 11 * | 11 * |
| 12 * This software consists of voluntary contributions made by many | 12 * This software consists of voluntary contributions made by many |
| 13 * individuals. For exact contribution history, see the revision | 13 * individuals. For exact contribution history, see the revision |
| 14 * history and logs, available at http://subversion.tigris.org/. | 14 * history and logs, available at http://subversion.tigris.org/. |
| 15 * ==================================================================== | 15 * ==================================================================== |
| 16 * @endcopyright | 16 * @endcopyright |
| 17 * | 17 * |
| 18 * @file svn_auth.h | 18 * @file svn_auth.h |
| 19 * @brief Subversion's authentication system | 19 * @brief Subversion's authentication system |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 #ifndef SVN_AUTH_H | 22 #ifndef SVN_AUTH_H |
| 23 #define SVN_AUTH_H | 23 #define SVN_AUTH_H |
| 24 | 24 |
| 25 #include <apr_pools.h> | 25 #include <apr_pools.h> |
| 26 | 26 |
| 27 #include "svn_types.h" | 27 #include "svn_types.h" |
| 28 | 28 |
| 29 #ifdef __cplusplus | 29 #ifdef __cplusplus |
| 30 extern "C" { | 30 extern "C" { |
| 31 #endif /* __cplusplus */ | 31 #endif /* __cplusplus */ |
| 32 | 32 |
| 33 /** Overview of the svn authentication system. | 33 /** Overview of the svn authentication system. |
| 34 * | 34 * |
| 35 * We define an authentication "provider" as a module that is able to | 35 * We define an authentication "provider" as a module that is able to |
| 36 * return a specific set of credentials. (e.g. username/password, | 36 * return a specific set of credentials. (e.g. username/password, |
| 37 * certificate, etc.) Each provider implements a vtable that | 37 * certificate, etc.) Each provider implements a vtable that |
| 38 * | 38 * |
| 39 * - can fetch initial credentials | 39 * - can fetch initial credentials |
| 40 * - can retry the fetch (or try to fetch something different) | 40 * - can retry the fetch (or try to fetch something different) |
| 41 * - can store the credentials for future use | 41 * - can store the credentials for future use |
| 42 * | 42 * |
| 43 * For any given type of credentials, there can exist any number of | 43 * For any given type of credentials, there can exist any number of |
| 44 * separate providers -- each provider has a different method of | 44 * separate providers -- each provider has a different method of |
| 45 * fetching. (i.e. from a disk store, by prompting the user, etc.) | 45 * fetching. (i.e. from a disk store, by prompting the user, etc.) |
| 46 * | 46 * |
| 47 * The application begins by creating an auth baton object, and | 47 * The application begins by creating an auth baton object, and |
| 48 * "registers" some number of providers with the auth baton, in a | 48 * "registers" some number of providers with the auth baton, in a |
| 49 * specific order. (For example, it may first register a | 49 * specific order. (For example, it may first register a |
| 50 * username/password provider that looks in disk store, then register | 50 * username/password provider that looks in disk store, then register |
| 51 * a username/password provider that prompts the user.) | 51 * a username/password provider that prompts the user.) |
| 52 * | 52 * |
| 53 * Later on, when any svn library is challenged, it asks the auth | 53 * Later on, when any svn library is challenged, it asks the auth |
| 54 * baton for the specific credentials. If the initial credentials | 54 * baton for the specific credentials. If the initial credentials |
| (...skipping 55 matching lines...) Show 10 above Show 10 below |
| 110 * Set @a *credentials to another set of valid credentials (using @a | 110 * Set @a *credentials to another set of valid credentials (using @a |
| 111 * iter_baton as the context from previous call to first_credentials | 111 * iter_baton as the context from previous call to first_credentials |
| 112 * or next_credentials). If no more credentials are available, set | 112 * or next_credentials). If no more credentials are available, set |
| 113 * @a *credentials to NULL. If the provider only has one set of | 113 * @a *credentials to NULL. If the provider only has one set of |
| 114 * credentials, this function pointer should simply be NULL. @a | 114 * credentials, this function pointer should simply be NULL. @a |
| 115 * provider_baton is general context for the vtable, @a parameters | 115 * provider_baton is general context for the vtable, @a parameters |
| 116 * contains any run-time data that the provider may need, and @a | 116 * contains any run-time data that the provider may need, and @a |
| 117 * realmstring comes from the svn_auth_first_credentials() call. | 117 * realmstring comes from the svn_auth_first_credentials() call. |
| 118 */ | 118 */ |
| 119 svn_error_t * (*next_credentials)(void **credentials, | 119 svn_error_t * (*next_credentials)(void **credentials, |
| 120 void *iter_baton, | 120 void *iter_baton, |
| 121 void *provider_baton, | 121 void *provider_baton, |
| 122 apr_hash_t *parameters, | 122 apr_hash_t *parameters, |
| 123 const char *realmstring, | 123 const char *realmstring, |
| 124 apr_pool_t *pool); | 124 apr_pool_t *pool); |
| 125 | 125 |
| 126 /** Save credentials. | 126 /** Save credentials. |
| 127 * | 127 * |
| 128 * Store @a credentials for future use. @a provider_baton is | 128 * Store @a credentials for future use. @a provider_baton is |
| 129 * general context for the vtable, and @a parameters contains any | 129 * general context for the vtable, and @a parameters contains any |
| 130 * run-time data the provider may need. Set @a *saved to TRUE if | 130 * run-time data the provider may need. Set @a *saved to TRUE if |
| 131 * the save happened, or FALSE if not. The provider is not required | 131 * the save happened, or FALSE if not. The provider is not required |
| 132 * to save; if it refuses or is unable to save for non-fatal | 132 * to save; if it refuses or is unable to save for non-fatal |
| 133 * reasons, return FALSE. If the provider never saves data, then | 133 * reasons, return FALSE. If the provider never saves data, then |
| 134 * this function pointer should simply be NULL. @a realmstring comes | 134 * this function pointer should simply be NULL. @a realmstring comes |
| 135 * from the svn_auth_first_credentials() call. | 135 * from the svn_auth_first_credentials() call. |
| 136 * | 136 * |
| 137 * All allocations should be done in @a pool, which can be assumed | 137 * All allocations should be done in @a pool, which can be assumed |
| 138 * to survive across RA sessions; auth providers that store passwords | 138 * to survive across RA sessions; auth providers that store passwords |
| 139 * in plaintext rely on this. | 139 * in plaintext rely on this. |
| 140 */ | 140 */ |
| 141 svn_error_t * (*save_credentials)(svn_boolean_t *saved, | 141 svn_error_t * (*save_credentials)(svn_boolean_t *saved, |
| 142 void *credentials, | 142 void *credentials, |
| 143 void *provider_baton, | 143 void *provider_baton, |
| 144 apr_hash_t *parameters, | 144 apr_hash_t *parameters, |
| 145 const char *realmstring, | 145 const char *realmstring, |
| 146 apr_pool_t *pool); | 146 apr_pool_t *pool); |
| 147 | 147 |
| 148 } svn_auth_provider_t; | 148 } svn_auth_provider_t; |
| 149 | 149 |
| 150 | 150 |
| 151 /** A provider object, ready to be put into an array and given to | 151 /** A provider object, ready to be put into an array and given to |
| 152 svn_auth_open(). */ | 152 svn_auth_open(). */ |
| 153 typedef struct svn_auth_provider_object_t | 153 typedef struct svn_auth_provider_object_t |
| 154 { | 154 { |
| 155 const svn_auth_provider_t *vtable; | 155 const svn_auth_provider_t *vtable; |
| 156 void *provider_baton; | 156 void *provider_baton; |
| 157 | 157 |
| 158 } svn_auth_provider_object_t; | 158 } svn_auth_provider_object_t; |
| 159 | 159 |
| 160 /** The type of function returning authentication provider. */ |
| 161 typedef void (*svn_auth_simple_provider_func_t) |
| 162 (svn_auth_provider_object_t **provider, |
| 163 apr_pool_t *pool); |
| 160 | 164 |
| 161 | 165 |
| 162 /** Specific types of credentials **/ | 166 /** Specific types of credentials **/ |
| 163 | 167 |
| 164 /** Simple username/password pair credential kind. | 168 /** Simple username/password pair credential kind. |
| 165 * | 169 * |
| 166 * The following auth parameters may be available to the providers: | 170 * The following auth parameters may be available to the providers: |
| 167 * | 171 * |
| 168 * - @c SVN_AUTH_PARAM_NO_AUTH_CACHE (@c void*) | 172 * - @c SVN_AUTH_PARAM_NO_AUTH_CACHE (@c void*) |
| 169 * - @c SVN_AUTH_PARAM_DEFAULT_USERNAME (@c char*) | 173 * - @c SVN_AUTH_PARAM_DEFAULT_USERNAME (@c char*) |
| 170 * - @c SVN_AUTH_PARAM_DEFAULT_PASSWORD (@c char*) | 174 * - @c SVN_AUTH_PARAM_DEFAULT_PASSWORD (@c char*) |
| 171 */ | 175 */ |
| 172 #define SVN_AUTH_CRED_SIMPLE "svn.simple" | 176 #define SVN_AUTH_CRED_SIMPLE "svn.simple" |
| 173 | 177 |
| 174 /** @c SVN_AUTH_CRED_SIMPLE credentials. */ | 178 /** @c SVN_AUTH_CRED_SIMPLE credentials. */ |
| 175 typedef struct svn_auth_cred_simple_t | 179 typedef struct svn_auth_cred_simple_t |
| 176 { | 180 { |
| 177 /** Username */ | 181 /** Username */ |
| 178 const char *username; | 182 const char *username; |
| 179 /** Password */ | 183 /** Password */ |
| 180 const char *password; | 184 const char *password; |
| 181 /** Indicates if the credentials may be saved (to disk). For example, a | 185 /** Indicates if the credentials may be saved (to disk). For example, a |
| 182 * GUI prompt implementation with a remember password checkbox shall set | 186 * GUI prompt implementation with a remember password checkbox shall set |
| 183 * @a may_save to TRUE if the checkbox is checked. | 187 * @a may_save to TRUE if the checkbox is checked. |
| 184 */ | 188 */ |
| 185 svn_boolean_t may_save; | 189 svn_boolean_t may_save; |
| 186 } svn_auth_cred_simple_t; | 190 } svn_auth_cred_simple_t; |
| 187 | 191 |
| 188 | 192 |
| 189 /** Username credential kind. | 193 /** Username credential kind. |
| 190 * | 194 * |
| 191 * The following optional auth parameters are relevant to the providers: | 195 * The following optional auth parameters are relevant to the providers: |
| 192 * | 196 * |
| 193 * - @c SVN_AUTH_PARAM_NO_AUTH_CACHE (@c void*) | 197 * - @c SVN_AUTH_PARAM_NO_AUTH_CACHE (@c void*) |
| 194 * - @c SVN_AUTH_PARAM_DEFAULT_USERNAME (@c char*) | 198 * - @c SVN_AUTH_PARAM_DEFAULT_USERNAME (@c char*) |
| 195 */ | 199 */ |
| 196 #define SVN_AUTH_CRED_USERNAME "svn.username" | 200 #define SVN_AUTH_CRED_USERNAME "svn.username" |
| 197 | 201 |
| 198 /** @c SVN_AUTH_CRED_USERNAME credentials. */ | 202 /** @c SVN_AUTH_CRED_USERNAME credentials. */ |
| 199 typedef struct svn_auth_cred_username_t | 203 typedef struct svn_auth_cred_username_t |
| 200 { | 204 { |
| 201 /** Username */ | 205 /** Username */ |
| 202 const char *username; | 206 const char *username; |
| 203 /** Indicates if the credentials may be saved (to disk). For example, a | 207 /** Indicates if the credentials may be saved (to disk). For example, a |
| 204 * GUI prompt implementation with a remember username checkbox shall set | 208 * GUI prompt implementation with a remember username checkbox shall set |
| 205 * @a may_save to TRUE if the checkbox is checked. | 209 * @a may_save to TRUE if the checkbox is checked. |
| 206 */ | 210 */ |
| 207 svn_boolean_t may_save; | 211 svn_boolean_t may_save; |
| 208 } svn_auth_cred_username_t; | 212 } svn_auth_cred_username_t; |
| 209 | 213 |
| (...skipping 490 matching lines...) Show 10 above Show 10 below |
| 700 * If a default username or password is available, @a *provider will | 704 * If a default username or password is available, @a *provider will |
| 701 * honor them as well, and return them when | 705 * honor them as well, and return them when |
| 702 * svn_auth_first_credentials() is called. (see @c | 706 * svn_auth_first_credentials() is called. (see @c |
| 703 * SVN_AUTH_PARAM_DEFAULT_USERNAME and @c | 707 * SVN_AUTH_PARAM_DEFAULT_USERNAME and @c |
| 704 * SVN_AUTH_PARAM_DEFAULT_PASSWORD). | 708 * SVN_AUTH_PARAM_DEFAULT_PASSWORD). |
| 705 * | 709 * |
| 706 * @since New in 1.6. | 710 * @since New in 1.6. |
| 707 */ | 711 */ |
| 708 void svn_auth_get_simple_provider2 | 712 void svn_auth_get_simple_provider2 |
| 709 (svn_auth_provider_object_t **provider, | 713 (svn_auth_provider_object_t **provider, |
| 710 svn_auth_plaintext_prompt_func_t plaintext_prompt_func, | 714 svn_auth_plaintext_prompt_func_t plaintext_prompt_func, |
| 711 void* prompt_baton, | 715 void* prompt_baton, |
| 712 apr_pool_t *pool); | 716 apr_pool_t *pool); |
| 713 | 717 |
| 714 /** Like svn_auth_get_simple_provider2, but without the ability to | 718 /** Like svn_auth_get_simple_provider2, but without the ability to |
| 715 * call the svn_auth_plaintext_prompt_func_t callback. | 719 * call the svn_auth_plaintext_prompt_func_t callback. |
| 716 * | 720 * |
| 717 * @deprecated Provided for backwards compatibility with the 1.5 API. | 721 * @deprecated Provided for backwards compatibility with the 1.5 API. |
| 718 * @since New in 1.4. | 722 * @since New in 1.4. |
| 719 */ | 723 */ |
| 720 void svn_auth_get_simple_provider(svn_auth_provider_object_t **provider, | 724 void svn_auth_get_simple_provider(svn_auth_provider_object_t **provider, |
| 721 apr_pool_t *pool); | 725 apr_pool_t *pool); |
| 722 | 726 |
| 723 | 727 |
| 724 #if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN) | 728 #if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN) |
| 725 /** | 729 /** |
| 726 * Create and return @a *provider, an authentication provider of type @c | 730 * Create and return @a *provider, an authentication provider of type @c |
| 727 * svn_auth_cred_simple_t that gets/sets information from the user's | 731 * svn_auth_cred_simple_t that gets/sets information from the user's |
| 728 * ~/.subversion configuration directory. Allocate @a *provider in | 732 * ~/.subversion configuration directory. Allocate @a *provider in |
| 729 * @a pool. | 733 * @a pool. |
| 730 * | 734 * |
| 731 * This is like svn_client_get_simple_provider(), except that, when | 735 * This is like svn_client_get_simple_provider(), except that, when |
| 732 * running on Window 2000 or newer (or any other Windows version that | 736 * running on Window 2000 or newer (or any other Windows version that |
| 733 * includes the CryptoAPI), the provider encrypts the password before | 737 * includes the CryptoAPI), the provider encrypts the password before |
| 734 * storing it to disk. On earlier versions of Windows, the provider | 738 * storing it to disk. On earlier versions of Windows, the provider |
| 735 * does nothing. | 739 * does nothing. |
| 736 * | 740 * |
| 737 * @since New in 1.4. | 741 * @since New in 1.4. |
| 738 * @note This function is only available on Windows. | 742 * @note This function is only available on Windows. |
| 739 * | 743 * |
| 740 * @note An administrative password reset may invalidate the account's | 744 * @note An administrative password reset may invalidate the account's |
| 741 * secret key. This function will detect that situation and behave as | 745 * secret key. This function will detect that situation and behave as |
| 742 * if the password were not cached at all. | 746 * if the password were not cached at all. |
| 743 */ | 747 */ |
| 744 void | 748 void |
| 745 svn_auth_get_windows_simple_provider(svn_auth_provider_object_t **provider, | 749 svn_auth_get_windows_simple_provider(svn_auth_provider_object_t **provider, |
| 746 apr_pool_t *pool); | 750 apr_pool_t *pool); |
| 747 #endif /* WIN32 || DOXYGEN */ | 751 #endif /* WIN32 || DOXYGEN */ |
| 748 | 752 |
| 749 #if defined(DARWIN) || defined(DOXYGEN) | 753 #if defined(DARWIN) || defined(DOXYGEN) |
| 750 | |
| 751 /** | 754 /** |
| 752 * Create and return @a *provider, an authentication provider of type @c | 755 * Create and return @a *provider, an authentication provider of type @c |
| 753 * svn_auth_cred_simple_t that gets/sets information from the user's | 756 * svn_auth_cred_simple_t that gets/sets information from the user's |
| 754 * ~/.subversion configuration directory. Allocate @a *provider in | 757 * ~/.subversion configuration directory. Allocate @a *provider in |
| 755 * @a pool. | 758 * @a pool. |
| 756 * | 759 * |
| 757 * This is like svn_client_get_simple_provider(), except that the | 760 * This is like svn_client_get_simple_provider(), except that the |
| 758 * password is stored in the Mac OS KeyChain. | 761 * password is stored in the Mac OS KeyChain. |
| 759 * | 762 * |
| 760 * @since New in 1.4 | 763 * @since New in 1.4 |
| 761 * @note This function is only available on Mac OS 10.2 and higher. | 764 * @note This function is only available on Mac OS 10.2 and higher. |
| 762 */ | 765 */ |
| 763 void | 766 void |
| 764 svn_auth_get_keychain_simple_provider(svn_auth_provider_object_t **provider, | 767 svn_auth_get_keychain_simple_provider(svn_auth_provider_object_t **provider, |
| 765 apr_pool_t *pool); | 768 apr_pool_t *pool); |
| 769 #endif /* DARWIN || DOXYGEN */ |
| 766 | 770 |
| 767 #endif /* DARWIN || DOXYGEN */ | |
| 768 | 771 |
| 769 /** Create and return @a *provider, an authentication provider of type @c | 772 /** Create and return @a *provider, an authentication provider of type @c |
| 770 * svn_auth_cred_username_t that gets/sets information from a user's | 773 * svn_auth_cred_username_t that gets/sets information from a user's |
| 771 * ~/.subversion configuration directory. Allocate @a *provider in | 774 * ~/.subversion configuration directory. Allocate @a *provider in |
| 772 * @a pool. | 775 * @a pool. |
| 773 * | 776 * |
| 774 * If a default username is available, @a *provider will honor it, | 777 * If a default username is available, @a *provider will honor it, |
| 775 * and return it when svn_auth_first_credentials() is called. (See | 778 * and return it when svn_auth_first_credentials() is called. (See |
| 776 * @c SVN_AUTH_PARAM_DEFAULT_USERNAME.) | 779 * @c SVN_AUTH_PARAM_DEFAULT_USERNAME.) |
| 777 * | 780 * |
| 778 * @since New in 1.4. | 781 * @since New in 1.4. |
| 779 */ | 782 */ |
| 780 void svn_auth_get_username_provider(svn_auth_provider_object_t **provider, | 783 void svn_auth_get_username_provider(svn_auth_provider_object_t **provider, |
| 781 apr_pool_t *pool); | 784 apr_pool_t *pool); |
| 782 | 785 |
| 783 | 786 |
| 784 /** Create and return @a *provider, an authentication provider of type @c | 787 /** Create and return @a *provider, an authentication provider of type @c |
| 785 * svn_auth_cred_ssl_server_trust_t, allocated in @a pool. | 788 * svn_auth_cred_ssl_server_trust_t, allocated in @a pool. |
| 786 * | 789 * |
| 787 * @a *provider retrieves its credentials from the configuration | 790 * @a *provider retrieves its credentials from the configuration |
| 788 * mechanism. The returned credential is used to override SSL | 791 * mechanism. The returned credential is used to override SSL |
| 789 * security on an error. | 792 * security on an error. |
| 790 * | 793 * |
| 791 * @since New in 1.4. | 794 * @since New in 1.4. |
| 792 */ | 795 */ |
| 793 void svn_auth_get_ssl_server_trust_file_provider | 796 void svn_auth_get_ssl_server_trust_file_provider |
| 794 (svn_auth_provider_object_t **provider, | 797 (svn_auth_provider_object_t **provider, |
| 795 apr_pool_t *pool); | 798 apr_pool_t *pool); |
| 796 | 799 |
| 797 | 800 |
| 798 #if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN) | 801 #if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN) |
| 799 /** | 802 /** |
| 800 * Create and return @a *provider, an authentication provider of type @c | 803 * Create and return @a *provider, an authentication provider of type @c |
| 801 * svn_auth_cred_ssl_server_trust_t, allocated in @a pool. | 804 * svn_auth_cred_ssl_server_trust_t, allocated in @a pool. |
| 802 * | 805 * |
| 803 * This provider automatically validates ssl server certificates with | 806 * This provider automatically validates ssl server certificates with |
| 804 * the CryptoApi, like Internet Explorer and the Windows network API do. | 807 * the CryptoApi, like Internet Explorer and the Windows network API do. |
| 805 * This allows the rollout of root certificates via Windows Domain | 808 * This allows the rollout of root certificates via Windows Domain |
| 806 * policies, instead of Subversion specific configuration. | 809 * policies, instead of Subversion specific configuration. |
| 807 * | 810 * |
| 808 * @since New in 1.5. | 811 * @since New in 1.5. |
| 809 * @note This function is only available on Windows. | 812 * @note This function is only available on Windows. |
| 810 */ | 813 */ |
| 811 void | 814 void |
| 812 svn_auth_get_windows_ssl_server_trust_provider | 815 svn_auth_get_windows_ssl_server_trust_provider |
| 813 (svn_auth_provider_object_t **provider, | 816 (svn_auth_provider_object_t **provider, |
| 814 apr_pool_t *pool); | 817 apr_pool_t *pool); |
| 815 #endif /* WIN32 || DOXYGEN */ | 818 #endif /* WIN32 || DOXYGEN */ |
| 816 | 819 |
| 817 /** Create and return @a *provider, an authentication provider of type @c | 820 /** Create and return @a *provider, an authentication provider of type @c |
| 818 * svn_auth_cred_ssl_client_cert_t, allocated in @a pool. | 821 * svn_auth_cred_ssl_client_cert_t, allocated in @a pool. |
| 819 * | 822 * |
| 820 * @a *provider retrieves its credentials from the configuration | 823 * @a *provider retrieves its credentials from the configuration |
| 821 * mechanism. The returned credential is used to load the appropriate | 824 * mechanism. The returned credential is used to load the appropriate |
| 822 * client certificate for authentication when requested by a server. | 825 * client certificate for authentication when requested by a server. |
| 823 * | 826 * |
| 824 * @since New in 1.4. | 827 * @since New in 1.4. |
| 825 */ | 828 */ |
| 826 void svn_auth_get_ssl_client_cert_file_provider | 829 void svn_auth_get_ssl_client_cert_file_provider |
| 827 (svn_auth_provider_object_t **provider, | 830 (svn_auth_provider_object_t **provider, |
| 828 apr_pool_t *pool); | 831 apr_pool_t *pool); |
| 829 | 832 |
| 830 | 833 |
| 831 /** Create and return @a *provider, an authentication provider of type @c | 834 /** Create and return @a *provider, an authentication provider of type @c |
| 832 * svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool. | 835 * svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool. |
| 833 * | 836 * |
| 834 * @a *provider retrieves its credentials from the configuration | 837 * @a *provider retrieves its credentials from the configuration |
| 835 * mechanism. The returned credential is used when a loaded client | 838 * mechanism. The returned credential is used when a loaded client |
| 836 * certificate is protected by a passphrase. | 839 * certificate is protected by a passphrase. |
| 837 * | 840 * |
| 838 * @since New in 1.4. | 841 * @since New in 1.4. |
| 839 */ | 842 */ |
| 840 void svn_auth_get_ssl_client_cert_pw_file_provider | 843 void svn_auth_get_ssl_client_cert_pw_file_provider |
| 841 (svn_auth_provider_object_t **provider, | 844 (svn_auth_provider_object_t **provider, |
| 842 apr_pool_t *pool); | 845 apr_pool_t *pool); |
| 843 | 846 |
| 844 | 847 |
| 845 /** Create and return @a *provider, an authentication provider of type @c | 848 /** Create and return @a *provider, an authentication provider of type @c |
| 846 * svn_auth_cred_ssl_server_trust_t, allocated in @a pool. | 849 * svn_auth_cred_ssl_server_trust_t, allocated in @a pool. |
| 847 * | 850 * |
| 848 * @a *provider retrieves its credentials by using the @a prompt_func | 851 * @a *provider retrieves its credentials by using the @a prompt_func |
| 849 * and @a prompt_baton. The returned credential is used to override | 852 * and @a prompt_baton. The returned credential is used to override |
| 850 * SSL security on an error. | 853 * SSL security on an error. |
| 851 * | 854 * |
| 852 * @since New in 1.4. | 855 * @since New in 1.4. |
| 853 */ | 856 */ |
| 854 void svn_auth_get_ssl_server_trust_prompt_provider | 857 void svn_auth_get_ssl_server_trust_prompt_provider |
| 855 (svn_auth_provider_object_t **provider, | 858 (svn_auth_provider_object_t **provider, |
| 856 svn_auth_ssl_server_trust_prompt_func_t prompt_func, | 859 svn_auth_ssl_server_trust_prompt_func_t prompt_func, |
| 857 void *prompt_baton, | 860 void *prompt_baton, |
| 858 apr_pool_t *pool); | 861 apr_pool_t *pool); |
| 859 | 862 |
| 860 | 863 |
| 861 /** Create and return @a *provider, an authentication provider of type @c | 864 /** Create and return @a *provider, an authentication provider of type @c |
| 862 * svn_auth_cred_ssl_client_cert_t, allocated in @a pool. | 865 * svn_auth_cred_ssl_client_cert_t, allocated in @a pool. |
| 863 * | 866 * |
| 864 * @a *provider retrieves its credentials by using the @a prompt_func | 867 * @a *provider retrieves its credentials by using the @a prompt_func |
| 865 * and @a prompt_baton. The returned credential is used to load the | 868 * and @a prompt_baton. The returned credential is used to load the |
| 866 * appropriate client certificate for authentication when requested by | 869 * appropriate client certificate for authentication when requested by |
| 867 * a server. The prompt will be retried @a retry_limit times. | 870 * a server. The prompt will be retried @a retry_limit times. |
| 868 * | 871 * |
| 869 * @since New in 1.4. | 872 * @since New in 1.4. |
| 870 */ | 873 */ |
| 871 void svn_auth_get_ssl_client_cert_prompt_provider | 874 void svn_auth_get_ssl_client_cert_prompt_provider |
| 872 (svn_auth_provider_object_t **provider, | 875 (svn_auth_provider_object_t **provider, |
| 873 svn_auth_ssl_client_cert_prompt_func_t prompt_func, | 876 svn_auth_ssl_client_cert_prompt_func_t prompt_func, |
| 874 void *prompt_baton, | 877 void *prompt_baton, |
| 875 int retry_limit, | 878 int retry_limit, |
| 876 apr_pool_t *pool); | 879 apr_pool_t *pool); |
| 877 | 880 |
| 878 | 881 |
| 879 /** Create and return @a *provider, an authentication provider of type @c | 882 /** Create and return @a *provider, an authentication provider of type @c |
| 880 * svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool. | 883 * svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool. |
| 881 * | 884 * |
| 882 * @a *provider retrieves its credentials by using the @a prompt_func | 885 * @a *provider retrieves its credentials by using the @a prompt_func |
| 883 * and @a prompt_baton. The returned credential is used when a loaded | 886 * and @a prompt_baton. The returned credential is used when a loaded |
| 884 * client certificate is protected by a passphrase. The prompt will | 887 * client certificate is protected by a passphrase. The prompt will |
| 885 * be retried @a retry_limit times. | 888 * be retried @a retry_limit times. |
| 886 * | 889 * |
| 887 * @since New in 1.4. | 890 * @since New in 1.4. |
| 888 */ | 891 */ |
| 889 void svn_auth_get_ssl_client_cert_pw_prompt_provider | 892 void svn_auth_get_ssl_client_cert_pw_prompt_provider |
| 890 (svn_auth_provider_object_t **provider, | 893 (svn_auth_provider_object_t **provider, |
| 891 svn_auth_ssl_client_cert_pw_prompt_func_t prompt_func, | 894 svn_auth_ssl_client_cert_pw_prompt_func_t prompt_func, |
| 892 void *prompt_baton, | 895 void *prompt_baton, |
| 893 int retry_limit, | 896 int retry_limit, |
| 894 apr_pool_t *pool); | 897 apr_pool_t *pool); |
| 895 | 898 |
| 896 #ifdef __cplusplus | 899 #ifdef __cplusplus |
| 897 } | 900 } |
| 898 #endif /* __cplusplus */ | 901 #endif /* __cplusplus */ |
| 899 | 902 |
| 900 #endif /* SVN_AUTH_H */ | 903 #endif /* SVN_AUTH_H */ |
| OLD | NEW |