Commit graph

255 commits

Author SHA1 Message Date
Paul Sokolovsky
3c6b62b718 crypto/rsa.c: RSA_decrypt: Always support both decrypt and sig-verify.
Signature verification need actually comes from yaota8266 project, that's
why it's untied from certificate verification.
2016-11-05 08:29:22 +03:00
Paul Sokolovsky
67d27df4b5 crypto/crypto_misc.c: RNG_initialize(): Don't do anything for esp8266.
It's tentative RNG is already setup when axTLS runs.
2016-07-11 16:49:43 +03:00
Paul Sokolovsky
9776795d9f ssl/Makefile: Make archive index when creating libaxtls.a. 2016-07-10 23:17:18 +03:00
Paul Sokolovsky
7e9e9a7812 tls1.h: Allow to override RT_MAX_PLAIN_LENGTH and RT_EXTRA. 2016-07-10 23:17:18 +03:00
Paul Sokolovsky
d044bf6ccf bigint.c: bi_mod_power(): esp8266: Process pending events.
To avoid watchdog reset/wifi disconnect during long operations.
2016-07-10 23:17:18 +03:00
Paul Sokolovsky
a0025d321e makefile.conf: Accept CFLAGS_EXTRA. 2016-07-10 23:17:18 +03:00
Paul Sokolovsky
54b2a4f5e2 crypto_misc.h: CONFIG_SSL_DIAGNOSTICS 2016-07-10 23:17:18 +03:00
Paul Sokolovsky
3c6e252720 crypto_misc.h: Don't ifdef in headers. 2016-07-10 23:17:17 +03:00
Paul Sokolovsky
60ec24b6db crypto_misc.c: CONFIG_SSL_DIAGNOSTICS 2016-07-10 23:17:17 +03:00
Paul Sokolovsky
f11093627a crypto_misc.c: print_blob(): Use snprintf() for MicroPython compatibility. 2016-07-10 23:17:17 +03:00
Paul Sokolovsky
3984fdd4fb os_int.h, os_port_micropython.h: Changes for esp8266 compatibility. 2016-07-10 23:17:17 +03:00
Paul Sokolovsky
b2325e5895 upyconfig: Enable server support. 2016-07-10 23:17:16 +03:00
Paul Sokolovsky
aadca9280b upyconfig.client: Client-only config. 2016-07-10 23:17:16 +03:00
Paul Sokolovsky
d8283d74ff os_port_micropython.h: Add ifdef'ed POSIX defines to ease testing. 2016-07-10 23:17:15 +03:00
Paul Sokolovsky
a4e0f106f3 tls1_svr.c: CONFIG_SSL_ENABLE_SERVER 2016-07-10 23:17:15 +03:00
Paul Sokolovsky
4fa4fb3461 tls1.c: CONFIG_SSL_ENABLE_SERVER 2016-07-10 23:17:15 +03:00
Paul Sokolovsky
06602d26de crypto_misc.h: Don't ifdef declarations. 2016-07-10 23:17:15 +03:00
Paul Sokolovsky
9cd22067ad tls1_svr.c: CONFIG_SSL_DIAGNOSTICS 2016-07-10 23:17:15 +03:00
Paul Sokolovsky
eab10ee5a7 tls1_clnt.c: CONFIG_SSL_DIAGNOSTICS 2016-07-10 23:17:14 +03:00
Paul Sokolovsky
9bf4489a9f tls1.c: CONFIG_SSL_DIAGNOSTICS 2016-07-10 23:17:14 +03:00
Paul Sokolovsky
22b2cc0965 loader.c: CONFIG_SSL_ENABLE_SERVER 2016-07-10 23:17:14 +03:00
Paul Sokolovsky
6f339f9b77 ssl/Config.in: Add explicit CONFIG_SSL_ENABLE_SERVER. 2016-07-10 23:17:13 +03:00
Paul Sokolovsky
672fa268d5 crypto/crypto_misc: Add tentative random generation for esp8266. 2016-07-10 23:17:13 +03:00
Paul Sokolovsky
e941743c1b Add namespace prefix to hmac_md5/hmac_sha1 functions.
These are pretty common names and can easily clash with other libraries.
At least, add "ssl_" prefix, as many other axTLS functions have.
2016-07-10 23:17:13 +03:00
Paul Sokolovsky
7ab52e9d6d Add .gitignore . 2016-07-10 23:17:13 +03:00
Paul Sokolovsky
3008b7474a Add config for MicroPython build. 2016-07-10 23:17:13 +03:00
Paul Sokolovsky
463a64723a En-masse other changes to minimize size and make embeddable into uPy. 2016-07-10 23:17:13 +03:00
Paul Sokolovsky
7e9e63023d os_port, tls1: Let port decide whether POSIX-style select() will be used.
POSIX-style select() is unlikely a good fit for embedded socket
implementation. It actually needed only for non-blocking sockets,
so let ports just be able to skip it. Going forward, this need
to be refactored into direct-purpose function to wait for socket
to be writable to be implemented per port.
2016-07-10 22:00:24 +03:00
Paul Sokolovsky
b5ba024a9f tls1: Abstract away getting last errno for a socket operation.
For usage with embedded ports where socket library may have other way to
pass errors rather than via C errno variable.
2016-07-10 22:00:24 +03:00
Paul Sokolovsky
c28cc4a6b7 hmac: hmac_md5(): Use single padding buffer.
Saves 64 bytes of stack space.
2016-07-10 22:00:23 +03:00
Paul Sokolovsky
b1f8b3b982 hmac: hmac_sha1(): Use single padding buffer.
Saves 64 bytes of stack space.
2016-07-10 22:00:23 +03:00
Paul Sokolovsky
8efa290751 md5: Optimize for size.
Original version is 2528 bytes for x86, optimized - 1208.
2016-07-10 22:00:22 +03:00
cameronrich
eabbfc866f Removed some printfs in skeleton mode
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@258 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
2016-07-05 20:16:05 +00:00
cameronrich
240f39fa5a Fixed some skeleton mode warnings
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@257 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
2016-07-05 20:07:17 +00:00
cameronrich
3e1b4909a2 removed endian.h from os_int.h as it is no longer needed and was causing issues with the micropython build
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@256 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
2016-07-05 19:57:29 +00:00
cameronrich
35a9bec2fd Now include os_port.h in tls1.h, but removed ax_malloc and friends
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@255 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
2016-07-05 19:54:05 +00:00
cameronrich
ef28667444 Can handle SSL chains which are out of order (thanks Paul Johnstone)
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@254 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
2016-07-05 07:07:45 +00:00
cameronrich
3d0da1dc19 Fixed a memset issue and removed some doubled code (thanks Jens Muller)
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@253 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
2016-07-05 06:46:55 +00:00
cameronrich
e223aa2133 Removed RC4 from the list of negotiated ciphers as browsers don't support it anymore
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@252 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
2016-06-12 10:51:12 +00:00
olereinhardt
d1bcdc5f97 Tag 64-bit constants with "LL" (make e.g. AVR32 gcc happy)
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@251 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
2015-10-01 15:58:22 +00:00
cameronrich
a5f7ede493 * Fixed client certificate issue where there is no client certificate and a certificate verify msg was still being sent.
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@250 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
2015-07-28 02:44:52 +00:00
cameronrich
acf35f0ea7 * Added named unions in SHA256 code for compilers that don't support it.
* Some other porting suggestions from Chris Ghormley.

