README.md
1# OpenSSL bindings for Go
2
3Please see http://godoc.org/github.com/spacemonkeygo/openssl for more info
4
5### License
6
7Copyright (C) 2017. See AUTHORS.
8
9Licensed under the Apache License, Version 2.0 (the "License");
10you may not use this file except in compliance with the License.
11You may obtain a copy of the License at
12
13 http://www.apache.org/licenses/LICENSE-2.0
14
15Unless required by applicable law or agreed to in writing, software
16distributed under the License is distributed on an "AS IS" BASIS,
17WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18See the License for the specific language governing permissions and
19limitations under the License.
20
21### Installing on a Unix-ish system with pkg-config
22
231. (If necessary) install the openssl C library with a package manager
24 that provides an openssl.pc file OR install openssl manually and create
25 an openssl.pc file.
26
272. Ensure that `pkg-config --cflags --libs openssl` finds your openssl
28 library. If it doesn't, try setting `PKG_CONFIG_PATH` to the directory
29 containing your openssl.pc file. E.g. for darwin: with MacPorts,
30 `PKG_CONFIG_PATH=/opt/local/lib/pkgconfig` or for Homebrew,
31 `PKG_CONFIG_PATH=/usr/local/Cellar/openssl/1.0.2l/lib/pkgconfig`
32
33### Installing on a Unix-ish system without pkg-config
34
351. (If necessary) install the openssl C library in your customary way
36
372. Set the `CGO_CPP_FLAGS`, `CGO_CFLAGS` and `CGO_LDFLAGS` as necessary to
38 provide `-I`, `-L` and other options to the compiler. E.g. on darwin,
39 MongoDB's darwin build servers use the native libssl, but provide the
40 missing headers in a custom directory, so it the build hosts set
41 `CGO_CPPFLAGS=-I/opt/mongodbtoolchain/v2/include`
42
43### Installing on Windows
44
451. Install [mingw-w64](http://mingw-w64.sourceforge.net/) and add it to
46 your `PATH`
47
482. Install the C openssl into `C:\openssl`. (Unfortunately, this is still
49 hard-coded.) You should have directories like `C:\openssl\include` and
50 `C:\openssl\bin`.
51