Files
libcoap/HOWTO.dual.openssl
T
Jon Shallow 9443d9034a PKCS11: Add in PKCS11 support for PKI
Add in a new PKI_KEY type for PKCS11 URI to get the PKI information from a
smart card or HSM device.

Currently only OpenSSL and GnuTLS are supported.

Makefile.am:

Do not expose coap_dtls_shutdown() function.

examples/client.c:
examples/coap-server.c:

Add in support for using pkcs11: URIs for defining the Certificates and
Private Keys.

include/coap2/coap_dtls.h:

Add in COAP_PKI_KEY_PKCS11 Key type.

man/coap-client.txt.in:
man/coap-server.txt.in:

Update documentation for supporting PKCS11.

man/coap_encryption.txt.in:

Add in documentation for COAP_PKI_KEY_PKCS11.
Correct some typos.

HOWTO.dual.gnutls (new):
HOWTO.dual.openssl (new):
HOWTO.dual.softhsm2 (new):
HOWTO.pkcs11 (new):

HowTo information.

src/coap_gnutls.c:
src/coap_openssl.c:

Add in PKCS11 support.

src/coap_mbedtls.c:

PKCS11 not yet supported.
Add in no-op coap_dtls_shutdown() function.

src/coap_notls.c:
src/coap_tinydtls.c:

Add in no-op coap_dtls_shutdown() function.

src/net.c:

Invoke coap_dtls_shutdown() function in coap_cleanup().

NOTE: There are memory leaks after cleanly closing down.  These are not within
libcoap as far as can be determined.  These leaks are a work in progress.
2020-07-07 09:15:58 +01:00

51 lines
1.6 KiB
Plaintext

############################################################################
#
# OpenSSL dual versions
#
# Works with CentOS 7
#
############################################################################
#
# Add in alternative OpenSSL support into /opt/openssl. /opt/openssl is
# chosen instead of the default of /usr/local so that existing utilities
# continue to use the original version of OpenSSL and so only specific
# applications that requires the newer version of OpenSSL will pick up the
# new code.
#
# Download latest stable version of openssl.X.Y.Z.tar.gz from
# https://www.openssl.org/source/
tar zxovf openssl.X.Y.Z.tar.gz
cd openssl.X.Y.X
./config --prefix=/opt/openssl --openssldir=/opt/openssl
make
sudo make install_sw
# The following should not clash the existing OpenSSL lib*.so.1.0 usage unless
# the previous OpenSSL version is 1.1.0 or later.
# It just makes things for running executables a lot simpler.
sudo cp /opt/openssl/lib/lib*.so.1.1 /lib64
cd ..
############################################################################
#
# libcoap build with updated OpenSSL
#
############################################################################
# Get the latest libcoap
git clone https://github.com/obgm/libcoap.git
# Build code
cd libcoap
./autogen.sh
# Update --enable- / --disable- options as appropriate
# libcoap libraries are put into /usr/lib64 for ease of linking
PKG_CONFIG_PATH=/opt/openssl/lib/pkgconfig ./configure --libdir=/usr/lib64 \
--with-openssl --enable-tests --enable-examples --disable-doxygen \
--disable-manpages
make
sudo make install
cd ..