summaryrefslogtreecommitdiff
path: root/external/libxmlsec/xmlsec1-customkeymanage.patch.1
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-07-07 21:37:35 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-07-08 07:01:58 +0000
commit9d1f51307d61d0b9a8a8e4847b9e7e5c0177322e (patch)
treebd69f58e5559fe2cc5cc5da8ee2698cfcb1684bf /external/libxmlsec/xmlsec1-customkeymanage.patch.1
parent9960537e66868413c64014815deb698c3fa74758 (diff)
Upgrade libxmlsec to 1.2.21
Obsoletes xmlsec1-ooxml.patch.1 and xmlsec1-vs2015.patch.1. Adds xmlsec1-keyinfo-revert.patch.1 till the LO side is adapted to the new xmlsec requirements. Change-Id: I1a46ad8fd7e9c8b4fa7a97591a1d90922969393d Reviewed-on: https://gerrit.libreoffice.org/24403 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'external/libxmlsec/xmlsec1-customkeymanage.patch.1')
-rw-r--r--external/libxmlsec/xmlsec1-customkeymanage.patch.195
1 files changed, 47 insertions, 48 deletions
diff --git a/external/libxmlsec/xmlsec1-customkeymanage.patch.1 b/external/libxmlsec/xmlsec1-customkeymanage.patch.1
index 852d513aea11..d17b3133cf9d 100644
--- a/external/libxmlsec/xmlsec1-customkeymanage.patch.1
+++ b/external/libxmlsec/xmlsec1-customkeymanage.patch.1
@@ -1,4 +1,4 @@
-From 584620e74f3240d955bb9ea7a9a2e2ffc7634b95 Mon Sep 17 00:00:00 2001
+From b902d273b54981681ee9896a015bb5bef71a4c0b Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@collabora.co.uk>
Date: Fri, 4 Mar 2016 16:19:12 +0100
Subject: [PATCH] xmlsec1-customkeymanage.patch
@@ -33,9 +33,9 @@ Conflicts:
src/nss/symkeys.c | 705 ++++++++++++++++++++++++++++--
src/nss/tokens.c | 548 ++++++++++++++++++++++++
src/nss/x509.c | 565 +++++-------------------
- src/nss/x509vfy.c | 292 ++++---------
+ src/nss/x509vfy.c | 291 ++++---------
win32/Makefile.msvc | 4 +
- 22 files changed, 3034 insertions(+), 970 deletions(-)
+ 22 files changed, 3034 insertions(+), 969 deletions(-)
create mode 100644 include/xmlsec/mscrypto/akmngr.h
create mode 100644 include/xmlsec/nss/akmngr.h
create mode 100644 include/xmlsec/nss/ciphers.h
@@ -57,10 +57,10 @@ index 18dff94..44837b6 100644
certkeys.h \
crypto.h \
diff --git a/include/xmlsec/mscrypto/Makefile.in b/include/xmlsec/mscrypto/Makefile.in
-index 411681d..3ed3f5b 100644
+index 3b22b00..b2eac50 100644
--- a/include/xmlsec/mscrypto/Makefile.in
+++ b/include/xmlsec/mscrypto/Makefile.in
-@@ -379,6 +379,7 @@ top_srcdir = @top_srcdir@
+@@ -397,6 +397,7 @@ top_srcdir = @top_srcdir@
NULL =
xmlsecmscryptoincdir = $(includedir)/xmlsec1/xmlsec/mscrypto
xmlsecmscryptoinc_HEADERS = \
@@ -160,10 +160,10 @@ index e352162..997ca7f 100644
install-exec-hook:
diff --git a/include/xmlsec/nss/Makefile.in b/include/xmlsec/nss/Makefile.in
-index 92f2d19..c190177 100644
+index e7098c6..2f1e318 100644
--- a/include/xmlsec/nss/Makefile.in
+++ b/include/xmlsec/nss/Makefile.in
-@@ -386,6 +386,9 @@ bignum.h \
+@@ -404,6 +404,9 @@ bignum.h \
keysstore.h \
pkikeys.h \
x509.h \
@@ -236,7 +236,7 @@ index 0000000..8053511
+
+
diff --git a/include/xmlsec/nss/app.h b/include/xmlsec/nss/app.h
-index 387d34e..d5dc345 100644
+index aeac55e..72e3db0 100644
--- a/include/xmlsec/nss/app.h
+++ b/include/xmlsec/nss/app.h
@@ -22,6 +22,9 @@ extern "C" {
@@ -765,10 +765,10 @@ index 8cd8586..a14199e 100644
if SHAREDLIB_HACK
diff --git a/src/nss/Makefile.in b/src/nss/Makefile.in
-index e43ac73..5622923 100644
+index 5a1393d..5613f5b 100644
--- a/src/nss/Makefile.in
+++ b/src/nss/Makefile.in
-@@ -126,7 +126,8 @@ am__DEPENDENCIES_1 =
+@@ -135,7 +135,8 @@ am__DEPENDENCIES_1 =
am__libxmlsec1_nss_la_SOURCES_DIST = app.c bignum.c ciphers.c crypto.c \
digests.c hmac.c pkikeys.c signatures.c symkeys.c x509.c \
x509vfy.c keysstore.c keytrans.c kw_des.c kw_aes.c globals.h \
@@ -776,9 +776,9 @@ index e43ac73..5622923 100644
+ ../strings.c \
+ akmngr.c tokens.c
am__objects_1 =
- @SHAREDLIB_HACK_TRUE@am__objects_2 = libxmlsec1_nss_la-strings.lo
- am_libxmlsec1_nss_la_OBJECTS = libxmlsec1_nss_la-app.lo \
-@@ -137,6 +138,8 @@ am_libxmlsec1_nss_la_OBJECTS = libxmlsec1_nss_la-app.lo \
+ am__dirstamp = $(am__leading_dot)dirstamp
+ @SHAREDLIB_HACK_TRUE@am__objects_2 = ../libxmlsec1_nss_la-strings.lo
+@@ -147,6 +148,8 @@ am_libxmlsec1_nss_la_OBJECTS = libxmlsec1_nss_la-app.lo \
libxmlsec1_nss_la-x509.lo libxmlsec1_nss_la-x509vfy.lo \
libxmlsec1_nss_la-keysstore.lo libxmlsec1_nss_la-keytrans.lo \
libxmlsec1_nss_la-kw_des.lo libxmlsec1_nss_la-kw_aes.lo \
@@ -787,7 +787,7 @@ index e43ac73..5622923 100644
$(am__objects_1) $(am__objects_2)
libxmlsec1_nss_la_OBJECTS = $(am_libxmlsec1_nss_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
-@@ -446,6 +449,7 @@ libxmlsec1_nss_la_CPPFLAGS = \
+@@ -464,6 +467,7 @@ libxmlsec1_nss_la_CPPFLAGS = \
libxmlsec1_nss_la_SOURCES = app.c bignum.c ciphers.c crypto.c \
digests.c hmac.c pkikeys.c signatures.c symkeys.c x509.c \
x509vfy.c keysstore.c keytrans.c kw_des.c kw_aes.c globals.h \
@@ -795,7 +795,7 @@ index e43ac73..5622923 100644
$(NULL) $(am__append_1)
libxmlsec1_nss_la_LIBADD = \
$(NSS_LIBS) \
-@@ -557,6 +561,8 @@ distclean-compile:
+@@ -584,6 +588,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmlsec1_nss_la-symkeys.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmlsec1_nss_la-x509.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmlsec1_nss_la-x509vfy.Plo@am__quote@
@@ -803,8 +803,8 @@ index e43ac73..5622923 100644
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmlsec1_nss_la-tokens.Plo@am__quote@
.c.o:
- @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@@ -586,6 +592,20 @@ libxmlsec1_nss_la-app.lo: app.c
+ @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@@ -616,6 +622,20 @@ libxmlsec1_nss_la-app.lo: app.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmlsec1_nss_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libxmlsec1_nss_la-app.lo `test -f 'app.c' || echo '$(srcdir)/'`app.c
@@ -1216,7 +1216,7 @@ index 0000000..65b94ac
+}
+
diff --git a/src/nss/hmac.c b/src/nss/hmac.c
-index ae7e67e..ba3887a 100644
+index 79fbf40..2469e6a 100644
--- a/src/nss/hmac.c
+++ b/src/nss/hmac.c
@@ -23,8 +23,8 @@
@@ -1247,7 +1247,7 @@ index ae7e67e..ba3887a 100644
}
diff --git a/src/nss/keysstore.c b/src/nss/keysstore.c
-index f07e44b..e4cb0f1 100644
+index 057fc45..e4cb0f1 100644
--- a/src/nss/keysstore.c
+++ b/src/nss/keysstore.c
@@ -1,36 +1,56 @@
@@ -1876,7 +1876,7 @@ index f07e44b..e4cb0f1 100644
- xmlSecAssert2(xmlSecKeyStoreCheckId(store, xmlSecNssKeysStoreId), -1);
-
- ss = xmlSecNssKeysStoreGetSS(store);
-- xmlSecAssert2((*ss == NULL), -1);
+- xmlSecAssert2(((ss == NULL) || (*ss == NULL)), -1);
-
- *ss = xmlSecKeyStoreCreate(xmlSecSimpleKeysStoreId);
- if(*ss == NULL) {
@@ -2175,7 +2175,7 @@ index f07e44b..e4cb0f1 100644
+ return(0);
}
diff --git a/src/nss/pkikeys.c b/src/nss/pkikeys.c
-index ae9e29b..9acd317 100644
+index 5ede4cc..896c245 100644
--- a/src/nss/pkikeys.c
+++ b/src/nss/pkikeys.c
@@ -24,6 +24,7 @@
@@ -2212,7 +2212,7 @@ index ae9e29b..9acd317 100644
ret = -1;
goto done;
}
-@@ -792,14 +795,14 @@ done:
+@@ -801,14 +804,14 @@ done:
if (slot != NULL) {
PK11_FreeSlot(slot);
}
@@ -2229,7 +2229,7 @@ index ae9e29b..9acd317 100644
return(ret);
}
-@@ -818,7 +821,7 @@ xmlSecNssKeyDataDsaXmlWrite(xmlSecKeyDataId id, xmlSecKeyPtr key,
+@@ -827,7 +830,7 @@ xmlSecNssKeyDataDsaXmlWrite(xmlSecKeyDataId id, xmlSecKeyPtr key,
ctx = xmlSecNssPKIKeyDataGetCtx(xmlSecKeyGetValue(key));
xmlSecAssert2(ctx != NULL, -1);
@@ -2238,7 +2238,7 @@ index ae9e29b..9acd317 100644
if(((xmlSecKeyDataTypePublic | xmlSecKeyDataTypePrivate) & keyInfoCtx->keyReq.keyType) == 0) {
/* we can have only private key or public key */
-@@ -940,7 +943,8 @@ xmlSecNssKeyDataDsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKe
+@@ -949,7 +952,8 @@ xmlSecNssKeyDataDsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKe
xmlSecErrorsSafeString(xmlSecKeyDataGetName(data)),
"PK11_PQG_ParamGen",
XMLSEC_ERRORS_R_CRYPTO_FAILED,
@@ -2248,7 +2248,7 @@ index ae9e29b..9acd317 100644
goto done;
}
-@@ -950,11 +954,12 @@ xmlSecNssKeyDataDsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKe
+@@ -959,11 +963,12 @@ xmlSecNssKeyDataDsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKe
xmlSecErrorsSafeString(xmlSecKeyDataGetName(data)),
"PK11_PQG_VerifyParams",
XMLSEC_ERRORS_R_CRYPTO_FAILED,
@@ -2263,7 +2263,7 @@ index ae9e29b..9acd317 100644
PK11_Authenticate(slot, PR_TRUE, NULL /* default pwd callback */);
privkey = PK11_GenerateKeyPair(slot, CKM_DSA_KEY_PAIR_GEN, pqgParams,
&pubkey, PR_FALSE, PR_TRUE, NULL);
-@@ -964,8 +969,9 @@ xmlSecNssKeyDataDsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKe
+@@ -973,8 +978,9 @@ xmlSecNssKeyDataDsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKe
xmlSecErrorsSafeString(xmlSecKeyDataGetName(data)),
"PK11_GenerateKeyPair",
XMLSEC_ERRORS_R_CRYPTO_FAILED,
@@ -2274,7 +2274,7 @@ index ae9e29b..9acd317 100644
goto done;
}
-@@ -979,6 +985,8 @@ xmlSecNssKeyDataDsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKe
+@@ -988,6 +994,8 @@ xmlSecNssKeyDataDsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKe
goto done;
}
@@ -2283,7 +2283,7 @@ index ae9e29b..9acd317 100644
ret = 0;
done:
-@@ -991,16 +999,13 @@ done:
+@@ -1000,16 +1008,13 @@ done:
if (pqgVerify != NULL) {
PK11_PQG_DestroyVerify(pqgVerify);
}
@@ -2301,7 +2301,7 @@ index ae9e29b..9acd317 100644
}
static xmlSecKeyDataType
-@@ -1010,10 +1015,10 @@ xmlSecNssKeyDataDsaGetType(xmlSecKeyDataPtr data) {
+@@ -1019,10 +1024,10 @@ xmlSecNssKeyDataDsaGetType(xmlSecKeyDataPtr data) {
xmlSecAssert2(xmlSecKeyDataCheckId(data, xmlSecNssKeyDataDsaId), xmlSecKeyDataTypeUnknown);
ctx = xmlSecNssPKIKeyDataGetCtx(data);
xmlSecAssert2(ctx != NULL, -1);
@@ -2314,7 +2314,7 @@ index ae9e29b..9acd317 100644
return(xmlSecKeyDataTypePublic);
}
-@@ -1027,7 +1032,7 @@ xmlSecNssKeyDataDsaGetSize(xmlSecKeyDataPtr data) {
+@@ -1036,7 +1041,7 @@ xmlSecNssKeyDataDsaGetSize(xmlSecKeyDataPtr data) {
xmlSecAssert2(xmlSecKeyDataCheckId(data, xmlSecNssKeyDataDsaId), 0);
ctx = xmlSecNssPKIKeyDataGetCtx(data);
xmlSecAssert2(ctx != NULL, -1);
@@ -2323,7 +2323,7 @@ index ae9e29b..9acd317 100644
return(8 * SECKEY_PublicKeyStrength(ctx->pubkey));
}
-@@ -1216,13 +1221,13 @@ xmlSecNssKeyDataRsaXmlRead(xmlSecKeyDataId id, xmlSecKeyPtr key,
+@@ -1225,13 +1230,13 @@ xmlSecNssKeyDataRsaXmlRead(xmlSecKeyDataId id, xmlSecKeyPtr key,
goto done;
}
@@ -2340,7 +2340,7 @@ index ae9e29b..9acd317 100644
ret = -1;
goto done;
}
-@@ -1384,7 +1389,7 @@ xmlSecNssKeyDataRsaXmlWrite(xmlSecKeyDataId id, xmlSecKeyPtr key,
+@@ -1393,7 +1398,7 @@ xmlSecNssKeyDataRsaXmlWrite(xmlSecKeyDataId id, xmlSecKeyPtr key,
ctx = xmlSecNssPKIKeyDataGetCtx(xmlSecKeyGetValue(key));
xmlSecAssert2(ctx != NULL, -1);
@@ -2349,7 +2349,7 @@ index ae9e29b..9acd317 100644
if(((xmlSecKeyDataTypePublic | xmlSecKeyDataTypePrivate) & keyInfoCtx->keyReq.keyType) == 0) {
-@@ -1455,7 +1460,7 @@ xmlSecNssKeyDataRsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKe
+@@ -1464,7 +1469,7 @@ xmlSecNssKeyDataRsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKe
params.keySizeInBits = sizeBits;
params.pe = 65537;
@@ -2358,7 +2358,7 @@ index ae9e29b..9acd317 100644
PK11_Authenticate(slot, PR_TRUE, NULL /* default pwd callback */);
privkey = PK11_GenerateKeyPair(slot, CKM_RSA_PKCS_KEY_PAIR_GEN, &params,
&pubkey, PR_FALSE, PR_TRUE, NULL);
-@@ -1525,7 +1530,7 @@ xmlSecNssKeyDataRsaGetSize(xmlSecKeyDataPtr data) {
+@@ -1534,7 +1539,7 @@ xmlSecNssKeyDataRsaGetSize(xmlSecKeyDataPtr data) {
ctx = xmlSecNssPKIKeyDataGetCtx(data);
xmlSecAssert2(ctx != NULL, -1);
@@ -2368,7 +2368,7 @@ index ae9e29b..9acd317 100644
return(8 * SECKEY_PublicKeyStrength(ctx->pubkey));
}
diff --git a/src/nss/symkeys.c b/src/nss/symkeys.c
-index 3da7a69..9b4c700 100644
+index b98dd49..39ba339 100644
--- a/src/nss/symkeys.c
+++ b/src/nss/symkeys.c
@@ -15,20 +15,41 @@
@@ -4519,7 +4519,7 @@ index 887c77c..749bbde 100644
xmlSecNssX509CertDebugDump(CERTCertificate* cert, FILE* output) {
SECItem *sn;
diff --git a/src/nss/x509vfy.c b/src/nss/x509vfy.c
-index 8a6e97a..d1b2850 100644
+index 0edaa2d..c8baaab 100644
--- a/src/nss/x509vfy.c
+++ b/src/nss/x509vfy.c
@@ -30,6 +30,7 @@
@@ -4550,7 +4550,7 @@ index 8a6e97a..d1b2850 100644
static xmlSecKeyDataStoreKlass xmlSecNssX509StoreKlass = {
sizeof(xmlSecKeyDataStoreKlass),
-@@ -362,7 +352,7 @@ xmlSecNssX509StoreFinalize(xmlSecKeyDataStorePtr store) {
+@@ -365,7 +355,7 @@ xmlSecNssX509StoreFinalize(xmlSecKeyDataStorePtr store) {
*****************************************************************************/
static CERTName *
xmlSecNssGetCertName(const xmlChar * name) {
@@ -4559,7 +4559,7 @@ index 8a6e97a..d1b2850 100644
xmlChar *p;
CERTName *res;
-@@ -387,33 +377,19 @@ xmlSecNssGetCertName(const xmlChar * name) {
+@@ -390,33 +380,19 @@ xmlSecNssGetCertName(const xmlChar * name) {
memcpy(p, " E=", 13);
}
@@ -4595,7 +4595,7 @@ index 8a6e97a..d1b2850 100644
return(res);
}
-@@ -511,22 +487,11 @@ xmlSecNssX509FindCert(CERTCertList* certsList, const xmlChar *subjectName,
+@@ -514,22 +490,11 @@ xmlSecNssX509FindCert(CERTCertList* certsList, const xmlChar *subjectName,
issuerAndSN.derIssuer.data = nameitem->data;
issuerAndSN.derIssuer.len = nameitem->len;
@@ -4621,7 +4621,7 @@ index 8a6e97a..d1b2850 100644
XMLSEC_ERRORS_R_XMLSEC_FAILED,
"error code=%d", PR_GetError());
SECITEM_FreeItem(&issuerAndSN.serialNumber, PR_FALSE);
-@@ -611,176 +576,6 @@ done:
+@@ -614,175 +579,6 @@ done:
return(cert);
}
@@ -4718,11 +4718,10 @@ index 8a6e97a..d1b2850 100644
- }
- memcpy(p, value, valueLen);
- p+=valueLen;
-- if (len > 0)
+- if (len > 0) {
- *p++=',';
+- }
- }
-- } else {
-- valueLen = 0;
- }
- if(len > 0) {
- ++str; --len;
@@ -4798,7 +4797,7 @@ index 8a6e97a..d1b2850 100644
/* code lifted from NSS */
static int
xmlSecNssNumToItem(SECItem *it, PRUint64 ui)
-@@ -817,6 +612,77 @@ xmlSecNssNumToItem(SECItem *it, PRUint64 ui)
+@@ -819,6 +615,77 @@ xmlSecNssNumToItem(SECItem *it, PRUint64 ui)
PORT_Memcpy(it->data, bb + (zeros_len - 1), it->len);
return(it->len);
}
@@ -4877,10 +4876,10 @@ index 8a6e97a..d1b2850 100644
diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc
-index 065595b..e0ac57e 100644
+index 51c53a7..525ae8d 100644
--- a/win32/Makefile.msvc
+++ b/win32/Makefile.msvc
-@@ -226,6 +226,9 @@ XMLSEC_OPENSSL_OBJS_A = \
+@@ -224,6 +224,9 @@ XMLSEC_OPENSSL_OBJS_A = \
$(XMLSEC_OPENSSL_INTDIR_A)\x509vfy.obj
XMLSEC_NSS_OBJS = \
@@ -4890,7 +4889,7 @@ index 065595b..e0ac57e 100644
$(XMLSEC_NSS_INTDIR)\app.obj\
$(XMLSEC_NSS_INTDIR)\bignum.obj\
$(XMLSEC_NSS_INTDIR)\ciphers.obj \
-@@ -261,6 +264,7 @@ XMLSEC_NSS_OBJS_A = \
+@@ -259,6 +262,7 @@ XMLSEC_NSS_OBJS_A = \
$(XMLSEC_NSS_INTDIR_A)\strings.obj
XMLSEC_MSCRYPTO_OBJS = \
@@ -4899,5 +4898,5 @@ index 065595b..e0ac57e 100644
$(XMLSEC_MSCRYPTO_INTDIR)\crypto.obj \
$(XMLSEC_MSCRYPTO_INTDIR)\ciphers.obj \
--
-2.6.2
+2.6.6