fixed compilation without OpenSSL

closes https://github.com/OpenSC/OpenSC/pull/1518
This commit is contained in:
Frank Morgner 2018-11-06 09:44:43 +01:00
parent f3a2962358
commit 2cb6f9c94f
3 changed files with 5 additions and 8 deletions

View File

@ -35,12 +35,6 @@ extern "C" {
#include <libopensc/types.h>
#include <common/libscdl.h>
#ifndef SHA_DIGEST_LENGTH
#define SHA_DIGEST_LENGTH 20
#define SHA1_DIGEST_LENGTH 20
#define SHA256_DIGEST_LENGTH 32
#endif
#define SM_TYPE_GP_SCP01 0x100
#define SM_TYPE_CWA14890 0x400
#define SM_TYPE_DH_RSA 0x500

View File

@ -27,9 +27,10 @@
#include "libopensc/cardctl.h"
#include "ui/notify.h"
#include "common/compat_strnlen.h"
#ifdef ENABLE_OPENSSL
#include <openssl/opensslv.h>
#include <openssl/sha.h>
#else
#define SHA_DIGEST_LENGTH 20
#endif
#include "sc-pkcs11.h"

View File

@ -32,6 +32,8 @@
#ifdef ENABLE_OPENSSL
#include <openssl/evp.h>
#else
#define ssl_error(a)
#endif
char eac_default_flags = 0;