subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 袁立新 <>
Subject my issue: ignore server invaild certificate by call api in linux
Date Fri, 21 Oct 2016 02:30:42 GMT
dear All,
      our  program call the api "svn_auth_ssl_server_trust_prompt_func_t" in windows to ignore
server invaild certificate,
Code like :
                &provider, onSslServerTrustPrompt, this, pool);
      *(svn_auth_provider_object_t **)apr_array_push(providers) = provider;
But in linux can't run normal,and change the api :
    typedef 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);
This could connect the server by "https".

My last way is this :
change code file:"\src-trunk\subversion\libsvn_subr\ssl_server_trust_providers.c"

       *failures = 0;   //wj  add
        /* If all failures are cleared now, we return the creds */
        if (! *failures)
              svn_auth_cred_ssl_server_trust_t *creds =
                apr_pcalloc(pool, sizeof(*creds));
                  creds->may_save = FALSE; /* No need to save it again... */
              *credentials = creds;
This way was deny by my leader for do not change the code of subversion, please help me!

[说明: geostar]
袁立新  软件研发中心

座机:(027) 87196288
传真:(027) 87196133
View raw message