Commit graph

66 commits

Author SHA1 Message Date
Dr. Stephen Henson
957c7c0e88 Don't load GOST ENGINE if it is already loaded.
Multiple copies of the ENGINE will cause problems when it is cleaned up as
the methods are stored in static structures which will be overwritten and
freed up more than once.

Set static methods to NULL when the ENGINE is freed so it can be reloaded.
2012-09-01 11:30:35 +00:00
Andy Polyakov
c4aa6b041b gosthash.c: use memmove in circle_xor8, as input pointers can be equal
[from HEAD].

PR: 2858
2012-08-13 16:37:58 +00:00
Ben Laurie
68d2cf51bc Reduce version skew: trivia (I hope). 2012-06-03 22:03:37 +00:00
Dr. Stephen Henson
c0b31ccb87 PR: 2744
Submitted by: Dmitry Belyavsky <beldmit@gmail.com>

CMS support for ccgost engine
2012-03-11 13:40:05 +00:00
Dr. Stephen Henson
8e8b247341 PR: 2743
Reported by: Dmitry Belyavsky <beldmit@gmail.com>

Fix memory leak if invalid GOST MAC key given.
2012-02-29 14:12:52 +00:00
Andy Polyakov
9b2a29660b Sanitize usage of <ctype.h> functions. It's important that characters
are passed zero-extended, not sign-extended [from HEAD].
PR: 2682
2012-01-12 16:28:03 +00:00
Dr. Stephen Henson
a17b5d5a4f Check GOST parameters are not NULL (CVE-2012-0027) 2012-01-04 23:03:20 +00:00
Dr. Stephen Henson
88ef78745e PR: 2586
Submitted by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Reviewed by: steve

Zero structure fields properly.
2011-09-01 13:45:35 +00:00
Andy Polyakov
73b408c242 engine/Makefile: harmonize engine install rule for .dylib extension on MacOS X [from HEAD].
PR: 2319
2010-08-24 21:46:58 +00:00
Dr. Stephen Henson
e97359435e Fix warnings (From HEAD, original patch by Ben). 2010-06-15 17:25:15 +00:00
Dr. Stephen Henson
dce2b5a8fc PR: 2254
Submitted by: Ger Hobbelt <ger@hobbelt.com>
Approved by: steve@openssl.org

Check for <= 0 i2d return value.
2010-05-22 00:40:58 +00:00
Dr. Stephen Henson
5daa9411a0 fix bug in ccgost CFB mode code 2010-04-14 00:33:22 +00:00
Dr. Stephen Henson
094d4019b8 check ASN1 type before using it 2010-04-14 00:30:12 +00:00
Dr. Stephen Henson
4ffd2ad1d3 make GOST MAC work again 2010-04-08 10:54:54 +00:00
Dr. Stephen Henson
03fd7f27db Submitted by: Dmitry Ivanov <vonami@gmail.com>
Don't leave dangling pointers in GOST engine if calls fail.
2010-02-16 14:30:19 +00:00
Richard Levitte
d89b895cfd size_t doesn't compare less than zero... 2010-01-27 01:18:26 +00:00
Dr. Stephen Henson
2e155fde39 PR: 2141
Submitted by: "NARUSE, Yui" <naruse@airemix.jp>

Remove non-ASCII comment which causes compilation errors on some versions
of VC++.
2010-01-19 19:28:03 +00:00
Dr. Stephen Henson
a1e1165200 PR: 2135
Submitted by: Mike Frysinger <vapier@gentoo.org>

Change missed references to lib to $(LIBDIR)
2010-01-16 20:06:10 +00:00
Bodo Möller
8bbd0e826c Use properly local variables for thread-safety.
Submitted by: Martin Rex
2009-12-22 11:52:15 +00:00
Dr. Stephen Henson
db6e41f0ed PR: 2070
Submitted by: Alexander Nikitovskiy <Nikitovski@ya.ru>
Approved by: steve@openssl.org

Fix wrong cast.
2009-10-19 13:13:14 +00:00
Dr. Stephen Henson
7171ade2c2 Submitted by: "Victor B. Wagner" <vitus@cryptocom.ru>
Reviewed by: steve@openssl.org

EVP_CTRL_PBE_PRF_NID suppot for Gost engine.
2009-07-01 11:23:07 +00:00
Dr. Stephen Henson
bfd502f027 Updates from HEAD. 2009-06-16 16:39:20 +00:00
Dr. Stephen Henson
8355647403 Typo. 2009-05-07 16:26:44 +00:00
Richard Levitte
c44544a1d7 Update from HEAD 2009-05-05 08:46:30 +00:00
Richard Levitte
88d9f669c5 Add local symbol hacks for OpenVMS 2009-04-26 12:26:04 +00:00
Dr. Stephen Henson
9990cb75c1 PR: 1894
Submitted by: Ger Hobbelt <ger@hobbelt.com>
Approved by: steve@openssl.org

Fix various typos and stuff.
2009-04-16 17:22:51 +00:00
Dr. Stephen Henson
5f590d2218 PR: 1887 (part)
Submitted by: "Victor B. Wagner" <vitus@cryptocom.ru>
Approved by: steve@openssl.org

Added error codes for ccgost.
2009-04-10 11:07:35 +00:00
Dr. Stephen Henson
1dad4f3672 PR: 1882
Submitted by: Corinna Vinschen <vinschen@redhat.com>
Approved by: steve@openssl.org

Typo.
2009-04-02 15:04:01 +00:00
Dr. Stephen Henson
70b2186e24 Stop warnings. 2009-03-31 19:54:51 +00:00
Dr. Stephen Henson
b6af2c7e3e Submitted by: "Victor B. Wagner" <vitus@cryptocom.ru>
Reviewed by: steve@openssl.org