git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@248 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
2015-04-30 06:06:09 +00:00
cameronrich
a88fd947b2 * Updated the release notes.
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@246 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
2015-03-10 04:41:32 +00:00
cameronrich
b0bd12beda * Added SHA384 and SHA512 digests.
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@245 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
2015-03-10 03:08:16 +00:00
cameronrich
0d334d81c2 * PT_APP_PROTOCOL_DATA has a test for hs_status=SSL_OK to prevent possible exchanges before the handshake is complete.
* Changed license on sha256.c to full BSD.

git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@244 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
2015-03-09 01:42:59 +00:00
cameronrich
67111693e6 * fixed issue where SSL mutex was not being picked up.
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@243 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
2014-11-26 19:50:20 +00:00
cameronrich
b9d43265b5 * axhttpd can load a certificate and private key from the command line
* axssl now prints all output regardless of null bytes. It no longer writes a null byte.

git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@242 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
2014-11-22 02:05:21 +00:00
cameronrich
b3fc32689d * Added diagnostic in case digest could not be identified.
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@240 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
2014-11-19 10:28:29 +00:00
cameronrich
58790919c1 * Added check to get_asn1_length() to limit the number of octets and to not allow overflow.
* Changed a few copyright dates to add a bit of new polish :-)

git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@239 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
2014-11-19 10:13:31 +00:00
cameronrich
82a7638efa * Added SHA256
* Return code checked for get_random()
* MD2 code removed.

git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@238 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
2014-11-19 03:51:22 +00:00