I got cold feet. I don't want to have to revert this many years later
instead, when some obscure 3rd-party software stops working.
This reverts commit e1ce7bad62.
So drop the parameter then and propagate fallout in the Windows
implementation in xmlsecurity. The NSS implementation already ignored
the parameter completely.
This interface is not 'published' and the parameter was even marked as
'reserved for internal use' so I doubt any external code has used it.
Change-Id: I5915b941b79cfddadc8137c32ed07c20c9ccaa37
Not sure what the author was thinking, or what the comment '//Native
methods' was supposed to mean.
Change-Id: I9e45de6f24531a99770d98f415fea6a1cfd7d2c2
That is what the default libxmlsec error handler
xmlSecMSCryptoErrorsDefaultCallback() does. Why show less information
in our own handler?
Change-Id: Ibc9f9b5066536d0f5cabbf2bda6d1fa14eca5613
The issue of 362d4f0cd4 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.
(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to
OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager();
in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)
Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
Revert "Bad cast from SanExtensionImpl to CertificateExtension_XmlSecImpl"
This reverts commit 321b8ff86b.
Revert "loplugin:singlevalfields in writerfilter and xmlsec"
This reverts commit a25327e4b1.
cause these two together mean that we get a certificate is
invalid dialog when the cert is perfectly fine on loading https
sources
Change-Id: Id8c1fb5ece4ecc0035500ce0b822a6b248d14282
...both ultimately derive from css::security::XCertificateExtension, but that is
all they have in common. The special handling of 2.5.29.17 (and thus the bad
casts) was introduced with d5feca7dcd
"tkr38: #i112307# Support for x509 v3 Subject Alternative Name extension added".
Lets assume that it was an oversight there that setCertExtn (which is a function
of CertificateExtension_XmlSecImpl, not inherited from a---common---base class)
should not be called on such special-case SanExtensionImpl instances.
Change-Id: I96cfd42f606c79920d1548f323b68f17ff4e9081
According to MSDN, calling CryptDecodeObject() with X509_KEY_USAGE
fills in a CRYPT_BIT_BLOB struct, not a CERT_KEY_USAGE_RESTRICTION_INFO
one.
Avoid potential complications of using CRYPT_DECODE_NOCOPY_FLAG.
Instead, just follow the normal pattern of first finding out the size
of buffer needed, allocate a such buffer, and then call the API again,
passing that buffer. When called without CRYPT_DECODE_NOCOPY_FLAG, at
least, it's what pbData points to that contains the usage bits, not
the pointer value itself.
Add SAL_WARNs for cleartext error messages in all error cases.
Change-Id: I9b9f7d08d6013753d127c723dedd959109a85c97
probably not much performance benefit, but it sure is good at
identifying leftover intermediate variables from previous
refactorings.
Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657
Reviewed-on: https://gerrit.libreoffice.org/24026
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Replace with C++11 delete copy-constructur
and copy-assignment.
Remove boost/noncopyable.hpp includes.
Add missing default ctors.
With this commit there should be no users
of boost::noncopyable left.
Change-Id: I6b1e47824912a6a80cc3f00f34938ebc048d8975
Reviewed-on: https://gerrit.libreoffice.org/24051
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
OOXML export will need an SHA-256 hash of the certificate, introducing
a css::security::XCertificate2 just for this would be probably an
overkill. The same will have to be done in the mscrypto backend in the
near future.
Change-Id: Id2df06416a713927edd60e1253ff8e1c09dd706a
A ridiculously fast way of doing this is:
for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
--exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
perl -0777 -i -pe 's/^
{3,}/
/gm' $i
done
Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
This is the mscrypto equivalent of what was done in commit
e6aaf64cfc (xmlsecurity: validate OOXML
<Manifest> references, 2016-02-01) for NSS.
Change-Id: I7ee713fb5c7b55ded38100a0f25f718f2f323e08
ODF uses no <Manifest> references, so this doesn't change anything for
ODF.
Previously we only validated the hash of a <Manifest> element, but not
reference hashes inside the <Manifest> element. This means now we can
detect not only changes to the signature metadata (signing data, signing
comment), but also changes in other streams, i.e. everything else.
libxmlsec already validated the manifest references hashes, the only
missing piece was that it's up to the client if it wants to validate
them, so libxmlsec doesn't do so by default -> our code has to.
This commit only affects the nss backend, still need to adapt the
mscrypto backend later presumably.
Change-Id: I0b11519d3eb003783048a00c4cada74762c6462f