#include <cctype>
#include <cerrno>
#include <fcntl.h>
#include <cinttypes>
#include <iostream>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <vector>
#include <alloca.h>
#include <arpa/inet.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <strings.h>
#include <unistd.h>
#include "XrdVersion.hh"
#include "XrdNet/XrdNetAddrInfo.hh"
#include "XrdOuc/XrdOucEnv.hh"
#include "XrdOuc/XrdOucErrInfo.hh"
#include "XrdOuc/XrdOucPinLoader.hh"
#include "XrdOuc/XrdOucString.hh"
#include "XrdOuc/XrdOucTokenizer.hh"
#include "XrdSciTokens/XrdSciTokensHelper.hh"
#include "XrdSys/XrdSysE2T.hh"
#include "XrdSys/XrdSysHeaders.hh"
#include "XrdSec/XrdSecInterface.hh"
Go to the source code of this file.
◆ __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS 1 |
◆ EAUTH
◆ XrdSecProtocolztnInit()
char* XrdSecProtocolztnInit |
( |
const char |
mode, |
|
|
const char * |
parms, |
|
|
XrdOucErrInfo * |
erp |
|
) |
| |
Definition at line 701 of file XrdSecProtocolztn.cc.
705 static char nilstr = 0;
711 if (mode ==
'c')
return &nilstr;
715 if (!parms || !(*parms))
717 if (!getLinkage(erp, accPlugin.c_str()))
return 0;
718 snprintf(buff,
sizeof(buff),
"TLS:%" PRIu64
":%d:",
opts, MaxTokSize);
724 std::vector<XrdOucString> useVec;
736 while((val = cfg.GetToken()))
737 {
if (!strcmp(val,
"-maxsz"))
738 {
if (!(val = cfg.GetToken()))
739 {
Fatal(erp,
"-maxsz argument missing", EINVAL);
742 MaxTokSize = strtol(val, &endP, 10);
743 if (*endP ==
'k' || *endP ==
'K')
744 {MaxTokSize *= 1024; endP++;}
745 if (MaxTokSize <= 0 || MaxTokSize > 524288 || *endP)
746 {
Fatal(erp,
"-maxsz argument is invalid", EINVAL);
750 else if (!strcmp(val,
"-expiry"))
751 {
if (!(val = cfg.GetToken()))
752 {
Fatal(erp,
"-expiry argument missing", EINVAL);
755 if (strcmp(val,
"ignore")) expiry = 0;
756 else if (strcmp(val,
"optional")) expiry = -1;
757 else if (strcmp(val,
"required")) expiry = 1;
758 else {
Fatal(erp,
"-expiry argument invalid", EINVAL);
763 else if (!strcmp(val,
"-tokenlib"))
764 {
if (!(val = cfg.GetToken()))
765 {
Fatal(erp,
"-acclib plugin path missing", EINVAL);
768 if (strcmp(val,
"none"))
776 else {
XrdOucString eTxt(
"Invalid parameter - "); eTxt += val;
777 Fatal(erp, eTxt.c_str(), EINVAL);
787 if (tokenlib && !getLinkage(erp, accPlugin.c_str()))
return 0;
792 snprintf(buff,
sizeof(buff),
"TLS:%" PRIu64
":%d:",
opts, MaxTokSize);
void Fatal(const char *op, const char *target)
static const int ztnVersion
References XrdOucString::c_str(), Fatal(), XrdOucTokenizer::GetLine(), XrdOucTokenizer::GetToken(), opts, and XrdSecProtocolztn::ztnVersion.
◆ XrdSecProtocolztnObject()
Definition at line 803 of file XrdSecProtocolztn.cc.
814 {
Fatal(erp,
"security protocol 'ztn' disallowed for non-TLS connections.",
824 if (aOK)
return protP;
838 snprintf(msg,
sizeof(msg),
"ztn required plugin (%s) has not been loaded!",
840 Fatal(erp, msg, EIDRM,
false);
848 Fatal(erp,
"insufficient memory for protocol.", ENOMEM,
false);
References Fatal(), and XrdNetAddrInfo::isUsingTLS().
◆ XrdVERSIONINFO()