Commit graph

60 commits

Author SHA1 Message Date
Matt Caswell
7b9f8f7f03 Auto init/deinit libcrypto
This builds on the previous commit to auto initialise/deinitialise
libcrypto.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-09 15:11:38 +00:00
Rich Salz
349807608f Remove /* foo.c */ comments
This was done by the following
        find . -name '*.[ch]' | /tmp/pl
where /tmp/pl is the following three-line script:
        print unless $. == 1 && m@/\* .*\.[ch] \*/@;
        close ARGV if eof; # Close file to reset $.

And then some hand-editing of other files.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-26 16:40:43 -05:00
Rich Salz
7644a9aef8 Rename some BUF_xxx to OPENSSL_xxx
Rename BUF_{strdup,strlcat,strlcpy,memdup,strndup,strnlen}
to OPENSSL_{strdup,strlcat,strlcpy,memdup,strndup,strnlen}
Add #define's for the old names.
Add CRYPTO_{memdup,strndup}, called by OPENSSL_{memdup,strndup} macros.

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-12-16 16:14:49 -05:00
Dr. Stephen Henson
19c6d3ea2d Remove RSA_FLAG_SIGN_VER flag.
Remove RSA_FLAG_SIGN_VER: this was origininally used to retain binary
compatibility after RSA_METHOD was extended to include rsa_sign and
rsa_verify fields. It is no longer needed.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-02 18:23:29 +00:00
Matt Caswell
55646005a9 Continue malloc standardisation in engines
Continuing from previous work standardise use of malloc in the engine code.

Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-11-09 22:48:41 +00:00
Rich Salz
b0700d2c8d Replace "SSLeay" in API with OpenSSL
All instances of SSLeay (any combination of case) were replaced with
the case-equivalent OpenSSL.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30 17:21:42 -04:00
Andy Polyakov
57ebe74831 engine/e_capi.c: fix various warnings.
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-09-29 18:06:06 +02:00
Rich Salz
64b25758ed remove 0 assignments.
After openssl_zalloc, cleanup more "set to 0/NULL" assignments.
Many are from github feedback.

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-03 16:26:34 -04:00
Rich Salz
75ebbd9aa4 Use p==NULL not !p (in if statements, mainly)
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-11 10:06:38 -04:00
Rich Salz
b4faea50c3 Use safer sizeof variant in malloc
For a local variable:
        TYPE *p;
Allocations like this are "risky":
        p = OPENSSL_malloc(sizeof(TYPE));
if the type of p changes, and the malloc call isn't updated, you
could get memory corruption.  Instead do this:
        p = OPENSSL_malloc(sizeof(*p));
Also fixed a few memset() calls that I noticed while doing this.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-04 15:00:13 -04:00
Rich Salz
b548a1f11c free null cleanup finale
Don't check for NULL before calling OPENSSL_free

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-01 10:02:07 -04:00
Rich Salz
d64070838e free NULL cleanup
Start ensuring all OpenSSL "free" routines allow NULL, and remove
any if check before calling them.
This gets DH_free, DSA_free, RSA_free

Reviewed-by: Matt Caswell <matt@openssl.org>
2015-03-24 23:17:16 -04:00
Rich Salz
fbf08b79ff Remove X509_PAIR
Unused type; a pair X509 certificates. Intended for LDAP support.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-02-06 10:55:31 -05:00
Matt Caswell
0f113f3ee4 Run util/openssl-format-source -v -c .
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:20:09 +00:00
Dr. Stephen Henson
98b3b116ab For master windows build dsa.h is now needed.
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-01-13 15:39:37 +00:00
Kurt Roeckx
5b17b79a89 capi_ctrl, capi_vtrace: check for NULL after allocating and free it
Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-10 18:35:18 +01:00
Kurt Roeckx
f6fa7c5347 capi_get_provname: Check return values
Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-12-04 23:48:44 +01:00
Jonas Maebe
b1a08ac71f capi_get_key: check for NULL after allocating key
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-12-04 23:48:44 +01:00
Jonas Maebe
8607322765 capi_cert_get_fname: check for NULL after allocating wfname
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-12-04 23:48:44 +01:00
Jonas Maebe
e2140501fd capi_get_provname: free name on error if it was malloc'ed
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-12-04 23:48:44 +01:00
Libor Krystek
a5ff18bf90 Add support for SHA2 in CAPI ENGINE.
PR#2706 though patch is from PR#3366.
2014-07-02 00:33:10 +01:00
Andy Polyakov
2c0093d294 engines/e_capi.c: fix typo.
Submitted by: Pierre Delaage
2012-12-19 10:54:47 +00:00
Dr. Stephen Henson
c4fc172240 PR: 2880
Submitted by: "Florian Rüchel" <florian.ruechel@ruhr-uni-bochum.de>

