Skip to content

Commit 117b793

Browse files
committed
Build the x509_acert openssl example against the right headers
1 parent 8aea08f commit 117b793

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

x509_acert/Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
CC = gcc
22

33
WOLFSSL_INSTALL_DIR = /usr/local
4-
OPENSSL_INSTALL_DIR = /usr/local
54

65
WOLFSSL_CFLAGS = -Werror -Wall -I$(WOLFSSL_INSTALL_DIR)/include -DUSE_WOLFSSL
76
WOLFSSL_LIBS = -L$(WOLFSSL_INSTALL_DIR)/lib -lm -lwolfssl
87

8+
# empty = system OpenSSL; pointing this at /usr/local would shadow openssl/*.h with wolfSSL's opensslextra compat headers
9+
OPENSSL_INSTALL_DIR ?=
10+
ifneq ($(OPENSSL_INSTALL_DIR),)
911
OPENSSL_CFLAGS = -Werror -Wall -I$(OPENSSL_INSTALL_DIR)/include
10-
OPENSSL_LIBS = -L$(OPENSSL_INSTALL_DIR)/lib64/ -lm -lssl -lcrypto
12+
OPENSSL_LIBS = -L$(OPENSSL_INSTALL_DIR)/lib -lm -lssl -lcrypto
13+
else
14+
OPENSSL_CFLAGS = -Werror -Wall
15+
OPENSSL_LIBS = -lm -lssl -lcrypto
16+
endif
1117

1218
DEBUG_FLAGS = -g -DDEBUG
1319

x509_acert/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ make wolfssl_acert
4444
Build the openssl example with:
4545

4646
```sh
47-
make wolfssl_acert
47+
make openssl_acert
4848
```
4949

5050
Note: you may need to use this script to set your environment
@@ -58,9 +58,9 @@ info: using env: /usr/local/lib64/:/usr/local/lib/
5858
### ACERT verification with pubkey
5959

6060
```sh
61-
$./wolfssl_acert -f acerts/acert.pem -k acerts/acert_pubkey.pem
62-
info: using acert file: acerts/acert.pem
63-
info: using pubkey file: acerts/acert_pubkey.pem
61+
$./wolfssl_acert -f certs/acert.pem -k certs/acert_pubkey.pem
62+
info: using acert file: certs/acert.pem
63+
info: using pubkey file: certs/acert_pubkey.pem
6464
info: PEM_read_bio_X509_ACERT: good
6565
info: acert version: 1
6666
info: PEM_read_bio_PUBKEY: good

0 commit comments

Comments
 (0)