-/*
- * Copyright 2001-2006 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.
*/
/**
* XMLObjects representing XML Encryption content
*/
-#ifndef __xmltooling_encryption_h__
+#if !defined(__xmltooling_encryption_h__) && !defined(XMLTOOLING_NO_XMLSEC)
#define __xmltooling_encryption_h__
-#include <xmltooling/AttributeExtensibleXMLObject.h>
-#include <xmltooling/signature/KeyInfo.h>
+#include <xmltooling/ConcreteXMLObjectBuilder.h>
+#include <xmltooling/ElementProxy.h>
+#include <xmltooling/util/XMLConstants.h>
+#include <cstdio>
+
+namespace xmlsignature {
+ class XMLTOOL_API KeyInfo;
+ class XMLTOOL_API Transform;
+};
+
+/**
+ * Macro for declaring encryption builders.
+ *
+ * @param cname name of class being built
+ */
#define DECL_XMLENCOBJECTBUILDER(cname) \
DECL_XMLOBJECTBUILDER(XMLTOOL_API,cname,xmlconstants::XMLENC_NS,xmlconstants::XMLENC_PREFIX)
DECL_INTEGER_CONTENT(Size);
END_XMLOBJECT;
- BEGIN_XMLOBJECT(XMLTOOL_API,EncryptionMethod,xmltooling::XMLObject,XML Encryption EncryptionMethod element);
+ BEGIN_XMLOBJECT(XMLTOOL_API,EncryptionMethod,xmltooling::ElementExtensibleXMLObject,XML Encryption EncryptionMethod element);
DECL_STRING_ATTRIB(Algorithm,ALGORITHM);
DECL_TYPED_CHILD(KeySize);
DECL_TYPED_CHILD(OAEPparams);
- DECL_XMLOBJECT_CHILDREN(OtherParameter);
/** EncryptionMethodType local name */
static const XMLCh TYPE_NAME[];
END_XMLOBJECT;
static const XMLCh TYPE_NAME[];
END_XMLOBJECT;
- BEGIN_XMLOBJECT2(XMLTOOL_API,EncryptionProperty,xmltooling::ElementProxy,xmltooling::AttributeExtensibleXMLObject,XML Encryption EncryptionProperty element);
+ BEGIN_XMLOBJECT(XMLTOOL_API,EncryptionProperty,xmltooling::ElementProxy,XML Encryption EncryptionProperty element);
DECL_STRING_ATTRIB(Target,TARGET);
DECL_STRING_ATTRIB(Id,ID);
/** EncryptionPropertyType local name */
static const XMLCh TYPE_NAME[];
END_XMLOBJECT;
- BEGIN_XMLOBJECT(XMLTOOL_API,ReferenceType,xmltooling::ElementProxy,XML Encryption ReferenceType type);
+ BEGIN_XMLOBJECT(XMLTOOL_API,ReferenceType,xmltooling::ElementExtensibleXMLObject,XML Encryption ReferenceType type);
DECL_STRING_ATTRIB(URI,URI);
/** ReferenceType local name */
static const XMLCh TYPE_NAME[];