Update ccgost engine to support parameter files.
2009-03-17 15:38:34 +00:00
Dr. Stephen Henson
2c618ab993 Submitted by: "Victor B. Wagner" <vitus@cryptocom.ru>
Reviewed by: steve@openssl.org

Change default Gost parameter set to id_Gost28147_89_CryptoPro_A_ParamSet
2009-02-16 21:52:01 +00:00
Ben Laurie
19d300d07c Return error if DH_new() fails (Coverity ID 150). 2008-12-13 17:39:53 +00:00
Ben Laurie
071920d9f6 Check for NULL before use (Coverity ID 203). 2008-12-13 17:28:25 +00:00
Andy Polyakov
09a60c9833 Fix warnings after commit#17578. 2008-10-31 20:20:54 +00:00
Lutz Jänicke
0f401ff08b Add missing 'extern "C" {' to some _err.h files in crypto/engines/
PR: 1609
2008-04-18 07:43:26 +00:00
Lutz Jänicke
5558128541 Another minor update from the mingw development
PR: 1552
Submitted by: Roumen Petrov <openssl@roumenpetrov.info>
2008-04-18 06:35:55 +00:00
Lutz Jänicke
4c1a6e004a Apply mingw patches as supplied by Roumen Petrov an Alon Bar-Lev
PR: 1552
Submitted by: Roumen Petrov <openssl@roumenpetrov.info>, "Alon Bar-Lev" <alon.barlev@gmail.com>
2008-04-17 10:19:16 +00:00
Dr. Stephen Henson
fe591284be Update dependencies. 2008-03-22 18:52:03 +00:00
Geoff Thorpe
1e26a8baed Fix a variety of warnings generated by some elevated compiler-fascism,
OPENSSL_NO_DEPRECATED, etc. Steve, please double-check the CMS stuff...
2008-03-16 21:05:46 +00:00
Dr. Stephen Henson
92e2c81aff Fix error code function name mismatches in GOST engine, rebuild errors. 2008-02-28 13:45:06 +00:00
Andy Polyakov
085ea80371 engine/ccgost Win32 portability fixes. 2008-01-05 21:28:53 +00:00
Dr. Stephen Henson
744ecaa5b6 Avoid WIN32 signed/unsigned warnings. 2008-01-04 00:37:23 +00:00
Dr. Stephen Henson
98057eba77 Submitted by: "Victor B. Wagner" <vitus@cryptocom.ru>
Update gost algorithm print routines.
2007-11-21 12:39:12 +00:00
Ben Laurie
10f0c85cfc Fix warnings. 2007-11-16 03:03:01 +00:00
Dr. Stephen Henson
37210fe7e2 GOST ENGINE information. 2007-10-26 23:50:40 +00:00
Dr. Stephen Henson
0e1dba934f 1. Changes for s_client.c to make it return non-zero exit code in case
of handshake failure

2. Changes to x509_certificate_type function (crypto/x509/x509type.c) to
make it recognize GOST certificates as EVP_PKT_SIGN|EVP_PKT_EXCH
(required for s3_srvr to accept GOST client certificates).

3. Changes to EVP
	- adding of function EVP_PKEY_CTX_get0_peerkey
	- Make function EVP_PKEY_derive_set_peerkey work for context with
	  ENCRYPT operation, because we use peerkey field in the context to
	  pass non-ephemeral secret key to GOST encrypt operation.
	- added EVP_PKEY_CTRL_SET_IV control command. It is really
	  GOST-specific, but it is used in SSL code, so it has to go
	  in some header file, available during libssl compilation

4. Fix to HMAC to avoid call of OPENSSL_cleanse on undefined data

5. Include des.h if KSSL_DEBUG is defined into some libssl files, to
  make debugging output which depends on constants defined there, work
  and other KSSL_DEBUG output fixes

6. Declaration of real GOST ciphersuites, two authentication methods
   SSL_aGOST94 and SSL_aGOST2001 and one key exchange method SSL_kGOST

7. Implementation  of these methods.

8. Support for sending unsolicited serverhello extension if GOST
  ciphersuite is selected. It is require for interoperability with
  CryptoPro CSP 3.0 and 3.6 and controlled by
  SSL_OP_CRYPTOPRO_TLSEXT_BUG constant.
  This constant is added to SSL_OP_ALL, because it does nothing, if
  non-GOST ciphersuite is selected, and all implementation of GOST
  include compatibility with CryptoPro.

9. Support for CertificateVerify message without length field. It is
   another CryptoPro bug, but support is made unconditional, because it
   does no harm for draft-conforming implementation.

10. In tls1_mac extra copy of stream mac context is no more done.
  When I've written currently commited code I haven't read
  EVP_DigestSignFinal manual carefully enough and haven't noticed that
  it does an internal digest ctx copying.

This implementation was tested against
1. CryptoPro CSP 3.6 client and server
2. Cryptopro CSP 3.0 server
2007-10-26 12:06:36 +00:00
Bodo Möller
1b827d7b6f Clean up error codes a bit.
(engines/ccgost/ remains utter chaos, though; "make errors" is not happy.)
2007-09-19 00:58:58 +00:00
Dr. Stephen Henson
0aa08a2e34 Fix for GOST engine on platforms where sizeof(size_t) != sizeof(int). 2007-05-31 12:32:27 +00:00
Dr. Stephen Henson
7b8b797375 Revert broken change to ccgost.
Initialize context properly for HMAC pkey method.
2007-05-22 12:58:39 +00:00
Dr. Stephen Henson
9aba74e55a Fix warning and back out bad modification. 2007-05-21 12:16:36 +00:00