Skip to content

Commit

Permalink
added ualpn mbedTLS implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ndilieto committed Apr 13, 2020
1 parent 0e2741b commit 21f2680
Show file tree
Hide file tree
Showing 7 changed files with 676 additions and 27 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ or, depending on your installation
```
uacme -v -s -c /path/to/uacme.d -h /usr/local/share/uacme/ualpn.sh issue www.your.domain.com
```
Note: currently **ualpn** requires building with GnuTLS or OpenSSL. Future mbedTLS support is planned.

## Documentation

Expand Down
11 changes: 2 additions & 9 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,7 @@ Optional Packages:
--without-openssl build without OpenSSL
--with-gnutls[=PATH] build with GnuTLS, PATH is installation root
--without-gnutls build without GnuTLS
--with-ualpn enable ualpn (not supported with mbedTLS)
--with-ualpn enable ualpn
--without-ualpn disable ualpn
Some influential environment variables:
Expand Down Expand Up @@ -6835,11 +6835,7 @@ $as_echo "$as_me: detected mbedTLS" >&6;}
fi
fi
if test "x$OPT_GNUTLS" != "xno" -o "x$OPT_OPENSSL" != "xno"; then
OPT_UALPN=yes
else
OPT_UALPN=no
fi
OPT_UALPN=yes
# Check whether --with-ualpn was given.
if test "${with_ualpn+set}" = set; then :
Expand All @@ -6848,9 +6844,6 @@ fi
if test "x$OPT_UALPN" != "xno"; then
if test "x$USE_GNUTLS" != "xyes" -a "x$USE_OPENSSL" != "xyes"; then
as_fn_error $? "ualpn requires GnuTLS or OpenSSL" "$LINENO" 5
fi
if test -n "$ac_tool_prefix"; then
for ac_prog in ar lib "link -lib"
do
Expand Down
11 changes: 2 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -315,19 +315,12 @@ if test "x$OPT_MBEDTLS" != "xno"; then
fi
fi

if test "x$OPT_GNUTLS" != "xno" -o "x$OPT_OPENSSL" != "xno"; then
OPT_UALPN=yes
else
OPT_UALPN=no
fi
OPT_UALPN=yes
AC_ARG_WITH(ualpn,
[AS_HELP_STRING([--with-ualpn], [enable ualpn (not supported with mbedTLS)])
[AS_HELP_STRING([--with-ualpn], [enable ualpn])
AS_HELP_STRING([--without-ualpn], [disable ualpn])], OPT_UALPN=$withval)

if test "x$OPT_UALPN" != "xno"; then
if test "x$USE_GNUTLS" != "xyes" -a "x$USE_OPENSSL" != "xyes"; then
AC_MSG_ERROR([ualpn requires GnuTLS or OpenSSL])
fi
AM_PROG_AR
AC_CHECK_HEADERS([sys/mman.h], [],
AC_MSG_ERROR([ualpn requires sys/mman.h]))
Expand Down
4 changes: 2 additions & 2 deletions docs/ualpn.html
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ <h2 id="_options">OPTIONS</h2>
</li>
<li>
<p>
apache: <a href="https://httpd.apache.org/docs/2.4/mod/mod_remoteip.html">https://httpd.apache.org/docs/2.4/mod/mod_remoteip.html</a>
apache: <a href="https://httpd.apache.org/docs/2.4/mod/mod_remoteip.html#remoteipproxyprotocol">https://httpd.apache.org/docs/2.4/mod/mod_remoteip.html#remoteipproxyprotocol</a>
</p>
</li>
</ul></div>
Expand Down Expand Up @@ -1188,7 +1188,7 @@ <h2 id="_copyright">COPYRIGHT</h2>
<div id="footer-text">
Version 1.1.2-dev<br>
Last updated
2020-03-14 08:10:42 CET
2020-04-13 23:41:56 CEST
</div>
</div>
</body>
Expand Down
6 changes: 3 additions & 3 deletions ualpn.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.\" Title: ualpn
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 03/29/2020
.\" Date: 04/13/2020
.\" Manual: User Commands
.\" Source: ualpn 1.1.2-dev
.\" Language: English
.\"
.TH "UALPN" "1" "03/29/2020" "ualpn 1\&.1\&.2\-dev" "User Commands"
.TH "UALPN" "1" "04/13/2020" "ualpn 1\&.1\&.2\-dev" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
Expand Down Expand Up @@ -155,7 +155,7 @@ https://docs\&.nginx\&.com/nginx/admin\-guide/load\-balancer/using\-proxy\-proto
.IP \(bu 2.3
.\}
apache:
https://httpd\&.apache\&.org/docs/2\&.4/mod/mod_remoteip\&.html
https://httpd\&.apache\&.org/docs/2\&.4/mod/mod_remoteip\&.html#remoteipproxyprotocol
.RE
.RE
.PP
Expand Down
2 changes: 1 addition & 1 deletion ualpn.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ OPTIONS
Enable server mode and disable (0) or specify (1, 2) the PROXY header
version (default 1). The backend server needs to be configured accordingly:
* nginx: <https://docs.nginx.com/nginx/admin-guide/load-balancer/using-proxy-protocol>
* apache: <https://httpd.apache.org/docs/2.4/mod/mod_remoteip.html>
* apache: <https://httpd.apache.org/docs/2.4/mod/mod_remoteip.html#remoteipproxyprotocol>

*-P, --pidfile* 'file'::
Specify pidfile location (default {runstatedir}/ualpn.pid)
Expand Down
Loading

0 comments on commit 21f2680

Please sign in to comment.