2 * auth.h : shared stuff internal to the subr library.
4 * ====================================================================
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements. See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership. The ASF licenses this file
9 * to you under the Apache License, Version 2.0 (the
10 * "License"); you may not use this file except in compliance
11 * with the License. You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing,
16 * software distributed under the License is distributed on an
17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18 * KIND, either express or implied. See the License for the
19 * specific language governing permissions and limitations
21 * ====================================================================
24 #ifndef SVN_LIBSVN_SUBR_AUTH_H
25 #define SVN_LIBSVN_SUBR_AUTH_H
29 #endif /* __cplusplus */
33 /* Helper for svn_config_{read|write}_auth_data. Return a path to a
34 file within ~/.subversion/auth/ that holds CRED_KIND credentials
35 within REALMSTRING. If no path is available *PATH will be set to
38 svn_auth__file_path(const char **path
,
39 const char *cred_kind
,
40 const char *realmstring
,
41 const char *config_dir
,
44 #if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN)
46 * Set @a *provider to an authentication provider of type @c
47 * svn_auth_cred_simple_t that gets/sets information from the user's
48 * ~/.subversion configuration directory. Allocate @a *provider in
51 * This is like svn_auth_get_simple_provider(), except that, when
52 * running on Window 2000 or newer (or any other Windows version that
53 * includes the CryptoAPI), the provider encrypts the password before
54 * storing it to disk. On earlier versions of Windows, the provider
57 * @note This function is only available on Windows.
59 * @note An administrative password reset may invalidate the account's
60 * secret key. This function will detect that situation and behave as
61 * if the password were not cached at all.
64 svn_auth__get_windows_simple_provider(svn_auth_provider_object_t
**provider
,
68 * Set @a *provider to an authentication provider of type @c
69 * svn_auth_cred_ssl_client_cert_pw_t that gets/sets information from the
70 * user's ~/.subversion configuration directory. Allocate @a *provider in
73 * This is like svn_auth_get_ssl_client_cert_pw_file_provider(), except that
74 * when running on Window 2000 or newer, the provider encrypts the password
75 * before storing it to disk. On earlier versions of Windows, the provider
78 * @note This function is only available on Windows.
80 * @note An administrative password reset may invalidate the account's
81 * secret key. This function will detect that situation and behave as
82 * if the password were not cached at all.
85 svn_auth__get_windows_ssl_client_cert_pw_provider(
86 svn_auth_provider_object_t
**provider
,
90 * Set @a *provider to an authentication provider of type @c
91 * svn_auth_cred_ssl_server_trust_t, allocated in @a pool.
93 * This provider automatically validates ssl server certificates with
94 * the CryptoApi, like Internet Explorer and the Windows network API do.
95 * This allows the rollout of root certificates via Windows Domain
96 * policies, instead of Subversion specific configuration.
98 * @note This function is only available on Windows.
101 svn_auth__get_windows_ssl_server_trust_provider(
102 svn_auth_provider_object_t
**provider
,
104 #endif /* WIN32 && !__MINGW32__ || DOXYGEN */
106 #if defined(DARWIN) || defined(DOXYGEN)
108 * Set @a *provider to an authentication provider of type @c
109 * svn_auth_cred_simple_t that gets/sets information from the user's
110 * ~/.subversion configuration directory. Allocate @a *provider in
113 * This is like svn_auth_get_simple_provider(), except that the
114 * password is stored in the Mac OS KeyChain.
116 * @note This function is only available on Mac OS 10.2 and higher.
119 svn_auth__get_keychain_simple_provider(svn_auth_provider_object_t
**provider
,
123 * Set @a *provider to an authentication provider of type @c
124 * svn_auth_cred_ssl_client_cert_pw_t that gets/sets information from the
125 * user's ~/.subversion configuration directory. Allocate @a *provider in
128 * This is like svn_auth_get_ssl_client_cert_pw_file_provider(), except
129 * that the password is stored in the Mac OS KeyChain.
131 * @note This function is only available on Mac OS 10.2 and higher.
134 svn_auth__get_keychain_ssl_client_cert_pw_provider(
135 svn_auth_provider_object_t
**provider
,
137 #endif /* DARWIN || DOXYGEN */
139 #if !defined(WIN32) || defined(DOXYGEN)
141 * Set @a *provider to an authentication provider of type @c
142 * svn_auth_cred_simple_t that gets/sets information from the user's
143 * ~/.subversion configuration directory.
145 * This is like svn_client_get_simple_provider(), except that the
146 * password is obtained from gpg_agent, which will keep it in
149 * Allocate @a *provider in @a pool.
151 * @note This function actually works only on systems with
152 * GNU Privacy Guard installed.
155 svn_auth__get_gpg_agent_simple_provider
156 (svn_auth_provider_object_t
**provider
,
158 #endif /* !defined(WIN32) || defined(DOXYGEN) */
161 * Set @a *provider to a dummy provider of type @c
162 * svn_auth_cred_simple_t that never returns or stores any
166 svn_auth__get_dummmy_simple_provider(svn_auth_provider_object_t
**provider
,
171 #endif /* __cplusplus */
173 #endif /* SVN_LIBSVN_SUBR_AUTH_H */