2381 EPNAME(
"ProtocolgsiInit");
2384 char *rc = (
char *)
"";
2445 cenv = getenv(
"XrdSecDEBUG");
2447 {
if (cenv[0] >= 49 && cenv[0] <= 51)
opts.
debug = atoi(cenv);
2448 else {
PRINT(
"unsupported debug value from env XrdSecDEBUG: "<<cenv<<
" - setting to 1");
2454 cenv = (getenv(
"XrdSecGSICADIR") ? getenv(
"XrdSecGSICADIR")
2455 : getenv(
"X509_CERT_DIR"));
2457 opts.certdir = strdup(cenv);
2460 cenv = (getenv(
"XrdSecGSICRLDIR") ? getenv(
"XrdSecGSICRLDIR")
2461 : getenv(
"X509_CERT_DIR"));
2463 opts.crldir = strdup(cenv);
2466 cenv = getenv(
"XrdSecGSICRLEXT");
2468 opts.crlext = strdup(cenv);
2471 cenv = getenv(
"XrdSecGSICRLRefresh");
2473 opts.crlrefresh = atoi(cenv);
2476 cenv = (getenv(
"XrdSecGSIUSERCERT") ? getenv(
"XrdSecGSIUSERCERT")
2477 : getenv(
"X509_USER_CERT"));
2479 opts.cert = strdup(cenv);
2482 cenv = (getenv(
"XrdSecGSIUSERKEY") ? getenv(
"XrdSecGSIUSERKEY")
2483 : getenv(
"X509_USER_KEY"));
2485 opts.key = strdup(cenv);
2488 cenv = (getenv(
"XrdSecGSIUSERPROXY") ? getenv(
"XrdSecGSIUSERPROXY")
2489 : getenv(
"X509_USER_PROXY"));
2491 opts.proxy = strdup(cenv);
2494 cenv = getenv(
"XrdSecGSIPROXYVALID");
2496 opts.valid = strdup(cenv);
2499 cenv = getenv(
"XrdSecGSIPROXYDEPLEN");
2501 opts.deplen = atoi(cenv);
2504 cenv = getenv(
"XrdSecGSIPROXYKEYBITS");
2506 opts.bits = atoi(cenv);
2509 cenv = getenv(
"XrdSecGSICACHECK");
2511 opts.ca = atoi(cenv);
2514 cenv = getenv(
"XrdSecGSICRLCHECK");
2516 opts.crl = atoi(cenv);
2519 cenv = getenv(
"XrdSecGSIDELEGPROXY");
2521 opts.dlgpxy = atoi(cenv);
2524 cenv = getenv(
"XrdSecGSICREATEPROXY");
2526 opts.createpxy = atoi(cenv);
2529 cenv = getenv(
"XrdSecGSISRVNAMES");
2531 opts.srvnames = strdup(cenv);
2534 cenv = getenv(
"XrdSecGSIUSEDEFAULTHASH");
2539 if ((cenv = getenv(
"XrdSecGSITRUSTDNS")))
2540 opts.trustdns = (!strcmp(cenv,
"0")) ?
false :
true;
2565 cenv = getenv(
"XRDDEBUG");
2566 if (cenv && !strcmp(cenv,
"1"))
opts.
debug = 1;
2573 char parmbuff[1024];
2574 strlcpy(parmbuff, parms,
sizeof(parmbuff));
2622 String gmapfunparms =
"";
2624 String authzfunparms =
"";
2626 String vomsfunparms =
"";
2630 int crlrefresh = 86400;
2635 int dlgpxy = dlgIgnore;
2637 int vomsat = vatIgnore;
2640 int trustdns =
false;
2643 while (inParms.GetLine()) {
2644 while ((op = inParms.GetToken())) {
2645 if (!strncmp(op,
"-d:",3)) {
2647 }
else if (!strncmp(op,
"-c:",3)) {
2648 clist = (
const char *)(op+3);
2649 }
else if (!strncmp(op,
"-certdir:",9)) {
2650 certdir = (
const char *)(op+9);
2651 }
else if (!strncmp(op,
"-crldir:",8)) {
2652 crldir = (
const char *)(op+8);
2653 }
else if (!strncmp(op,
"-crlext:",8)) {
2654 crlext = (
const char *)(op+8);
2655 }
else if (!strncmp(op,
"-cert:",6)) {
2656 cert = (
const char *)(op+6);
2657 }
else if (!strncmp(op,
"-key:",5)) {
2658 key = (
const char *)(op+5);
2659 }
else if (!strncmp(op,
"-cipher:",8)) {
2660 cipher = (
const char *)(op+8);
2661 }
else if (!strncmp(op,
"-md:",4)) {
2662 md = (
const char *)(op+4);
2663 }
else if (!strncmp(op,
"-ca:",4)) {
2664 ca = getOptVal(caVerOpts, op+4);
2666 }
else if (!strncmp(op,
"-crl:",5)) {
2667 crl = getOptVal(crlOpts, op+5);
2668 }
else if (!strncmp(op,
"-crlrefresh:",12)) {
2669 crlrefresh = atoi(op+12);
2670 }
else if (!strncmp(op,
"-gmapopt:",9)) {
2671 ogmap = getOptVal(gmoOpts, op+9);
2672 }
else if (!strncmp(op,
"-gridmap:",9)) {
2673 gridmap = (
const char *)(op+9);
2674 }
else if (!strncmp(op,
"-gmapfun:",9)) {
2675 gmapfun = (
const char *)(op+9);
2676 }
else if (!strncmp(op,
"-gmapfunparms:",14)) {
2677 gmapfunparms = (
const char *)(op+14);
2678 }
else if (!strncmp(op,
"-authzcall:",11)) {
2679 authzcall = getOptVal(azCallOpts, op+11);
2680 }
else if (!strncmp(op,
"-authzfun:",10)) {
2681 authzfun = (
const char *)(op+10);
2682 }
else if (!strncmp(op,
"-authzfunparms:",15)) {
2683 authzfunparms = (
const char *)(op+15);
2684 }
else if (!strncmp(op,
"-authzto:",9)) {
2685 authzto = atoi(op+9);
2686 }
else if (!strncmp(op,
"-gmapto:",8)) {
2687 gmapto = atoi(op+8);
2688 }
else if (!strncmp(op,
"-dlgpxy:",8)) {
2689 opts.dlgpxy = getOptVal(sDlgOpts, op+8);
2690 }
else if (!strncmp(op,
"-exppxy:",8)) {
2691 exppxy = (
const char *)(op+8);
2692 }
else if (!strncmp(op,
"-authzpxy:",10)) {
2693 opts.authzpxy = getOptVal(azPxyOpts, op+10);
2694 }
else if (!strncmp(op,
"-authzpxy",9)) {
2696 }
else if (!strncmp(op,
"-vomsat:",8)) {
2697 vomsat = getOptVal(vomsatOpts, op+8);
2698 if (vomsat != vatIgnore && vomsfun.
length() == 0)
2699 vomsfun =
"default";
2700 }
else if (!strncmp(op,
"-vomsfun:",9)) {
2701 vomsfun = (
const char *)(op+9);
2702 }
else if (!strncmp(op,
"-vomsfunparms:",14)) {
2703 vomsfunparms = (
const char *)(op+14);
2704 }
else if (!strcmp(op,
"-moninfo")) {
2706 }
else if (!strncmp(op,
"-moninfo:",9)) {
2707 moninfo = atoi(op+9);
2708 }
else if (!strcmp(op,
"-defaulthash")) {
2710 }
else if (!strncmp(op,
"-trustdns:",10)) {
2711 trustdns = getOptVal(tdnsOpts, op+10);
2712 }
else if (!strncmp(op,
"-showdn:",8)) {
2713 showDN = getOptVal(tdnsOpts, op+8);
2715 PRINT(
"ignoring unknown switch: "<<op);
2725 if (vomsfun.
length() > 0)
2726 {
if (vomsat == vatIgnore) vomsat = vatExtract;
2728 }
else authzcall = azAlways;
2736 opts.crlrefresh = crlrefresh;
2738 opts.gmapto = gmapto;
2739 opts.authzcall = authzcall;
2740 opts.authzto = authzto;
2741 opts.dlgpxy = (dlgpxy >= dlgIgnore && dlgpxy <= dlgReqSign) ? dlgpxy : 0;
2742 opts.authzpxy = authzpxy;
2743 opts.vomsat = vomsat;
2744 opts.moninfo = moninfo;
2745 opts.hashcomp = hashcomp;
2746 opts.trustdns = (trustdns <= 0) ?
false :
true;
2747 opts.showDN = (showDN > 0) ?
true :
false;
2750 if (certdir.
length() > 0)
2764 if (gridmap.
length() > 0)
2766 if (gmapfun.
length() > 0)
2768 if (gmapfunparms.
length() > 0)
2769 opts.gmapfunparms = (
char *)gmapfunparms.
c_str();
2770 if (authzfun.
length() > 0)
2771 opts.authzfun = (
char *)authzfun.
c_str();
2772 if (authzfunparms.
length() > 0)
2773 opts.authzfunparms = (
char *)authzfunparms.
c_str();
2776 if (vomsfun.
length() > 0)
2778 if (vomsfunparms.
length() > 0)
2779 opts.vomsfunparms = (
char *)vomsfunparms.
c_str();
const char * c_str() const
static XrdOucTrace * EnableTracing()
static char * Init(gsiOptions o, XrdOucErrInfo *erp)