diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-08-22 09:49:25 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-08-23 20:39:39 +0200 |
commit | 4bc16aeb73c1201f187742e0fefe35521fae77ac (patch) | |
tree | c3324a63b842682ad53c1cb4fa7b2581c661e468 /sal/Library_sal.mk | |
parent | 229340812f6e6cc8c868915055583f60c82a8cf3 (diff) |
rhbz#1618703: Allow to use OpenSSL as backend for rtl/cipher.h
...with new configuration option --enable-cipher-openssl-backend
rtl/cipher.h (which is part of the stable URE interface) offers functionality to
en-/decrypt data with Blowfish in ECB, CBC, and streaming CFB mode, and with RC4
(aka ARCFOUR; which is a stream cipher). LO itself only uses Blowfish CFB and
RC4, so only those are wired to OpenSSL for now, for simplicity. Using Blowfish
ECB and CBC, or Blowfish CFB in DirectionBoth mode would cause failures for now
(cf. sal/qa/rtl/cipher/rtl_cipher.cxx); the assumption is that no external code
actually makes use of this functionality.
Using NSS instead of OpenSSL could be an alternative, but there appears to be no
support in NSS for Blowfish in streaming CFB mode, only CKM_BLOWFISH_CBC for
CBC mode.
Change-Id: I0bc042961539ed46844c96cb1c808209578528a0
Reviewed-on: https://gerrit.libreoffice.org/59428
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal/Library_sal.mk')
-rw-r--r-- | sal/Library_sal.mk | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk index 9d5822e36256..868d9f8dd23d 100644 --- a/sal/Library_sal.mk +++ b/sal/Library_sal.mk @@ -254,4 +254,12 @@ $(eval $(call gb_Library_add_exception_objects,sal,\ endif # ifneq ($(OS),WNT) +ifeq ($(ENABLE_CIPHER_OPENSSL_BACKEND),TRUE) +$(eval $(call gb_Library_add_defs,sal,-DLIBO_CIPHER_OPENSSL_BACKEND)) +$(eval $(call gb_Library_use_externals,sal, \ + openssl \ + openssl_headers \ +)) +endif + # vim: set noet sw=4 ts=4: |