2382 EPNAME(
"ProtocolgsiInit");
2385 char *rc = (
char *)
"";
2446 cenv = getenv(
"XrdSecDEBUG");
2448 {
if (cenv[0] >= 49 && cenv[0] <= 51)
opts.
debug = atoi(cenv);
2449 else {
PRINT(
"unsupported debug value from env XrdSecDEBUG: "<<cenv<<
" - setting to 1");
2455 cenv = (getenv(
"XrdSecGSICADIR") ? getenv(
"XrdSecGSICADIR")
2456 : getenv(
"X509_CERT_DIR"));
2458 opts.certdir = strdup(cenv);
2461 cenv = (getenv(
"XrdSecGSICRLDIR") ? getenv(
"XrdSecGSICRLDIR")
2462 : getenv(
"X509_CERT_DIR"));
2464 opts.crldir = strdup(cenv);
2467 cenv = getenv(
"XrdSecGSICRLEXT");
2469 opts.crlext = strdup(cenv);
2472 cenv = getenv(
"XrdSecGSICRLRefresh");
2474 opts.crlrefresh = atoi(cenv);
2477 cenv = (getenv(
"XrdSecGSIUSERCERT") ? getenv(
"XrdSecGSIUSERCERT")
2478 : getenv(
"X509_USER_CERT"));
2480 opts.cert = strdup(cenv);
2483 cenv = (getenv(
"XrdSecGSIUSERKEY") ? getenv(
"XrdSecGSIUSERKEY")
2484 : getenv(
"X509_USER_KEY"));
2486 opts.key = strdup(cenv);
2489 cenv = (getenv(
"XrdSecGSIUSERPROXY") ? getenv(
"XrdSecGSIUSERPROXY")
2490 : getenv(
"X509_USER_PROXY"));
2492 opts.proxy = strdup(cenv);
2495 cenv = getenv(
"XrdSecGSIPROXYVALID");
2497 opts.valid = strdup(cenv);
2500 cenv = getenv(
"XrdSecGSIPROXYDEPLEN");
2502 opts.deplen = atoi(cenv);
2505 cenv = getenv(
"XrdSecGSIPROXYKEYBITS");
2507 opts.bits = atoi(cenv);
2510 cenv = getenv(
"XrdSecGSICACHECK");
2512 opts.ca = atoi(cenv);
2515 cenv = getenv(
"XrdSecGSICRLCHECK");
2517 opts.crl = atoi(cenv);
2520 cenv = getenv(
"XrdSecGSIDELEGPROXY");
2522 opts.dlgpxy = atoi(cenv);
2525 cenv = getenv(
"XrdSecGSICREATEPROXY");
2527 opts.createpxy = atoi(cenv);
2530 cenv = getenv(
"XrdSecGSISRVNAMES");
2532 opts.srvnames = strdup(cenv);
2535 cenv = getenv(
"XrdSecGSIUSEDEFAULTHASH");
2540 if ((cenv = getenv(
"XrdSecGSITRUSTDNS")))
2541 opts.trustdns = (!strcmp(cenv,
"0")) ?
false :
true;
2566 cenv = getenv(
"XRDDEBUG");
2567 if (cenv && !strcmp(cenv,
"1"))
opts.
debug = 1;
2574 char parmbuff[1024];
2575 strlcpy(parmbuff, parms,
sizeof(parmbuff));
2623 String gmapfunparms =
"";
2625 String authzfunparms =
"";
2627 String vomsfunparms =
"";
2631 int crlrefresh = 86400;
2636 int dlgpxy = dlgIgnore;
2638 int vomsat = vatIgnore;
2641 int trustdns =
false;
2644 while (inParms.GetLine()) {
2645 while ((op = inParms.GetToken())) {
2646 if (!strncmp(op,
"-d:",3)) {
2648 }
else if (!strncmp(op,
"-c:",3)) {
2649 clist = (
const char *)(op+3);
2650 }
else if (!strncmp(op,
"-certdir:",9)) {
2651 certdir = (
const char *)(op+9);
2652 }
else if (!strncmp(op,
"-crldir:",8)) {
2653 crldir = (
const char *)(op+8);
2654 }
else if (!strncmp(op,
"-crlext:",8)) {
2655 crlext = (
const char *)(op+8);
2656 }
else if (!strncmp(op,
"-cert:",6)) {
2657 cert = (
const char *)(op+6);
2658 }
else if (!strncmp(op,
"-key:",5)) {
2659 key = (
const char *)(op+5);
2660 }
else if (!strncmp(op,
"-cipher:",8)) {
2661 cipher = (
const char *)(op+8);
2662 }
else if (!strncmp(op,
"-md:",4)) {
2663 md = (
const char *)(op+4);
2664 }
else if (!strncmp(op,
"-ca:",4)) {
2665 ca = getOptVal(caVerOpts, op+4);
2667 }
else if (!strncmp(op,
"-crl:",5)) {
2668 crl = getOptVal(crlOpts, op+5);
2669 }
else if (!strncmp(op,
"-crlrefresh:",12)) {
2670 crlrefresh = atoi(op+12);
2671 }
else if (!strncmp(op,
"-gmapopt:",9)) {
2672 ogmap = getOptVal(gmoOpts, op+9);
2673 }
else if (!strncmp(op,
"-gridmap:",9)) {
2674 gridmap = (
const char *)(op+9);
2675 }
else if (!strncmp(op,
"-gmapfun:",9)) {
2676 gmapfun = (
const char *)(op+9);
2677 }
else if (!strncmp(op,
"-gmapfunparms:",14)) {
2678 gmapfunparms = (
const char *)(op+14);
2679 }
else if (!strncmp(op,
"-authzcall:",11)) {
2680 authzcall = getOptVal(azCallOpts, op+11);
2681 }
else if (!strncmp(op,
"-authzfun:",10)) {
2682 authzfun = (
const char *)(op+10);
2683 }
else if (!strncmp(op,
"-authzfunparms:",15)) {
2684 authzfunparms = (
const char *)(op+15);
2685 }
else if (!strncmp(op,
"-authzto:",9)) {
2686 authzto = atoi(op+9);
2687 }
else if (!strncmp(op,
"-gmapto:",8)) {
2688 gmapto = atoi(op+8);
2689 }
else if (!strncmp(op,
"-dlgpxy:",8)) {
2690 opts.dlgpxy = getOptVal(sDlgOpts, op+8);
2691 }
else if (!strncmp(op,
"-exppxy:",8)) {
2692 exppxy = (
const char *)(op+8);
2693 }
else if (!strncmp(op,
"-authzpxy:",10)) {
2694 opts.authzpxy = getOptVal(azPxyOpts, op+10);
2695 }
else if (!strncmp(op,
"-authzpxy",9)) {
2697 }
else if (!strncmp(op,
"-vomsat:",8)) {
2698 vomsat = getOptVal(vomsatOpts, op+8);
2699 if (vomsat != vatIgnore && vomsfun.
length() == 0)
2700 vomsfun =
"default";
2701 }
else if (!strncmp(op,
"-vomsfun:",9)) {
2702 vomsfun = (
const char *)(op+9);
2703 }
else if (!strncmp(op,
"-vomsfunparms:",14)) {
2704 vomsfunparms = (
const char *)(op+14);
2705 }
else if (!strcmp(op,
"-moninfo")) {
2707 }
else if (!strncmp(op,
"-moninfo:",9)) {
2708 moninfo = atoi(op+9);
2709 }
else if (!strcmp(op,
"-defaulthash")) {
2711 }
else if (!strncmp(op,
"-trustdns:",10)) {
2712 trustdns = getOptVal(tdnsOpts, op+10);
2713 }
else if (!strncmp(op,
"-showdn:",8)) {
2714 showDN = getOptVal(tdnsOpts, op+8);
2716 PRINT(
"ignoring unknown switch: "<<op);
2726 if (vomsfun.
length() > 0)
2727 {
if (vomsat == vatIgnore) vomsat = vatExtract;
2729 }
else authzcall = azAlways;
2737 opts.crlrefresh = crlrefresh;
2739 opts.gmapto = gmapto;
2740 opts.authzcall = authzcall;
2741 opts.authzto = authzto;
2742 opts.dlgpxy = (dlgpxy >= dlgIgnore && dlgpxy <= dlgReqSign) ? dlgpxy : 0;
2743 opts.authzpxy = authzpxy;
2744 opts.vomsat = vomsat;
2745 opts.moninfo = moninfo;
2746 opts.hashcomp = hashcomp;
2747 opts.trustdns = (trustdns <= 0) ?
false :
true;
2748 opts.showDN = (showDN > 0) ?
true :
false;
2751 if (certdir.
length() > 0)
2765 if (gridmap.
length() > 0)
2767 if (gmapfun.
length() > 0)
2769 if (gmapfunparms.
length() > 0)
2770 opts.gmapfunparms = (
char *)gmapfunparms.
c_str();
2771 if (authzfun.
length() > 0)
2772 opts.authzfun = (
char *)authzfun.
c_str();
2773 if (authzfunparms.
length() > 0)
2774 opts.authzfunparms = (
char *)authzfunparms.
c_str();
2777 if (vomsfun.
length() > 0)
2779 if (vomsfunparms.
length() > 0)
2780 opts.vomsfunparms = (
char *)vomsfunparms.
c_str();
const char * c_str() const
static XrdOucTrace * EnableTracing()
static char * Init(gsiOptions o, XrdOucErrInfo *erp)