31 #include <apr_pools.h>
33 #include <apr_tables.h>
112 void *provider_baton,
113 apr_hash_t *parameters,
114 const char *realmstring,
130 void *provider_baton,
131 apr_hash_t *parameters,
132 const char *realmstring,
148 void *provider_baton,
149 apr_hash_t *parameters,
150 const char *realmstring,
161 void *provider_baton;
186 #define SVN_AUTH_CRED_SIMPLE "svn.simple"
210 #define SVN_AUTH_CRED_USERNAME "svn.username"
236 #define SVN_AUTH_CRED_SSL_CLIENT_CERT "svn.ssl.client-cert"
271 #define SVN_AUTH_CRED_SSL_CLIENT_CERT_PW "svn.ssl.client-passphrase"
300 #define SVN_AUTH_CRED_SSL_SERVER_TRUST "svn.ssl.server"
380 const char *username,
412 #define SVN_AUTH_SSL_NOTYETVALID 0x00000001
414 #define SVN_AUTH_SSL_EXPIRED 0x00000002
416 #define SVN_AUTH_SSL_CNMISMATCH 0x00000004
418 #define SVN_AUTH_SSL_UNKNOWNCA 0x00000008
421 #define SVN_AUTH_SSL_OTHER 0x40000000
443 apr_uint32_t failures,
477 typedef svn_error_t *(*svn_auth_ssl_client_cert_pw_prompt_func_t)(
499 const char *realmstring,
516 typedef svn_error_t *(*svn_auth_plaintext_passphrase_prompt_func_t)(
518 const char *realmstring,
535 const apr_array_header_t *providers,
568 #define SVN_AUTH_PARAM_PREFIX "svn:auth:"
575 #define SVN_AUTH_PARAM_DEFAULT_USERNAME SVN_AUTH_PARAM_PREFIX "username"
577 #define SVN_AUTH_PARAM_DEFAULT_PASSWORD SVN_AUTH_PARAM_PREFIX "password"
583 #define SVN_AUTH_PARAM_NON_INTERACTIVE SVN_AUTH_PARAM_PREFIX "non-interactive"
588 #define SVN_AUTH_PARAM_DONT_STORE_PASSWORDS SVN_AUTH_PARAM_PREFIX \
589 "dont-store-passwords"
596 #define SVN_AUTH_PARAM_STORE_PLAINTEXT_PASSWORDS SVN_AUTH_PARAM_PREFIX \
597 "store-plaintext-passwords"
604 #define SVN_AUTH_PARAM_DONT_STORE_SSL_CLIENT_CERT_PP \
605 SVN_AUTH_PARAM_PREFIX "dont-store-ssl-client-cert-pp"
612 #define SVN_AUTH_PARAM_STORE_SSL_CLIENT_CERT_PP_PLAINTEXT \
613 SVN_AUTH_PARAM_PREFIX "store-ssl-client-cert-pp-plaintext"
618 #define SVN_AUTH_PARAM_NO_AUTH_CACHE SVN_AUTH_PARAM_PREFIX "no-auth-cache"
623 #define SVN_AUTH_PARAM_SSL_SERVER_FAILURES SVN_AUTH_PARAM_PREFIX \
628 #define SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO SVN_AUTH_PARAM_PREFIX \
633 #define SVN_AUTH_PARAM_CONFIG_CATEGORY_CONFIG SVN_AUTH_PARAM_PREFIX \
634 "config-category-config"
638 #define SVN_AUTH_PARAM_CONFIG_CATEGORY_SERVERS SVN_AUTH_PARAM_PREFIX \
639 "config-category-servers"
642 #define SVN_AUTH_PARAM_CONFIG SVN_AUTH_PARAM_CONFIG_CATEGORY_SERVERS
645 #define SVN_AUTH_PARAM_SERVER_GROUP SVN_AUTH_PARAM_PREFIX "server-group"
649 #define SVN_AUTH_PARAM_CONFIG_DIR SVN_AUTH_PARAM_PREFIX "config-dir"
666 const char *cred_kind,
667 const char *realmstring,
716 const char *cred_kind,
717 const char *realmstring,
840 const char *provider_name,
841 const char *provider_type,
864 apr_array_header_t **providers,
868 #if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN)
946 #if defined(DARWIN) || defined(DOXYGEN)
1005 char **keyring_password,
1006 const char *keyring_name,
1016 #define SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC "gnome-keyring-unlock-prompt-func"
1020 #define SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_BATON "gnome-keyring-unlock-prompt-baton"
1022 #if (!defined(DARWIN) && !defined(WIN32)) || defined(DOXYGEN)
1148 #if !defined(WIN32) || defined(DOXYGEN)
svn_boolean_t may_save
Indicates if the credentials may be saved (to disk).
const char * password
Password.
svn_error_t * svn_auth_get_platform_specific_client_providers(apr_array_header_t **providers, svn_config_t *config, apr_pool_t *pool)
Set *providers to an array of svn_auth_provider_object_t * objects.
void svn_auth_get_windows_ssl_client_cert_pw_provider(svn_auth_provider_object_t **provider, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_ssl_client_cert_pw_t that gets/sets...
void svn_auth_get_gnome_keyring_ssl_client_cert_pw_provider(svn_auth_provider_object_t **provider, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_ssl_client_cert_pw_t that gets/sets...
const char * valid_until
ASCII date until which the certificate is valid.
The main authentication "provider" vtable.
svn_error_t *(* svn_auth_ssl_client_cert_pw_prompt_func_t)(svn_auth_cred_ssl_client_cert_pw_t **cred, void *baton, const char *realm, svn_boolean_t may_save, apr_pool_t *pool)
Set *cred by prompting the user, allocating *cred in pool.
A provider object, ready to be put into an array and given to svn_auth_open().
SSL server certificate information used by SVN_AUTH_CRED_SSL_SERVER_TRUST providers.
void svn_auth_get_keychain_ssl_client_cert_pw_provider(svn_auth_provider_object_t **provider, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_ssl_client_cert_pw_t that gets/sets...
svn_error_t * svn_auth_next_credentials(void **credentials, svn_auth_iterstate_t *state, apr_pool_t *pool)
Get another set of credentials, assuming previous ones failed to authenticate.
const char * cert_file
Absolute path to the certificate file.
svn_error_t *(* svn_auth_ssl_client_cert_prompt_func_t)(svn_auth_cred_ssl_client_cert_t **cred, void *baton, const char *realm, svn_boolean_t may_save, apr_pool_t *pool)
Set *cred by prompting the user, allocating *cred in pool.
const char * cred_kind
The kind of credentials this provider knows how to retrieve.
const char * password
Certificate password.
void svn_auth_get_username_provider(svn_auth_provider_object_t **provider, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_username_t that gets/sets informati...
const svn_version_t * svn_auth_gnome_keyring_version(void)
Get libsvn_auth_gnome_keyring version information.
svn_boolean_t may_save
Indicates if the credentials may be saved (to disk).
void svn_auth_get_simple_prompt_provider(svn_auth_provider_object_t **provider, svn_auth_simple_prompt_func_t prompt_func, void *prompt_baton, int retry_limit, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_simple_t that gets information by p...
svn_error_t *(* svn_auth_plaintext_prompt_func_t)(svn_boolean_t *may_save_plaintext, const char *realmstring, void *baton, apr_pool_t *pool)
A type of callback function for asking whether storing a password to disk in plaintext is allowed...
SVN_AUTH_CRED_SSL_CLIENT_CERT credentials.
struct svn_auth_cred_ssl_client_cert_t svn_auth_cred_ssl_client_cert_t
SVN_AUTH_CRED_SSL_CLIENT_CERT credentials.
void svn_auth_get_ssl_client_cert_file_provider(svn_auth_provider_object_t **provider, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_ssl_client_cert_t, allocated in pool.
void svn_auth_get_gnome_keyring_simple_provider(svn_auth_provider_object_t **provider, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_simple_t that gets/sets information...
const char * valid_from
ASCII date from which the certificate is valid.
void svn_auth_get_keychain_simple_provider(svn_auth_provider_object_t **provider, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_simple_t that gets/sets information...
struct svn_auth_cred_ssl_client_cert_pw_t svn_auth_cred_ssl_client_cert_pw_t
SVN_AUTH_CRED_SSL_CLIENT_CERT_PW credentials.
SVN_AUTH_CRED_SSL_SERVER_TRUST credentials.
struct svn_auth_iterstate_t svn_auth_iterstate_t
The type of a Subversion authentication-iteration object.
const char * issuer_dname
DN of the certificate issuer.
void svn_auth_get_kwallet_ssl_client_cert_pw_provider(svn_auth_provider_object_t **provider, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_ssl_client_cert_pw_t that gets/sets...
void svn_auth_get_gpg_agent_simple_provider(svn_auth_provider_object_t **provider, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_simple_t that gets/sets information...
const char * hostname
Primary CN.
struct svn_config_t svn_config_t
Opaque structure describing a set of configuration options.
svn_error_t * svn_auth_forget_credentials(svn_auth_baton_t *auth_baton, const char *cred_kind, const char *realmstring, apr_pool_t *pool)
Forget a set (or all) memory-cached credentials.
SVN_AUTH_CRED_SSL_CLIENT_CERT_PW credentials.
struct svn_auth_ssl_server_cert_info_t svn_auth_ssl_server_cert_info_t
SSL server certificate information used by SVN_AUTH_CRED_SSL_SERVER_TRUST providers.
svn_error_t *(* svn_auth_ssl_server_trust_prompt_func_t)(svn_auth_cred_ssl_server_trust_t **cred, void *baton, const char *realm, apr_uint32_t failures, const svn_auth_ssl_server_cert_info_t *cert_info, svn_boolean_t may_save, apr_pool_t *pool)
Set *cred by prompting the user, allocating *cred in pool.
void svn_auth_get_ssl_server_trust_prompt_provider(svn_auth_provider_object_t **provider, svn_auth_ssl_server_trust_prompt_func_t prompt_func, void *prompt_baton, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_ssl_server_trust_t, allocated in pool.
svn_error_t * svn_auth_save_credentials(svn_auth_iterstate_t *state, apr_pool_t *pool)
Save a set of credentials.
void svn_auth_get_ssl_client_cert_pw_file_provider(svn_auth_provider_object_t **provider, apr_pool_t *pool)
Like svn_auth_get_ssl_client_cert_pw_file_provider2, but without the ability to call the svn_auth_pla...
void svn_auth_get_ssl_server_trust_file_provider(svn_auth_provider_object_t **provider, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_ssl_server_trust_t, allocated in pool.
void(* svn_auth_simple_provider_func_t)(svn_auth_provider_object_t **provider, apr_pool_t *pool)
The type of function returning authentication provider.
void svn_auth_get_ssl_client_cert_prompt_provider(svn_auth_provider_object_t **provider, svn_auth_ssl_client_cert_prompt_func_t prompt_func, void *prompt_baton, int retry_limit, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_ssl_client_cert_t, allocated in pool.
SVN_AUTH_CRED_SIMPLE credentials.
svn_error_t * svn_auth_first_credentials(void **credentials, svn_auth_iterstate_t **state, const char *cred_kind, const char *realmstring, svn_auth_baton_t *auth_baton, apr_pool_t *pool)
Get an initial set of credentials.
void(* svn_auth_ssl_client_cert_pw_provider_func_t)(svn_auth_provider_object_t **provider, apr_pool_t *pool)
A function returning an SSL client certificate passphrase provider.
struct svn_auth_provider_object_t svn_auth_provider_object_t
A provider object, ready to be put into an array and given to svn_auth_open().
Subversion's data types.
svn_error_t *(* svn_auth_simple_prompt_func_t)(svn_auth_cred_simple_t **cred, void *baton, const char *realm, const char *username, svn_boolean_t may_save, apr_pool_t *pool)
Credential-constructing prompt functions.
void svn_auth_set_parameter(svn_auth_baton_t *auth_baton, const char *name, const void *value)
Set an authentication run-time parameter.
struct svn_auth_baton_t svn_auth_baton_t
The type of a Subversion authentication object.
void svn_auth_get_ssl_client_cert_pw_prompt_provider(svn_auth_provider_object_t **provider, svn_auth_ssl_client_cert_pw_prompt_func_t prompt_func, void *prompt_baton, int retry_limit, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_ssl_client_cert_pw_t, allocated in pool.
const char * fingerprint
ASCII fingerprint.
struct svn_auth_cred_simple_t svn_auth_cred_simple_t
SVN_AUTH_CRED_SIMPLE credentials.
void svn_auth_open(svn_auth_baton_t **auth_baton, const apr_array_header_t *providers, apr_pool_t *pool)
Initialize an authentication system.
svn_auth_ssl_server_cert_info_t * svn_auth_ssl_server_cert_info_dup(const svn_auth_ssl_server_cert_info_t *info, apr_pool_t *pool)
Return a deep copy of info, allocated in pool.
#define SVN_DEPRECATED
Macro used to mark deprecated functions.
void svn_auth_get_username_prompt_provider(svn_auth_provider_object_t **provider, svn_auth_username_prompt_func_t prompt_func, void *prompt_baton, int retry_limit, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_username_t that gets information by...
apr_uint32_t accepted_failures
Bit mask of the accepted failures.
const char * username
Username.
void svn_auth_get_simple_provider(svn_auth_provider_object_t **provider, apr_pool_t *pool)
Like svn_auth_get_simple_provider2, but without the ability to call the svn_auth_plaintext_prompt_fun...
const void * svn_auth_get_parameter(svn_auth_baton_t *auth_baton, const char *name)
Get an authentication run-time parameter.
struct svn_auth_cred_username_t svn_auth_cred_username_t
SVN_AUTH_CRED_USERNAME credentials.
void svn_auth_get_windows_ssl_server_trust_provider(svn_auth_provider_object_t **provider, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_ssl_server_trust_t, allocated in pool.
const svn_version_t * svn_auth_kwallet_version(void)
Get libsvn_auth_kwallet version information.
svn_boolean_t may_save
Indicates if the credentials may be saved (to disk).
void svn_auth_get_ssl_client_cert_pw_file_provider2(svn_auth_provider_object_t **provider, svn_auth_plaintext_passphrase_prompt_func_t plaintext_passphrase_prompt_func, void *prompt_baton, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_ssl_client_cert_pw_t that gets/sets...
svn_error_t *(* svn_auth_plaintext_passphrase_prompt_func_t)(svn_boolean_t *may_save_plaintext, const char *realmstring, void *baton, apr_pool_t *pool)
A type of callback function for asking whether storing a passphrase to disk in plaintext is allowed...
Accessing SVN configuration files.
void svn_auth_get_windows_simple_provider(svn_auth_provider_object_t **provider, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_simple_t that gets/sets information...
svn_error_t *(* svn_auth_username_prompt_func_t)(svn_auth_cred_username_t **cred, void *baton, const char *realm, svn_boolean_t may_save, apr_pool_t *pool)
Set *cred by prompting the user, allocating *cred in pool.
const char * username
Username.
struct svn_auth_provider_t svn_auth_provider_t
The main authentication "provider" vtable.
int svn_boolean_t
YABT: Yet Another Boolean Type.
svn_boolean_t may_save
Indicates if the credentials may be saved (to disk).
const char * ascii_cert
Base-64 encoded DER certificate representation.
struct svn_auth_cred_ssl_server_trust_t svn_auth_cred_ssl_server_trust_t
SVN_AUTH_CRED_SSL_SERVER_TRUST credentials.
SVN_AUTH_CRED_USERNAME credentials.
svn_error_t * svn_auth_get_platform_specific_provider(svn_auth_provider_object_t **provider, const char *provider_name, const char *provider_type, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_provider_object_t, or return NULL if the...
void svn_auth_get_simple_provider2(svn_auth_provider_object_t **provider, svn_auth_plaintext_prompt_func_t plaintext_prompt_func, void *prompt_baton, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_simple_t that gets/sets information...
void svn_auth_get_kwallet_simple_provider(svn_auth_provider_object_t **provider, apr_pool_t *pool)
Set *provider to an authentication provider of type svn_auth_cred_simple_t that gets/sets information...
svn_boolean_t may_save
Indicates if the credentials may be saved (to disk).