Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force static linking for libraries when --enable-static-linking is specified on Windows (MinGW/Cygwin) #680

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/make-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ name: Make Check

on:
push:
branches: [ master ]
branches:
- master
- xmlsec-1_2_x
pull_request:
branches: [ master ]
branches:
- master
- xmlsec-1_2_x

jobs:
check-ubuntu-openssl300:
Expand Down
7 changes: 5 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT([xmlsec1],[1.2.36],[http://www.aleksey.com/xmlsec])
AC_INIT([xmlsec1],[1.2.37],[http://www.aleksey.com/xmlsec])

XMLSEC_PACKAGE=xmlsec1
XMLSEC_VERSION_MAJOR=1
XMLSEC_VERSION_MINOR=2
XMLSEC_VERSION_SUBMINOR=36
XMLSEC_VERSION_SUBMINOR=37
XMLSEC_VERSION="$XMLSEC_VERSION_MAJOR.$XMLSEC_VERSION_MINOR.$XMLSEC_VERSION_SUBMINOR"
XMLSEC_VERSION_INFO=`echo $XMLSEC_VERSION | awk -F. '{ printf "%d:%d:%d", $1+$2, $3, $2 }'`
XMLSEC_VERSION_SAFE=`echo $XMLSEC_VERSION | sed 's/\./_/g'`
Expand Down Expand Up @@ -2224,6 +2224,9 @@ AC_MSG_CHECKING(for static linking)
AC_ARG_ENABLE([static_linking], [AS_HELP_STRING([--enable-static-linking],[enable static linking (no)])])
if test "z$enable_static_linking" = "zyes" -o "z$enable_static_linking" = "ztrue" ; then
XMLSEC_STATIC_BINARIES="-static"
if test "z$build_on_windows" = "zyes" ; then
XMLSEC_DEFINES="$XMLSEC_DEFINES -DXMLSEC_STATIC=1"
fi
XMLSEC_APP_DEFINES="$XMLSEC_APP_DEFINES -DXMLSEC_STATIC=1"
enable_crypto_dl="no"
AC_MSG_RESULT([yes])
Expand Down
6 changes: 3 additions & 3 deletions docs/api/xmlsec-version.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ <h2><span class="refentrytitle"><a name="xmlsec-version.top_of_page"></a>version
<a name="xmlsec-version.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="XMLSEC-VERSION:CAPS"></a><h3>XMLSEC_VERSION</h3>
<pre class="programlisting">#define XMLSEC_VERSION "1.2.36"
<pre class="programlisting">#define XMLSEC_VERSION "1.2.37"
</pre>
<p>The library version string in the format
"$major_number.$minor_number.$sub_minor_number".</p>
Expand All @@ -100,14 +100,14 @@ <h2><span class="refentrytitle"><a name="xmlsec-version.top_of_page"></a>version
<hr>
<div class="refsect2">
<a name="XMLSEC-VERSION-SUBMINOR:CAPS"></a><h3>XMLSEC_VERSION_SUBMINOR</h3>
<pre class="programlisting">#define XMLSEC_VERSION_SUBMINOR 36
<pre class="programlisting">#define XMLSEC_VERSION_SUBMINOR 37
</pre>
<p>The library sub-minor version number.</p>
</div>
<hr>
<div class="refsect2">
<a name="XMLSEC-VERSION-INFO:CAPS"></a><h3>XMLSEC_VERSION_INFO</h3>
<pre class="programlisting">#define XMLSEC_VERSION_INFO "3:36:2"
<pre class="programlisting">#define XMLSEC_VERSION_INFO "3:37:2"
</pre>
<p>The library version info string in the format
"$major_number+$minor_number:$sub_minor_number:$minor_number".</p>
Expand Down
2 changes: 0 additions & 2 deletions docs/bugs.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,13 @@
by any information distribution using XMLSec GitHub issues tracker, discussions,
source code, or any other XMLSec related tools.</p>

<p>
<div align="center">
<a href="http://www.google.com"><img src="images/bart.gif" alt="Ask google" border="0"></a>
</div>
<small>Unfortunatelly, I don't know the author of this picture and I was not
able to ask permissions to publish it. If you are the author or know
the author then I would appreciate if you send me a message on GitHub so I can ask
permissions and put author's name here.</small>
</p>
</td></tr></table></td>
</tr></table></body>
</html>
8 changes: 4 additions & 4 deletions docs/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
<h1>Download</h1>
</div>
<h2>Stable releases.</h2>
<p>The latest stable XML Security Library version is <b>1.2.36</b>:</p>
<p>The latest stable XML Security Library version is <b>1.2.37</b>:</p>
<ul>
<li>
<a href="http://www.aleksey.com/xmlsec/download/xmlsec1-1.2.36.tar.gz">Sources for latest version</a>.</li>
<a href="http://www.aleksey.com/xmlsec/download/xmlsec1-1.2.37.tar.gz">Sources for latest version</a>.</li>
<li>
<a href="http://www.zlatkovic.com/projects/libxml/index.html">Windows binaries</a> for XMLSec Library
(as well as LibXML2, LibXSLT and OpenSSL) from <a href="mailto:[email protected]">Igor Zlatkovic</a>.</li>
Expand Down Expand Up @@ -90,10 +90,10 @@ <h2>GIT</h2>
<p>XML Security Library is available from the <a href="https://github.com/lsh123/xmlsec">GitHub</a>.
</p>
<h2>Other languages</h2>
<p><ul>
<ul>
<li><a href="https://github.com/mehcode/python-xmlsec">Python xmlsec module</a></li>
<li><a href="https://github.com/estrelow/Perl-LibXML-Sec">Perl LibXML-Sec module</a></li>
</ul></p>
</ul>
</td></tr></table></td>
</tr></table></body>
</html>
8 changes: 8 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ <h1>XML Security Library</h1>
see the Copyright file in the distribution for details.<br><br></p>
<p><b>News</b></p>
<ul>
<li>November 30 2022<br>
The <a href="download.html">XML Security Library 1.2.37</a> release includes the following changes:
<ul>
<li>Fixed two regressions from 1.2.36 release: <a href="https://github.com/lsh123/xmlsec/issues/437">issue #437</a>
and <a href="https://github.com/lsh123/xmlsec/issues/449">issue #449</a>.</li>
</ul>
</li>
<br>
<li>October 31 2022<br>
The <a href="download.html">XML Security Library 1.2.36</a> release includes the following changes:
<ul>
Expand Down
8 changes: 8 additions & 0 deletions docs/news.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@
<h1>XML Security Library News</h1>
</div>
<ul>
<li>November 30 2022<br>
The <a href="download.html">XML Security Library 1.2.37</a> release includes the following changes:
<ul>
<li>Fixed two regressions from 1.2.36 release: <a href="https://github.com/lsh123/xmlsec/issues/437">issue #437</a>
and <a href="https://github.com/lsh123/xmlsec/issues/449">issue #449</a>.</li>
</ul>
</li>
<br>
<li>October 31 2022<br>
The <a href="download.html">XML Security Library 1.2.36</a> release includes the following changes:
<ul>
Expand Down
2 changes: 0 additions & 2 deletions docs/xmldsig.html
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,6 @@ <h4 style="text-align: center;">Other algorithms</h4>
<td valign="top">N</td>
<td valign="top">Y<a href="#gost-mscrypto"><sup>(2)</sup></a>
<td valign="top">N</td>
</td>
</tr>
<tr>
<td style="vertical-align: top; width: 40%;">GOST2001 signatures</td>
Expand All @@ -691,7 +690,6 @@ <h4 style="text-align: center;">Other algorithms</h4>
<td valign="top">N</td>
<td valign="top">Y<a href="#gost-mscrypto"><sup>(2)</sup></a>
<td valign="top">N</td>
</td>
</tr>
</tbody></table>
<br><br><a name="dsa-sha1"></a><sup>(1)</sup> Defining <a href="http://www.w3.org/TR/xmldsig-core/#sec-DSAKeyValue"> DSA key</a>
Expand Down
4 changes: 2 additions & 2 deletions include/xmlsec/exports.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ extern "C" {
# if !defined(XMLSEC_STATIC)
# define XMLSEC_EXPORT __declspec(dllimport)
# else
# define XMLSEC_EXPORT
# define XMLSEC_EXPORT extern
# endif
# endif /* defined(IN_XMLSEC) */
/* This holds on all other platforms/compilers, which are easier to
Expand All @@ -71,7 +71,7 @@ extern "C" {
# if !defined(XMLSEC_STATIC)
# define XMLSEC_CRYPTO_EXPORT __declspec(dllimport)
# else
# define XMLSEC_CRYPTO_EXPORT
# define XMLSEC_CRYPTO_EXPORT extern
# endif
# endif /* defined(IN_XMLSEC_CRYPTO) */
/* This holds on all other platforms/compilers, which are easier to
Expand Down
2 changes: 1 addition & 1 deletion man/xmlsec1-config.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
.TH XMLSEC1-CONFIG "1" "October 2022" "xmlsec1-config 1.2.36" "User Commands"
.TH XMLSEC1-CONFIG "1" "November 2022" "xmlsec1-config 1.2.37" "User Commands"
.SH NAME
xmlsec1-config \- detail installed version of xmlsec library
.SH SYNOPSIS
Expand Down
2 changes: 1 addition & 1 deletion man/xmlsec1.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
.TH XMLSEC1 "1" "October 2022" "xmlsec1 1.2.36 (openssl)" "User Commands"
.TH XMLSEC1 "1" "November 2022" "xmlsec1 1.2.37 (openssl)" "User Commands"
.SH NAME
xmlsec1 \- sign, verify, encrypt and decrypt XML documents
.SH SYNOPSIS
Expand Down
18 changes: 18 additions & 0 deletions scripts/build_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

# config
configure_options=""
configure_options="$configure_options --enable-static-linking --enable-crypto-dl=no"
configure_options="$configure_options --enable-manpages-build --enable-docs-build"
configure_options="$configure_options --enable-md5 --enable-ripemd160"
cur_pwd=`pwd`
today=`date +%F-%H-%M-%S`

echo "============= Building xmlsec"
make distclean
./autogen.sh $configure_options
make

echo "============== Cleanup"
cd "$cur_pwd"

4 changes: 4 additions & 0 deletions scripts/build_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ tar_file="xmlsec1-$version.tar.gz"
sig_file="xmlsec1-$version.sig"
rc_tar_file="xmlsec1-$version-$rc.tar.gz"
rc_sig_file="xmlsec1-$version-$rc.sig"
git_1_2_x_branch="xmlsec-1_2_x"
git_release_branch=`echo "xmlsec-$version" | sed 's/\./_/g'`
git_version_tag=`echo $version | sed 's/\./_/g'`

Expand All @@ -36,6 +37,9 @@ cd xmlsec
if [ x"$rc" != x ]; then
echo "============== Switching to release branch '$git_release_branch' for RC build '$rc'"
git checkout $git_release_branch
else
echo "============== Switching to 1.2.x branch '$git_1_2_x_branch'"
git checkout $git_1_2_x_branch
fi
find . -name ".git" | xargs rm -r

Expand Down
23 changes: 23 additions & 0 deletions scripts/check-return.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/perl
#
# Usage:
# egrep -r -A8 -n 'xmlSec.*Error[0-9]?\(' ./src/ | sed 's/ //g' | perl ./scripts/check-return.pl
#

my $has_return = 0;
my $where = "";
foreach my $line ( <STDIN> ) {
chomp( $line );
if($line eq "--" || $line eq '}' || $line eq 'continue' || $line eq 'break') {
if(not $has_return) {
print("FOUND MISSING RETURN: $where\n");
}
$has_return = 0;
$where = "";
} elsif($line =~ /.*Error.*/ && $where eq "") {
# print("Found error: $line\n");
$where = $line
} elsif($line =~ /.*goto.*/ || $line =~ /.*return.*/ || $line =~ /.*ignoreerror.*/) {
$has_return = 1;
}
}
3 changes: 3 additions & 0 deletions src/dl.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ xmlSecCryptoDLLibraryDestroy(xmlSecCryptoDLLibraryPtr lib) {
ret = lt_dlclose(lib->handle);
if(ret != 0) {
xmlSecIOError("lt_dlclose", NULL, NULL);
/* ignore error */
}
}
#endif /* XMLSEC_DL_LIBLTDL */
Expand All @@ -234,6 +235,7 @@ xmlSecCryptoDLLibraryDestroy(xmlSecCryptoDLLibraryPtr lib) {
res = FreeLibrary(lib->handle);
if(!res) {
xmlSecIOError("FreeLibrary", NULL, NULL);
/* ignore error */
}
}
#endif /* defined(XMLSEC_WINDOWS) && defined(XMLSEC_DL_WIN32)*/
Expand Down Expand Up @@ -395,6 +397,7 @@ xmlSecCryptoDLShutdown(void) {
ret = lt_dlexit ();
if(ret != 0) {
xmlSecIOError("lt_dlexit", NULL, NULL);
/* ignore error */
}
#else /* XMLSEC_DL_LIBLTDL */
UNREFERENCED_PARAMETER(ret);
Expand Down
10 changes: 5 additions & 5 deletions src/gcrypt/signatures.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,16 +388,16 @@ xmlSecGCryptPkSignatureVerify(xmlSecTransformPtr transform,
}

/* check result */
if(ret == 1) {
transform->status = xmlSecTransformStatusOk;
} else {
if(ret != 1) {
xmlSecOtherError(XMLSEC_ERRORS_R_DATA_NOT_MATCH,
xmlSecTransformGetName(transform),
"ctx->verify: signature does not verify");
"ctx->verify: signature verification failed");
transform->status = xmlSecTransformStatusFail;
return(0);
}

/* done */
/* success */
transform->status = xmlSecTransformStatusOk;
return(0);
}

Expand Down
Loading