#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 704 of file XrdSecProtocolztn.cc.
708 static char nilstr = 0;
714 if (mode ==
'c')
return &nilstr;
718 if (!parms || !(*parms))
720 if (!getLinkage(erp, accPlugin.c_str()))
return 0;
721 snprintf(buff,
sizeof(buff),
"TLS:%" PRIu64
":%d:",
opts, MaxTokSize);
727 std::vector<XrdOucString> useVec;
739 while((val = cfg.GetToken()))
740 {
if (!strcmp(val,
"-maxsz"))
741 {
if (!(val = cfg.GetToken()))
742 {
Fatal(erp,
"-maxsz argument missing", EINVAL);
745 MaxTokSize = strtol(val, &endP, 10);
746 if (*endP ==
'k' || *endP ==
'K')
747 {MaxTokSize *= 1024; endP++;}
748 if (MaxTokSize <= 0 || MaxTokSize > 524288 || *endP)
749 {
Fatal(erp,
"-maxsz argument is invalid", EINVAL);
753 else if (!strcmp(val,
"-expiry"))
754 {
if (!(val = cfg.GetToken()))
755 {
Fatal(erp,
"-expiry argument missing", EINVAL);
758 if (strcmp(val,
"ignore")) expiry = 0;
759 else if (strcmp(val,
"optional")) expiry = -1;
760 else if (strcmp(val,
"required")) expiry = 1;
761 else {
Fatal(erp,
"-expiry argument invalid", EINVAL);
766 else if (!strcmp(val,
"-tokenlib"))
767 {
if (!(val = cfg.GetToken()))
768 {
Fatal(erp,
"-acclib plugin path missing", EINVAL);
771 if (strcmp(val,
"none"))
779 else {
XrdOucString eTxt(
"Invalid parameter - "); eTxt += val;
780 Fatal(erp, eTxt.c_str(), EINVAL);
790 if (tokenlib && !getLinkage(erp, accPlugin.c_str()))
return 0;
795 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 806 of file XrdSecProtocolztn.cc.
817 {
Fatal(erp,
"security protocol 'ztn' disallowed for non-TLS connections.",
827 if (aOK)
return protP;
841 snprintf(msg,
sizeof(msg),
"ztn required plugin (%s) has not been loaded!",
843 Fatal(erp, msg, EIDRM,
false);
851 Fatal(erp,
"insufficient memory for protocol.", ENOMEM,
false);
References Fatal(), and XrdNetAddrInfo::isUsingTLS().
◆ XrdVERSIONINFO()