Correctly handle local machine keys in the capi ENGINE.
2012-11-18 15:24:37 +00:00
Dr. Stephen Henson
e626c77808 PR: 2703
Submitted by: Alexey Melnikov <alexey.melnikov@isode.com>

Fix some memory and resource leaks in CAPI ENGINE.
2012-02-11 23:13:10 +00:00
Dr. Stephen Henson
da2a5a79ef PR: 2705
Submitted by: Alexey Melnikov <alexey.melnikov@isode.com>

Only create ex_data indices once for CAPI engine.
2012-02-11 23:08:08 +00:00
Dr. Stephen Henson
b9b0a177f8 new flag to stop ENGINE methods being registered 2011-05-15 15:56:49 +00:00
Dr. Stephen Henson
9609ea869d NULL is a valid cspname 2011-05-15 11:44:14 +00:00
Dr. Stephen Henson
eb164d0b12 stop warnings about no previous prototype when compiling shared engines 2011-01-30 01:30:48 +00:00
Andy Polyakov
c329c6bac7 e_capi.c: rearrange #include-s to improve portability.
PR: 2394
2010-12-14 20:39:17 +00:00
Andy Polyakov
cc4c230653 e_capi.c: change from ANSI to TCHAR domain. This makes it compilable on
Windows CE/Mobile, yet keeps it normal Windows loop.
PR: 2350
2010-12-12 20:26:09 +00:00
Dr. Stephen Henson
6b02f9fafb PR: 2374
Submitted by: Guenter <lists@gknw.net>
Reviewed by: steve

Don't compile capi ENGINE on mingw32
2010-11-18 22:57:02 +00:00
Andy Polyakov
82f385d71d e_capi.c: fix typo. 2010-03-15 22:28:48 +00:00
Dr. Stephen Henson
6c6bdd543d workaround for missing definition in some headers 2010-03-15 13:10:08 +00:00
Andy Polyakov
f87e307875 Adapt mingw config for newer mingw environment. Note modified conditional
compilation in e_capi.c.
PR: 2113
2009-12-30 11:46:54 +00:00
Dr. Stephen Henson
0b36857866 Update from 0.9.8-stable. 2009-05-29 14:02:57 +00:00
Andy Polyakov
01483c269e Make CAPI engine UNICODE aware (it didn't work on Win64). 2009-05-03 13:52:01 +00:00
Dr. Stephen Henson
d4f0339c66 Update from 1.0.0-stable. 2009-04-26 22:18:22 +00:00
Andy Polyakov
492279f6f3 AIX build updates. 2008-09-12 14:45:54 +00:00
Bodo Möller
9be8035b11 fix error function codes 2008-08-13 19:44:15 +00:00
Dr. Stephen Henson
a0f3679b52 Update from stable branch. 2008-06-25 10:43:07 +00:00
Dr. Stephen Henson
2836cb3816 Update from stable branch. 2008-06-18 15:08:41 +00:00
Dr. Stephen Henson
46d4782888 Update from stable branch. 2008-06-18 12:06:10 +00:00
Dr. Stephen Henson
1cd504e7be Don't change _WIN32_WINNT and detect GetConsoleWindow() and
CryptUIDlgSelectCertificateFromStore() at runtime. Add callback function
for selection mechanism.
2008-06-05 23:19:56 +00:00
Dr. Stephen Henson
11f3cee93b Update from stable branch. 2008-06-05 17:04:16 +00:00
Dr. Stephen Henson
ffc2b3e927 Update from stable branch. 2008-06-05 11:45:25 +00:00
Dr. Stephen Henson
e1451bb51d Update from stable branch. 2008-06-04 23:03:28 +00:00
Dr. Stephen Henson
1381bf90f4 Use an appropriate Window for selection dialog. 2008-06-04 16:45:05 +00:00
Dr. Stephen Henson
e0f7b87227 Add support for Windoes dialog box based certificate selection. 2008-06-04 16:10:09 +00:00
Dr. Stephen Henson
b814c01a76 Tidy up and add comments to selection code. 2008-06-04 12:03:57 +00:00
Dr. Stephen Henson
37cf49a3df Avoid name clash. 2008-06-04 10:57:38 +00:00