1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <sal/config.h>
23 #include "certificateextension_xmlsecimpl.hxx"
25 using namespace ::com::sun::star::uno
;
27 using ::com::sun::star::security::XCertificateExtension
;
29 CertificateExtension_XmlSecImpl :: CertificateExtension_XmlSecImpl() :
36 CertificateExtension_XmlSecImpl :: ~CertificateExtension_XmlSecImpl() {
40 //Methods from XCertificateExtension
41 sal_Bool SAL_CALL
CertificateExtension_XmlSecImpl :: isCritical() throw( ::com::sun::star::uno::RuntimeException
, std::exception
) {
45 ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
CertificateExtension_XmlSecImpl :: getExtensionId() throw( ::com::sun::star::uno::RuntimeException
, std::exception
) {
49 ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
CertificateExtension_XmlSecImpl :: getExtensionValue() throw( ::com::sun::star::uno::RuntimeException
, std::exception
) {
53 void CertificateExtension_XmlSecImpl :: setCertExtn( unsigned char* value
, unsigned int vlen
, unsigned char* id
, unsigned int idlen
, bool critical
) {
55 if( value
!= NULL
&& vlen
!= 0 ) {
56 Sequence
< sal_Int8
> extnv( vlen
) ;
57 for( i
= 0; i
< vlen
; i
++ )
58 extnv
[i
] = *( value
+ i
) ;
60 m_xExtnValue
= extnv
;
62 m_xExtnValue
= Sequence
<sal_Int8
>();
65 if( id
!= NULL
&& idlen
!= 0 ) {
66 Sequence
< sal_Int8
> extnId( idlen
) ;
67 for( i
= 0; i
< idlen
; i
++ )
68 extnId
[i
] = *( id
+ i
) ;
72 m_xExtnId
= Sequence
<sal_Int8
>();
75 m_critical
= critical
;
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */