Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions | Static Public Member Functions | Static Protected Attributes
ArcSec::DelegationCollector Class Reference

#include <DelegationCollector.h>

Inheritance diagram for ArcSec::DelegationCollector:
Inheritance graph
Collaboration diagram for ArcSec::DelegationCollector:
Collaboration graph

List of all members.

Public Member Functions

 DelegationCollector (Arc::Config *cfg)
virtual ~DelegationCollector (void)
virtual bool Handle (Arc::Message *msg) const

Static Public Member Functions

static Arc::Pluginget_sechandler (Arc::PluginArgument *arg)

Static Protected Attributes

static Arc::Logger logger

Detailed Description

Definition at line 12 of file DelegationCollector.h.

Constructor & Destructor Documentation

Definition at line 19 of file DelegationCollector.cpp.

                                                   :SecHandler(cfg) {

Here is the caller graph for this function:

Definition at line 22 of file DelegationCollector.cpp.


Member Function Documentation

Definition at line 111 of file DelegationCollector.cpp.

    ArcSec::SecHandlerPluginArgument* shcarg =
    if(!shcarg) return NULL;
    return new DelegationCollector((Arc::Config*)(*shcarg));

Here is the call graph for this function:

bool ArcSec::DelegationCollector::Handle ( Arc::Message msg) const [virtual]

Implements ArcSec::SecHandler.

Definition at line 74 of file DelegationCollector.cpp.

  DelegationMultiSecAttr* sattr = NULL;
  try {
    MessagePayload* mpayload = msg->Payload();
    if(!mpayload) return false; // No payload in this message
    PayloadTLSStream* tstream = dynamic_cast<PayloadTLSStream*>(msg->Payload());
    // Currently only TLS payloads are supported
    if(!tstream) return false;
    SecAttr* sattr_ = msg->Auth()->get("DELEGATION POLICY");
    if(sattr_) sattr=dynamic_cast<DelegationMultiSecAttr*>(sattr_);
    if(!sattr) sattr=new DelegationMultiSecAttr;
    X509* cert = tstream->GetPeerCert();
    if (cert != NULL) {
      if(!get_proxy_policy(cert,sattr)) {
        throw std::exception();
    STACK_OF(X509)* peerchain = tstream->GetPeerChain();
    if(peerchain != NULL) {
      for(int idx = 0;;++idx) {
        if(idx >= sk_X509_num(peerchain)) break;
        X509* cert = sk_X509_value(peerchain,idx);
        if(cert) {
          if(!get_proxy_policy(cert,sattr)) throw std::exception();
    if(!sattr_) msg->Auth()->set("DELEGATION POLICY",sattr);
    return true;
  } catch(std::exception&) { };
  if(sattr) delete sattr;
  return false;

Here is the call graph for this function:

Member Data Documentation

Arc::Logger ArcSec::SecHandler::logger [static, protected, inherited]

Reimplemented in ArcSec::DelegationSH.

Definition at line 31 of file SecHandler.h.

The documentation for this class was generated from the following files: