Commit graph

295 commits

Author SHA1 Message Date
Bodo Möller
a291745eeb fix function codes for error 2007-04-24 01:06:19 +00:00
Ben Laurie
2ff7a0edef Make sure we detect corruption. 2007-04-04 13:21:15 +00:00
Bodo Möller
bd31fb2145 Change to mitigate branch prediction attacks
Submitted by: Matthew D Wood
Reviewed by: Bodo Moeller
2007-03-28 00:15:28 +00:00
Dr. Stephen Henson
560b79cbff Constify version strings and some structures. 2007-01-21 13:07:17 +00:00
Dr. Stephen Henson
4d7aff707e Update dependencies. 2006-11-30 13:41:47 +00:00
Dr. Stephen Henson
47a9d527ab Update from 0.9.8 stable. Eliminate duplicate error codes. 2006-11-21 21:29:44 +00:00
Bodo Möller
5e3225cc44 Introduce limits to prevent malicious keys being able to
cause a denial of service.  (CVE-2006-2940)
[Steve Henson, Bodo Moeller]
2006-09-28 13:45:34 +00:00
Dr. Stephen Henson
c80c7bf999 Make int_rsa_sign function match prototype.
PR: 1383
2006-09-21 13:11:24 +00:00
Bodo Möller
7f4301668f Make sure the int_rsa_verify() prototype matches the implementation
(m_len currently is 'unsigned int', not 'size_t')

