2
0

INSTALL 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965
  1. OPENSSL INSTALLATION
  2. --------------------
  3. This document describes installation on all supported operating
  4. systems (the Unix/Linux family (which includes Mac OS/X), OpenVMS,
  5. and Windows).
  6. To install OpenSSL, you will need:
  7. * A make implementation
  8. * Perl 5 with core modules (please read NOTES.PERL)
  9. * The perl module Text::Template (please read NOTES.PERL)
  10. * an ANSI C compiler
  11. * a development environment in the form of development libraries and C
  12. header files
  13. * a supported operating system
  14. For additional platform specific requirements, solutions to specific
  15. issues and other details, please read one of these:
  16. * NOTES.UNIX (any supported Unix like system)
  17. * NOTES.VMS (OpenVMS)
  18. * NOTES.WIN (any supported Windows)
  19. * NOTES.DJGPP (DOS platform with DJGPP)
  20. Notational conventions in this document
  21. ---------------------------------------
  22. Throughout this document, we use the following conventions in command
  23. examples:
  24. $ command Any line starting with a dollar sign
  25. ($) is a command line.
  26. { word1 | word2 | word3 } This denotes a mandatory choice, to be
  27. replaced with one of the given words.
  28. A simple example would be this:
  29. $ echo { FOO | BAR | COOKIE }
  30. which is to be understood as one of
  31. these:
  32. $ echo FOO
  33. - or -
  34. $ echo BAR
  35. - or -
  36. $ echo COOKIE
  37. [ word1 | word2 | word3 ] Similar to { word1 | word2 | word3 }
  38. except it's optional to give any of
  39. those. In addition to the examples
  40. above, this would also be valid:
  41. $ echo
  42. {{ target }} This denotes a mandatory word or
  43. sequence of words of some sort. A
  44. simple example would be this:
  45. $ type {{ filename }}
  46. which is to be understood to use the
  47. command 'type' on some file name
  48. determined by the user.
  49. [[ options ]] Similar to {{ target }}, but is
  50. optional.
  51. Note that the notation assumes spaces around {, }, [, ], {{, }} and
  52. [[, ]]. This is to differentiate from OpenVMS directory
  53. specifications, which also use [ and ], but without spaces.
  54. Quick Start
  55. -----------
  56. If you want to just get on with it, do:
  57. on Unix (again, this includes Mac OS/X):
  58. $ ./config
  59. $ make
  60. $ make test
  61. $ make install
  62. on OpenVMS:
  63. $ @config
  64. $ mms
  65. $ mms test
  66. $ mms install
  67. on Windows (only pick one of the targets for configuration):
  68. $ perl Configure { VC-WIN32 | VC-WIN64A | VC-WIN64I | VC-CE }
  69. $ nmake
  70. $ nmake test
  71. $ nmake install
  72. If any of these steps fails, see section Installation in Detail below.
  73. This will build and install OpenSSL in the default location, which is:
  74. Unix: normal installation directories under /usr/local
  75. OpenVMS: SYS$COMMON:[OPENSSL-'version'...], where 'version' is the
  76. OpenSSL version number with underscores instead of periods.
  77. Windows: C:\Program Files\OpenSSL or C:\Program Files (x86)\OpenSSL
  78. If you want to install it anywhere else, run config like this:
  79. On Unix:
  80. $ ./config --prefix=/opt/openssl --openssldir=/usr/local/ssl
  81. On OpenVMS:
  82. $ @config --prefix=PROGRAM:[INSTALLS] --openssldir=SYS$MANAGER:[OPENSSL]
  83. (Note: if you do add options to the configuration command, please make sure
  84. you've read more than just this Quick Start, such as relevant NOTES.* files,
  85. the options outline below, as configuration options may change the outcome
  86. in otherwise unexpected ways)
  87. Configuration Options
  88. ---------------------
  89. There are several options to ./config (or ./Configure) to customize
  90. the build (note that for Windows, the defaults for --prefix and
  91. --openssldir depend in what configuration is used and what Windows
  92. implementation OpenSSL is built on. More notes on this in NOTES.WIN):
  93. --api=x.y.z
  94. Don't build with support for deprecated APIs below the
  95. specified version number. For example "--api=1.1.0" will
  96. remove support for all APIS that were deprecated in OpenSSL
  97. version 1.1.0 or below.
  98. --cross-compile-prefix=PREFIX
  99. The PREFIX to include in front of commands for your
  100. toolchain. It's likely to have to end with dash, e.g.
  101. a-b-c- would invoke GNU compiler as a-b-c-gcc, etc.
  102. Unfortunately cross-compiling is too case-specific to
  103. put together one-size-fits-all instructions. You might
  104. have to pass more flags or set up environment variables
  105. to actually make it work. Android and iOS cases are
  106. discussed in corresponding Configurations/10-main.cf
  107. sections. But there are cases when this option alone is
  108. sufficient. For example to build the mingw64 target on
  109. Linux "--cross-compile-prefix=x86_64-w64-mingw32-"
  110. works. Naturally provided that mingw packages are
  111. installed. Today Debian and Ubuntu users have option to
  112. install a number of prepackaged cross-compilers along
  113. with corresponding run-time and development packages for
  114. "alien" hardware. To give another example
  115. "--cross-compile-prefix=mipsel-linux-gnu-" suffices
  116. in such case. Needless to mention that you have to
  117. invoke ./Configure, not ./config, and pass your target
  118. name explicitly.
  119. --debug
  120. Build OpenSSL with debugging symbols.
  121. --libdir=DIR
  122. The name of the directory under the top of the installation
  123. directory tree (see the --prefix option) where libraries will
  124. be installed. By default this is "lib". Note that on Windows
  125. only ".lib" files will be stored in this location. dll files
  126. will always be installed to the "bin" directory.
  127. --openssldir=DIR
  128. Directory for OpenSSL configuration files, and also the
  129. default certificate and key store. Defaults are:
  130. Unix: /usr/local/ssl
  131. Windows: C:\Program Files\Common Files\SSL
  132. or C:\Program Files (x86)\Common Files\SSL
  133. OpenVMS: SYS$COMMON:[OPENSSL-COMMON]
  134. --prefix=DIR
  135. The top of the installation directory tree. Defaults are:
  136. Unix: /usr/local
  137. Windows: C:\Program Files\OpenSSL
  138. or C:\Program Files (x86)\OpenSSL
  139. OpenVMS: SYS$COMMON:[OPENSSL-'version']
  140. --release
  141. Build OpenSSL without debugging symbols. This is the default.
  142. --strict-warnings
  143. This is a developer flag that switches on various compiler
  144. options recommended for OpenSSL development. It only works
  145. when using gcc or clang as the compiler. If you are
  146. developing a patch for OpenSSL then it is recommended that
  147. you use this option where possible.
  148. --with-zlib-include=DIR
  149. The directory for the location of the zlib include file. This
  150. option is only necessary if enable-zlib (see below) is used
  151. and the include file is not already on the system include
  152. path.
  153. --with-zlib-lib=LIB
  154. On Unix: this is the directory containing the zlib library.
  155. If not provided the system library path will be used.
  156. On Windows: this is the filename of the zlib library (with or
  157. without a path). This flag must be provided if the
  158. zlib-dynamic option is not also used. If zlib-dynamic is used
  159. then this flag is optional and a default value ("ZLIB1") is
  160. used if not provided.
  161. On VMS: this is the filename of the zlib library (with or
  162. without a path). This flag is optional and if not provided
  163. then "GNV$LIBZSHR", "GNV$LIBZSHR32" or "GNV$LIBZSHR64" is
  164. used by default depending on the pointer size chosen.
  165. no-afalgeng
  166. Don't build the AFALG engine. This option will be forced if
  167. on a platform that does not support AFALG.
  168. enable-asan
  169. Build with the Address sanitiser. This is a developer option
  170. only. It may not work on all platforms and should never be
  171. used in production environments. It will only work when used
  172. with gcc or clang and should be used in conjunction with the
  173. no-shared option.
  174. no-asm
  175. Do not use assembler code. On some platforms a small amount
  176. of assembler code may still be used.
  177. no-async
  178. Do not build support for async operations.
  179. no-autoalginit
  180. Don't automatically load all supported ciphers and digests.
  181. Typically OpenSSL will make available all of its supported
  182. ciphers and digests. For a statically linked application this
  183. may be undesirable if small executable size is an objective.
  184. This only affects libcrypto. Ciphers and digests will have to
  185. be loaded manually using EVP_add_cipher() and
  186. EVP_add_digest() if this option is used. This option will
  187. force a non-shared build.
  188. no-autoerrinit
  189. Don't automatically load all libcrypto/libssl error strings.
  190. Typically OpenSSL will automatically load human readable
  191. error strings. For a statically linked application this may
  192. be undesirable if small executable size is an objective.
  193. no-capieng
  194. Don't build the CAPI engine. This option will be forced if
  195. on a platform that does not support CAPI.
  196. no-cms
  197. Don't build support for CMS features
  198. no-comp
  199. Don't build support for SSL/TLS compression. If this option
  200. is left enabled (the default), then compression will only
  201. work if the zlib or zlib-dynamic options are also chosen.
  202. enable-crypto-mdebug
  203. Build support for debugging memory allocated via
  204. OPENSSL_malloc() or OPENSSL_zalloc().
  205. enable-crypto-mdebug-backtrace
  206. As for crypto-mdebug, but additionally provide backtrace
  207. information for allocated memory.
  208. TO BE USED WITH CARE: this uses GNU C functionality, and
  209. is therefore not usable for non-GNU config targets. If
  210. your build complains about the use of '-rdynamic' or the
  211. lack of header file execinfo.h, this option is not for you.
  212. ALSO NOTE that even though execinfo.h is available on your
  213. system (through Gnulib), the functions might just be stubs
  214. that do nothing.
  215. no-ct
  216. Don't build support for Certificate Transparency.
  217. no-deprecated
  218. Don't build with support for any deprecated APIs. This is the
  219. same as using "--api" and supplying the latest version
  220. number.
  221. no-dgram
  222. Don't build support for datagram based BIOs. Selecting this
  223. option will also force the disabling of DTLS.
  224. no-dso
  225. Don't build support for loading Dynamic Shared Objects.
  226. no-dynamic-engine
  227. Don't build the dynamically loaded engines. This only has an
  228. effect in a "shared" build
  229. no-ec
  230. Don't build support for Elliptic Curves.
  231. no-ec2m
  232. Don't build support for binary Elliptic Curves
  233. enable-ec_nistp_64_gcc_128
  234. Enable support for optimised implementations of some commonly
  235. used NIST elliptic curves. This is only supported on some
  236. platforms.
  237. enable-egd
  238. Build support for gathering entropy from EGD (Entropy
  239. Gathering Daemon).
  240. no-engine
  241. Don't build support for loading engines.
  242. no-err
  243. Don't compile in any error strings.
  244. no-filenames
  245. Don't compile in filename and line number information (e.g.
  246. for errors and memory allocation).
  247. enable-fuzz-libfuzzer, enable-fuzz-afl
  248. Build with support for fuzzing using either libfuzzer or AFL.
  249. These are developer options only. They may not work on all
  250. platforms and should never be used in production environments.
  251. See the file fuzz/README.md for further details.
  252. no-gost
  253. Don't build support for GOST based ciphersuites. Note that
  254. if this feature is enabled then GOST ciphersuites are only
  255. available if the GOST algorithms are also available through
  256. loading an externally supplied engine.
  257. enable-heartbeats
  258. Build support for DTLS heartbeats.
  259. no-hw-padlock
  260. Don't build the padlock engine.
  261. no-makedepend
  262. Don't generate dependencies.
  263. no-multiblock
  264. Don't build support for writing multiple records in one
  265. go in libssl (Note: this is a different capability to the
  266. pipelining functionality).
  267. no-nextprotoneg
  268. Don't build support for the NPN TLS extension.
  269. no-ocsp
  270. Don't build support for OCSP.
  271. no-pic
  272. Don't build with support for Position Independent Code.
  273. no-posix-io
  274. Don't use POSIX IO capabilities.
  275. no-psk
  276. Don't build support for Pre-Shared Key based ciphersuites.
  277. no-rdrand
  278. Don't use hardware RDRAND capabilities.
  279. no-rfc3779
  280. Don't build support for RFC3779 ("X.509 Extensions for IP
  281. Addresses and AS Identifiers")
  282. sctp
  283. Build support for SCTP
  284. no-shared
  285. Do not create shared libraries, only static ones. See "Note
  286. on shared libraries" below.
  287. no-sock
  288. Don't build support for socket BIOs
  289. no-srp
  290. Don't build support for SRP or SRP based ciphersuites.
  291. no-srtp
  292. Don't build SRTP support
  293. no-sse2
  294. Exclude SSE2 code paths from 32-bit x86 assembly modules.
  295. Normally SSE2 extension is detected at run-time, but the
  296. decision whether or not the machine code will be executed
  297. is taken solely on CPU capability vector. This means that
  298. if you happen to run OS kernel which does not support SSE2
  299. extension on Intel P4 processor, then your application
  300. might be exposed to "illegal instruction" exception.
  301. There might be a way to enable support in kernel, e.g.
  302. FreeBSD kernel can be compiled with CPU_ENABLE_SSE, and
  303. there is a way to disengage SSE2 code paths upon application
  304. start-up, but if you aim for wider "audience" running
  305. such kernel, consider no-sse2. Both the 386 and
  306. no-asm options imply no-sse2.
  307. enable-ssl-trace
  308. Build with the SSL Trace capabilities (adds the "-trace"
  309. option to s_client and s_server).
  310. no-static-engine
  311. Don't build the statically linked engines. This only
  312. has an impact when not built "shared".
  313. no-stdio
  314. Don't use anything from the C header file "stdio.h" that
  315. makes use of the "FILE" type. Only libcrypto and libssl can
  316. be built in this way. Using this option will suppress
  317. building the command line applications. Additionally since
  318. the OpenSSL tests also use the command line applications the
  319. tests will also be skipped.
  320. no-threads
  321. Don't try to build with support for multi-threaded
  322. applications.
  323. threads
  324. Build with support for multi-threaded applications. Most
  325. platforms will enable this by default. However if on a
  326. platform where this is not the case then this will usually
  327. require additional system-dependent options! See "Note on
  328. multi-threading" below.
  329. no-ts
  330. Don't build Time Stamping Authority support.
  331. enable-ubsan
  332. Build with the Undefined Behaviour sanitiser. This is a
  333. developer option only. It may not work on all platforms and
  334. should never be used in production environments. It will only
  335. work when used with gcc or clang and should be used in
  336. conjunction with the "-DPEDANTIC" option (or the
  337. --strict-warnings option).
  338. no-ui
  339. Don't build with the "UI" capability (i.e. the set of
  340. features enabling text based prompts).
  341. enable-unit-test
  342. Enable additional unit test APIs. This should not typically
  343. be used in production deployments.
  344. enable-weak-ssl-ciphers
  345. Build support for SSL/TLS ciphers that are considered "weak"
  346. (e.g. RC4 based ciphersuites).
  347. zlib
  348. Build with support for zlib compression/decompression.
  349. zlib-dynamic
  350. Like "zlib", but has OpenSSL load the zlib library
  351. dynamically when needed. This is only supported on systems
  352. where loading of shared libraries is supported.
  353. 386
  354. In 32-bit x86 builds, when generating assembly modules,
  355. use the 80386 instruction set only (the default x86 code
  356. is more efficient, but requires at least a 486). Note:
  357. This doesn't affect code generated by compiler, you're
  358. likely to complement configuration command line with
  359. suitable compiler-specific option.
  360. no-<prot>
  361. Don't build support for negotiating the specified SSL/TLS
  362. protocol (one of ssl, ssl3, tls, tls1, tls1_1, tls1_2, dtls,
  363. dtls1 or dtls1_2). If "no-tls" is selected then all of tls1,
  364. tls1_1 and tls1_2 are disabled. Similarly "no-dtls" will
  365. disable dtls1 and dtls1_2. The "no-ssl" option is synonymous
  366. with "no-ssl3". Note this only affects version negotiation.
  367. OpenSSL will still provide the methods for applications to
  368. explicitly select the individual protocol versions.
  369. no-<prot>-method
  370. As for no-<prot> but in addition do not build the methods for
  371. applications to explicitly select individual protocol
  372. versions.
  373. enable-<alg>
  374. Build with support for the specified algorithm, where <alg>
  375. is one of: md2 or rc5.
  376. no-<alg>
  377. Build without support for the specified algorithm, where
  378. <alg> is one of: bf, blake2, camellia, cast, chacha, cmac,
  379. des, dh, dsa, ecdh, ecdsa, idea, md4, mdc2, ocb, poly1305,
  380. rc2, rc4, rmd160, scrypt, seed or whirlpool. The "ripemd"
  381. algorithm is deprecated and if used is synonymous with rmd160.
  382. -Dxxx, lxxx, -Lxxx, -Wl, -rpath, -R, -framework, -static
  383. These system specific options will be recocognised and
  384. passed through to the compiler to allow you to define
  385. preprocessor symbols, specify additional libraries, library
  386. directories or other compiler options. It might be worth
  387. noting that some compilers generate code specifically for
  388. processor the compiler currently executes on. This is not
  389. necessarily what you might have in mind, since it might be
  390. unsuitable for execution on other, typically older,
  391. processor. Consult your compiler documentation.
  392. -xxx, +xxx
  393. Additional options that are not otherwise recognised are
  394. passed through as they are to the compiler as well. Again,
  395. consult your compiler documentation.
  396. Installation in Detail
  397. ----------------------
  398. 1a. Configure OpenSSL for your operation system automatically:
  399. NOTE: This is not available on Windows.
  400. $ ./config [[ options ]] # Unix
  401. or
  402. $ @config [[ options ]] ! OpenVMS
  403. For the remainder of this text, the Unix form will be used in all
  404. examples, please use the appropriate form for your platform.
  405. This guesses at your operating system (and compiler, if necessary) and
  406. configures OpenSSL based on this guess. Run ./config -t to see
  407. if it guessed correctly. If you want to use a different compiler, you
  408. are cross-compiling for another platform, or the ./config guess was
  409. wrong for other reasons, go to step 1b. Otherwise go to step 2.
  410. On some systems, you can include debugging information as follows:
  411. $ ./config -d [[ options ]]
  412. 1b. Configure OpenSSL for your operating system manually
  413. OpenSSL knows about a range of different operating system, hardware and
  414. compiler combinations. To see the ones it knows about, run
  415. $ ./Configure # Unix
  416. or
  417. $ perl Configure # All other platforms
  418. For the remainder of this text, the Unix form will be used in all
  419. examples, please use the appropriate form for your platform.
  420. Pick a suitable name from the list that matches your system. For most
  421. operating systems there is a choice between using "cc" or "gcc". When
  422. you have identified your system (and if necessary compiler) use this name
  423. as the argument to Configure. For example, a "linux-elf" user would
  424. run:
  425. $ ./Configure linux-elf [[ options ]]
  426. If your system isn't listed, you will have to create a configuration
  427. file named Configurations/{{ something }}.conf and add the correct
  428. configuration for your system. See the available configs as examples
  429. and read Configurations/README and Configurations/README.design for
  430. more information.
  431. The generic configurations "cc" or "gcc" should usually work on 32 bit
  432. Unix-like systems.
  433. Configure creates a build file ("Makefile" on Unix, "makefile" on Windows
  434. and "descrip.mms" on OpenVMS) from a suitable template in Configurations,
  435. and defines various macros in include/openssl/opensslconf.h (generated from
  436. include/openssl/opensslconf.h.in).
  437. 1c. Configure OpenSSL for building outside of the source tree.
  438. OpenSSL can be configured to build in a build directory separate from
  439. the directory with the source code. It's done by placing yourself in
  440. some other directory and invoking the configuration commands from
  441. there.
  442. Unix example:
  443. $ mkdir /var/tmp/openssl-build
  444. $ cd /var/tmp/openssl-build
  445. $ /PATH/TO/OPENSSL/SOURCE/config [[ options ]]
  446. or
  447. $ /PATH/TO/OPENSSL/SOURCE/Configure {{ target }} [[ options ]]
  448. OpenVMS example:
  449. $ set default sys$login:
  450. $ create/dir [.tmp.openssl-build]
  451. $ set default [.tmp.openssl-build]
  452. $ @[PATH.TO.OPENSSL.SOURCE]config [[ options ]]
  453. or
  454. $ @[PATH.TO.OPENSSL.SOURCE]Configure {{ target }} [[ options ]]
  455. Windows example:
  456. $ C:
  457. $ mkdir \temp-openssl
  458. $ cd \temp-openssl
  459. $ perl d:\PATH\TO\OPENSSL\SOURCE\Configure {{ target }} [[ options ]]
  460. Paths can be relative just as well as absolute. Configure will
  461. do its best to translate them to relative paths whenever possible.
  462. 2. Build OpenSSL by running:
  463. $ make # Unix
  464. $ mms ! (or mmk) OpenVMS
  465. $ nmake # Windows
  466. This will build the OpenSSL libraries (libcrypto.a and libssl.a on
  467. Unix, corresponding on other platforms) and the OpenSSL binary
  468. ("openssl"). The libraries will be built in the top-level directory,
  469. and the binary will be in the "apps" subdirectory.
  470. If the build fails, look at the output. There may be reasons
  471. for the failure that aren't problems in OpenSSL itself (like
  472. missing standard headers). If you are having problems you can
  473. get help by sending an email to the openssl-users email list (see
  474. https://www.openssl.org/community/mailinglists.html for details). If
  475. it is a bug with OpenSSL itself, please open an issue on GitHub, at
  476. https://github.com/openssl/openssl/issues. Please review the existing
  477. ones first; maybe the bug was already reported or has already been
  478. fixed.
  479. (If you encounter assembler error messages, try the "no-asm"
  480. configuration option as an immediate fix.)
  481. Compiling parts of OpenSSL with gcc and others with the system
  482. compiler will result in unresolved symbols on some systems.
  483. 3. After a successful build, the libraries should be tested. Run:
  484. $ make test # Unix
  485. $ mms test ! OpenVMS
  486. $ nmake test # Windows
  487. NOTE: you MUST run the tests from an unprivileged account (or
  488. disable your privileges temporarily if your platform allows it).
  489. If some tests fail, look at the output. There may be reasons for
  490. the failure that isn't a problem in OpenSSL itself (like a
  491. malfunction with Perl). You may want increased verbosity, that
  492. can be accomplished like this:
  493. $ make VERBOSE=1 test # Unix
  494. $ mms /macro=(VERBOSE=1) test ! OpenVMS
  495. $ nmake VERBOSE=1 test # Windows
  496. If you want to run just one or a few specific tests, you can use
  497. the make variable TESTS to specify them, like this:
  498. $ make TESTS='test_rsa test_dsa' test # Unix
  499. $ mms/macro="TESTS=test_rsa test_dsa" test ! OpenVMS
  500. $ nmake TESTS='test_rsa test_dsa' test # Windows
  501. And of course, you can combine (Unix example shown):
  502. $ make VERBOSE=1 TESTS='test_rsa test_dsa' test
  503. You can find the list of available tests like this:
  504. $ make list-tests # Unix
  505. $ mms list-tests ! OpenVMS
  506. $ nmake list-tests # Windows
  507. Have a look at the manual for the perl module Test::Harness to
  508. see what other HARNESS_* variables there are.
  509. If you find a problem with OpenSSL itself, try removing any
  510. compiler optimization flags from the CFLAGS line in Makefile and
  511. run "make clean; make" or corresponding.
  512. To report a bug please open an issue on GitHub, at
  513. https://github.com/openssl/openssl/issues.
  514. 4. If everything tests ok, install OpenSSL with
  515. $ make install # Unix
  516. $ mms install ! OpenVMS
  517. $ nmake install # Windows
  518. This will install all the software components in this directory
  519. tree under PREFIX (the directory given with --prefix or its
  520. default):
  521. Unix:
  522. bin/ Contains the openssl binary and a few other
  523. utility scripts.
  524. include/openssl
  525. Contains the header files needed if you want
  526. to build your own programs that use libcrypto
  527. or libssl.
  528. lib Contains the OpenSSL library files.
  529. lib/engines Contains the OpenSSL dynamically loadable engines.
  530. share/man/man1 Contains the OpenSSL command line man-pages.
  531. share/man/man3 Contains the OpenSSL library calls man-pages.
  532. share/man/man5 Contains the OpenSSL configuration format man-pages.
  533. share/man/man7 Contains the OpenSSL other misc man-pages.
  534. share/doc/openssl/html/man1
  535. share/doc/openssl/html/man3
  536. share/doc/openssl/html/man5
  537. share/doc/openssl/html/man7
  538. Contains the HTML rendition of the man-pages.
  539. OpenVMS ('arch' is replaced with the architecture name, "Alpha"
  540. or "ia64", 'sover' is replaced with the shared library version
  541. (0101 for 1.1), and 'pz' is replaced with the pointer size
  542. OpenSSL was built with):
  543. [.EXE.'arch'] Contains the openssl binary.
  544. [.EXE] Contains a few utility scripts.
  545. [.include.openssl]
  546. Contains the header files needed if you want
  547. to build your own programs that use libcrypto
  548. or libssl.
  549. [.LIB.'arch'] Contains the OpenSSL library files.
  550. [.ENGINES'sover''pz'.'arch']
  551. Contains the OpenSSL dynamically loadable engines.
  552. [.SYS$STARTUP] Contains startup, login and shutdown scripts.
  553. These define appropriate logical names and
  554. command symbols.
  555. [.SYSTEST] Contains the installation verification procedure.
  556. [.HTML] Contains the HTML rendition of the manual pages.
  557. Additionally, install will add the following directories under
  558. OPENSSLDIR (the directory given with --openssldir or its default)
  559. for you convenience:
  560. certs Initially empty, this is the default location
  561. for certificate files.
  562. private Initially empty, this is the default location
  563. for private key files.
  564. misc Various scripts.
  565. Package builders who want to configure the library for standard
  566. locations, but have the package installed somewhere else so that
  567. it can easily be packaged, can use
  568. $ make DESTDIR=/tmp/package-root install # Unix
  569. $ mms/macro="DESTDIR=TMP:[PACKAGE-ROOT]" install ! OpenVMS
  570. The specified destination directory will be prepended to all
  571. installation target paths.
  572. Compatibility issues with previous OpenSSL versions:
  573. * COMPILING existing applications
  574. OpenSSL 1.1.0 hides a number of structures that were previously
  575. open. This includes all internal libssl structures and a number
  576. of EVP types. Accessor functions have been added to allow
  577. controlled access to the structures' data.
  578. This means that some software needs to be rewritten to adapt to
  579. the new ways of doing things. This often amounts to allocating
  580. an instance of a structure explicitly where you could previously
  581. allocate them on the stack as automatic variables, and using the
  582. provided accessor functions where you would previously access a
  583. structure's field directly.
  584. Some APIs have changed as well. However, older APIs have been
  585. preserved when possible.
  586. Environment Variables
  587. ---------------------
  588. A number of environment variables can be used to provide additional control
  589. over the build process. Typically these should be defined prior to running
  590. config or Configure. Not all environment variables are relevant to all
  591. platforms.
  592. AR
  593. The name of the ar executable to use.
  594. BUILDFILE
  595. Use a different build file name than the platform default
  596. ("Makefile" on Unixly platforms, "makefile" on native Windows,
  597. "descrip.mms" on OpenVMS). This requires that there is a
  598. corresponding build file template. See Configurations/README
  599. for further information.
  600. CC
  601. The compiler to use. Configure will attempt to pick a default
  602. compiler for your platform but this choice can be overridden
  603. using this variable. Set it to the compiler executable you wish
  604. to use, e.g. "gcc" or "clang".
  605. CROSS_COMPILE
  606. This environment variable has the same meaning as for the
  607. "--cross-compile-prefix" Configure flag described above. If both
  608. are set then the Configure flag takes precedence.
  609. NM
  610. The name of the nm executable to use.
  611. OPENSSL_LOCAL_CONFIG_DIR
  612. OpenSSL comes with a database of information about how it
  613. should be built on different platforms as well as build file
  614. templates for those platforms. The database is comprised of
  615. ".conf" files in the Configurations directory. The build
  616. file templates reside there as well as ".tmpl" files. See the
  617. file Configurations/README for further information about the
  618. format of ".conf" files as well as information on the ".tmpl"
  619. files.
  620. In addition to the standard ".conf" and ".tmpl" files, it is
  621. possible to create your own ".conf" and ".tmpl" files and store
  622. them locally, outside the OpenSSL source tree. This environment
  623. variable can be set to the directory where these files are held
  624. and will have Configure to consider them in addition to the
  625. standard ones.
  626. PERL
  627. The name of the Perl executable to use when building OpenSSL.
  628. HASHBANGPERL
  629. The command string for the Perl executable to insert in the
  630. #! line of perl scripts that will be publically installed.
  631. Default: /usr/bin/env perl
  632. Note: the value of this variable is added to the same scripts
  633. on all platforms, but it's only relevant on Unix-like platforms.
  634. RC
  635. The name of the rc executable to use. The default will be as
  636. defined for the target platform in the ".conf" file. If not
  637. defined then "windres" will be used. The WINDRES environment
  638. variable is synonymous to this. If both are defined then RC
  639. takes precedence.
  640. RANLIB
  641. The name of the ranlib executable to use.
  642. WINDRES
  643. See RC.
  644. Makefile targets
  645. ----------------
  646. The Configure script generates a Makefile in a format relevant to the specific
  647. platform. The Makefiles provide a number of targets that can be used. Not all
  648. targets may be available on all platforms. Only the most common targets are
  649. described here. Examine the Makefiles themselves for the full list.
  650. all
  651. The default target to build all the software components.
  652. clean
  653. Remove all build artefacts and return the directory to a "clean"
  654. state.
  655. depend
  656. Rebuild the dependencies in the Makefiles. This is a legacy
  657. option that no longer needs to be used in OpenSSL 1.1.0.
  658. install
  659. Install all OpenSSL components.
  660. install_sw
  661. Only install the OpenSSL software components.
  662. install_docs
  663. Only install the OpenSSL documentation components.
  664. install_man_docs
  665. Only install the OpenSSL man pages (Unix only).
  666. install_html_docs
  667. Only install the OpenSSL html documentation.
  668. list-tests
  669. Prints a list of all the self test names.
  670. test
  671. Build and run the OpenSSL self tests.
  672. uninstall
  673. Uninstall all OpenSSL components.
  674. update
  675. This is a developer option. If you are developing a patch for
  676. OpenSSL you may need to use this if you want to update
  677. automatically generated files; add new error codes or add new
  678. (or change the visibility of) public API functions. (Unix only).
  679. Note on multi-threading
  680. -----------------------
  681. For some systems, the OpenSSL Configure script knows what compiler options
  682. are needed to generate a library that is suitable for multi-threaded
  683. applications. On these systems, support for multi-threading is enabled
  684. by default; use the "no-threads" option to disable (this should never be
  685. necessary).
  686. On other systems, to enable support for multi-threading, you will have
  687. to specify at least two options: "threads", and a system-dependent option.
  688. (The latter is "-D_REENTRANT" on various systems.) The default in this
  689. case, obviously, is not to include support for multi-threading (but
  690. you can still use "no-threads" to suppress an annoying warning message
  691. from the Configure script.)
  692. OpenSSL provides built-in support for two threading models: pthreads (found on
  693. most UNIX/Linux systems), and Windows threads. No other threading models are
  694. supported. If your platform does not provide pthreads or Windows threads then
  695. you should Configure with the "no-threads" option.
  696. Notes on shared libraries
  697. -------------------------
  698. For most systems the OpenSSL Configure script knows what is needed to
  699. build shared libraries for libcrypto and libssl. On these systems
  700. the shared libraries will be created by default. This can be suppressed and
  701. only static libraries created by using the "no-shared" option. On systems
  702. where OpenSSL does not know how to build shared libraries the "no-shared"
  703. option will be forced and only static libraries will be created.
  704. Shared libraries are named a little differently on different platforms.
  705. One way or another, they all have the major OpenSSL version number as
  706. part of the file name, i.e. for OpenSSL 1.1.x, 1.1 is somehow part of
  707. the name.
  708. On most POSIXly platforms, shared libraries are named libcrypto.so.1.1
  709. and libssl.so.1.1.
  710. on Cygwin, shared libraries are named cygcrypto-1.1.dll and cygssl-1.1.dll
  711. with import libraries libcrypto.dll.a and libssl.dll.a.
  712. On Windows build with MSVC or using MingW, shared libraries are named
  713. libcrypto-1_1.dll and libssl-1_1.dll for 32-bit Windows, libcrypto-1_1-x64.dll
  714. and libssl-1_1-x64.dll for 64-bit x86_64 Windows, and libcrypto-1_1-ia64.dll
  715. and libssl-1_1-ia64.dll for IA64 Windows. With MSVC, the import libraries
  716. are named libcrypto.lib and libssl.lib, while with MingW, they are named
  717. libcrypto.dll.a and libssl.dll.a.
  718. On VMS, shareable images (VMS speak for shared libraries) are named
  719. ossl$libcrypto0101_shr.exe and ossl$libssl0101_shr.exe. However, when
  720. OpenSSL is specifically built for 32-bit pointers, the shareable images
  721. are named ossl$libcrypto0101_shr32.exe and ossl$libssl0101_shr32.exe
  722. instead, and when built for 64-bit pointers, they are named
  723. ossl$libcrypto0101_shr64.exe and ossl$libssl0101_shr64.exe.
  724. Note on random number generation
  725. --------------------------------
  726. Availability of cryptographically secure random numbers is required for
  727. secret key generation. OpenSSL provides several options to seed the
  728. internal PRNG. If not properly seeded, the internal PRNG will refuse
  729. to deliver random bytes and a "PRNG not seeded error" will occur.
  730. On systems without /dev/urandom (or similar) device, it may be necessary
  731. to install additional support software to obtain a random seed.
  732. Please check out the manual pages for RAND_add(), RAND_bytes(), RAND_egd(),
  733. and the FAQ for more information.