71int main(
int argc,
char **argv)
73char *
tohex(
char *inbuff,
int inlen,
char *outbuff);
75char *protocols=0, *hostspec=0;
79int putbin = 0, putlen = 0;
92 while ((c=getopt(argc,argv,
"bdlh:")) != (
char)EOF)
95 case 'b': putbin = 1;
break;
97 case 'h': hostspec = optarg;
break;
98 case 'l': putlen = 1;
break;
110 {std::cerr <<
"testClient: Extraneous parameter, '" <<argv[
optind] <<
"'." <<std::endl;
116 if (!protocols && !(protocols = getenv(
"XrdSecSECTOKEN")))
117 {std::cerr <<
"testClient: Security protocol string not specified." <<std::endl;
120 SecToken.
size = strlen(protocols);
121 SecToken.
buffer = protocols;
125 if (hostspec && (eText = theAddr(hostspec,0)))
126 {std::cerr <<
"testServer: Unable to resolve '" <<hostspec <<
"'; " <<eText <<std::endl;
128 }
else theAddr.
Set(
"localhost",0);
133 {putenv((
char *)
"XrdSecDEBUG=1");
134 std::cerr <<
"testClient: security token='" <<protocols <<
"'" <<std::endl;
140 if (!pp) {std::cerr <<
"Unable to get protocol." <<std::endl; exit(1);}
144 pp->addrInfo = &theAddr;
147 {std::cerr <<
"Unable to get credentials," <<std::endl;
151 std::cerr <<
"testClient: credentials size=" <<cred->
size <<std::endl;
158 {std::cerr <<
"Unable to write credentials length" <<std::endl;
161 {std::cerr <<
"Unable to write credentials" <<std::endl;
164 if (putlen) printf(
"%s",
int main(int argc, char *argv[])