Lines Matching defs:result

41                            apr_ldap_err_t *result);
43 apr_ldap_err_t *result);
57 apr_ldap_err_t *result;
59 result = apr_pcalloc(pool, sizeof(apr_ldap_err_t));
60 *result_err = result;
61 if (!result) {
66 result->rc = ldap_get_option(ldap, option, outvalue);
69 if (result->rc != LDAP_SUCCESS) {
70 result->msg = ldap_err2string(result-> rc);
71 result->reason = apr_pstrdup(pool, "LDAP: Could not get an option");
95 apr_ldap_err_t *result;
97 result = apr_pcalloc(pool, sizeof(apr_ldap_err_t));
98 *result_err = result;
99 if (!result) {
105 option_set_cert(pool, ldap, invalue, result);
109 option_set_tls(pool, ldap, invalue, result);
114 result->reason = "LDAP: Verify certificate not yet supported by APR on the "
116 result->rc = -1;
121 result->rc = ldapssl_set_verify_mode(LDAPSSL_VERIFY_SERVER);
124 result->rc = ldapssl_set_verify_mode(LDAPSSL_VERIFY_NONE);
133 result->rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, &i);
137 result->rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, &i);
140 result->reason = "LDAP: SSL/TLS not yet supported by APR on this "
142 result->rc = -1;
148 if (result->rc != LDAP_SUCCESS) {
149 result->msg = ldap_err2string(result->rc);
150 result->reason = "LDAP: Could not set verify mode";
160 result->rc = ldap_set_option(ldap, LDAP_OPT_REFERRALS, (void *)invalue);
162 if (result->rc != LDAP_SUCCESS) {
163 result->reason = "Unable to set LDAP_OPT_REFERRALS.";
164 return(result->rc);
175 result->rc = LDAP_SUCCESS;
183 result->rc = ldap_set_option(ldap, LDAP_OPT_REFHOPLIMIT, (void *)invalue);
186 if (result->rc != LDAP_SUCCESS) {
187 result->reason = "Unable to set LDAP_OPT_REFHOPLIMIT.";
188 return(result->rc);
194 result->rc = ldap_set_option(ldap, option, (void *)invalue);
197 if (result->rc != LDAP_SUCCESS) {
198 result->msg = ldap_err2string(result->rc);
199 result->reason = "LDAP: Could not set an option";
205 if (result->rc != LDAP_SUCCESS) {
224 apr_ldap_err_t *result)
234 result->rc = ldapssl_install_routines(ldap);
237 if (result->rc == LDAP_SUCCESS) {
238 result->rc = ldap_set_option(ldap, LDAP_OPT_SSL, LDAP_OPT_ON);
241 if (result->rc != LDAP_SUCCESS) {
242 result->msg = ldap_err2string(result->rc);
243 result->reason = "LDAP: Could not switch SSL on for this "
248 result->reason = "LDAP: STARTTLS is not supported by the "
250 result->rc = -1;
253 result->reason = "LDAP: STOPTLS is not supported by the "
255 result->rc = -1;
259 result->reason = "LDAP: SSL/TLS is not supported by this version "
261 result->rc = -1;
276 result->rc = ldapssl_install_routines(ldap);
277 if (result->rc != LDAP_SUCCESS) {
278 result->msg = ldap_err2string(result->rc);
279 result->reason = "LDAP: Could not switch SSL on for this "
284 result->rc = ldapssl_start_tls(ldap);
285 if (result->rc != LDAP_SUCCESS) {
286 result->msg = ldap_err2string(result->rc);
287 result->reason = "LDAP: Could not start TLS on this connection";
291 result->rc = ldapssl_stop_tls(ldap);
292 if (result->rc != LDAP_SUCCESS) {
293 result->msg = ldap_err2string(result->rc);
294 result->reason = "LDAP: Could not stop TLS on this connection";
304 result->rc = ldap_set_option(ldap, LDAP_OPT_X_TLS, &SSLmode);
305 if (result->rc != LDAP_SUCCESS) {
306 result->reason = "LDAP: ldap_set_option failed. "
309 result->msg = ldap_err2string(result->rc);
313 result->rc = ldap_start_tls_s(ldap, NULL, NULL);
314 if (result->rc != LDAP_SUCCESS) {
315 result->reason = "LDAP: ldap_start_tls_s() failed";
316 result->msg = ldap_err2string(result->rc);
320 result->reason = "LDAP: STOPTLS is not supported by the "
322 result->rc = -1;
326 result->reason = "LDAP: SSL/TLS not yet supported by APR on this "
328 result->rc = -1;
337 result->rc = ldap_set_option(ldap, LDAP_OPT_SSL, &ul);
338 if (result->rc != LDAP_SUCCESS) {
339 result->reason = "LDAP: an attempt to set LDAP_OPT_SSL off "
341 result->msg = ldap_err2string(result->rc);
346 result->rc = ldap_set_option(ldap, LDAP_OPT_SSL, &ul);
347 if (result->rc != LDAP_SUCCESS) {
348 result->reason = "LDAP: an attempt to set LDAP_OPT_SSL on "
350 result->msg = ldap_err2string(result->rc);
355 result->rc = ldap_start_tls_s(ldap, NULL, NULL, NULL, NULL);
356 if (result->rc != LDAP_SUCCESS) {
357 result->reason = "LDAP: ldap_start_tls_s() failed";
358 result->msg = ldap_err2string(result->rc);
362 result->rc = ldap_stop_tls_s(ldap);
363 if (result->rc != LDAP_SUCCESS) {
364 result->reason = "LDAP: ldap_stop_tls_s() failed";
365 result->msg = ldap_err2string(result->rc);
373 result->reason = "LDAP: SSL/TLS is currently not supported by "
375 result->rc = -1;
397 const void *invalue, apr_ldap_err_t *result)
432 result->rc = -1;
433 result->reason = "LDAP: The Netscape/Mozilla LDAP SDK only "
438 if (result->rc != LDAP_SUCCESS) {
444 if (result->rc == LDAP_SUCCESS) {
446 result->rc = ldapssl_enable_clientauth(ldap, "",
449 if (result->rc != LDAP_SUCCESS) {
450 result->reason = "LDAP: could not set client certificate: "
452 result->msg = ldap_err2string(result->rc);
456 result->rc = ldapssl_advclientauth_init(cert7db, NULL,
459 if (result->rc != LDAP_SUCCESS) {
460 result->reason = "LDAP: ldapssl_advclientauth_init() failed.";
461 result->msg = ldap_err2string(result->rc);
465 result->rc = ldapssl_clientauth_init(cert7db, NULL,
467 if (result->rc != LDAP_SUCCESS) {
468 result->reason = "LDAP: ldapssl_clientauth_init() failed.";
469 result->msg = ldap_err2string(result->rc);
473 result->rc = ldapssl_client_init(cert7db, NULL);
474 if (result->rc != LDAP_SUCCESS) {
475 result->reason = "LDAP: ldapssl_client_init() failed.";
476 result->msg = ldap_err2string(result->rc);
481 result->reason = "LDAP: SSL/TLS ldapssl_client_init() function not "
484 result->rc = -1;
495 result->rc = -1;
496 result->reason = "LDAP: The Novell LDAP SDK cannot support the setting "
501 result->rc = ldapssl_client_init(NULL, NULL);
502 if (result->rc != LDAP_SUCCESS) {
503 result->msg = ldap_err2string(result-> rc);
504 result->reason = apr_pstrdup(pool, "LDAP: Could not "
509 for (i = 0; LDAP_SUCCESS == result->rc && i < certs->nelts; i++) {
513 result->rc = ldapssl_add_trusted_cert((void *)ents[i].path,
515 result->msg = ldap_err2string(result->rc);
518 result->rc = ldapssl_add_trusted_cert((void *)ents[i].path,
520 result->msg = ldap_err2string(result->rc);
523 result->rc = ldapssl_set_client_cert((void *)ents[i].path,
526 result->msg = ldap_err2string(result->rc);
529 result->rc = ldapssl_set_client_cert((void *)ents[i].path,
532 result->msg = ldap_err2string(result->rc);
535 result->rc = ldapssl_set_client_cert((void *)ents[i].path,
538 result->msg = ldap_err2string(result->rc);
541 result->rc = ldapssl_set_client_private_key((void *)ents[i].path,
544 result->msg = ldap_err2string(result->rc);
547 result->rc = ldapssl_set_client_private_key((void *)ents[i].path,
550 result->msg = ldap_err2string(result->rc);
553 result->rc = ldapssl_set_client_private_key((void *)ents[i].path,
556 result->msg = ldap_err2string(result->rc);
559 result->rc = -1;
560 result->reason = "LDAP: The Novell LDAP SDK only understands the "
564 if (result->rc != LDAP_SUCCESS) {
569 result->reason = "LDAP: ldapssl_client_init(), "
574 result->rc = -1;
587 result->rc = ldap_set_option(ldap, LDAP_OPT_X_TLS_CACERTFILE,
589 result->msg = ldap_err2string(result->rc);
592 result->rc = ldap_set_option(ldap, LDAP_OPT_X_TLS_CERTFILE,
594 result->msg = ldap_err2string(result->rc);
597 result->rc = ldap_set_option(ldap, LDAP_OPT_X_TLS_KEYFILE,
599 result->msg = ldap_err2string(result->rc);
603 result->rc = ldap_set_option(ldap, LDAP_OPT_X_TLS_CACERTDIR,
605 result->msg = ldap_err2string(result->rc);
609 result->rc = -1;
610 result->reason = "LDAP: The OpenLDAP SDK only understands the "
614 if (result->rc != LDAP_SUCCESS) {
619 result->reason = "LDAP: LDAP_OPT_X_TLS_CACERTFILE not "
622 result->rc = -1;
630 result->reason = "LDAP: CA certificates cannot be set using this method, "
632 result->rc = -1;
637 result->reason = "LDAP: LDAP_OPT_X_TLS_CACERTFILE not "
640 result->rc = -1;
644 result->reason = "LDAP: Attempt to set certificate(s) failed. "
646 result->rc = -1;