LCOV - code coverage report
Current view: top level - libreoffice/xmlsecurity/source/xmlsec - certificateextension_xmlsecimpl.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 26 0.0 %
Date: 2012-12-27 Functions: 0 7 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #include <sal/config.h>
      21             : #include <rtl/uuid.h>
      22             : 
      23             : #ifndef _certificateextension_nssimpl_hxx_
      24             : #include "certificateextension_xmlsecimpl.hxx"
      25             : #endif
      26             : 
      27             : using namespace ::com::sun::star::uno ;
      28             : using ::rtl::OUString ;
      29             : 
      30             : using ::com::sun::star::security::XCertificateExtension ;
      31             : 
      32           0 : CertificateExtension_XmlSecImpl :: CertificateExtension_XmlSecImpl() :
      33             :     m_critical( sal_False ) ,
      34             :     m_xExtnId() ,
      35           0 :     m_xExtnValue()
      36             : {
      37           0 : }
      38             : 
      39           0 : CertificateExtension_XmlSecImpl :: ~CertificateExtension_XmlSecImpl() {
      40           0 : }
      41             : 
      42             : 
      43             : //Methods from XCertificateExtension
      44           0 : sal_Bool SAL_CALL CertificateExtension_XmlSecImpl :: isCritical() throw( ::com::sun::star::uno::RuntimeException ) {
      45           0 :     return m_critical ;
      46             : }
      47             : 
      48           0 : ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL CertificateExtension_XmlSecImpl :: getExtensionId() throw( ::com::sun::star::uno::RuntimeException ) {
      49           0 :     return m_xExtnId ;
      50             : }
      51             : 
      52           0 : ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL CertificateExtension_XmlSecImpl :: getExtensionValue() throw( ::com::sun::star::uno::RuntimeException ) {
      53           0 :     return m_xExtnValue ;
      54             : }
      55             : 
      56           0 : void CertificateExtension_XmlSecImpl :: setCertExtn( unsigned char* value, unsigned int vlen, unsigned char* id, unsigned int idlen, sal_Bool critical ) {
      57             :     unsigned int i ;
      58           0 :     if( value != NULL && vlen != 0 ) {
      59           0 :         Sequence< sal_Int8 > extnv( vlen ) ;
      60           0 :         for( i = 0; i < vlen ; i ++ )
      61           0 :             extnv[i] = *( value + i ) ;
      62             : 
      63           0 :         m_xExtnValue = extnv ;
      64             :     } else {
      65           0 :         m_xExtnValue = Sequence<sal_Int8>();
      66             :     }
      67             : 
      68           0 :     if( id != NULL && idlen != 0 ) {
      69           0 :         Sequence< sal_Int8 > extnId( idlen ) ;
      70           0 :         for( i = 0; i < idlen ; i ++ )
      71           0 :             extnId[i] = *( id + i ) ;
      72             : 
      73           0 :         m_xExtnId = extnId ;
      74             :     } else {
      75           0 :         m_xExtnId =  Sequence<sal_Int8>();
      76             :     }
      77             : 
      78           0 :     m_critical = critical ;
      79           0 : }
      80             : 
      81             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10