config.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. //config CONFIG_SSL_SERVER_ONLY
  2. // bool "Server only - no verification"
  3. // help
  4. // Enable server functionality (no client functionality).
  5. // This mode still supports sessions and chaining (which can be turned
  6. // off in configuration).
  7. //
  8. // The axssl sample runs with the minimum of features.
  9. //
  10. // This is the most space efficient of the modes with the library
  11. // about 45kB in size. Use this mode if you are doing standard SSL server
  12. // work.
  13. //config CONFIG_SSL_CERT_VERIFICATION
  14. // bool "Server only - with verification"
  15. // help
  16. // Enable server functionality with client authentication (no client
  17. // functionality).
  18. //
  19. // The axssl sample runs with the "-verify" and "-CAfile" options.
  20. //
  21. // This mode produces a library about 49kB in size. Use this mode if you
  22. // have an SSL server which requires client authentication (which is
  23. // uncommon in browser applications).
  24. //config CONFIG_SSL_ENABLE_CLIENT
  25. // bool "Client/Server enabled"
  26. // help
  27. // Enable client/server functionality (including peer authentication).
  28. //
  29. // The axssl sample runs with the "s_client" option enabled.
  30. //
  31. // This mode produces a library about 51kB in size. Use this mode if you
  32. // require axTLS to use SSL client functionality (the SSL server code
  33. // is always enabled).
  34. #define CONFIG_SSL_FULL_MODE
  35. //config CONFIG_SSL_FULL_MODE
  36. // bool "Client/Server enabled with diagnostics"
  37. // help
  38. // Enable client/server functionality including diagnostics. Most of the
  39. // extra size in this mode is due to the storage of various strings that
  40. // are used.
  41. //
  42. // The axssl sample has 3 more options, "-debug", "-state" and "-show-rsa"
  43. //
  44. // This mode produces a library about 58kB in size. It is suggested that
  45. // this mode is used only during development, or systems that have more
  46. // generous memory limits.
  47. //
  48. // It is the default to demonstrate the features of axTLS.
  49. //config CONFIG_SSL_SKELETON_MODE
  50. // bool "Skeleton mode - the smallest server mode"
  51. // help
  52. // This is an experiment to build the smallest library at the expense of
  53. // features and speed.
  54. //
  55. // * Server mode only.
  56. // * The AES cipher is disabled.
  57. // * No session resumption.
  58. // * No external keys/certificates are supported.
  59. // * The bigint library has most of the performance features disabled.
  60. // * Some other features/API calls may not work.
  61. //
  62. // This mode produces a library about 37kB in size. The main
  63. // disadvantage of this mode is speed - it will be much slower than the
  64. // other build modes.
  65. //choice
  66. // prompt "Protocol Preference"
  67. // depends on !CONFIG_SSL_SKELETON_MODE
  68. // default CONFIG_SSL_PROT_MEDIUM
  69. //
  70. //config CONFIG_SSL_PROT_LOW
  71. // bool "Low"
  72. // help
  73. // Chooses the cipher in the order of RC4-SHA, AES128-SHA, AES256-SHA.
  74. //
  75. // This will use the fastest cipher(s) but at the expense of security.
  76. //
  77. #define CONFIG_SSL_PROT_MEDIUM 1
  78. //config CONFIG_SSL_PROT_MEDIUM
  79. // bool "Medium"
  80. // help
  81. // Chooses the cipher in the order of AES128-SHA, AES256-SHA, RC4-SHA.
  82. //
  83. // This mode is a balance between speed and security and is the default.
  84. //
  85. //config CONFIG_SSL_PROT_HIGH
  86. // bool "High"
  87. // help
  88. // Chooses the cipher in the order of AES256-SHA, AES128-SHA, RC4-SHA.
  89. //
  90. // This will use the strongest cipher(s) at the cost of speed.
  91. #define CONFIG_SSL_USE_DEFAULT_KEY 1
  92. //config CONFIG_SSL_USE_DEFAULT_KEY
  93. // bool "Enable default key"
  94. // depends on !CONFIG_SSL_SKELETON_MODE
  95. // default y
  96. // help
  97. // Some applications will not require the default private key/certificate
  98. // that is built in. This is one way to save on a couple of kB's if an
  99. // external private key/certificate is used.
  100. //
  101. // The private key is in ssl/private_key.h and the certificate is in
  102. // ssl/cert.h.
  103. //
  104. // The advantage of a built-in private key/certificate is that no file
  105. // system is required for access. Both the certificate and the private
  106. // key will be automatically loaded on a ssl_ctx_new().
  107. //
  108. // However this private key/certificate can never be changed (without a
  109. // code update).
  110. //
  111. // This mode is enabled by default. Disable this mode if the
  112. // built-in key/certificate is not used.
  113. //
  114. #define CONFIG_SSL_PRIVATE_KEY_LOCATION "" //"axTLS.key"
  115. //config CONFIG_SSL_PRIVATE_KEY_LOCATION
  116. // string "Private key file location"
  117. // depends on !CONFIG_SSL_USE_DEFAULT_KEY && !CONFIG_SSL_SKELETON_MODE
  118. // help
  119. // The file location of the private key which will be automatically
  120. // loaded on a ssl_ctx_new().
  121. //
  122. #define CONFIG_SSL_PRIVATE_KEY_PASSWORD ""
  123. //config CONFIG_SSL_PRIVATE_KEY_PASSWORD
  124. // string "Private key password"
  125. // depends on !CONFIG_SSL_USE_DEFAULT_KEY && CONFIG_SSL_HAS_PEM
  126. // help
  127. // The password required to decrypt a PEM-encoded password file.
  128. //
  129. #define CONFIG_SSL_X509_CERT_LOCATION "" //"axTLS_x509.cer"
  130. //config CONFIG_SSL_X509_CERT_LOCATION
  131. // string "X.509 certificate file location"
  132. // depends on !CONFIG_SSL_GENERATE_X509_CERT && !CONFIG_SSL_USE_DEFAULT_KEY && !CONFIG_SSL_SKELETON_MODE
  133. // help
  134. // The file location of the X.509 certificate which will be automatically
  135. // loaded on a ssl_ctx_new().
  136. //
  137. //config CONFIG_SSL_GENERATE_X509_CERT
  138. // bool "Generate X.509 Certificate"
  139. // default n
  140. // help
  141. // An X.509 certificate can be automatically generated on a
  142. // ssl_ctx_new(). A private key still needs to be provided (the private
  143. // key in ss/private_key.h will be used unless
  144. // CONFIG_SSL_PRIVATE_KEY_LOCATION is set).
  145. //
  146. // The certificate is generated on the fly, and so a minor start-up time
  147. // penalty is to be expected. This feature adds around 5kB to the
  148. // library.
  149. //
  150. // This feature is disabled by default.
  151. //
  152. //config CONFIG_SSL_X509_COMMON_NAME
  153. // string "X.509 Common Name"
  154. // depends on CONFIG_SSL_GENERATE_X509_CERT
  155. // help
  156. // The common name for the X.509 certificate. This should be the fully
  157. // qualified domain name (FQDN), e.g. www.foo.com.
  158. //
  159. // If this is blank, then this will be value from gethostname() and
  160. // getdomainname().
  161. //
  162. //config CONFIG_SSL_X509_ORGANIZATION_NAME
  163. // string "X.509 Organization Name"
  164. // depends on CONFIG_SSL_GENERATE_X509_CERT
  165. // help
  166. // The organization name for the generated X.509 certificate.
  167. //
  168. // This field is optional.
  169. //
  170. //config CONFIG_SSL_X509_ORGANIZATION_UNIT_NAME
  171. // string "X.509 Organization Unit Name"
  172. // depends on CONFIG_SSL_GENERATE_X509_CERT
  173. // help
  174. // The organization unit name for the generated X.509 certificate.
  175. //
  176. // This field is optional.
  177. //config CONFIG_SSL_ENABLE_V23_HANDSHAKE
  178. // bool "Enable v23 Handshake"
  179. // default y
  180. // help
  181. // Some browsers use the v23 handshake client hello message
  182. // (an SSL2 format message which all SSL servers can understand).
  183. // It may be used if SSL2 is enabled in the browser.
  184. //
  185. // Since this feature takes a kB or so, this feature may be disabled - at
  186. // the risk of making it incompatible with some browsers (IE6 is ok,
  187. // Firefox 1.5 and below use it).
  188. //
  189. // Disable if backwards compatibility is not an issue (i.e. the client is
  190. // always using TLS1.0)
  191. #define CONFIG_SSL_HAS_PEM 1
  192. //config CONFIG_SSL_HAS_PEM
  193. // bool "Enable PEM"
  194. // default n if !CONFIG_SSL_FULL_MODE
  195. // default y if CONFIG_SSL_FULL_MODE
  196. // depends on !CONFIG_SSL_SKELETON_MODE
  197. // help
  198. // Enable the use of PEM format for certificates and private keys.
  199. //
  200. // PEM is not normally needed - PEM files can be converted into DER files
  201. // quite easily. However they have the convenience of allowing multiple
  202. // certificates/keys in the same file.
  203. //
  204. // This feature will add a couple of kB to the library.
  205. //
  206. // Disable if PEM is not used (which will be in most cases).
  207. #define CONFIG_SSL_USE_PKCS12 1
  208. //config CONFIG_SSL_USE_PKCS12
  209. // bool "Use PKCS8/PKCS12"
  210. // default n if !CONFIG_SSL_FULL_MODE
  211. // default y if CONFIG_SSL_FULL_MODE
  212. // depends on !CONFIG_SSL_SERVER_ONLY && !CONFIG_SSL_SKELETON_MODE
  213. // help
  214. // PKCS#12 certificates combine private keys and certificates together in
  215. // one file.
  216. //
  217. // PKCS#8 private keys are also suppported (as it is a subset of PKCS#12).
  218. //
  219. // The decryption of these certificates uses RC4-128 (and these
  220. // certificates must be encrypted using this cipher). The actual
  221. // algorithm is "PBE-SHA1-RC4-128".
  222. //
  223. // Disable if PKCS#12 is not used (which will be in most cases).
  224. #define CONFIG_SSL_EXPIRY_TIME 24
  225. //config CONFIG_SSL_EXPIRY_TIME
  226. // int "Session expiry time (in hours)"
  227. // depends on !CONFIG_SSL_SKELETON_MODE
  228. // default 24
  229. // help
  230. // The time (in hours) before a session expires.
  231. //
  232. // A longer time means that the expensive parts of a handshake don't
  233. // need to be run when a client reconnects later.
  234. //
  235. // The default is 1 day.
  236. //
  237. #define CONFIG_X509_MAX_CA_CERTS 4
  238. //config CONFIG_X509_MAX_CA_CERTS
  239. // int "Maximum number of certificate authorites"
  240. // default 4
  241. // depends on !CONFIG_SSL_SERVER_ONLY && !CONFIG_SSL_SKELETON_MODE
  242. // help
  243. // Determines the number of CA's allowed.
  244. //
  245. // Increase this figure if more trusted sites are allowed. Each
  246. // certificate adds about 300 bytes (when added).
  247. //
  248. // The default is to allow four certification authorities.
  249. //
  250. #define CONFIG_SSL_MAX_CERTS 2
  251. //config CONFIG_SSL_MAX_CERTS
  252. // int "Maximum number of chained certificates"
  253. // default 2
  254. // help
  255. // Determines the number of certificates used in a certificate
  256. // chain. The chain length must be at least 1.
  257. //
  258. // Increase this figure if more certificates are to be added to the
  259. // chain. Each certificate adds about 300 bytes (when added).
  260. //
  261. // The default is to allow one certificate + 1 certificate in the chain
  262. // (which may be the certificate authority certificate).
  263. //
  264. #define CONFIG_SSL_CTX_MUTEXING 1
  265. //config CONFIG_SSL_CTX_MUTEXING
  266. // bool "Enable SSL_CTX mutexing"
  267. // default n
  268. // help
  269. // Normally mutexing is not required - each SSL_CTX object can deal with
  270. // many SSL objects (as long as each SSL_CTX object is using a single
  271. // thread).
  272. //
  273. // If the SSL_CTX object is not thread safe e.g. the case where a
  274. // new thread is created for each SSL object, then mutexing is required.
  275. //
  276. // Select y when a mutex on the SSL_CTX object is required.
  277. //
  278. //config CONFIG_USE_DEV_URANDOM
  279. // bool "Use /dev/urandom"
  280. // default y
  281. // depends on !CONFIG_PLATFORM_WIN32
  282. // help
  283. // Use /dev/urandom. Otherwise a custom RNG is used.
  284. //
  285. // This will be the default on most Linux systems.
  286. //
  287. //config CONFIG_WIN32_USE_CRYPTO_LIB
  288. // bool "Use Win32 Crypto Library"
  289. // depends on CONFIG_PLATFORM_WIN32
  290. // help
  291. // Microsoft produce a Crypto API which requires the Platform SDK to be
  292. // installed. It's used for the RNG.
  293. //
  294. // This will be the default on most Win32 systems.
  295. //
  296. //config CONFIG_OPENSSL_COMPATIBLE
  297. // bool "Enable openssl API compatibility"
  298. // default n
  299. // help
  300. // To ease the porting of openssl applications, a subset of the openssl
  301. // API is wrapped around the axTLS API.
  302. //
  303. // Note: not all the API is implemented, so parts may still break. And
  304. // it's definitely not 100% compatible.
  305. //
  306. //config CONFIG_PERFORMANCE_TESTING
  307. // bool "Build the bigint performance test tool"
  308. // default n
  309. // help
  310. // Used for performance testing of bigint.
  311. //
  312. // This is a testing tool and is normally disabled.
  313. //
  314. //config CONFIG_SSL_TEST
  315. // bool "Build the SSL testing tool"
  316. // default n
  317. // depends on CONFIG_SSL_FULL_MODE && !CONFIG_SSL_GENERATE_X509_CERT
  318. // help
  319. // Used for sanity checking the SSL handshaking.
  320. //
  321. // This is a testing tool and is normally disabled.