[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Changes to svn_ra.h for proxy support

From: Dale Thatcher <subversion_at_dalethatcher.com>
Date: 2001-09-26 10:53:09 CEST


Below are my proposed changes to svn_ra.h to add proxy support into the
library. I've only included the sections that have been modified.

I've changed svn_ra_simple_password_authenticator_t to add a url parameter.
This provides data that can be used to indicate the resource that
authentication is being sought. This could be the remote host, proxy or for
other schemes could be the key to unlock an RSA cert (file url) etc.

There is also an addition to the callback table to request the proxy that
should be used for a particular url.

Comments please.


- Dale Thatcher

/* A protocol which needs a username and password (used by ra_dav)
   (matches type SVN_RA_AUTH_SIMPLE_PASSWORD above.) */
typedef struct svn_ra_simple_password_authenticator_t
  /* Get a username and password from the client. */
  svn_error_t *(*get_user_and_pass) (char *url,
                                     char **username,
                                     char **password,
                                     void *auth_baton,
                                     apr_pool_t *pool);

  /* If authentication was successful, tell the client to store the
     USERNAME or PASSWORD. If these routines are NULL, that means the
     client is unable (or unwilling) to store auth data. */
  svn_error_t *(*store_user_and_pass) (char *url,
                                       const char *username,
                                       const char *password,
                                       void *auth_baton);

} svn_ra_simple_password_authenticator_t;

/* A collection of callbacks implemented by libsvn_client which allows
   an RA layer to "pull" information from the client application, or
   possibly store information. libsvn_client passes this vtable to

   Each routine takes a CALLBACK_BATON originally provided with the
   vtable. */
typedef struct svn_ra_callbacks_t
  /* Open a unique temporary file for writing in the working copy.
     This file will be automatically deleted when FP is closed. */
  svn_error_t *(*open_tmp_file) (apr_file_t **fp,
                                 void *callback_baton);
  /* Retrieve an AUTHENTICATOR/AUTH_BATON pair from the client,
     which represents the protocol METHOD. */
  svn_error_t *(*get_authenticator) (void **authenticator,
                                     void **auth_baton,
                                     apr_uint64_t method,
                                     void *callback_baton,
                                     apr_pool_t *pool);

  /* Retrieve the proxy that is to be used for the given URL. If no
     proxy is required either the callback can be NULL or a NULL proxyhost
     returned. */
  svn_error_t *(*get_proxy) (char *url
                             char **proxyhost,
                             int **proxyport,
                             void *callback_baton,
                             apr_pool_t *pool);

} svn_ra_callbacks_t;

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:42 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.