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
2bc5fb34
Kaydet (Commit)
2bc5fb34
authored
Ock 11, 2011
tarafından
Julien Nabet
Kaydeden (comit)
Caolán McNamara
Ock 11, 2011
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Some cppcheck cleaning
üst
fd8e6b21
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
55 deletions
+16
-55
securityenvironment_mscryptimpl.cxx
...source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+13
-41
secerror.cxx
xmlsecurity/source/xmlsec/nss/secerror.cxx
+1
-1
seinitializer_nssimpl.cxx
xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
+1
-1
xmlstreamio.cxx
xmlsecurity/source/xmlsec/xmlstreamio.cxx
+1
-12
No files found.
xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
Dosyayı görüntüle @
2bc5fb34
...
...
@@ -154,21 +154,21 @@ SecurityEnvironment_MSCryptImpl :: ~SecurityEnvironment_MSCryptImpl() {
if
(
!
m_tSymKeyList
.
empty
()
)
{
std
::
list
<
HCRYPTKEY
>::
iterator
symKeyIt
;
for
(
symKeyIt
=
m_tSymKeyList
.
begin
()
;
symKeyIt
!=
m_tSymKeyList
.
end
()
;
symKeyIt
++
)
for
(
symKeyIt
=
m_tSymKeyList
.
begin
()
;
symKeyIt
!=
m_tSymKeyList
.
end
()
;
++
symKeyIt
)
CryptDestroyKey
(
*
symKeyIt
)
;
}
if
(
!
m_tPubKeyList
.
empty
()
)
{
std
::
list
<
HCRYPTKEY
>::
iterator
pubKeyIt
;
for
(
pubKeyIt
=
m_tPubKeyList
.
begin
()
;
pubKeyIt
!=
m_tPubKeyList
.
end
()
;
pubKeyIt
++
)
for
(
pubKeyIt
=
m_tPubKeyList
.
begin
()
;
pubKeyIt
!=
m_tPubKeyList
.
end
()
;
++
pubKeyIt
)
CryptDestroyKey
(
*
pubKeyIt
)
;
}
if
(
!
m_tPriKeyList
.
empty
()
)
{
std
::
list
<
HCRYPTKEY
>::
iterator
priKeyIt
;
for
(
priKeyIt
=
m_tPriKeyList
.
begin
()
;
priKeyIt
!=
m_tPriKeyList
.
end
()
;
priKeyIt
++
)
for
(
priKeyIt
=
m_tPriKeyList
.
begin
()
;
priKeyIt
!=
m_tPriKeyList
.
end
()
;
++
priKeyIt
)
CryptDestroyKey
(
*
priKeyIt
)
;
}
...
...
@@ -266,12 +266,6 @@ void SecurityEnvironment_MSCryptImpl :: setCryptoProvider( HCRYPTPROV aProv ) th
}
if
(
aProv
!=
NULL
)
{
/*- Replaced by direct adopt for WINNT support ----
if( !CryptContextAddRef( aProv, NULL, NULL ) )
throw Exception() ;
else
m_hProv = aProv ;
----*/
m_hProv
=
aProv
;
}
}
...
...
@@ -322,16 +316,12 @@ void SecurityEnvironment_MSCryptImpl :: adoptSymKey( HCRYPTKEY aSymKey ) throw(
if
(
aSymKey
!=
NULL
)
{
//First try to find the key in the list
for
(
keyIt
=
m_tSymKeyList
.
begin
()
;
keyIt
!=
m_tSymKeyList
.
end
()
;
keyIt
++
)
{
for
(
keyIt
=
m_tSymKeyList
.
begin
()
;
keyIt
!=
m_tSymKeyList
.
end
()
;
++
keyIt
)
{
if
(
*
keyIt
==
aSymKey
)
return
;
}
//If we do not find the key in the list, add a new node
/*- Replaced with directly adopt for WINNT 4.0 support ----
if( !CryptDuplicateKey( aSymKey, NULL, 0, &symkey ) )
throw RuntimeException() ;
----*/
symkey
=
aSymKey
;
try
{
...
...
@@ -347,7 +337,7 @@ void SecurityEnvironment_MSCryptImpl :: rejectSymKey( HCRYPTKEY aSymKey ) throw(
std
::
list
<
HCRYPTKEY
>::
iterator
keyIt
;
if
(
aSymKey
!=
NULL
)
{
for
(
keyIt
=
m_tSymKeyList
.
begin
()
;
keyIt
!=
m_tSymKeyList
.
end
()
;
keyIt
++
)
{
for
(
keyIt
=
m_tSymKeyList
.
begin
()
;
keyIt
!=
m_tSymKeyList
.
end
()
;
++
keyIt
)
{
if
(
*
keyIt
==
aSymKey
)
{
symkey
=
*
keyIt
;
CryptDestroyKey
(
symkey
)
;
...
...
@@ -364,7 +354,7 @@ HCRYPTKEY SecurityEnvironment_MSCryptImpl :: getSymKey( unsigned int position )
unsigned
int
pos
;
symkey
=
NULL
;
for
(
pos
=
0
,
keyIt
=
m_tSymKeyList
.
begin
()
;
pos
<
position
&&
keyIt
!=
m_tSymKeyList
.
end
()
;
pos
++
,
keyIt
++
)
;
for
(
pos
=
0
,
keyIt
=
m_tSymKeyList
.
begin
()
;
pos
<
position
&&
keyIt
!=
m_tSymKeyList
.
end
()
;
++
pos
,
++
keyIt
)
;
if
(
pos
==
position
&&
keyIt
!=
m_tSymKeyList
.
end
()
)
symkey
=
*
keyIt
;
...
...
@@ -378,16 +368,12 @@ void SecurityEnvironment_MSCryptImpl :: adoptPubKey( HCRYPTKEY aPubKey ) throw(
if
(
aPubKey
!=
NULL
)
{
//First try to find the key in the list
for
(
keyIt
=
m_tPubKeyList
.
begin
()
;
keyIt
!=
m_tPubKeyList
.
end
()
;
keyIt
++
)
{
for
(
keyIt
=
m_tPubKeyList
.
begin
()
;
keyIt
!=
m_tPubKeyList
.
end
()
;
++
keyIt
)
{
if
(
*
keyIt
==
aPubKey
)
return
;
}
//If we do not find the key in the list, add a new node
/*- Replaced with directly adopt for WINNT 4.0 support ----
if( !CryptDuplicateKey( aPubKey, NULL, 0, &pubkey ) )
throw RuntimeException() ;
----*/
pubkey
=
aPubKey
;
try
{
...
...
@@ -403,7 +389,7 @@ void SecurityEnvironment_MSCryptImpl :: rejectPubKey( HCRYPTKEY aPubKey ) throw(
std
::
list
<
HCRYPTKEY
>::
iterator
keyIt
;
if
(
aPubKey
!=
NULL
)
{
for
(
keyIt
=
m_tPubKeyList
.
begin
()
;
keyIt
!=
m_tPubKeyList
.
end
()
;
keyIt
++
)
{
for
(
keyIt
=
m_tPubKeyList
.
begin
()
;
keyIt
!=
m_tPubKeyList
.
end
()
;
++
keyIt
)
{
if
(
*
keyIt
==
aPubKey
)
{
pubkey
=
*
keyIt
;
CryptDestroyKey
(
pubkey
)
;
...
...
@@ -420,7 +406,7 @@ HCRYPTKEY SecurityEnvironment_MSCryptImpl :: getPubKey( unsigned int position )
unsigned
int
pos
;
pubkey
=
NULL
;
for
(
pos
=
0
,
keyIt
=
m_tPubKeyList
.
begin
()
;
pos
<
position
&&
keyIt
!=
m_tPubKeyList
.
end
()
;
pos
++
,
keyIt
++
)
;
for
(
pos
=
0
,
keyIt
=
m_tPubKeyList
.
begin
()
;
pos
<
position
&&
keyIt
!=
m_tPubKeyList
.
end
()
;
++
pos
,
++
keyIt
)
;
if
(
pos
==
position
&&
keyIt
!=
m_tPubKeyList
.
end
()
)
pubkey
=
*
keyIt
;
...
...
@@ -434,16 +420,12 @@ void SecurityEnvironment_MSCryptImpl :: adoptPriKey( HCRYPTKEY aPriKey ) throw(
if
(
aPriKey
!=
NULL
)
{
//First try to find the key in the list
for
(
keyIt
=
m_tPriKeyList
.
begin
()
;
keyIt
!=
m_tPriKeyList
.
end
()
;
keyIt
++
)
{
for
(
keyIt
=
m_tPriKeyList
.
begin
()
;
keyIt
!=
m_tPriKeyList
.
end
()
;
++
keyIt
)
{
if
(
*
keyIt
==
aPriKey
)
return
;
}
//If we do not find the key in the list, add a new node
/*- Replaced with directly adopt for WINNT 4.0 support ----
if( !CryptDuplicateKey( aPriKey, NULL, 0, &prikey ) )
throw RuntimeException() ;
----*/
prikey
=
aPriKey
;
try
{
...
...
@@ -459,7 +441,7 @@ void SecurityEnvironment_MSCryptImpl :: rejectPriKey( HCRYPTKEY aPriKey ) throw(
std
::
list
<
HCRYPTKEY
>::
iterator
keyIt
;
if
(
aPriKey
!=
NULL
)
{
for
(
keyIt
=
m_tPriKeyList
.
begin
()
;
keyIt
!=
m_tPriKeyList
.
end
()
;
keyIt
++
)
{
for
(
keyIt
=
m_tPriKeyList
.
begin
()
;
keyIt
!=
m_tPriKeyList
.
end
()
;
++
keyIt
)
{
if
(
*
keyIt
==
aPriKey
)
{
prikey
=
*
keyIt
;
CryptDestroyKey
(
prikey
)
;
...
...
@@ -476,7 +458,7 @@ HCRYPTKEY SecurityEnvironment_MSCryptImpl :: getPriKey( unsigned int position )
unsigned
int
pos
;
prikey
=
NULL
;
for
(
pos
=
0
,
keyIt
=
m_tPriKeyList
.
begin
()
;
pos
<
position
&&
keyIt
!=
m_tPriKeyList
.
end
()
;
pos
++
,
keyIt
++
)
;
for
(
pos
=
0
,
keyIt
=
m_tPriKeyList
.
begin
()
;
pos
<
position
&&
keyIt
!=
m_tPriKeyList
.
end
()
;
++
pos
,
++
keyIt
)
;
if
(
pos
==
position
&&
keyIt
!=
m_tPriKeyList
.
end
()
)
prikey
=
*
keyIt
;
...
...
@@ -515,15 +497,6 @@ Sequence< Reference < XCertificate > > SecurityEnvironment_MSCryptImpl :: getPer
DWORD
dwKeySpec
;
HCRYPTPROV
hCryptProv
;
/*
hSystemKeyStore = CertOpenStore(
CERT_STORE_PROV_SYSTEM ,
0 ,
NULL ,
CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_READONLY_FLAG | CERT_STORE_OPEN_EXISTING_FLAG ,
L"MY"
) ;
*/
hSystemKeyStore
=
CertOpenSystemStore
(
0
,
"MY"
)
;
if
(
hSystemKeyStore
!=
NULL
)
{
pCertContext
=
CertEnumCertificatesInStore
(
hSystemKeyStore
,
pCertContext
);
...
...
@@ -560,7 +533,7 @@ Sequence< Reference < XCertificate > > SecurityEnvironment_MSCryptImpl :: getPer
std
::
list
<
X509Certificate_MSCryptImpl
*
>::
iterator
xcertIt
;
Sequence
<
Reference
<
XCertificate
>
>
certSeq
(
length
)
;
for
(
i
=
0
,
xcertIt
=
certsList
.
begin
();
xcertIt
!=
certsList
.
end
();
xcertIt
++
,
i
++
)
{
for
(
i
=
0
,
xcertIt
=
certsList
.
begin
();
xcertIt
!=
certsList
.
end
();
++
xcertIt
,
++
i
)
{
certSeq
[
i
]
=
*
xcertIt
;
}
...
...
@@ -573,7 +546,6 @@ Sequence< Reference < XCertificate > > SecurityEnvironment_MSCryptImpl :: getPer
Reference
<
XCertificate
>
SecurityEnvironment_MSCryptImpl
::
getCertificate
(
const
OUString
&
issuerName
,
const
Sequence
<
sal_Int8
>&
serialNumber
)
throw
(
SecurityException
,
RuntimeException
)
{
unsigned
int
i
;
// sal_Int8 found = 0 ;
LPSTR
pszName
;
X509Certificate_MSCryptImpl
*
xcert
=
NULL
;
PCCERT_CONTEXT
pCertContext
=
NULL
;
...
...
xmlsecurity/source/xmlsec/nss/secerror.cxx
Dosyayı görüntüle @
2bc5fb34
...
...
@@ -75,7 +75,6 @@ getCertError(PRErrorCode errNum)
void
printChainFailure
(
CERTVerifyLog
*
log
)
{
unsigned
long
errorFlags
=
0
;
unsigned
int
depth
=
(
unsigned
int
)
-
1
;
const
char
*
specificError
=
NULL
;
const
char
*
issuer
=
NULL
;
...
...
@@ -84,6 +83,7 @@ printChainFailure(CERTVerifyLog *log)
if
(
log
->
count
>
0
)
{
xmlsec_trace
(
"Bad certifcation path:"
);
unsigned
long
errorFlags
=
0
;
for
(
node
=
log
->
head
;
node
;
node
=
node
->
next
)
{
if
(
depth
!=
node
->
depth
)
...
...
xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
Dosyayı görüntüle @
2bc5fb34
...
...
@@ -347,7 +347,6 @@ bool getMozillaCurrentProfile(
mozilla
::
MozillaProductType_Mozilla
,
mozilla
::
MozillaProductType_Firefox
,
mozilla
::
MozillaProductType_Default
};
int
nProduct
=
4
;
uno
::
Reference
<
uno
::
XInterface
>
xInstance
=
rxMSF
->
createInstance
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.mozilla.MozillaBootstrap"
))
);
...
...
@@ -359,6 +358,7 @@ bool getMozillaCurrentProfile(
if
(
xMozillaBootstrap
.
is
())
{
int
nProduct
=
4
;
for
(
int
i
=
0
;
i
<
nProduct
;
i
++
)
{
::
rtl
::
OUString
profile
=
xMozillaBootstrap
->
getDefaultProfile
(
productTypes
[
i
]);
...
...
xmlsecurity/source/xmlsec/xmlstreamio.cxx
Dosyayı görüntüle @
2bc5fb34
...
...
@@ -164,19 +164,8 @@ int xmlStreamClose( void * context )
int
xmlEnableStreamInputCallbacks
()
{
int
cbs
=
0
;
if
(
!
(
enableXmlStreamIO
&
XMLSTREAMIO_INITIALIZED
)
)
{
//Register the callbacks into libxml2
//cbs = xmlRegisterInputCallbacks(
// xmlStreamMatch,
// xmlStreamOpen,
// xmlStreamRead,
// xmlStreamClose ) ;
//if( cbs < 0 ) {
// return -1 ;
//}
//Register the callbacks into xmlSec
//In order to make the xmlsec io finding the callbacks firstly,
//I put the callbacks at the very begining.
...
...
@@ -186,7 +175,7 @@ int xmlEnableStreamInputCallbacks()
xmlSecIOCleanupCallbacks
()
;
//Register my classbacks.
cbs
=
xmlSecIORegisterCallbacks
(
int
cbs
=
xmlSecIORegisterCallbacks
(
xmlStreamMatch
,
xmlStreamOpen
,
xmlStreamRead
,
...
...
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