You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Alexander Mueller <Xe...@web.de> on 2003/07/31 07:15:55 UTC

Question about svn_client_get_ssl_*_prompt_provider

This function is used to register a callback that will be called for 
interactive feedback and questions.

One example:
a callback function foo that was registered via 
svn_client_get_ssl_server_prompt_provider will be called if the server 
ceritificate could not be verified. ("Error validating server 
certificate: Unknown certificate issuer. Accept? (y/N):").

The solution of asking a question and then expecting a string with an 
answer might be appropriate for a command line client, but its really 
dirty when you are trying to build a GUI client. The workaround for 
now is just to ask the question and let the user input a string. What 
I would prefer a different/additional interface that handles this kind 
of prompts:

typedef svn_error_t *
(*svn_client_prompt_opt_t) (const int *answer,
                             const char *prompt,
                             int options,
                             void *baton,
                             apr_pool_t *pool);

Options could be a bitfield of valid options:
   yes
   no
   abort
   continue
   retry

And whatever else.

Xela


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Question about svn_client_get_ssl_*_prompt_provider

Posted by Ben Collins-Sussman <su...@collab.net>.
Alexander Mueller <Xe...@web.de> writes:

> The solution of asking a question and then expecting a string with an
> answer might be appropriate for a command line client, but its really
> dirty when you are trying to build a GUI client.

This is already a well-discussed problem;  see issue 1214.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Question about svn_client_get_ssl_*_prompt_provider

Posted by David Waite <ma...@akuma.org>.
Note that you do not have to deal with these authentication events using 
the prompt callbacks; you can write your own provider (from "scratch") 
by implementing the  another function similar to 
server_ssl_file_first_credentials (in libsvn_client/auth.c). The 
variable failures_in is a bitmask.

Note that the interface may change with neon-0.24.

-David Waite

Alexander Mueller wrote:

> This function is used to register a callback that will be called for 
> interactive feedback and questions.
>
> One example:
> a callback function foo that was registered via 
> svn_client_get_ssl_server_prompt_provider will be called if the server 
> ceritificate could not be verified. ("Error validating server 
> certificate: Unknown certificate issuer. Accept? (y/N):").
>
> The solution of asking a question and then expecting a string with an 
> answer might be appropriate for a command line client, but its really 
> dirty when you are trying to build a GUI client. The workaround for 
> now is just to ask the question and let the user input a string. What 
> I would prefer a different/additional interface that handles this kind 
> of prompts:
>
> typedef svn_error_t *
> (*svn_client_prompt_opt_t) (const int *answer,
>                             const char *prompt,
>                             int options,
>                             void *baton,
>                             apr_pool_t *pool);
>
> Options could be a bitfield of valid options:
>   yes
>   no
>   abort
>   continue
>   retry
>
> And whatever else.
>
> Xela
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org