-/*
-* Copyright 2001-2010 Internet2
- *
-* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the University Corporation for Advanced Internet
+ * Development, Inc. (UCAID) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * UCAID licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the
+ * License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
*/
/**
* XMLSecSignatureImpl.cpp
*
- * Signature class for XMLSec-based signature-handling
+ * Signature class for XMLSec-based signature-handling.
*/
#include "internal.h"
public:
XMLSecSignatureImpl() : AbstractXMLObject(XMLSIG_NS, Signature::LOCAL_NAME, XMLSIG_PREFIX),
UnknownElementImpl(XMLSIG_NS, Signature::LOCAL_NAME, XMLSIG_PREFIX),
- m_signature(NULL), m_c14n(NULL), m_sm(NULL), m_key(NULL), m_keyInfo(NULL), m_reference(NULL) {}
+ m_signature(nullptr), m_c14n(nullptr), m_sm(nullptr), m_key(nullptr), m_keyInfo(nullptr), m_reference(nullptr) {}
virtual ~XMLSecSignatureImpl();
void releaseDOM() const;
XMLObject* clone() const;
Signature* cloneSignature() const;
- DOMElement* marshall(DOMDocument* document=NULL, const vector<Signature*>* sigs=NULL, const Credential* credential=NULL) const;
- DOMElement* marshall(DOMElement* parentElement, const vector<Signature*>* sigs=NULL, const Credential* credential=NULL) const;
+ DOMElement* marshall(DOMDocument* document=nullptr, const vector<Signature*>* sigs=nullptr, const Credential* credential=nullptr) const;
+ DOMElement* marshall(DOMElement* parentElement, const vector<Signature*>* sigs=nullptr, const Credential* credential=nullptr) const;
XMLObject* unmarshall(DOMElement* element, bool bindDocument=false);
// Getters
m_reference=reference;
}
- void sign(const Credential* credential=NULL);
+ void sign(const Credential* credential=nullptr);
private:
mutable DSIGSignature* m_signature;
// Release the associated signature.
if (m_signature) {
XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->releaseSignature(m_signature);
- m_signature=NULL;
+ m_signature=nullptr;
}
}
}
// Fresh signature, so we just create an empty one.
log.debug("creating empty Signature element");
if (!document) {
- document=DOMImplementationRegistry::getDOMImplementation(NULL)->createDocument();
+ document=DOMImplementationRegistry::getDOMImplementation(nullptr)->createDocument();
bindDocument=true;
}
DSIGSignature* temp=XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->newSignature();
// Marshall KeyInfo data.
if (credential) {
delete m_keyInfo;
- m_keyInfo = NULL;
+ m_keyInfo = nullptr;
m_keyInfo = credential->getKeyInfo();
}
if (m_keyInfo && (!m_signature->getKeyInfoList() || m_signature->getKeyInfoList()->isEmpty())) {
// Marshall KeyInfo data.
if (credential) {
delete m_keyInfo;
- m_keyInfo = NULL;
+ m_keyInfo = nullptr;
m_keyInfo = credential->getKeyInfo();
}
if (m_keyInfo && (!m_signature->getKeyInfoList() || m_signature->getKeyInfoList()->isEmpty())) {
// Move input into a safeBuffer to source the transform chain.
safeBuffer sb,sbout;
sb.sbStrncpyIn(in,in_len);
- TXFMSB* sbt = new TXFMSB(NULL);
+ TXFMSB* sbt = new TXFMSB(nullptr);
sbt->setInput(sb, in_len);
TXFMChain tx(sbt);
// Move input into a safeBuffer to source the transform chain.
safeBuffer sb;
sb.sbStrncpyIn(in,in_len);
- TXFMSB* sbt = new TXFMSB(NULL);
+ TXFMSB* sbt = new TXFMSB(nullptr);
sbt->setInput(sb, in_len);
TXFMChain tx(sbt);