2 * Copyright 2001-2006 Internet2
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
18 * @file SigningContext.h
\r
20 * SAML-specific signature reference profile
\r
23 #ifndef __saml_sigref_h__
\r
24 #define __saml_sigref_h__
\r
26 #include <saml/base.h>
\r
27 #include <xmltooling/signature/ContentReference.h>
\r
29 namespace opensaml {
\r
31 class SAML_API SignableObject;
\r
34 * SAML-specific signature reference profile.
\r
36 class SAML_API ContentReference : public virtual xmlsignature::ContentReference
\r
42 * @param signableObject reference to object being signed
\r
44 ContentReference(const SignableObject& signableObject) : m_signableObject(signableObject) {
\r
47 virtual ~ContentReference() {}
\r
50 * Given a "blank" native signature, creates signature reference
\r
51 * appropriate for the SAML object being signed.
\r
53 * @param sig native signature interface
\r
55 virtual void createReferences(DSIGSignature* sig);
\r
58 * Adds a namespace prefix for "inclusive" processing by the
\r
59 * Exclusive C14N Transform applied to the object.
\r
60 * An empty string will be transformed into "#default".
\r
62 * @param prefix the prefix to add
\r
64 void addInclusivePrefix(const char* prefix) {
\r
65 m_prefixes.push_back(prefix);
\r
69 /** Reference to object to sign. */
\r
70 const SignableObject& m_signableObject;
\r
72 /** Inclusive prefixes. */
\r
73 std::vector<std::string> m_prefixes;
\r
78 #endif /* __saml_sigref_h__ */
\r