Config.in 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. if PACKAGE_libopenssl
  2. comment "Build Options"
  3. config OPENSSL_OPTIMIZE_SPEED
  4. bool
  5. default y if x86_64 || i386
  6. prompt "Enable optimization for speed instead of size"
  7. select OPENSSL_WITH_ASM
  8. help
  9. Enabling this option increases code size and performance.
  10. The increase in performance and size depends on the
  11. target CPU. EC and AES seem to benefit the most.
  12. config OPENSSL_SMALL_FOOTPRINT
  13. bool
  14. depends on !OPENSSL_OPTIMIZE_SPEED
  15. default y if SMALL_FLASH || LOW_MEMORY_FOOTPRINT
  16. prompt "Build with OPENSSL_SMALL_FOOTPRINT (read help)"
  17. help
  18. This turns on -DOPENSSL_SMALL_FOOTPRINT. This will save only
  19. 1-3% of of the ipk size. The performance drop depends on
  20. architecture and algorithm. MIPS drops 13% of performance for
  21. a 3% decrease in ipk size. On Aarch64, for a 1% reduction in
  22. size, ghash and GCM performance decreases 90%, while
  23. Chacha20-Poly1305 is 15% slower. X86_64 drops 1% of its size
  24. for 3% of performance. Other arches have not been tested.
  25. config OPENSSL_KTLS
  26. bool
  27. prompt "Enable kTLS support"
  28. select PACKAGE_kmod-tls
  29. help
  30. This will enable kTLS support, allowing data encryption
  31. operations to be performed in kernel space.
  32. config OPENSSL_WITH_ASM
  33. bool
  34. default y
  35. prompt "Compile with optimized assembly code"
  36. depends on !arc
  37. help
  38. Disabling this option will reduce code size and performance.
  39. The increase in performance and size depends on the target
  40. CPU and on the algorithms being optimized.
  41. config OPENSSL_WITH_SSE2
  42. bool
  43. default y if !TARGET_x86_legacy && !TARGET_x86_geode
  44. prompt "Enable use of x86 SSE2 instructions"
  45. depends on OPENSSL_WITH_ASM && i386
  46. help
  47. Use of SSE2 instructions greatly increase performance with a
  48. minimum increase in package size, but it will bring no benefit
  49. if your hardware does not support them, such as Geode GX and LX.
  50. AMD Geode NX, and Intel Pentium 4 and above support SSE2.
  51. config OPENSSL_WITH_DEPRECATED
  52. bool
  53. default y
  54. prompt "Include deprecated APIs"
  55. help
  56. This drops all deprecated API, including engine support.
  57. config OPENSSL_NO_DEPRECATED
  58. bool
  59. default !OPENSSL_WITH_DEPRECATED
  60. config OPENSSL_WITH_ERROR_MESSAGES
  61. bool
  62. default y if !OPENSSL_SMALL_FOOTPRINT || (!SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
  63. prompt "Include error messages"
  64. help
  65. This option aids debugging, but increases package size and
  66. memory usage.
  67. comment "Protocol Support"
  68. config OPENSSL_WITH_TLS13
  69. bool
  70. default y
  71. prompt "Enable support for TLS 1.3"
  72. help
  73. TLS 1.3 is the newest version of the TLS specification.
  74. It aims:
  75. * to increase the overall security of the protocol,
  76. removing outdated algorithms, and encrypting more of the
  77. protocol;
  78. * to increase performance by reducing the number of round-trips
  79. when performing a full handshake.
  80. config OPENSSL_WITH_DTLS
  81. bool
  82. prompt "Enable DTLS support"
  83. help
  84. Datagram Transport Layer Security (DTLS) provides TLS-like security
  85. for datagram-based (UDP, DCCP, CAPWAP, SCTP & SRTP) applications.
  86. config OPENSSL_WITH_NPN
  87. bool
  88. prompt "Enable NPN support"
  89. help
  90. NPN is a TLS extension, obsoleted and replaced with ALPN,
  91. used to negotiate SPDY, and HTTP/2.
  92. config OPENSSL_WITH_SRP
  93. bool
  94. default y
  95. prompt "Enable SRP support"
  96. help
  97. The Secure Remote Password protocol (SRP) is an augmented
  98. password-authenticated key agreement (PAKE) protocol, specifically
  99. designed to work around existing patents.
  100. config OPENSSL_WITH_CMS
  101. bool
  102. default y
  103. prompt "Enable CMS (RFC 5652) support"
  104. help
  105. Cryptographic Message Syntax (CMS) is used to digitally sign,
  106. digest, authenticate, or encrypt arbitrary message content.
  107. comment "Algorithm Selection"
  108. config OPENSSL_WITH_EC2M
  109. bool
  110. prompt "Enable ec2m support"
  111. help
  112. This option enables the more efficient, yet less common, binary
  113. field elliptic curves.
  114. config OPENSSL_WITH_CHACHA_POLY1305
  115. bool
  116. default y
  117. prompt "Enable ChaCha20-Poly1305 ciphersuite support"
  118. help
  119. ChaCha20-Poly1305 is an AEAD ciphersuite with 256-bit keys,
  120. combining ChaCha stream cipher with Poly1305 MAC.
  121. It is 3x faster than AES, when not using a CPU with AES-specific
  122. instructions, as is the case of most embedded devices.
  123. config OPENSSL_PREFER_CHACHA_OVER_GCM
  124. bool
  125. default y if !x86_64 && !aarch64
  126. prompt "Prefer ChaCha20-Poly1305 over AES-GCM by default"
  127. depends on OPENSSL_WITH_CHACHA_POLY1305
  128. help
  129. The default openssl preference is for AES-GCM before ChaCha, but
  130. that takes into account AES-NI capable chips. It is not the
  131. case with most embedded chips, so it may be better to invert
  132. that preference. This is just for the default case. The
  133. application can always override this.
  134. config OPENSSL_WITH_PSK
  135. bool
  136. default y
  137. prompt "Enable PSK support"
  138. help
  139. Build support for Pre-Shared Key based cipher suites.
  140. comment "Less commonly used build options"
  141. config OPENSSL_WITH_ARIA
  142. bool
  143. prompt "Enable ARIA support"
  144. help
  145. ARIA is a block cipher developed in South Korea, based on AES.
  146. config OPENSSL_WITH_CAMELLIA
  147. bool
  148. prompt "Enable Camellia cipher support"
  149. help
  150. Camellia is a bock cipher with security levels and processing
  151. abilities comparable to AES.
  152. config OPENSSL_WITH_IDEA
  153. bool
  154. default y if !SMALL_FLASH
  155. prompt "Enable IDEA cipher support (needs legacy provider)"
  156. help
  157. IDEA is a block cipher with 128-bit keys.
  158. To use the cipher, one must install the libopenssl-legacy
  159. package, using a main libopenssl package compiled with this
  160. option enabled as well.
  161. config OPENSSL_WITH_SEED
  162. bool
  163. default y if !SMALL_FLASH
  164. prompt "Enable SEED cipher support (needs legacy provider)"
  165. help
  166. SEED is a block cipher with 128-bit keys broadly used in
  167. South Korea, but seldom found elsewhere.
  168. To use the cipher, one must install the libopenssl-legacy
  169. package, using a main libopenssl package compiled with this
  170. option enabled as well.
  171. config OPENSSL_WITH_SM234
  172. bool
  173. prompt "Enable SM2/3/4 algorithms support"
  174. help
  175. These algorithms are a set of "Commercial Cryptography"
  176. algorithms approved for use in China.
  177. * SM2 is an EC algorithm equivalent to ECDSA P-256
  178. * SM3 is a hash function equivalent to SHA-256
  179. * SM4 is a 128-block cipher equivalent to AES-128
  180. config OPENSSL_WITH_BLAKE2
  181. bool
  182. prompt "Enable BLAKE2 digest support"
  183. help
  184. BLAKE2 is a cryptographic hash function based on the ChaCha
  185. stream cipher.
  186. config OPENSSL_WITH_MDC2
  187. bool
  188. default y if !SMALL_FLASH
  189. prompt "Enable MDC2 digest support (needs legacy provider)"
  190. help
  191. To use the digest, one must install the libopenssl-legacy
  192. package, using a main libopenssl package compiled with this
  193. option enabled as well.
  194. config OPENSSL_WITH_WHIRLPOOL
  195. bool
  196. default y if !SMALL_FLASH
  197. prompt "Enable Whirlpool digest support (needs legacy provider)"
  198. help
  199. To use the digest, one must install the libopenssl-legacy
  200. package, using a main libopenssl package compiled with this
  201. option enabled as well.
  202. config OPENSSL_WITH_COMPRESSION
  203. bool
  204. prompt "Enable compression support"
  205. help
  206. TLS compression is not recommended, as it is deemed insecure.
  207. The CRIME attack exploits this weakness.
  208. Even with this option turned on, it is disabled by default, and the
  209. application must explicitly turn it on.
  210. config OPENSSL_WITH_RFC3779
  211. bool
  212. prompt "Enable RFC3779 support (BGP)"
  213. help
  214. RFC 3779 defines two X.509 v3 certificate extensions. The first
  215. binds a list of IP address blocks, or prefixes, to the subject of a
  216. certificate. The second binds a list of autonomous system
  217. identifiers to the subject of a certificate. These extensions may be
  218. used to convey the authorization of the subject to use the IP
  219. addresses and autonomous system identifiers contained in the
  220. extensions.
  221. comment "Engine/Hardware Support"
  222. config OPENSSL_ENGINE
  223. bool "Enable engine support"
  224. select OPENSSL_WITH_DEPRECATED
  225. default y
  226. help
  227. This enables alternative cryptography implementations,
  228. most commonly for interfacing with external crypto devices,
  229. or supporting new/alternative ciphers and digests.
  230. If you compile the library with this option disabled, packages built
  231. using an engine-enabled library (i.e. from the official repo) may
  232. fail to run. Compile and install the packages with engine support
  233. disabled, and you should be fine.
  234. Note that you need to enable KERNEL_AIO to be able to build the
  235. afalg engine package.
  236. config OPENSSL_ENGINE_BUILTIN
  237. bool "Build chosen engines into libcrypto"
  238. depends on OPENSSL_ENGINE
  239. help
  240. This builds all chosen engines into libcrypto.so, instead of building
  241. them as dynamic engines in separate packages.
  242. The benefit of building the engines into libcrypto is that they won't
  243. require any configuration to be used by default.
  244. config OPENSSL_ENGINE_BUILTIN_AFALG
  245. bool
  246. prompt "Acceleration support through AF_ALG sockets engine"
  247. depends on OPENSSL_ENGINE_BUILTIN && KERNEL_AIO
  248. select PACKAGE_libopenssl-conf
  249. help
  250. This enables use of hardware acceleration through the
  251. AF_ALG kernel interface.
  252. config OPENSSL_ENGINE_BUILTIN_DEVCRYPTO
  253. bool
  254. prompt "Acceleration support through /dev/crypto"
  255. depends on OPENSSL_ENGINE_BUILTIN
  256. select PACKAGE_libopenssl-conf
  257. help
  258. This enables use of hardware acceleration through OpenBSD
  259. Cryptodev API (/dev/crypto) interface.
  260. Even though configuration is not strictly needed, it is worth seeing
  261. https://openwrt.org/docs/techref/hardware/cryptographic.hardware.accelerators
  262. for information on how to configure the engine.
  263. config OPENSSL_ENGINE_BUILTIN_PADLOCK
  264. bool
  265. prompt "VIA Padlock Acceleration support engine"
  266. depends on OPENSSL_ENGINE_BUILTIN && TARGET_x86
  267. select PACKAGE_libopenssl-conf
  268. help
  269. This enables use of hardware acceleration through the
  270. VIA Padlock module.
  271. config OPENSSL_WITH_ASYNC
  272. bool
  273. prompt "Enable asynchronous jobs support"
  274. depends on OPENSSL_ENGINE && USE_GLIBC
  275. help
  276. Enables async-aware applications to be able to use OpenSSL to
  277. initiate crypto operations asynchronously. In order to work
  278. this will require the presence of an async capable engine.
  279. endif