doc/build-netpgp.md
branchENGINE-237
changeset 2018 479c39e0c729
parent 2014 4b6659d17b61
child 2039 b88e62c9ea72
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/doc/build-netpgp.md	Tue Aug 29 16:11:21 2017 +0200
     1.3 @@ -0,0 +1,35 @@
     1.4 +# Using NetPGP instead of GnuPG
     1.5 +## Prepare
     1.6 +
     1.7 +Get OpenSSL and build/install it as shared library.
     1.8 +
     1.9 +```
    1.10 +wget https://www.openssl.org/source/old/1.0.1/openssl-1.0.1u.tar.gz
    1.11 +tar xvfz openssl-1.0.1u.tar.gz
    1.12 +cd openssl-1.0.1u
    1.13 +./Configure darwin64-x86_64-cc --prefix=$HOME shared
    1.14 +make install
    1.15 +```
    1.16 +
    1.17 +Get and autoconf NetPGP
    1.18 +
    1.19 +```
    1.20 +cd $SRC
    1.21 +hg clone https://cacert.pep.foundation/dev/repos/netpgp-et/
    1.22 +cd netpgp-et
    1.23 +autoreconf -i
    1.24 +```
    1.25 +
    1.26 +## Build
    1.27 +
    1.28 +Important : LDFLAGS is set to help finding OpenSSL shared lib. If not set,
    1.29 +system's default libcrypto may silently be used instead, causing memory
    1.30 +corruption or crash at runtime.
    1.31 +
    1.32 +```
    1.33 +mkdir netpgp_debug
    1.34 +cd netpgp_debug
    1.35 +$SRC/netpgp-et/configure --with-openssl=$HOME --prefix=$HOME CPPFLAGS=-DDEBUG CXXFLAGS="-g -O0" LDFLAGS="-L${HOME}/lib"
    1.36 +make
    1.37 +make install
    1.38 +```