Commit Graph

6052 Commits

Author SHA1 Message Date
Richard Levitte
ab23d5ffda Add symbol hacks for some long names.
make update
2004-03-29 08:13:49 +00:00
Andy Polyakov
1a979201d5 This is essentially Intel 32-bit compiler tune-up. To start with all
available compiler versions generated bogus machine code trying to
compile new crypto/des/cfb_enc.c. Secondly, 8th version defines
__GNUC__ macro, but fails to compile *some* inline assembler correctly.
Note that all versions of icc implement MSC-like _lrot[rl] intrinsic,
which is used now instead of offensive asm. Finally, unnecessary linker
dependencies are eliminated. Most notably dependency from libirc.a
caused trouble at application start-up, if libcrypto.so is linked with
-Bsymbolic (which it is).
2004-03-28 21:27:47 +00:00
Dr. Stephen Henson
216659eb87 Enhance EVP code to generate random symmetric keys of the
appropriate form, for example correct DES parity.

Update S/MIME code and EVP_SealInit to use new functions.

PR: 700
2004-03-28 17:38:00 +00:00
Dr. Stephen Henson
5d6383c83f Make {i2v,v2i}_ASN1_BIT_STRING global.
make update
2004-03-28 12:40:11 +00:00
Dr. Stephen Henson
e07d3a021d Remove obsolete files. 2004-03-28 12:29:05 +00:00
Dr. Stephen Henson
e1a27eb34a Allow CRLs to be passed into X509_STORE_CTX. This is useful when the
verified structure can contain its own CRLs (such as PKCS#7 signedData).

Tidy up some of the verify code.
2004-03-27 22:49:28 +00:00
Dr. Stephen Henson
6446e0c3c8 Extend OID config module format. 2004-03-27 13:30:14 +00:00
Dr. Stephen Henson
beedea2fef Free up BIO properly when using streaming S/MIME sign. 2004-03-26 00:24:38 +00:00
Dr. Stephen Henson
34be34fdd0 Remove BN_CTX debug from debug-steve 2004-03-25 23:32:06 +00:00
Richard Levitte
0020502a07 SSL_COMP_get_compression_method is a typo (a missing 's' at the end of
the symbol name).
2004-03-25 21:32:30 +00:00
Richard Levitte
d530017c00 Move the definition of Win32_rename(), since the macro rename gets undefined
in the middle of the code on Windows, and that disrupts operations in functions
later that use rename()...
PR: 853
2004-03-25 20:09:00 +00:00
Richard Levitte
fd9fa844e2 Wrap code starting with a definition.
PR: 854
2004-03-25 20:01:01 +00:00
Richard Levitte
c2dc3ee8d9 Change spaces to symbols in names.
PR: 856
2004-03-25 19:52:34 +00:00
Richard Levitte
482c2acf02 Make prototypes for some callback pointers. 2004-03-25 16:21:42 +00:00
Richard Levitte
a481b4b52c A couple more cases where RAND_add() gets an integer instead of a
doule as last argument.
2004-03-25 16:04:02 +00:00
Richard Levitte
a87228031f RAND_add() wants a double as it's last argument. 2004-03-25 15:52:43 +00:00
Dr. Stephen Henson
b79c82eaab Fix loads of warnings in policy code.
I'll remember to try to compile this with warnings enabled next time :-)
2004-03-25 13:45:58 +00:00
Dr. Stephen Henson
69d1d5e6ce Fix ASN1 warnings. 2004-03-25 13:37:02 +00:00
Geoff Thorpe
c86f2054f3 Adjust various bignum functions to use BN_CTX for variables instead of
locally initialising their own.

NB: I've removed the "BN_clear_free()" loops for the exit-paths in some of
these functions, and that may be a major part of the performance
improvements we're seeing. The "free" part can be removed because we're
using BN_CTX. The "clear" part OTOH can be removed because BN_CTX
destruction automatically performs this task, so performing it inside
functions that may be called repeatedly is wasteful. This is currently safe
within openssl due to the fact that BN_CTX objects are never created for
longer than a single high-level operation. However, that is only because
there's currently no mechanism in openssl for thread-local storage. Beyond
that, this might be an issue for applications using the bignum API directly
and caching their own BN_CTX objects. The solution is to introduce a flag
to BN_CTX_start() that allows its variables to be automatically sanitised
on release during BN_CTX_end(). This way any higher-level function (and
perhaps the application) can specify this flag in its own
BN_CTX_start()/BN_CTX_end() pair, and this will cause inner-loop functions
specifying the flag to be ignored so that sanitisation is handled only once
back out at the higher level. I will be implementing this in the near
future.
2004-03-25 04:32:24 +00:00
Geoff Thorpe
5c98b2caf5 Replace the BN_CTX implementation with my current work. I'm leaving the
little TODO list in there as well as the debugging code (only enabled if
BN_CTX_DEBUG is defined).

I'd appreciate as much review and testing as can be spared for this. I'll
commit some changes to other parts of the bignum code shortly to make
better use of this implementation (no more fixed size limitations). Note
also that under identical optimisations, I'm seeing a noticable speed
increase over openssl-0.9.7 - so any feedback to confirm/deny this on other
systems would also be most welcome.
2004-03-25 04:16:14 +00:00
Geoff Thorpe
5148710994 Adds warnings about two curves and fixes the "seed" value for two other
curves.

Submitted by: Nils Larsch
2004-03-25 03:03:52 +00:00
Geoff Thorpe
ea77fc3380 ... and this should likewise fix up those RSA implementations that weren't
already built and tested.
2004-03-25 02:55:17 +00:00
Geoff Thorpe
46ef873f0b By adding a BN_CTX parameter to the 'rsa_mod_exp' callback, private key
operations no longer require two distinct BN_CTX structures. This may put
more "strain" on the current BN_CTX implementation (which has a fixed limit
to the number of variables it will hold), but so far this limit is not
triggered by any of the tests pass and I will be changing BN_CTX in the
near future to avoid this problem anyway.

This also changes the default RSA implementation code to use the BN_CTX in
favour of initialising some of its variables locally in each function.
2004-03-25 02:52:04 +00:00
Geoff Thorpe
2d2a5ba32a Damn, I was a bit hasty with my fix and hadn't spotted the linker
dependency from asn1.
2004-03-25 02:41:35 +00:00
Geoff Thorpe
2bd4e3379f Remove some warnings. 2004-03-25 02:24:38 +00:00
Geoff Thorpe
032c3ecb18 Protect against gcc's "warning: cast does not match function type". 2004-03-25 02:19:42 +00:00
Richard Levitte
e703b46598 Don't define fd for platforms that do not use it, as some may not declare fileno() properly 2004-03-24 10:55:48 +00:00
Richard Levitte
0fa793bc7b Correct constness problems. 2004-03-24 10:50:42 +00:00
Richard Levitte
ba5477eb1a Make it easier to buld test applications... 2004-03-24 10:50:25 +00:00
Richard Levitte
5c42f62e48 Only build the PKCS#7 test applications if "pkcs7" is present in
SDIRS.
2004-03-24 10:48:50 +00:00
Richard Levitte
a08e05d1be Add store.h among the exported headers on VMS. 2004-03-24 09:52:16 +00:00
Richard Levitte
d342ec3335 o_str.h isn't a public header file, so make sure it will still be
included.
2004-03-24 09:43:03 +00:00
Richard Levitte
3d8b8860cf o_str.h isn't a public header file. 2004-03-24 09:41:33 +00:00
Richard Levitte
a0b5ebeac6 Typo... 2004-03-24 09:40:59 +00:00
Richard Levitte
8ee18dd520 Make sure toupper() is properly declared. 2004-03-24 09:40:23 +00:00
Richard Levitte
f46e76ef50 Make it clear that for RSA_NO_PADDING, flen must be RSA_size(rsa) 2004-03-23 21:01:34 +00:00
Richard Levitte
e725a9660b make update 2004-03-23 15:06:33 +00:00
Richard Levitte
d7eed1929b Sync the VMS build with Unix. 2004-03-23 14:50:16 +00:00
Dr. Stephen Henson
4acc3e907d Initial support for certificate policy checking and evaluation.
This is currently *very* experimental and needs to be more fully integrated
with the main verification code.
2004-03-23 14:14:35 +00:00
Richard Levitte
9449e38504 Correct minor spelling error.
PR: 845
2004-03-21 23:03:52 +00:00
Richard Levitte
b8b0b5d856 Change \t to real tab in echo argument.
PR: 847
2004-03-21 22:50:20 +00:00
Richard Levitte
ec5d8a54e9 Remove a warning for conversion double->long. This has impacts on Windows.
PR: 849
2004-03-21 22:39:52 +00:00
Richard Levitte
18a6333180 Make sure fd is defined where it should.
PR: 849
2004-03-21 22:36:27 +00:00
Geoff Thorpe
7f663ce430 Note my bignum hijinx in case app maintainers are using CHANGES for their
porting efforts. Also, add Richard's name to the prior change.
2004-03-17 18:30:47 +00:00
Geoff Thorpe
e042540f6b Variety of belt-tightenings in the bignum code. (Please help test this!)
- Remove some unnecessary "+1"-like fudges. Sizes should be handled
  exactly, as enlarging size parameters causes needless bloat and may just
  make bugs less likely rather than fixing them: bn_expand() macro,
  bn_expand_internal(), and BN_sqr().
- Deprecate bn_dup_expand() - it's new since 0.9.7, unused, and not that
  useful.
- Remove unnecessary zeroing of unused bytes in bn_expand2().
- Rewrite BN_set_word() - it should be much simpler, the previous
  complexities probably date from old mismatched type issues.
- Add missing bn_check_top() macros in bn_word.c
- Improve some degenerate case handling in BN_[add|sub]_word(), add
  comments, and avoid a bignum expansion if an overflow isn't possible.
2004-03-17 17:36:54 +00:00
Dr. Stephen Henson
4e8172d6da Avoid warnings. 2004-03-16 13:51:11 +00:00
Richard Levitte
875a644a90 Constify d2i, s2i, c2i and r2i functions and other associated
functions and macros.

This change has associated tags: LEVITTE_before_const and
LEVITTE_after_const.  Those will be removed when this change has been
properly reviewed.
2004-03-15 23:15:26 +00:00
Richard Levitte
ec37635c94 It was just pointed out to me that it's better to cast to double... 2004-03-15 23:02:55 +00:00
Richard Levitte
fd836aeee0 Make sure that the last argument to RAND_add() is a float, or some
compilers may complain.
2004-03-15 22:37:08 +00:00
Richard Levitte
560f7abb7e Make sure we use unsigned constants, or come compilers may complain. 2004-03-15 22:33:19 +00:00