forked from cisco/libest
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
106 lines (75 loc) · 3.83 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
This directory contains the libest project, which is an EST
stack written in C. EST is used for secure certificate
enrollment and is compatible with Suite B certs (as well as RSA
and DSA certificates). EST is a suitable replacement for SCEP.
Directory contents:
/src This directory contains the EST library. The
target built from this directory is libest.a.
/example This directory contains sample code for implementing
an application that uses the libEST library.
/test This directory contains unit test code to verify
the libest capabilities.
Getting started
---------------
1. ./configure; make ; make install
2. Descend into the example/server directory and run
the sample EST server. There is a README in this directory
with detailed instructions.
3. Descend into the example/client directory and run
the sample EST client. There is a README in this directory
with detailed instructions.
For further detailed instructions, build the reference manual PDF for
libEST and refer to it. Steps to build the reference manual are in
README.doxy
Getting started - Windows
--------------------------
libEST can be built natively on Windows, but only client
functionality has been explictly tested. libEST uses Gradle for Windows
build automation and the Visual Studio toolchain.
To build using Gradle you must have Visual Studio 2010, 2012, or 2013
and at least Gradle 2.12 on your system. Follow the steps below to
build an EST dll with Gradle:
1. Have OpenSSL built and installed on your Windows system
2. Set the following environment variables to tell the Gradle build script
where to find your installations of OpenSSL and EST
SSL_DIR - must contain an "include" subdirectory for the OpenSSL header files,
a "bin" subdirectory for the OpenSSL dll binaries, and a "lib" subdirectory
for the OpenSSL link files
set SSL_DIR=C:\PathToYourLibraryInstalls\OpenSSL
URIPARSER_DIR - Specify only if path segment support is required. Must contain
an "include" subdirectory for uriparser header files and a "lib"
subdirectory for the uriparser.lib static library file.
set URIPARSER_DIR=C:\PathToYourLibraryInstalls\uriparser
PATH - must contain the path to your Visual Studio 2010/2012/2013 VC bin directory
prior to any other Visual Studio bin directory and the path to
your Gradle executable (which should already be in PATH)
set PATH=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin;%PATH%
3. Invoke Gradle:
gradle estReleaseSharedLibrary
The est.dll binary and est.lib link file can then be found at the path below:
build\libs\est\shared\release
To see all build related tasks Gradle can perform for EST, type:
gradle tasks
Cross-compiling
---------------
It has been quite a while, but libEST has been cross-compiled for Android,
but no testing has been performed. Follow these steps to compile using the
Android NDK:
1. Compile and install OpenSSL for Android. See OpenSSL docs
for details.
2. Set the following environment variables to setup your cross-compile.
This assumes you've installed OpenSSL into /usr/local/OpenSSL-Android:
export CC=arm-linux-androideabi-gcc
export LDFLAGS=-L/usr/local/OpenSSL-Android/lib
export CFLAGS="-DDISABLE_BACKTRACE -DDISABLE_TSEARCH -DIS_FREEBSD"
**Note: you may not need all the CFLAGS values above depending
on your tool chain.
3. Configure libEST for cross-compiling and specify the location
of your OpenSSL build:
./configure --with-ssl-dir=/usr/local/OpenSSL-Android \
--host=arm-linux-androideabi \
--disable-shared --disable-pthreads \
--prefix=/var/android/libest
4. Compile and install:
make
make install