Submitted by: Gisle Vanem
2006-09-08 06:00:40 +00:00
Bodo Möller
2952886010 Remove non-functional part of recent patch, after discussion with
Colin Percival (this would have caused more problems than solved,
and isn't really necessary anyway)
2006-09-06 06:43:11 +00:00
Mark J. Cox
b79aa05e3b Avoid PKCS #1 v1.5 signature attack discovered by Daniel Bleichenbacher
(CVE-2006-4339)

Submitted by: Ben Laurie, Google Security Team
Reviewed by: bmoeller, mjc, shenson
2006-09-05 08:58:03 +00:00
Ben Laurie
777c47acbe Make things static that should be. Declare stuff in headers that should be.
Fix warnings.
2006-08-28 17:01:04 +00:00
Dr. Stephen Henson
786aa98da1 Use correct pointer types for various functions. 2006-07-20 16:56:47 +00:00
Dr. Stephen Henson
5c95c2ac23 Fix various error codes to match functions. 2006-07-17 16:33:31 +00:00
Dr. Stephen Henson
b7683e3a5d Allow digests to supply S/MIME micalg values from a ctrl.
Send ctrls to EVP_PKEY_METHOD during signing of PKCS7 structure so
customisation is possible.
2006-07-10 18:36:55 +00:00
Bodo Möller
48fc582f66 New functions CRYPTO_set_idptr_callback(),
CRYPTO_get_idptr_callback(), CRYPTO_thread_idptr() for a 'void *' type
thread ID, since the 'unsigned long' type of the existing thread ID
does not always work well.
2006-06-23 15:21:36 +00:00
Bodo Möller
675f605d44 Thread-safety fixes 2006-06-14 08:55:23 +00:00
Richard Levitte
0cfc80c4c3 rslen is unsigned, so it can never go below 0. 2006-05-28 19:36:29 +00:00
Dr. Stephen Henson
8bdcef40e4 New function to dup EVP_PKEY_CTX. This will be needed to make new signing
functions and EVP_MD_CTX_copy work properly.
2006-05-24 23:49:30 +00:00
Dr. Stephen Henson
eaff5a1412 Use size_t for new crypto size parameters. 2006-05-24 12:33:46 +00:00
Dr. Stephen Henson
7f57b076a6 New functions to get key types without dereferncing EVP_PKEY.
More error checking for RSA pmeth.
2006-05-11 21:33:00 +00:00
Dr. Stephen Henson
399a6f0bd1 Update PKCS#7 enveloped data to new API. 2006-05-08 12:44:25 +00:00
Dr. Stephen Henson
03919683f9 Add support for default public key digest type ctrl. 2006-05-07 17:09:39 +00:00
Dr. Stephen Henson
a78568b7e9 Replace RSA specific PKCS7_RECIP_INFO set up with an public key algorithm
ctrl.
2006-04-27 18:20:34 +00:00
Dr. Stephen Henson
ee1d9ec019 Remove link between digests and signature algorithms.
Use cross reference table in ASN1_item_sign(), ASN1_item_verify() to eliminate
the need for algorithm specific code.
2006-04-19 17:05:59 +00:00
Dr. Stephen Henson
492a9e2415 Allow public key ASN1 methods to set PKCS#7 SignerInfo structures. 2006-04-17 17:12:23 +00:00
Dr. Stephen Henson
c20276e4ae Fix (most) WIN32 warnings and errors. 2006-04-17 12:08:22 +00:00
Dr. Stephen Henson
b010b7c434 Use more flexible method of determining output length, by setting &outlen
value of the passed output buffer is NULL.

The old method of using EVP_PKEY_size(pkey) isn't flexible enough to cover all
cases where the output length may depend on the operation or the parameters
associated with it.
2006-04-15 18:50:56 +00:00
Dr. Stephen Henson
09b88a4a55 Update copyright notices on a few files where all original SSLeay code has
been deleted.
2006-04-14 17:36:18 +00:00
Dr. Stephen Henson
d87e615209 Add key derivation support. 2006-04-13 12:56:41 +00:00
Dr. Stephen Henson
c927df3fa1 Initial DSA EVP_PKEY_METHOD. Fixup some error codes. 2006-04-12 10:20:47 +00:00
Dr. Stephen Henson
54d853ebc3 Add support for setting keybits and public exponent value for pkey RSA keygen. 2006-04-11 17:28:37 +00:00
Dr. Stephen Henson
f5cda4cbb1 Initial keygen support. 2006-04-11 13:28:52 +00:00
Dr. Stephen Henson
f9a6348a53 ctrls to set PSS salt length. 2006-04-10 12:55:04 +00:00
Dr. Stephen Henson
a7ffd9d19c Preliminary PSS support. 2006-04-10 12:41:21 +00:00
Dr. Stephen Henson
29db322e8f Beginnings of PSS support. 2006-04-10 11:48:35 +00:00
Dr. Stephen Henson
716630c0eb Change operation values so they can be used as a mask.
Fix rsa_pkey_method.
2006-04-10 11:16:11 +00:00
Dr. Stephen Henson
4f59b6587f Implementation of pkey_rsa_verify. Some constification. 2006-04-10 01:06:17 +00:00
Dr. Stephen Henson
75d44c0452 Store digests as EVP_MD instead of a NID.
Add digest size sanity checks.
2006-04-09 21:24:48 +00:00
Dr. Stephen Henson
a58a636838 Constification. 2006-04-09 20:53:19 +00:00
Dr. Stephen Henson
9fdab72dd7 Bugfix X9.31 padding. 2006-04-09 20:44:00 +00:00
Dr. Stephen Henson
b2a97be7f4 Support for digest signing and X931 in rsa_pkey_meth. 2006-04-09 19:17:25 +00:00
Dr. Stephen Henson
6471c9f478 Add checking to padding ctrl. 2006-04-09 12:53:55 +00:00
Dr. Stephen Henson
4a3dc3c0e3 Add RSA ctrl for padding mode, add ctrl support in pkeyutl. 2006-04-09 12:42:09 +00:00
Dr. Stephen Henson
8cd44e3630 Implement encrypt/decrypt using RSA. 2006-04-08 13:02:04 +00:00
Dr. Stephen Henson
07e970c7e6 Initial functions for RSA EVP_PKEY_METHOD.
Update dependencies.
2006-04-08 00:15:07 +00:00
Dr. Stephen Henson
0b6f3c66cd Initial definitions and a few functions for EVP_PKEY_METHOD: an extension
of the EVP routines to public key algorithms.
2006-04-06 13:02:06 +00:00
Dr. Stephen Henson
e42633140e Add support for legacy PEM format private keys in EVP_PKEY_ASN1_METHOD. 2006-03-23 18:02:23 +00:00
Dr. Stephen Henson
d82e2718e2 Add information and pem strings. Update dependencies. 2006-03-23 11:54:51 +00:00
Dr. Stephen Henson
18e377b4ff Make EVP_PKEY_ASN1_METHOD opaque. Add application level functions to
initialize it. Initial support for application added public key ASN1.
2006-03-22 17:59:49 +00:00