summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2020-01-22 23:11:58 +0800
committerSebastian Rasmussen <sebras@gmail.com>2020-01-24 00:00:54 +0800
commit8b79cf2ead21053ae7e0875dba6e1e9b24624467 (patch)
treef443ac9d6e75eddb5a502d4acbb9e119df4fbd0f
parent64741c1dc4ba8729392ed74fa53d253bc9759bc5 (diff)
Add workaround for libressl missing new openssl APIs.
If supporting libressl is trivial, then mupdf should support it. Should libressl and openssl diverge too much, we might need to reconsider this decision.
-rw-r--r--source/helpers/pkcs7/pkcs7-openssl.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/helpers/pkcs7/pkcs7-openssl.c b/source/helpers/pkcs7/pkcs7-openssl.c
index 5856721ea..4875bb534 100644
--- a/source/helpers/pkcs7/pkcs7-openssl.c
+++ b/source/helpers/pkcs7/pkcs7-openssl.c
@@ -116,6 +116,22 @@ static const char AdobeCA_p7c[] = {
116#warning detect version of openssl at compile time 116#warning detect version of openssl at compile time
117#endif 117#endif
118 118
119#ifdef LIBRESSL_VERSION_NUMBER
120
121static inline const STACK_OF(PKCS12_SAFEBAG) *
122PKCS12_SAFEBAG_get0_safes(const PKCS12_SAFEBAG *bag)
123{
124 return (OBJ_obj2nid(bag->type) == NID_safeContentsBag) ? bag->value.safes : NULL;
125}
126
127static inline const PKCS8_PRIV_KEY_INFO *
128PKCS12_SAFEBAG_get0_p8inf(const PKCS12_SAFEBAG *bag)
129{
130 return (OBJ_obj2nid(bag->type) == NID_keyBag) ? bag->value.keybag : NULL;
131}
132
133#endif
134
119typedef struct 135typedef struct
120{ 136{
121 fz_context *ctx; 137 fz_context *ctx;