Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
5da74dcd
Kaydet (Commit)
5da74dcd
authored
Ara 06, 2012
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clean up SerialNumberAdapter implementation
Change-Id: Iebf992544cb71fd2e2f4541a5a63fc962150e390
üst
f0b22ccf
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
155 additions
and
53 deletions
+155
-53
Library_xsec_xmlsec.mk
xmlsecurity/Library_xsec_xmlsec.mk
+1
-0
serialnumberadapter.cxx
xmlsecurity/source/xmlsec/serialnumberadapter.cxx
+99
-0
serialnumberadapter.hxx
xmlsecurity/source/xmlsec/serialnumberadapter.hxx
+49
-0
xsec_xmlsec.cxx
xmlsecurity/source/xmlsec/xsec_xmlsec.cxx
+4
-51
xsec_xmlsec.component
xmlsecurity/util/xsec_xmlsec.component
+1
-1
xsec_xmlsec.windows.component
xmlsecurity/util/xsec_xmlsec.windows.component
+1
-1
No files found.
xmlsecurity/Library_xsec_xmlsec.mk
Dosyayı görüntüle @
5da74dcd
...
...
@@ -84,6 +84,7 @@ $(eval $(call gb_Library_add_exception_objects,xsec_xmlsec,\
xmlsecurity/source/xmlsec/diagnose
\
xmlsecurity/source/xmlsec/errorcallback
\
xmlsecurity/source/xmlsec/saxhelper
\
xmlsecurity/source/xmlsec/serialnumberadapter
\
xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl
\
xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl
\
xmlsecurity/source/xmlsec/xmlstreamio
\
...
...
xmlsecurity/source/xmlsec/serialnumberadapter.cxx
0 → 100644
Dosyayı görüntüle @
5da74dcd
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF 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 .
*/
#include "sal/config.h"
#include "boost/noncopyable.hpp"
#include "com/sun/star/lang/XServiceInfo.hpp"
#include "com/sun/star/security/XSerialNumberAdapter.hpp"
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/RuntimeException.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/XComponentContext.hpp"
#include "com/sun/star/uno/XInterface.hpp"
#include "cppuhelper/implbase2.hxx"
#include "cppuhelper/supportsservice.hxx"
#include "cppuhelper/weak.hxx"
#include "rtl/ustring.hxx"
#include "sal/types.h"
#include "xmlsecurity/biginteger.hxx"
#include "serialnumberadapter.hxx"
namespace
{
class
Service
:
public
cppu
::
WeakImplHelper2
<
css
::
lang
::
XServiceInfo
,
css
::
security
::
XSerialNumberAdapter
>
,
private
boost
::
noncopyable
{
public
:
Service
()
{}
private
:
virtual
~
Service
()
{}
virtual
OUString
SAL_CALL
getImplementationName
()
throw
(
css
::
uno
::
RuntimeException
)
{
return
xml_security
::
serial_number_adapter
::
implementationName
();
}
virtual
sal_Bool
SAL_CALL
supportsService
(
OUString
const
&
ServiceName
)
throw
(
css
::
uno
::
RuntimeException
)
{
return
cppu
::
supportsService
(
this
,
ServiceName
);
}
virtual
css
::
uno
::
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames
()
throw
(
css
::
uno
::
RuntimeException
)
{
return
xml_security
::
serial_number_adapter
::
serviceNames
();
}
virtual
OUString
SAL_CALL
toString
(
css
::
uno
::
Sequence
<
sal_Int8
>
const
&
SerialNumber
)
throw
(
css
::
uno
::
RuntimeException
)
{
return
bigIntegerToNumericString
(
SerialNumber
);
}
virtual
css
::
uno
::
Sequence
<
sal_Int8
>
SAL_CALL
toSequence
(
OUString
const
&
SerialNumber
)
throw
(
css
::
uno
::
RuntimeException
)
{
return
numericStringToBigInteger
(
SerialNumber
);
}
};
}
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
xml_security
::
serial_number_adapter
::
create
(
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
const
&
)
{
return
static_cast
<
cppu
::
OWeakObject
*
>
(
new
Service
);
}
OUString
xml_security
::
serial_number_adapter
::
implementationName
()
throw
(
css
::
uno
::
RuntimeException
)
{
return
OUString
(
"com.sun.star.comp.security.SerialNumberAdapter"
);
}
css
::
uno
::
Sequence
<
OUString
>
xml_security
::
serial_number_adapter
::
serviceNames
()
throw
(
css
::
uno
::
RuntimeException
)
{
css
::
uno
::
Sequence
<
OUString
>
s
(
1
);
s
[
0
]
=
"com.sun.star.security.SerialNumberAdapter"
;
return
s
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
xmlsecurity/source/xmlsec/serialnumberadapter.hxx
0 → 100644
Dosyayı görüntüle @
5da74dcd
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF 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 .
*/
#ifndef INCLUDED_XMLSECURITY_SOURCE_XMLSEC_SERIALNUMBERADAPTER_HXX
#define INCLUDED_XMLSECURITY_SOURCE_XMLSEC_SERIALNUMBERADAPTER_HXX
#include "sal/config.h"
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/Sequence.hxx"
#include "sal/types.h"
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
uno
{
class
XComponentContext
;
class
XInterface
;
}
}
}
}
namespace
rtl
{
class
OUString
;
}
namespace
xml_security
{
namespace
serial_number_adapter
{
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
SAL_CALL
create
(
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
const
&
);
rtl
::
OUString
implementationName
()
throw
(
css
::
uno
::
RuntimeException
);
css
::
uno
::
Sequence
<
rtl
::
OUString
>
serviceNames
()
throw
(
css
::
uno
::
RuntimeException
);
}
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
xmlsecurity/source/xmlsec/xsec_xmlsec.cxx
Dosyayı görüntüle @
5da74dcd
...
...
@@ -19,64 +19,17 @@
#include <sal/config.h>
#include <stdio.h>
#include <osl/mutex.hxx>
#include <osl/thread.h>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/security/XSerialNumberAdapter.hpp>
#include "serialnumberadapter.hxx"
#include "xmlelementwrapper_xmlsecimpl.hxx"
#include "xmldocumentwrapper_xmlsecimpl.hxx"
#include "xmlsecurity/biginteger.hxx"
using
namespace
::
rtl
;
using
namespace
::
cppu
;
using
namespace
::
com
::
sun
::
star
::
uno
;
using
namespace
::
com
::
sun
::
star
::
lang
;
using
namespace
::
com
::
sun
::
star
::
registry
;
namespace
{
class
SerialNumberAdapterImpl
:
public
WeakImplHelper1
<
::
com
::
sun
::
star
::
security
::
XSerialNumberAdapter
>
{
virtual
OUString
SAL_CALL
toString
(
const
Sequence
<
sal_Int8
>&
rSerialNumber
)
throw
(
RuntimeException
)
{
return
bigIntegerToNumericString
(
rSerialNumber
);
}
virtual
Sequence
<
sal_Int8
>
SAL_CALL
toSequence
(
const
OUString
&
rSerialNumber
)
throw
(
RuntimeException
)
{
return
numericStringToBigInteger
(
rSerialNumber
);
}
};
OUString
SerialNumberAdapterImpl_getImplementationName
()
throw
(
RuntimeException
)
{
return
OUString
(
"com.sun.star.security.SerialNumberAdapter"
);
}
Sequence
<
OUString
>
SerialNumberAdapterImpl_getSupportedServiceNames
()
throw
(
RuntimeException
)
{
Sequence
<
OUString
>
aRet
(
1
);
OUString
*
pArray
=
aRet
.
getArray
();
pArray
[
0
]
=
OUString
(
"com.sun.star.security.SerialNumberAdapter"
);
return
aRet
;
}
Reference
<
XInterface
>
SerialNumberAdapterImpl_createInstance
(
const
Reference
<
XComponentContext
>
&
)
throw
(
Exception
)
{
return
Reference
<
XInterface
>
(
*
new
SerialNumberAdapterImpl
()
);
}
}
extern
"C"
{
...
...
@@ -107,12 +60,12 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL xsec_xmlsec_component_getFactory( const sal_
OUString
::
createFromAscii
(
pImplName
),
XMLDocumentWrapper_XmlSecImpl_createInstance
,
XMLDocumentWrapper_XmlSecImpl_getSupportedServiceNames
()
)
);
}
else
if
(
SerialNumberAdapterImpl_getI
mplementationName
().
equals
(
OUString
::
createFromAscii
(
pImplName
)
)
)
else
if
(
xml_security
::
serial_number_adapter
::
i
mplementationName
().
equals
(
OUString
::
createFromAscii
(
pImplName
)
)
)
{
xFactory
=
::
cppu
::
createSingleComponentFactory
(
SerialNumberAdapterImpl_createInstanc
e
,
xml_security
::
serial_number_adapter
::
creat
e
,
OUString
::
createFromAscii
(
pImplName
),
SerialNumberAdapterImpl_getSupportedS
erviceNames
()
);
xml_security
::
serial_number_adapter
::
s
erviceNames
()
);
}
}
...
...
xmlsecurity/util/xsec_xmlsec.component
Dosyayı görüntüle @
5da74dcd
...
...
@@ -19,7 +19,7 @@
<component
loader=
"com.sun.star.loader.SharedLibrary"
prefix=
"xsec_xmlsec"
xmlns=
"http://openoffice.org/2010/uno-components"
>
<implementation
name=
"com.sun.star.security.SerialNumberAdapter"
>
<implementation
name=
"com.sun.star.
comp.
security.SerialNumberAdapter"
>
<service
name=
"com.sun.star.security.SerialNumberAdapter"
/>
</implementation>
<implementation
name=
"com.sun.star.xml.security.bridge.xmlsec.SEInitializer_NssImpl"
>
...
...
xmlsecurity/util/xsec_xmlsec.windows.component
Dosyayı görüntüle @
5da74dcd
...
...
@@ -19,7 +19,7 @@
<component
loader=
"com.sun.star.loader.SharedLibrary"
prefix=
"xsec_xmlsec"
xmlns=
"http://openoffice.org/2010/uno-components"
>
<implementation
name=
"com.sun.star.security.SerialNumberAdapter"
>
<implementation
name=
"com.sun.star.
comp.
security.SerialNumberAdapter"
>
<service
name=
"com.sun.star.security.SerialNumberAdapter"
/>
</implementation>
<implementation
name=
"com.sun.star.xml.security.bridge.xmlsec.NSSInitializer_NssImpl"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment