Commit Graph

34 Commits

Author SHA1 Message Date
Steffen Jaeckel
b4bd23b4d2
Update LibTomMath to 1.2.0 (#84)
* update C files

* update other files

* update headers

* update makefiles

* remove mp_set/get_double()

* use ltm 1.2.0 API

* update ltm_desc

* use bundled tommath if system-tommath is too old

* XMALLOC etc. were changed to MP_MALLOC etc.
2020-05-26 23:36:47 +08:00
Matt Johnston
972d723484 split signkey_type and signature_type for RSA sha1 vs sha256 2020-05-17 23:58:31 +08:00
Matt Johnston
7dc2f36c3e use sigtype where appropriate 2020-04-06 23:18:26 +08:00
Matt Johnston
67111efdad limit rsa->e size to 64 bits 2018-02-17 19:41:44 +08:00
Francois Perrad
89e64c631e Pointer parameter could be declared as pointing to const 2017-08-19 17:16:13 +02:00
Matt Johnston
c38927da47 add m_mp_free_multi, be more careful freeing when failing to load keys 2017-05-26 21:08:43 +08:00
Francois Perrad
9dcb04a1e0 fix DEBUG_* condition 2017-06-01 19:10:37 +02:00
Matt Johnston
32a28d0d9c Convert #ifdef to #if, other build changes 2016-05-04 15:33:40 +02:00
Francois Perrad
9bda22e702 more hard tab 2016-01-01 15:02:09 +01:00
Francois Perrad
23ac7f56fa refactor indentation with hard tab 2015-12-31 16:00:23 +01:00
Matt Johnston
1a4db21fe4 buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
Gaël PORTAY
224b16b247 Fix pointer differ in signess warnings [-Werror=pointer-sign] 2015-05-05 20:39:13 +02:00
Matt Johnston
12e7d570a2 Make some debug info conditional 2014-02-24 20:53:32 +08:00
Matt Johnston
cbe63bbabe rename random.h to dbrandom.h since some OSes have a system random.h
--HG--
rename : random.c => dbrandom.c
rename : random.h => dbrandom.h
2013-11-14 22:05:47 +08:00
Matt Johnston
aafeebd0c8 have separate ecdsa keys for each size
fix crash from the mp_alloc_init_multi change in RSA

--HG--
branch : ecc
2013-05-25 00:54:19 +08:00
Matt Johnston
d9e790e7dc Add m_mp_alloc_init_multi() helper
--HG--
branch : ecc
2013-05-23 22:18:16 +08:00
Matt Johnston
04518e9e80 merge in HEAD
--HG--
branch : ecc
2013-05-21 12:09:35 +08:00
Matt Johnston
a8135dec1e Make _sign and _verify functions take a buffer* rather than void* and int
--HG--
branch : ecc
2013-04-06 16:00:37 +08:00
Matt Johnston
90cf7f012c Move the more verbose TRACE() statements into TRACE2() 2013-04-01 00:07:26 +08:00
Matt Johnston
38ed870ffe Improve capitalisation for all logged strings
--HG--
extra : convert_revision : 997e53cec7a9efb7413ac6e17b6be60a5597bd2e
2011-02-23 15:50:30 +00:00
Matt Johnston
fced1113d3 Rename rsa_key to dropbear_rsa_key (and same for dss too) so
we don't conflict with libtomcrypt.

--HG--
extra : convert_revision : 77961344ec415d73d48fdc7b1ebead3099c13394
2010-07-21 12:55:25 +00:00
Matt Johnston
d5897b9a5d merge of '182c2d8dbd5321ef4d1df8758936f4dc7127015f'
and '31dcd7a22983ef19d6c63248e415e71d292dd0ec'

--HG--
extra : convert_revision : e84f66826c7ee6ebe99ef92cc0f6c22ecf638d01
2006-12-06 13:11:41 +00:00
Matt Johnston
a0aefb3d3f Make sure that we clean up key parts if we fail during reading a rsa key
(from Klocwork)

--HG--
extra : convert_revision : fbcb5f84b48c3c2f04bba5516abbf101aec49a14
2006-11-02 16:10:18 +00:00
Matt Johnston
4cb673b644 Fixes from Erik Hovland:
cli-authpubkey.c:
    fix leak of keybuf

cli-kex.c:
    fix leak of fingerprint fp

cli-service.c:
    remove commented out code

dropbearkey.c:
    don't attepmt to free NULL key on failure

common-kex.c:
    only free key if it is initialised

keyimport.c:
    remove dead encrypted-key code
    don't leak a FILE* loading OpenSSH keys

rsa.c, dss.c:
    check return values for some libtommath functions

svr-kex.c:
    check return value retrieving DH kex mpint

svr-tcpfwd.c:
    fix null-dereference if remote tcp forward request fails

tcp-accept.c:
    don't incorrectly free the tcpinfo var

--HG--
extra : convert_revision : 640a55bc710cbaa6d212453c750026c770e19193
2006-07-07 09:17:18 +00:00
Matt Johnston
1dc0652444 Stomp on some minor warnings
--HG--
extra : convert_revision : 4cbdd6e0a0d8c061075b9ed7609a06c4547f67d3
2006-03-08 12:09:02 +00:00
Matt Johnston
53681cbdb6 * use own assertions which should get logged properly
--HG--
extra : convert_revision : 3dc365619f0840ab5781660b1257a9f22c05d3fe
2005-09-05 15:16:10 +00:00
Matt Johnston
8f75480ebc * move RSA_BLINDING to options.h
--HG--
extra : convert_revision : e3f32a86aafc1d806b2bee9405020368f9706d85
2005-07-08 13:19:10 +00:00
Matt Johnston
0f0a8472d7 * add a "label" argument to printhex()
* make some vars static in random.c

--HG--
extra : convert_revision : ef941a918e42e8af23b132946f44e6836a327e71
2005-05-10 17:02:05 +00:00
Matt Johnston
cf585ba1de - refactored random mp_int generation and byte->mp_int code
- added RSA blinding

--HG--
extra : convert_revision : 5d5b4657a24a1c8f53c6fc45d5ec29ddb85fb45a
2005-05-05 03:58:21 +00:00
Matt Johnston
8c1a429c44 Fixed DEBUG_TRACE macro so that we don't get semicolons left about the place
--HG--
extra : convert_revision : d928bc851e32be7bd429bf7504b148c0e4bf7e2f
2005-01-02 20:25:56 +00:00
Matt Johnston
4a52217ed4 default initialisers for mp_ints
--HG--
extra : convert_revision : af69bacb50a31523e383e8f73844d04681f9e394
2004-08-17 10:20:20 +00:00
Matt Johnston
8e1ec24f55 Merging in the changes from 0.41-0.43 main Dropbear tree
--HG--
extra : convert_revision : 4c3428781bc8faf0fd7cadd7099fbd7f4ea386e7
2004-08-12 16:41:58 +00:00
Matt Johnston
2d82f73484 Client mostly works up to password auth
Need to rework algo-choosing etc, since server is now broken.

--HG--
extra : convert_revision : 458dc4eed0e885e7c91633d4781d3348213a0e19
2004-07-28 16:44:16 +00:00
Matt Johnston
674a607488 Makefile.in contains updated files required
--HG--
extra : convert_revision : cc8a8c49dc70e632c352853a39801089b08149be
2004-06-01 02:46:09 +00:00