2 * Licensed to the University Corporation for Advanced Internet
3 * Development, Inc. (UCAID) under one or more contributor license
4 * agreements. See the NOTICE file distributed with this work for
5 * additional information regarding copyright ownership.
7 * UCAID licenses this file to you under the Apache License,
8 * Version 2.0 (the "License"); you may not use this file except
9 * in compliance with the License. You may obtain a copy of the
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
17 * either express or implied. See the License for the specific
18 * language governing permissions and limitations under the License.
22 * @file xmltooling/security/XSECCryptoX509CRL.h
24 * Wrapper for X.509 CRL objects, similar to existing XSEC wrappers.
27 #if !defined(__xmltooling_x509crl_h__) && !defined(XMLTOOLING_NO_XMLSEC)
28 #define __xmltooling_x509crl_h__
30 #include <xmltooling/base.h>
32 #include <xsec/framework/XSECDefs.hpp>
33 #include <xsec/utils/XSECSafeBuffer.hpp>
35 namespace xmltooling {
37 * Interface class for X.509 CRLs
38 * The library uses classes derived from this to process X.509 CRLs.
40 class XMLTOOL_API XSECCryptoX509CRL {
41 MAKE_NONCOPYABLE(XSECCryptoX509CRL);
45 virtual ~XSECCryptoX509CRL();
48 * Returns a string that identifies the crypto owner of this library.
50 * @return the crypto provider name
52 virtual const XMLCh* getProviderName() const=0;
55 * Returns a duplicate of the original object.
57 * @return the duplicate
59 virtual XSECCryptoX509CRL* clone() const=0;
62 * Load a Base64-encoded CRL into the object.
64 * @param buf buffer containing the base64-encoded CRL
65 * @param len number of bytes of data in the CRL buffer (0 if the string is null terminated)
67 virtual void loadX509CRLBase64Bin(const char* buf, unsigned int len)=0;
70 * Load a PEM encoded CRL into the object.
72 * @param buf buffer containing the PEM encoded CRL
73 * @param len number of bytes of data in the CRL buffer (0 if the string is null terminated)
75 void loadX509CRLPEM(const char* buf, unsigned int len=0);
78 * Get a Base64 DER encoded copy of the CRL
80 * @return A safeBuffer containing the DER encoded certificate
82 virtual safeBuffer& getDEREncodingSB(void)=0;
86 #endif /* __xmltooling_x509crl_h__ */