1*ec61c6edSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*ec61c6edSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*ec61c6edSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*ec61c6edSAndrew Rist * distributed with this work for additional information 6*ec61c6edSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*ec61c6edSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*ec61c6edSAndrew Rist * "License"); you may not use this file except in compliance 9*ec61c6edSAndrew Rist * with the License. You may obtain a copy of the License at 10*ec61c6edSAndrew Rist * 11*ec61c6edSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*ec61c6edSAndrew Rist * 13*ec61c6edSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*ec61c6edSAndrew Rist * software distributed under the License is distributed on an 15*ec61c6edSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*ec61c6edSAndrew Rist * KIND, either express or implied. See the License for the 17*ec61c6edSAndrew Rist * specific language governing permissions and limitations 18*ec61c6edSAndrew Rist * under the License. 19*ec61c6edSAndrew Rist * 20*ec61c6edSAndrew Rist *************************************************************/ 21*ec61c6edSAndrew Rist 22*ec61c6edSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _CERTIFICATEEXTENSION_XMLSECIMPL_HXX_ 25cdf0e10cSrcweir #define _CERTIFICATEEXTENSION_XMLSECIMPL_HXX_ 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <sal/config.h> 28cdf0e10cSrcweir #include <rtl/ustring.hxx> 29cdf0e10cSrcweir #include <cppuhelper/factory.hxx> 30cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx> 31cdf0e10cSrcweir #include <com/sun/star/uno/Exception.hpp> 32cdf0e10cSrcweir #include "com/sun/star/uno/SecurityException.hpp" 33cdf0e10cSrcweir #include <com/sun/star/security/XCertificateExtension.hpp> 34cdf0e10cSrcweir 35cdf0e10cSrcweir class CertificateExtension_XmlSecImpl : public ::cppu::WeakImplHelper1< 36cdf0e10cSrcweir ::com::sun::star::security::XCertificateExtension > 37cdf0e10cSrcweir { 38cdf0e10cSrcweir private : 39cdf0e10cSrcweir sal_Bool m_critical ; 40cdf0e10cSrcweir ::com::sun::star::uno::Sequence< sal_Int8 > m_xExtnId ; 41cdf0e10cSrcweir ::com::sun::star::uno::Sequence< sal_Int8 > m_xExtnValue ; 42cdf0e10cSrcweir 43cdf0e10cSrcweir public : 44cdf0e10cSrcweir CertificateExtension_XmlSecImpl() ; 45cdf0e10cSrcweir virtual ~CertificateExtension_XmlSecImpl() ; 46cdf0e10cSrcweir 47cdf0e10cSrcweir //Methods from XCertificateExtension 48cdf0e10cSrcweir virtual sal_Bool SAL_CALL isCritical() throw( ::com::sun::star::uno::RuntimeException ) ; 49cdf0e10cSrcweir 50cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getExtensionId() throw( ::com::sun::star::uno::RuntimeException ) ; 51cdf0e10cSrcweir 52cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getExtensionValue() throw( ::com::sun::star::uno::RuntimeException ) ; 53cdf0e10cSrcweir 54cdf0e10cSrcweir //Helper method 55cdf0e10cSrcweir void setCertExtn( ::com::sun::star::uno::Sequence< sal_Int8 > extnId, ::com::sun::star::uno::Sequence< sal_Int8 > extnValue, sal_Bool critical ) ; 56cdf0e10cSrcweir 57cdf0e10cSrcweir void setCertExtn( unsigned char* value, unsigned int vlen, unsigned char* id, unsigned int idlen, sal_Bool critical ) ; 58cdf0e10cSrcweir } ; 59cdf0e10cSrcweir 60cdf0e10cSrcweir #endif // _CERTIFICATEEXTENSION_XMLSECIMPL_HXX_ 61cdf0e10cSrcweir 62