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
f7a7f2b0
Kaydet (Commit)
f7a7f2b0
authored
Tem 23, 2004
tarafından
Michael Mi
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue number:
Submitted by: Andrew Fan Reviewed by:
üst
401fc9b2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
35 deletions
+40
-35
makefile.mk
xmlsecurity/source/xmlsec/makefile.mk
+3
-2
xmlencryption_mscryptimpl.cxx
...urity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
+10
-9
xmlsignature_mscryptimpl.cxx
...curity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
+7
-6
xmlencryption_nssimpl.cxx
xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx
+13
-12
xmlsignature_nssimpl.cxx
xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
+7
-6
No files found.
xmlsecurity/source/xmlsec/makefile.mk
Dosyayı görüntüle @
f7a7f2b0
...
...
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.
1.1.1
$
# $Revision: 1.
2
$
#
# last change: $Author: m
t $ $Date: 2004-07-12 13:15:21
$
# last change: $Author: m
mi $ $Date: 2004-07-23 03:12:26
$
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
...
...
@@ -82,6 +82,7 @@ CDEFS += -DXMLSEC_CRYPTO_NSS -DXMLSEC_NO_XSLT
# --- Files --------------------------------------------------------
SLOFILES
=
\
$(SLO)$/
baseencoding.obj
\
$(SLO)$/
saxhelper.obj
\
$(SLO)$/
xmldocumentwrapper_xmlsecimpl.obj
\
$(SLO)$/
xmlelementwrapper_xmlsecimpl.obj
\
...
...
xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
Dosyayı görüntüle @
f7a7f2b0
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlencryption_mscryptimpl.cxx,v $
*
* $Revision: 1.
1.1.1
$
* $Revision: 1.
2
$
*
* last change: $Author: m
t $ $Date: 2004-07-12 13:15:22
$
* last change: $Author: m
mi $ $Date: 2004-07-23 03:12:26
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -104,6 +104,7 @@ using ::com::sun::star::xml::crypto::XSecurityEnvironment ;
using
::
com
::
sun
::
star
::
xml
::
crypto
::
XXMLEncryption
;
using
::
com
::
sun
::
star
::
xml
::
crypto
::
XXMLEncryptionTemplate
;
using
::
com
::
sun
::
star
::
xml
::
crypto
::
XXMLSecurityContext
;
using
::
com
::
sun
::
star
::
xml
::
crypto
::
XMLEncryptionException
;
XMLEncryption_MSCryptImpl
::
XMLEncryption_MSCryptImpl
(
const
Reference
<
XMultiServiceFactory
>&
aFactory
)
:
m_xServiceManager
(
aFactory
)
{
}
...
...
@@ -147,7 +148,7 @@ SAL_CALL XMLEncryption_MSCryptImpl :: encrypt(
//Create Encryption context
pEncCtx
=
xmlSecEncCtxCreate
(
pMngr
)
;
if
(
pEncCtx
==
NULL
)
throw
Runtime
Exception
()
;
throw
XMLEncryption
Exception
()
;
//Get the encryption template
...
...
@@ -181,7 +182,7 @@ SAL_CALL XMLEncryption_MSCryptImpl :: encrypt(
if
(
pCipherData
==
NULL
)
{
xmlSecEncCtxDestroy
(
pEncCtx
)
;
throw
Runtime
Exception
()
;
throw
XMLEncryption
Exception
()
;
}
xmlNodePtr
pCipherValue
=
pCipherData
->
children
;
...
...
@@ -192,14 +193,14 @@ SAL_CALL XMLEncryption_MSCryptImpl :: encrypt(
if
(
pCipherValue
==
NULL
)
{
xmlSecEncCtxDestroy
(
pEncCtx
)
;
throw
Runtime
Exception
()
;
throw
XMLEncryption
Exception
()
;
}
pContent
=
pCipherValue
->
children
;
if
(
pContent
==
NULL
)
{
xmlSecEncCtxDestroy
(
pEncCtx
)
;
throw
Runtime
Exception
()
;
throw
XMLEncryption
Exception
()
;
}
xmlUnlinkNode
(
pContent
);
...
...
@@ -223,7 +224,7 @@ SAL_CALL XMLEncryption_MSCryptImpl :: encrypt(
//Encrypt the template
if
(
xmlSecEncCtxXmlEncrypt
(
pEncCtx
,
pEncryptedData
,
pContent
)
<
0
)
{
xmlSecEncCtxDestroy
(
pEncCtx
)
;
throw
Runtime
Exception
()
;
throw
XMLEncryption
Exception
()
;
}
xmlSecEncCtxDestroy
(
pEncCtx
)
;
...
...
@@ -275,7 +276,7 @@ XMLEncryption_MSCryptImpl :: decrypt(
//Create Encryption context
pEncCtx
=
xmlSecEncCtxCreate
(
pMngr
)
;
if
(
pEncCtx
==
NULL
)
throw
Runtime
Exception
()
;
throw
XMLEncryption
Exception
()
;
//Get the encryption template
...
...
@@ -317,7 +318,7 @@ XMLEncryption_MSCryptImpl :: decrypt(
//Decrypt the template
if
(
xmlSecEncCtxDecrypt
(
pEncCtx
,
pEncryptedData
)
<
0
||
pEncCtx
->
result
==
NULL
)
{
xmlSecEncCtxDestroy
(
pEncCtx
)
;
throw
Runtime
Exception
()
;
throw
XMLEncryption
Exception
()
;
}
/*----------------------------------------
if( pEncCtx->resultReplaced != 0 ) {
...
...
xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
Dosyayı görüntüle @
f7a7f2b0
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlsignature_mscryptimpl.cxx,v $
*
* $Revision: 1.
1.1.1
$
* $Revision: 1.
2
$
*
* last change: $Author: m
t $ $Date: 2004-07-12 13:15:22
$
* last change: $Author: m
mi $ $Date: 2004-07-23 03:12:26
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -104,6 +104,7 @@ using ::com::sun::star::xml::crypto::XXMLSignature ;
using
::
com
::
sun
::
star
::
xml
::
crypto
::
XXMLSignatureTemplate
;
using
::
com
::
sun
::
star
::
xml
::
crypto
::
XXMLSecurityContext
;
using
::
com
::
sun
::
star
::
xml
::
crypto
::
XUriBinding
;
using
::
com
::
sun
::
star
::
xml
::
crypto
::
XMLSignatureException
;
XMLSignature_MSCryptImpl
::
XMLSignature_MSCryptImpl
(
const
Reference
<
XMultiServiceFactory
>&
aFactory
)
:
m_xServiceManager
(
aFactory
)
{
}
...
...
@@ -170,7 +171,7 @@ SAL_CALL XMLSignature_MSCryptImpl :: generate(
//Create Signature context
pDsigCtx
=
xmlSecDSigCtxCreate
(
pMngr
)
;
if
(
pDsigCtx
==
NULL
)
throw
Runtim
eException
()
;
throw
XMLSignatur
eException
()
;
//Sign the template
if
(
xmlSecDSigCtxSign
(
pDsigCtx
,
pNode
)
<
0
)
{
...
...
@@ -180,7 +181,7 @@ SAL_CALL XMLSignature_MSCryptImpl :: generate(
if
(
xUriBinding
.
is
()
)
xmlUnregisterStreamInputCallbacks
()
;
throw
Runtim
eException
()
;
throw
XMLSignatur
eException
()
;
}
xmlSecDSigCtxDestroy
(
pDsigCtx
)
;
...
...
@@ -259,7 +260,7 @@ XMLSignature_MSCryptImpl :: validate(
//Create Signature context
pDsigCtx
=
xmlSecDSigCtxCreate
(
pMngr
)
;
if
(
pDsigCtx
==
NULL
)
throw
Runtim
eException
()
;
throw
XMLSignatur
eException
()
;
//Verify signature
...
...
@@ -270,7 +271,7 @@ XMLSignature_MSCryptImpl :: validate(
if
(
xUriBinding
.
is
()
)
xmlUnregisterStreamInputCallbacks
()
;
throw
Runtim
eException
()
;
throw
XMLSignatur
eException
()
;
}
valid
=
(
pDsigCtx
->
status
==
xmlSecDSigStatusSucceeded
)
;
...
...
xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx
Dosyayı görüntüle @
f7a7f2b0
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlencryption_nssimpl.cxx,v $
*
* $Revision: 1.
1.1.1
$
* $Revision: 1.
2
$
*
* last change: $Author: m
t $ $Date: 2004-07-12 13:15:21
$
* last change: $Author: m
mi $ $Date: 2004-07-23 03:12:27
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -104,6 +104,7 @@ using ::com::sun::star::xml::crypto::XSecurityEnvironment ;
using
::
com
::
sun
::
star
::
xml
::
crypto
::
XXMLEncryption
;
using
::
com
::
sun
::
star
::
xml
::
crypto
::
XXMLEncryptionTemplate
;
using
::
com
::
sun
::
star
::
xml
::
crypto
::
XXMLSecurityContext
;
using
::
com
::
sun
::
star
::
xml
::
crypto
::
XMLEncryptionException
;
XMLEncryption_NssImpl
::
XMLEncryption_NssImpl
(
const
Reference
<
XMultiServiceFactory
>&
aFactory
)
:
m_xServiceManager
(
aFactory
)
{
}
...
...
@@ -147,7 +148,7 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
//Create Encryption context
pEncCtx
=
xmlSecEncCtxCreate
(
pMngr
)
;
if
(
pEncCtx
==
NULL
)
throw
Runtime
Exception
()
;
throw
XMLEncryption
Exception
()
;
//Get the encryption template
...
...
@@ -182,7 +183,7 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
if( pCipherData == NULL ) {
xmlSecEncCtxDestroy( pEncCtx ) ;
throw
Runtime
Exception() ;
throw
XMLEncryption
Exception() ;
}
xmlNodePtr pCipherValue = pCipherData->children;
...
...
@@ -193,7 +194,7 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
if( pCipherValue == NULL ) {
xmlSecEncCtxDestroy( pEncCtx ) ;
throw
Runtime
Exception() ;
throw
XMLEncryption
Exception() ;
}
pContent = pCipherValue->children;
...
...
@@ -203,13 +204,13 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
Reference
<
XXMLElementWrapper
>
xTarget
=
aTemplate
->
getTarget
()
;
if
(
!
xTarget
.
is
()
)
{
xmlSecEncCtxDestroy
(
pEncCtx
)
;
throw
Runtime
Exception
()
;
throw
XMLEncryption
Exception
()
;
}
Reference
<
XUnoTunnel
>
xTgtTunnel
(
xTarget
,
UNO_QUERY
)
;
if
(
!
xTgtTunnel
.
is
()
)
{
xmlSecEncCtxDestroy
(
pEncCtx
)
;
throw
Runtime
Exception
()
;
throw
XMLEncryption
Exception
()
;
}
XMLElementWrapper_XmlSecImpl
*
pTarget
=
(
XMLElementWrapper_XmlSecImpl
*
)
xTgtTunnel
->
getSomething
(
XMLElementWrapper_XmlSecImpl
::
getUnoTunnelImplementationId
()
)
;
...
...
@@ -223,7 +224,7 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
if
(
pContent
==
NULL
)
{
xmlSecEncCtxDestroy
(
pEncCtx
)
;
throw
Runtime
Exception
()
;
throw
XMLEncryption
Exception
()
;
}
/* MM : remove the following 2 lines
...
...
@@ -249,7 +250,7 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
//Encrypt the template
if
(
xmlSecEncCtxXmlEncrypt
(
pEncCtx
,
pEncryptedData
,
pContent
)
<
0
)
{
xmlSecEncCtxDestroy
(
pEncCtx
)
;
throw
Runtime
Exception
()
;
throw
XMLEncryption
Exception
()
;
}
xmlSecEncCtxDestroy
(
pEncCtx
)
;
...
...
@@ -301,7 +302,7 @@ XMLEncryption_NssImpl :: decrypt(
//Create Encryption context
pEncCtx
=
xmlSecEncCtxCreate
(
pMngr
)
;
if
(
pEncCtx
==
NULL
)
throw
Runtime
Exception
()
;
throw
XMLEncryption
Exception
()
;
//Get the encryption template
...
...
@@ -343,7 +344,7 @@ XMLEncryption_NssImpl :: decrypt(
//Decrypt the template
if
(
xmlSecEncCtxDecrypt
(
pEncCtx
,
pEncryptedData
)
<
0
||
pEncCtx
->
result
==
NULL
)
{
xmlSecEncCtxDestroy
(
pEncCtx
)
;
throw
Runtime
Exception
()
;
throw
XMLEncryption
Exception
()
;
}
/*----------------------------------------
if( pEncCtx->resultReplaced != 0 ) {
...
...
@@ -363,7 +364,7 @@ XMLEncryption_NssImpl :: decrypt(
pNode->setNativeElement( pContent ) ;
} else {
xmlSecEncCtxDestroy( pEncCtx ) ;
throw
Runtime
Exception() ;
throw
XMLEncryption
Exception() ;
}
----------------------------------------*/
...
...
xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
Dosyayı görüntüle @
f7a7f2b0
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlsignature_nssimpl.cxx,v $
*
* $Revision: 1.
1.1.1
$
* $Revision: 1.
2
$
*
* last change: $Author: m
t $ $Date: 2004-07-12 13:15:21
$
* last change: $Author: m
mi $ $Date: 2004-07-23 03:12:27
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -104,6 +104,7 @@ using ::com::sun::star::xml::crypto::XXMLSignature ;
using
::
com
::
sun
::
star
::
xml
::
crypto
::
XXMLSignatureTemplate
;
using
::
com
::
sun
::
star
::
xml
::
crypto
::
XXMLSecurityContext
;
using
::
com
::
sun
::
star
::
xml
::
crypto
::
XUriBinding
;
using
::
com
::
sun
::
star
::
xml
::
crypto
::
XMLSignatureException
;
XMLSignature_NssImpl
::
XMLSignature_NssImpl
(
const
Reference
<
XMultiServiceFactory
>&
aFactory
)
:
m_xServiceManager
(
aFactory
)
{
}
...
...
@@ -170,7 +171,7 @@ SAL_CALL XMLSignature_NssImpl :: generate(
//Create Signature context
pDsigCtx
=
xmlSecDSigCtxCreate
(
pMngr
)
;
if
(
pDsigCtx
==
NULL
)
throw
Runtim
eException
()
;
throw
XMLSignatur
eException
()
;
//Sign the template
if
(
xmlSecDSigCtxSign
(
pDsigCtx
,
pNode
)
<
0
)
{
...
...
@@ -180,7 +181,7 @@ SAL_CALL XMLSignature_NssImpl :: generate(
if
(
xUriBinding
.
is
()
)
xmlUnregisterStreamInputCallbacks
()
;
throw
Runtim
eException
()
;
throw
XMLSignatur
eException
()
;
}
xmlSecDSigCtxDestroy
(
pDsigCtx
)
;
...
...
@@ -259,7 +260,7 @@ XMLSignature_NssImpl :: validate(
//Create Signature context
pDsigCtx
=
xmlSecDSigCtxCreate
(
pMngr
)
;
if
(
pDsigCtx
==
NULL
)
throw
Runtim
eException
()
;
throw
XMLSignatur
eException
()
;
//Verify signature
...
...
@@ -270,7 +271,7 @@ XMLSignature_NssImpl :: validate(
if
(
xUriBinding
.
is
()
)
xmlUnregisterStreamInputCallbacks
()
;
throw
Runtim
eException
()
;
throw
XMLSignatur
eException
()
;
}
valid
=
(
pDsigCtx
->
status
==
xmlSecDSigStatusSucceeded
)
;
...
...
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