Commit graph

1258 commits

Author SHA1 Message Date
Bodo Möller
939fff6799 Add "FIXME" comment. 2000-05-31 09:51:55 +00:00
Bodo Möller
361ee9733f Improve PRNG robustness. 2000-05-30 21:44:36 +00:00
Dr. Stephen Henson
49528751b8 More EVP cipher revision.
Change EVP_SealInit() and EVP_OpenInit() to
handle cipher parameters.

Make it possible to set RC2 and RC5 params.

Make RC2 ASN1 code use the effective key bits
and not the key length.

TODO: document how new API works.
2000-05-30 18:26:22 +00:00
Dr. Stephen Henson
5da2f69f41 Fourth phase EVP revision.
Declare ciphers in terms of macros. This reduces
the amount of code and places each block cipher EVP
definition in a single file instead of being spread
over 4 files.
2000-05-30 02:21:15 +00:00
Dr. Stephen Henson
57ae2e2428 Fourth phase EVP revision.
Declare ciphers in terms of macros. This reduces
the amount of code and places each block cipher EVP
definition in a single file instead of being spread
over 4 files.
2000-05-30 02:10:57 +00:00
Geoff Thorpe
8c343cf861 another warning. 2000-05-29 04:20:52 +00:00
Geoff Thorpe
4dbe060f2c It seems that mktime does what is required here. Certainly timegm() can
not be used because it is not available on all systems (most notably,
win32).
2000-05-29 03:50:37 +00:00
Geoff Thorpe
e212226828 This declaration seems to have been added into the header file accidently.
There's no trace of it being implemented and it doesn't seem to have been
intended given that it is prototyped with a BIO yet there was a BIO-
specific version added in at the same time.
2000-05-29 03:17:45 +00:00
Geoff Thorpe
e9e6b88b35 oops. 2000-05-29 02:42:57 +00:00
Dr. Stephen Henson
360370d953 Third phase of EVP cipher overhaul.
Remove duplicated code in EVP.
2000-05-28 12:44:46 +00:00
Dr. Stephen Henson
be06a9348d Second phase of EVP cipher overhaul.
Change functions like EVP_EncryptUpdate() so they now return a
value. These normally have software only implementations
which cannot fail so this was acceptable. However ciphers
can be implemented in hardware and these could return errors.
2000-05-27 12:38:43 +00:00
Dr. Stephen Henson
7f0606016c Beginnings of EVP cipher overhaul. This should eventually
enhance and tidy up the EVP interface.

This patch adds initial support for variable length ciphers
and changes S/MIME code to use this.

Some other library functions need modifying to support use
of modified cipher parameters.

Also need to change all the cipher functions that should
return error codes, but currenly don't.

And of course it needs extensive testing...
2000-05-26 23:51:35 +00:00
Dr. Stephen Henson
b4b41f48d1 Add DSA library string. Workaround for IIS .key file invalid
ASN1 encoding.
2000-05-24 13:09:59 +00:00
Ben Laurie
4d29312ce1 Yet more typesafety. 2000-05-21 15:21:55 +00:00
Bodo Möller
c95b7a723f Fix "FIXME" indentation :-) 2000-05-19 12:02:09 +00:00
Bodo Möller
5569e1c39a Add "FIXME" comment, and adjust the indentation. 2000-05-19 11:59:55 +00:00
Dr. Stephen Henson
439df5087f Fix c_rehash script, add -fingerprint option to crl. 2000-05-18 00:33:00 +00:00
Ben Laurie
0d3b0afe9e Typesafety Thought Police last part. 2000-05-17 10:08:05 +00:00
Ben Laurie
abc9400e10 Typesafety Thought Police part 5. 2000-05-17 09:13:36 +00:00
Ben Laurie
371acb22e6 Typesafe Thought Police part 4. 2000-05-16 23:01:19 +00:00
Ben Laurie
5de603abc8 Typesafety Thought Police part 3. 2000-05-16 21:22:45 +00:00
Ben Laurie
f2716dada0 Typesafety Thought Police Part 2. 2000-05-16 19:53:50 +00:00
Ulf Möller
0e1c06128a Get rid of more non-ANSI declarations. 2000-05-15 22:54:43 +00:00
Ulf Möller
0c109ea2cb prototype. 2000-05-15 21:02:44 +00:00
Ulf Möller
911ea946cb Make sure that NO-RSA applications etc can include evp.h 2000-05-15 19:24:23 +00:00
Ulf Möller
991f0706d8 MacOS changes. 2000-05-15 18:59:55 +00:00
Ben Laurie
fd73a2121c Allow UTCTIME objects to be retrieved. Check for imminent cert expiry. 2000-05-14 12:39:53 +00:00
Bodo Möller
50e4e9283d When open()ing 'file' in RAND_write_file, don't use O_EXCL.
This is superfluous now that we don't have to avoid creating
multiple versions of the file on VMS (because older versions
are now deleted).
2000-05-11 23:10:27 +00:00
Dr. Stephen Henson
0cb957a684 Fix for SSL server purpose checking 2000-05-04 23:03:49 +00:00
Dr. Stephen Henson
a331a305e9 Make PKCS#12 code handle missing passwords.
Add a couple of FAQs.
2000-05-04 00:08:35 +00:00
Richard Levitte
aa9fb57b99 Initialise. 2000-05-02 13:38:11 +00:00
Richard Levitte
6596268675 In Message-ID: <003201bfb332$14a07520$0801a8c0@janm.transactionsite.com>,
"Jan Mikkelsen" <janm@transactionsite.com> correctly states that the
OpenSSL header files have #include's and extern "C"'s in an incorrect
order.  Thusly fixed.

Also, make the memory debugging routines defined and declared with
prototypes, and use void* instead of char* for memory blobs.

And last of all, redo the ugly callback construct for elegance and
better definition (with prototypes).
2000-05-02 13:36:50 +00:00
Richard Levitte
b50e1bd3c3 In Message-ID: <003201bfb332$14a07520$0801a8c0@janm.transactionsite.com>,
"Jan Mikkelsen" <janm@transactionsite.com> correctly states that the
OpenSSL header files have #include's and extern "C"'s in an incorrect
order.  Thusly fixed.
2000-05-02 12:35:04 +00:00
Richard Levitte
82271cee5b In Message-ID: <003201bfb332$14a07520$0801a8c0@janm.transactionsite.com>,
"Jan Mikkelsen" <janm@transactionsite.com> correctly states that the
OpenSSL header files have #include's and extern "C"'s in an incorrect
order.  Thusly fixed.
2000-05-02 12:16:01 +00:00
Bodo Möller
22a415478f Add missing #include. 2000-05-01 19:49:41 +00:00
Bodo Möller
dcba2534fa Avoid leaking memory in thread_hash (and enable memory leak detection
for it).
2000-04-29 23:58:05 +00:00
Richard Levitte
09451b6857 Use CONFerr, not RSAerr, in the conf library... 2000-04-26 12:15:19 +00:00
Richard Levitte
21346b7a04 Clarifications and removal of double declaration... 2000-04-26 12:13:19 +00:00
Geoff Thorpe
ebbaebf784 This case in the "dso_unload" handlers should not be reported as an error -
if a DSO_load(NULL,...) operation fails, it will have to call DSO_free() on
the DSO structure it created and that will filter through to this "unload"
call.

If the stack size is "< 1", then the library never actually loaded. To keep
things clean higher up, I'll treat this as a vacuous case without an error.
It makes the error stack easier to follow real world cases, and the error
this ignores was only useful for catching bugs in internal code, not
mismatched calls from applications (which should be handled in the generic
DSO layer).
2000-04-25 08:37:12 +00:00
Geoff Thorpe
da414db464 The handling of DSA_METHOD and DH_METHOD wasn't quite as problematic as
with RSA_METHOD (the **_get_default_methods do set the default value if
it's not set). However, the code had some duplication and was a bit
conter-intuitive.
2000-04-20 07:58:11 +00:00
Geoff Thorpe
deb4d50e51 Previously, the default RSA_METHOD was NULL until the first RSA structure was
initialised, at which point an appropriate default was chosen. This meant a
call to RSA_get_default_method might have returned FALSE.

This change fixes that; now any called to RSA_new(), RSA_new_method(NULL), or
RSA_get_default_method() will ensure that a default is chosen if it wasn't
already.
2000-04-20 06:44:18 +00:00
Geoff Thorpe
b9e6391582 This change facilitates name translation for shared libraries. The
technique used is far from perfect and alternatives are welcome.
Basically if the translation flag is set, the string is not too
long, and there appears to be no path information in the string,
then it is converted to whatever the standard should be for the
DSO_METHOD in question, eg;
    blah --> libblah.so   on *nix, and
    blah --> blah.dll     on win32.

This change also introduces the DSO_ctrl() function that is used
by the name translation stuff.
2000-04-19 21:45:17 +00:00
Bodo Möller
bc36f18117 Ignore lib and Makefile.save. 2000-04-14 23:37:44 +00:00
Bodo Möller
e5c84d5152 New function ERR_error_string_n. 2000-04-14 23:36:15 +00:00
Richard Levitte
7a807ad8a7 "make update" 2000-04-09 12:52:40 +00:00
Richard Levitte
d86b6915be I've always wanted to make the CONF library more adaptable. Here's
the result.

I have retained the old behavior of the CONF_* functions, and have
added a more "object oriented" interface through NCONF_* functions
(New CONF, you see :-)), working the same way as, for example, the
BIO interface.  Really, the CONF_* are rewritten so they use the
NCONF_* functions internally.

In addition to that, I've split the old conf.c code into two files,
conf_def.c and conf_api.c.  conf_def.c contains the default config
object that reads a configuration file the standard OpenSSL way, as
well as configuration file with Win32 registry file syntax (I'm not
sure I got that one right).  conf_api.c provides an API to build other
configuration file readers around (can you see a configuraion file in
XML?  I can :-)).

Finally, I've changed the name conf_lcl.h to conf_def.h, since it's
made specifically for that "class" and none others.
2000-04-09 12:04:35 +00:00
Geoff Thorpe
51175595b3 Constification, and a silly mistake in the comments. 2000-04-06 14:54:54 +00:00
Geoff Thorpe
bc2aadad84 This helps make the DSO stuff more portable;
* "no-dso" option available in Configure so that all DSO methods will
  return NULL, overriding any support the platform might otherwise
  have built.
* dlfcn_no_h config string now available rather than just dlfcn. This
  is for platforms that have dlfcn.h functions but do not have (or
  need) the dlfcn.h header file.
2000-04-06 07:09:45 +00:00
Geoff Thorpe
9ec0126ed2 This commit ties the new DSO code (crypto/dso/) into the build for a
variety of platforms. A few are missing, and they will be added in
eventually, but as this is new stuff, it was better to not break lots of
platforms in one go that we can't easily test. The changes to "Configure"
should illustrate how to add support to other systems if you feel like
having a go.

NB: I'll add something shortly to allow you to add "dlfcn.h" support on
those platforms that don't have (or need) a dlfcn.h header file. (The
symbol for Configure will probably by "dlfcn_no_h").

Thanks to Richard Levitte, who is responsible for the dso_dl.c support,
understanding the trickier aspects of the build process, and giving great
feedback on everything else.

[Don't use this stuff if you're easily offended by changes to the
interface or behaviour - it's still work in progress.]

PR:
2000-04-04 22:32:19 +00:00
Geoff Thorpe
8f4fac7f96 This is a set of startup code for the DSO support, it's not yet linked into
the build process (an upcoming commit no doubt), and is very much *new*
code - what that means is that it compiles ok - usually. It certainly
doesn't mean it runs well or even properly yet. Please don't muck round
with this unless you're looking to help out and hunt bugs. :-)

Currently this code doesn't have any support for controlling the "load"
behaviour (eg. paths, filename translations, etc). That'll be handled
using DSO_ctrl() and various flags, once we work out a sensible set of
flags.
2000-04-04 21:57:11 +00:00
Richard Levitte
7c6c052e68 Tagging has now been done, update to the next possible version (I keep
a low profile, so we don't get discontinuity in the numbering...)
2000-04-01 11:21:14 +00:00
Richard Levitte
561c71a76b Building version 0.9.5a 2000-04-01 11:03:41 +00:00
Richard Levitte
c2359eb18c _lrotl and _lrotr are defined in MSVC but nowhere else that we know
off.
2000-04-01 10:39:33 +00:00
Bodo Möller
b841e0acd8 'entropy >= ENTROPY_NEEDED' should be evaluated while the
variables are locked.
2000-03-30 06:11:54 +00:00
Richard Levitte
7ae634de49 Since ssleay_rand_initialize() unlocks then locks CRYPTO_LOCK_RAND,
it's a good thing if ssleay_rand_status() would do the corresponding
lock and unlock as everyone else...
2000-03-29 17:25:52 +00:00
Richard Levitte
6e9aee5724 Removed, especially since it conflicts with des.pod on
case-insensitive file systems.
2000-03-27 12:34:58 +00:00
Dr. Stephen Henson
b475baffb2 Fix for HMAC. 2000-03-27 00:53:27 +00:00
Richard Levitte
9cead2f2a5 Beautifying code. 2000-03-25 21:17:51 +00:00
Richard Levitte
90cc4e29b3 Tagging has been done, update to next probable version... 2000-03-23 21:14:11 +00:00
Richard Levitte
0806278561 Time for version 0.9.5a beta2
I know it's earlier than announced.  The high amount of problems in
beta1 warants this, however.
2000-03-23 21:07:41 +00:00
Richard Levitte
0fa197d8bc Clean up context, even if an error occured. 2000-03-23 18:14:21 +00:00
Dr. Stephen Henson
555b22cfca Update docs and remove old PKCS#7 README file. 2000-03-23 02:35:47 +00:00
Dr. Stephen Henson
e77066ea0a Fix a memory leak in PKCS12_parse.
Don't copy private key to X509 etc public key structures.
Fix for warning.
2000-03-22 13:50:23 +00:00
Ulf Möller
623bb80b77 In some of the Makefiles CPP was not defined. 2000-03-20 18:16:52 +00:00
Ulf Möller
71b4d8971b Problems with the Windows build. 2000-03-20 13:40:16 +00:00
Richard Levitte
c81ccaddad Tagging done, we move to the next possible. 2000-03-20 07:47:37 +00:00
Richard Levitte
be1755f1cf make update 2000-03-20 07:35:38 +00:00
Richard Levitte
3cf4f5d05e Change the version text, it's time to release the first beta of 0.9.5a. 2000-03-20 07:22:47 +00:00
Ulf Möller
a6aa71ff5f Bug fix: RAND_write_file() failed to write to files created by open()
on Win32.
2000-03-19 22:57:07 +00:00
Richard Levitte
87b89b799f Make sure an error condition is returned if, for some reason, the file
couldn't be opened.
2000-03-19 19:10:03 +00:00
Ulf Möller
f3f3cc0cca oops. don't use "entropy" directly. 2000-03-19 17:20:26 +00:00
Ulf Möller
c97b11f4b3 New function RAND_event() collects entropy from Windows events. 2000-03-19 17:14:25 +00:00
Ulf Möller
2501b335fa FLAT_INC is not needed; we use -I.. all the time 2000-03-19 12:15:24 +00:00
Ulf Möller
48b83a2504 Integrate podd.h sk.h into set_key.c 2000-03-19 12:13:44 +00:00
Richard Levitte
e55818b9d3 Change the notation and coding of the version to be able to contain
both a patch level and a beta status.  IMHO, it also makes more sense
to have beta status be part of the development status than to have it
be an alternate name for patch levels under special conditions.
2000-03-19 09:35:19 +00:00
Richard Levitte
ea82355258 Keep in sync with Unix code, and prepare for a misfeature fix. 2000-03-19 09:23:25 +00:00
Ulf Möller
1f39d082c6 make update 2000-03-19 02:18:45 +00:00
Ulf Möller
edb93ae643 cleanup. 2000-03-19 02:10:17 +00:00
Ulf Möller
395df2fe30 libdes manpage.
This may still contain a few errors from the old documentation,
but most of it should make sense.
2000-03-19 02:09:37 +00:00
Ulf Möller
7af4816f0e des_quad_cksum() byte order bug fix.
See http://www.pdc.kth.se/kth-krb/

Their solution for CRAY is somewhat awkward.
I'll assume that a "short" is 32 bits on CRAY to avoid the
#ifdef _CRAY
    typedef struct {
        unsigned int a:32;
        unsigned int b:32;
    } XXX;
#else
    typedef DES_LONG XXX;
#endif
2000-03-19 02:06:37 +00:00
Ulf Möller
fc79993620 DES in Perl was incomplete and not very useful 2000-03-18 18:39:58 +00:00
Ulf Möller
7043a4fc4a superseded by des_modes.pod 2000-03-18 18:37:43 +00:00
Ulf Möller
50c16ed350 change manpages to pod. Contents are not up to date! 2000-03-18 17:55:09 +00:00
Bodo Möller
6e22639f46 Eliminate memory leaks in mem_dbg.c. 2000-03-18 15:18:27 +00:00
Richard Levitte
ee7f80c580 Make sure to complete the cleanup of names. 2000-03-17 23:49:15 +00:00
Richard Levitte
158ef04857 Bugs corrected 2000-03-17 10:02:16 +00:00
Bodo Möller
82dccbd72a Insert a comment: This is one of the few files in this directory
that is actually used (even though it may not appear so at first
sight).
2000-03-14 14:33:11 +00:00
Bodo Möller
24aaff588a Remove "Makefile.uni" files and some related stuff.
This was meant for building individual ciphers separately;
but nothing of this is maintained, it does not work
because we rely on central configuration by the Configure
utility with <openssl/opensslconf.h> etc., so the files
are only wasting space and time.
2000-03-14 13:56:00 +00:00
Richard Levitte
d8779db47b Typos corrected. 2000-03-14 06:51:18 +00:00
Richard Levitte
cff4cbaaa7 Target added. 2000-03-14 06:17:52 +00:00
Richard Levitte
2d708bf61d Bugs corrected, and a couple of include files to get declarations for
lib$-functions and sys$-functions.
2000-03-14 06:12:30 +00:00
Richard Levitte
5241a83b2d bss_log has dollars, so compile it with that warning flag disabled. 2000-03-14 04:23:03 +00:00
Richard Levitte
008fee3838 Typo corrected 2000-03-14 04:16:10 +00:00
Dr. Stephen Henson
80870566cf Make V_ASN1_APP_CHOOSE work again. 2000-03-14 03:29:57 +00:00
Bodo Möller
65b002f399 Update test suite so that 'make test' succeeds in 'no-rsa' configuration. 2000-03-13 19:24:39 +00:00
Bodo Möller
88f17a5e98 Remove Win32 assembler files. They are always rebuilt (with some
choice of parameters) when they are needed.
2000-03-13 08:04:20 +00:00
Bodo Möller
863fe2ecac cleaning up a little 2000-03-12 23:27:14 +00:00
Ulf Möller
3a6a39c373 asm workaround for SuSE Linux
proposed by Holger Reif
2000-03-12 12:52:36 +00:00
Ulf Möller
cee814f9d5 make update 2000-03-12 12:49:45 +00:00
Bodo Möller
bf8479d22f Workaround for Windoze weirdness. 2000-03-11 01:29:26 +00:00
Ulf Möller
f95808e8a5 NO_SYSLOG is defined for MSDOS anyway. just don't include the Unix
header...
2000-03-10 23:45:51 +00:00
Bodo Möller
4991d07cf3 Use signed types where necessary, and add missing functionality
to make SSL_nread0 work.
2000-03-10 21:44:38 +00:00
Ulf Möller
9e03333fd5 Use L for all constants. 2000-03-10 17:43:05 +00:00
Ulf Möller
153a59f46d Repair bss_log.
Curiously enough, void functions don't return a value.
2000-03-10 17:01:23 +00:00
Ulf Möller
837174dd63 bug fix.
Submitted by: "Yoram Meroz" <yoram@mail.idrive.com>
2000-03-09 17:07:19 +00:00
Dr. Stephen Henson
c61252001b Fix typo and make ca get the CA and request fields correct. 2000-03-08 12:44:10 +00:00
Richard Levitte
3bf7ef5389 Check that a password was actually passed, or the user will just get
mysterious crashes.
2000-03-07 22:35:27 +00:00
Dr. Stephen Henson
068fdce877 New compatability trust and purpose settings. 2000-03-07 14:04:29 +00:00
Dr. Stephen Henson
48fe0eec67 Fix the PKCS#8 DSA code so it works again. All the
broken formats worked but the valid didn't :-(
2000-03-07 01:03:33 +00:00
Bodo Möller
59fc2b0fc2 Preserve reason strings in automatically build tables. 2000-03-05 00:19:36 +00:00
Richard Levitte
5ba7c902e5 Beautifying. Sorry, but code that's slammed to the far left is not
very readable in my opinion.
2000-03-04 21:31:52 +00:00
Richard Levitte
3916800fef Let's care about the compiler warnings for both cases, shall we? 2000-03-04 20:19:57 +00:00
Bodo Möller
1a2450bfc3 There is no reason to use downcase letters throughout in error reason
strings, it's just the default because it's usually ok.
2000-03-04 17:56:32 +00:00
Ben Laurie
e45b3305b7 Get definition of ssize_t. 2000-03-04 11:42:40 +00:00
Bodo Möller
0a150c5c9f Generate correct error reasons strings for SYSerr. 2000-03-04 01:36:53 +00:00
Ulf Möller
938d90db71 gcc warnings 2000-03-04 00:21:45 +00:00
Bodo Möller
741e600c12 Use signed type where -1 may be returned. 2000-03-03 22:34:35 +00:00
Bodo Möller
d6f68fa314 Fix for previous patch: If RAND_pseudo_bytes returns 0, this is not an error. 2000-03-03 07:51:25 +00:00
Dr. Stephen Henson
645820f273 Make name_funcs_stack static. 2000-03-03 01:37:11 +00:00
Dr. Stephen Henson
d9c88a3902 Move the 'file scope' argument in set_label to
the third argument: the second was being used
already.
2000-03-03 00:06:40 +00:00
Bodo Möller
7c472f706e Use RAND_pseudo_bytes, not RAND_bytes, for IVs/salts. 2000-03-02 22:29:38 +00:00
Bodo Möller
df83eeb710 Update comment. 2000-03-02 22:08:30 +00:00
Bodo Möller
743e7be913 Add missing dependencies. 2000-03-02 19:30:41 +00:00
Bodo Möller
5eb8ca4d92 Use RAND_METHOD for implementing RAND_status. 2000-03-02 14:34:58 +00:00
Bodo Möller
2d092edf5e Change comment. 2000-03-02 14:34:08 +00:00
Richard Levitte
5ee0d9c4a3 Hack b_print.c to implement asprintf() functionality. Not enabled by
default yet, I wanna play with it a bit more.

For those who don't know: asprintf() is an allocating sprintf.  The
first argument to it is a double indirection to char instead of a
single.
2000-03-02 07:50:02 +00:00
Richard Levitte
84339237d1 Make bss_log.c a bit more readable, and implement it for VMS as well. 2000-03-02 07:45:31 +00:00
Dr. Stephen Henson
582e592924 Fix bug which would free up a public key
twice if the verify callback tried to
continue after a signature failure.
2000-03-02 00:37:53 +00:00
Ulf Möller
8782a42627 add comment. 2000-03-01 19:08:47 +00:00
Ulf Möller
0b8fa44ef0 Bug fix. 2000-03-01 19:08:27 +00:00
Ulf Möller
f1a617edc9 check for WIN32 (needed by Mingw32) 2000-03-01 01:46:34 +00:00
Bodo Möller
27b782732f 'rand' application for creating pseudo-random files. 2000-02-29 23:47:01 +00:00
Bodo Möller
19c057da2e Check BN_rand return value.
"make update".
2000-02-29 22:37:27 +00:00
Ulf Möller
96723a3a68 Bug fix.
Pointed out by: Gisle Vanem <gvanem@eunet.no>
2000-02-29 14:47:29 +00:00
Ulf Möller
e64dceab74 Switch for turning on the predictable "random" number generator. 2000-02-28 20:19:39 +00:00
Ulf Möller
c9e1fe33be Fix for non-monolithic build.
Submitted by: Andrew Gray <agray@iconsinc.com>
2000-02-28 20:16:06 +00:00
Ulf Möller
2da0c11926 Support assembler for Mingw32. 2000-02-28 19:16:41 +00:00
Dr. Stephen Henson
82b931860a Ouch! PKCS7_encrypt() was heading MIME text headers twice
because it added them manually and as part of SMIME_crlf_copy().
Removed the manual add.
2000-02-28 14:11:19 +00:00
Richard Levitte
11750113c6 Tagging has been done, time to switch to 0.9.6-dev. 2000-02-28 12:11:39 +00:00
Richard Levitte
74cdf6f73a Time for a release 2000-02-28 11:59:02 +00:00
Richard Levitte
42a9af38e7 Typo corrected. 2000-02-28 11:30:31 +00:00
Richard Levitte
1b7aee1d4e Short is always promoted to int when passed as a function argument.
This is especially true when it's part of a '...'.
2000-02-27 23:17:18 +00:00
Richard Levitte
4ba48ec4d0 Include rand.h so RAND_pseudo_bytes may be declared.
Remove one ampersand so the compiler may complain less.
Make rand() static so it will not conflict with the C RTL.
Make bug() static too, for good measure.
2000-02-27 22:57:53 +00:00
Bodo Möller
fd74679ae2 Use standard header file string.h for memset prototype (where
"standard" refers to the C language, probably there's also some
standard that defines memory.h).
2000-02-27 17:37:41 +00:00
Dr. Stephen Henson
587bb0e02e Don't call BN_rand with zero bits in bntest.c 2000-02-27 17:34:30 +00:00
Ben Laurie
c850925cdf Declare memset. 2000-02-27 17:01:20 +00:00
Ben Laurie
707ef52e21 Typo. 2000-02-27 16:56:48 +00:00
Bodo Möller
981cdfab86 Add a comment. 2000-02-27 11:48:32 +00:00
Richard Levitte
13bf48c77a For lack of a better name, this is now called 0.9.5beta3-dev until the
release.
2000-02-27 11:12:58 +00:00
Richard Levitte
a1a426ea20 Change version string to reflect the release of beta 2. 2000-02-27 11:07:23 +00:00
Richard Levitte
6209ada910 New logical names to skip algorithms are now supported.
Also, on Alpha, vms.mar is no longer used (it produced a lot of
confusing messages) for BN.  Instead, the assembler part of bn_lcl.h
is used.
2000-02-27 10:39:41 +00:00
Ulf Möller
688938fbb4 Bug fix! 2000-02-27 02:05:39 +00:00
Dr. Stephen Henson
94de04192d Fix so Win32 assembly language works with MASM.
Add info about where to get MASM.
2000-02-27 01:15:25 +00:00
Ulf Möller
1070e0e2ee *** empty log message *** 2000-02-27 00:00:56 +00:00
Ulf Möller
1b199605c4 workaround no longer needed 2000-02-26 22:37:43 +00:00
Ulf Möller
f27e41349f remove 2000-02-26 22:37:34 +00:00
Ulf Möller
775c63fc02 Reorganize bn_mul.c (no bugfix yet), remove obsolete files in BN library. 2000-02-26 22:16:47 +00:00
Dr. Stephen Henson
0202197dbf Make ASN1 types real typedefs.
Rebuild error files.
2000-02-26 19:25:31 +00:00
Andy Polyakov
63933136ab BN_div_recp fix. I've ran divtest for 10 mins and it didn't exhibit a
single fault:-) Needless to mention that bnbug.c posted couple of days
ago passes as well...
2000-02-26 16:20:05 +00:00
Richard Levitte
6ee6fdf555 A small script to compile mttest.c on VMS as well. 2000-02-26 11:17:33 +00:00
Richard Levitte
c131593d48 Make sure there's some entropy, and log a few more errors. 2000-02-26 11:02:31 +00:00
Bodo Möller
6d0d5431d4 More get0 et al. changes. Also provide fgrep targets in CHANGES
where the new functions are mentioned.
2000-02-26 08:36:46 +00:00
Richard Levitte
7bd3a58022 make update 2000-02-26 04:48:22 +00:00
Richard Levitte
a1990dd76d Don't include sys/types.h if NO_SYS_TYPES_H is defined. 2000-02-26 03:55:15 +00:00
Richard Levitte
668ba7d63f ftruncate() and fileno() are not supported on all versions of OpenVMS
(they don't really exist before version 7), so that solution was toast.
Instead, let's do it the way it's done on Unix, but then remove older
versions of the file.

That new mechanism *may* fail for some unixly formated file spec,
although I wouldn't worry too much about it.
2000-02-26 01:55:56 +00:00
Dr. Stephen Henson
c7cb16a8ff Rename functions for new convention. 2000-02-26 01:55:33 +00:00
Richard Levitte
47c177c7b3 Let's avoid compiler warnings over types.
Actually, this should be resolved by using size_t a bit more, but
that'll be for later.
2000-02-26 01:45:17 +00:00
Richard Levitte
b755955a53 Compile rand_egd.c on VMS as well. 2000-02-26 00:29:33 +00:00
Richard Levitte
7c0dc41c38 For safety, check __VMS as well. 2000-02-26 00:26:17 +00:00
Richard Levitte
c29b6d560b Since a stack with quite long name is declared here, vms_idhacks.h is
also needed to get around C compilers on VMS that set the symbol limit
to 31 characters.  Bot the macros VMS and __VMS are checked, since
there's no real way to know if e_os.h has been included yet.
2000-02-26 00:01:16 +00:00
Richard Levitte
1340db6569 Small error fix. 2000-02-25 23:33:16 +00:00
Richard Levitte
9da65c3280 Adjust all the old scripts to deal with the new location. 2000-02-25 23:18:27 +00:00
Richard Levitte
dc8c8cda4d New script to compile on systems that already have pthreads in the
system.
2000-02-25 23:17:46 +00:00
Richard Levitte
2d2d31394a Update the two threads modules to conform to our recommendations (use
CRYPTO_num_locks() instead of CRYPTO_NUM_LOCKS!), and correct all the
inconsistencies with the rest of OpenSSL.

At least, this compiles nicely on Linux using PTHREADS.  I've done no
other tests so far.
2000-02-25 23:16:56 +00:00
Ulf Möller
582afb4bd7 flush output.
Looks like it fails when b is a power of 2, but I never get incorrect
results.
2000-02-25 22:08:37 +00:00
Richard Levitte
f36e02b2ef Enhance consistency by using BIO_flush() instead of fflush(). 2000-02-25 20:40:12 +00:00
Richard Levitte
3e0f27f3c9 Changes to synchronise with Unix.
(actually, much more is needed, like a real config script)
2000-02-25 20:37:46 +00:00
Ulf Möller
17dddc0596 Test the division functions.
Apparently BN_div_recp reports an error for small divisors
(1,2,4,8,40).

I haven't got mismatches so far. If you can, please run the test
program for a few days (nohup divtest >out& or something), and if it
reports a mismatch, post the output.
2000-02-25 20:28:54 +00:00
Ulf Möller
3167f68faf The main() return value is a program's exit code. 2000-02-25 16:04:52 +00:00
Geoff Thorpe
4621a00063 More VC++ pickiness. (destest.c doesn't have a "return" and the usual
signed/unsigned stuff in s3_pkt.c)

Submitted by:
Reviewed by:
PR:
2000-02-25 15:09:04 +00:00
Geoff Thorpe
7dce5a727a Gets around VC++ compiler pickiness. (long != double)
PR:
2000-02-25 14:50:37 +00:00
Ulf Möller
a6fc578bd5 mt contained an old copy of mttest.c. remove it and move the other
files to crypto/threads
2000-02-25 14:40:31 +00:00
Ulf Möller
fea217f96f EGD bugfix.
Submitted by: Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
2000-02-25 14:16:43 +00:00
Ulf Möller
b478e91fda different snprintf version. 2000-02-25 14:00:24 +00:00
Bodo Möller
b05c7211cb Clarification. 2000-02-25 07:48:02 +00:00
Bodo Möller
c6709c6b0f handle entropy estimate correctly 2000-02-25 07:40:53 +00:00
Dr. Stephen Henson
fbb41ae0ad Allow code which calls RSA temp key callback to cope
with a failure.

Fix typos in some error codes.
2000-02-25 00:23:48 +00:00
Ulf Möller
766d78c8f5 divide the correct number... 2000-02-25 00:14:50 +00:00
Ulf Möller
c04949e978 work around a bug in BN_div_recp or BN_reciprocal 2000-02-24 23:37:15 +00:00
Ulf Möller
9fd4ee5d7c Use public domain snprintf() implementation by Patrick Powell to avoid
potential buffer overrun in BIO_printf().
----------------------------------------------------------------------
crypto/bio/b_print.c CVS:
----------------------------------------------------------------------
2000-02-24 22:23:45 +00:00
Bodo Möller
f6de86dc3d Version 0.9.5beta2-dev (so that the next snapshot will not
claim to be 0.9.5beta1).

(Are the version number examples correct -- the same numerical
code for:
 * 0.9.3beta2-dev 0x00903002
 * 0.9.3beta2     0x00903002
?)
2000-02-24 20:40:02 +00:00
Bodo Möller
1a33f6da8b Don't use buffered fread() to read from DEVRANDOM,
because this will drain the entropy pool.
2000-02-24 20:24:45 +00:00
Bodo Möller
0dd0cbf554 Do fflush(stdout) when there was an error. 2000-02-24 20:13:27 +00:00
Bodo Möller
a7b991bd68 Don't define platform-dependent preprocessor symbols for OPENSSL_THREAD_DEFINES.
"make update".
2000-02-24 18:19:50 +00:00
Ralf S. Engelschall
8d5b4ee1ca Add an evil cast, because POSIX/SUSv2 define connect(2) require
the second argument to be of type ``struct sockaddr *''.
2000-02-24 10:36:51 +00:00
Ulf Möller
4ec2d4d2b3 Support EGD. 2000-02-24 02:51:47 +00:00
Richard Levitte
5921ea3bcf 0.9.5beta1 2000-02-24 02:22:15 +00:00
Richard Levitte
e6a58767c5 make update 2000-02-23 23:38:59 +00:00
Ulf Möller
4a26329b4c correct macro. 2000-02-23 22:11:07 +00:00
Richard Levitte
88886fd305 Sync with Unix 2000-02-23 19:41:09 +00:00
Dr. Stephen Henson
41e68ef25f Add PBE algorithms with ciphers, not digests. 2000-02-23 14:27:47 +00:00
Dr. Stephen Henson
3142c86d65 Allow ADH to be used but not present in the default cipher
list.

Allow CERTIFICATE to be used in PEM headers for PKCS#7 structures:
some CAs do this.
2000-02-23 01:11:01 +00:00
Dr. Stephen Henson
4b42658082 Make pkcs8 work again.
Make EVP_CIPHER_type() return NID_undef if the cipher has no
ASN1 OID, modify code to handle this.
2000-02-22 18:45:11 +00:00
Ulf Möller
43e9d805e8 warning. 2000-02-22 12:53:59 +00:00
Ulf Möller
17ef291661 Check tlen size in all padding_check functions. As called within the rsa
library, the output buffer always is large enough, but if the tlen
parameter is there, it should be checked in the interest of clarity,
as proposed by David Sacerdote <das33@cornell.edu>.
2000-02-22 11:34:01 +00:00
Dr. Stephen Henson
72b60351f1 Change EVP_MD_CTX_type so it is more logical and add EVP_MD_CTX_md for
the old functionality.

Various warning fixes.

Initial EVP symmetric cipher docs.
2000-02-22 02:59:26 +00:00
Richard Levitte
d3442bc780 Move the registration of callback functions to special functions
designed for that.  This removes the potential error to mix data and
function pointers.

Please note that I'm a little unsure how incorrect calls to the old
ctrl functions should be handled, in som cases.  I currently return 0
and that's it, but it may be more correct to generate a genuine error
in those cases.
2000-02-20 23:43:02 +00:00
Ulf Möller
4ec19e203c Fix gcc warnings. 2000-02-20 20:59:21 +00:00
Dr. Stephen Henson
d754b3850f Change the 'other' structure in certificate aux info. 2000-02-20 18:27:23 +00:00
Bodo Möller
853f757ece Allow for higher granularity of entropy estimates by using 'double'
instead of 'unsigned' counters.
Seed PRNG in MacOS/GetHTTPS.src/GetHTTPS.cpp.

Partially submitted by Yoram Meroz <yoram@mail.idrive.com>.
2000-02-19 15:22:53 +00:00
Richard Levitte
4328d51d08 Cosmetic change. No, openssl.h.in is not autogenerated :-) 2000-02-18 09:06:55 +00:00
Dr. Stephen Henson
8a208cba97 New functions and option to use NEW in certificate requests. 2000-02-18 00:54:21 +00:00
Bodo Möller
5c2ec54f12 Make sure the return value of by_file_ctrl(..., X509_L_FILE_LOAD, ...)
aka X509_LOOKUP_load_file(...) is always 0 or 1, not the counter
returned from the recently introduced function X509_load_cert_crl_file.
X509_STORE_load_locations expects X509_LOOKUP_load_file to return 1 on
success, and possibly there's other software that relies on this too.
2000-02-17 21:04:40 +00:00
Dr. Stephen Henson
a3fe382e2d Pass phrase reorganisation. 2000-02-16 23:16:01 +00:00
Ben Laurie
bd03b99b9b Add support for Compaq Atalla crypto accelerator. 2000-02-16 22:15:39 +00:00
Andy Polyakov
8691ff97a1 Move primes to read-only segment. 2000-02-16 13:24:06 +00:00
Ben Laurie
bd44570322 Fix signed/unsigned warnings. 2000-02-16 12:09:17 +00:00
Andy Polyakov
2aca27a9a8 Move initial key to read-only segment. 2000-02-15 17:43:12 +00:00
Andy Polyakov
bc80c86031 Move CAST_S_tables to read-only segment. 2000-02-15 17:37:44 +00:00
Andy Polyakov
89cee61b45 New NO_INLINE_ASM macro. Primary target for the moment is Solaris x86
which can't stand GNU C assembler templates.
2000-02-15 17:20:52 +00:00
Andy Polyakov
ea96c4bc7f test_mont was exercising 100-bit multiplication modulus X*I-bit, where
X is 5120 on 32-bit and 151552 on 64-bit architectures and I varies
from 0 to 4. As result the test was *unreasonably* slow and virtually
impossible to complete on 64-bit architectures (e.g. IRIX bc couldn't
even swallow such long lines).
2000-02-15 13:50:02 +00:00
Dr. Stephen Henson
c9080477ec Modernise 'selfsign.c' to use new X509_NAME code
and add example of extension aliasing. Also fix
the extension aliasing because it didn't work :-)
2000-02-13 00:28:26 +00:00
Andy Polyakov
bcba6cc60f HP-UX tune-up: new unified configs, HP C compiler bug workaround. 2000-02-12 23:33:01 +00:00
Bodo Möller
cbcc5c01f9 Update. 2000-02-11 16:31:04 +00:00
Ben Laurie
b1f8affbd5 Correct time in seconds instead of minutes. 2000-02-11 16:08:40 +00:00
Ralf S. Engelschall
667ac4ec6a Make gcc 2.95.2 happy again, even under ``-Wall -Wshadow -Wpointer-arith -Wcast-align
-Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline''.
2000-02-11 09:47:18 +00:00
Bodo Möller
0a751d8ce8 16 * 8 = 128. 2000-02-10 21:47:06 +00:00
Bodo Möller
8ce288a881 Note about des_ncbc_encrypt. 2000-02-08 21:50:52 +00:00
Richard Levitte
cf0694015e Constify 2000-02-08 14:19:14 +00:00
Dr. Stephen Henson
f07fb9b24b Add command line password options to the reamining utilities,
amend docs.
2000-02-08 01:34:59 +00:00
Dr. Stephen Henson
ff8a4c47ce Rename the X509V3_*_d2i functions to X509_get_ext_d2i() etc.
This better reflects their behaviour.
2000-02-07 01:17:22 +00:00
Ulf Möller
4e539aaa1e "print" is GNU bc specific. 2000-02-06 23:33:06 +00:00
Ulf Möller
fcb20be846 put missing line back in. 2000-02-06 16:35:28 +00:00
Ulf Möller
cae55bfc68 Improve bntest slightly, and fix another bug in the BN library. 2000-02-06 15:56:59 +00:00
Andy Polyakov
0fad6cb7e7 Support for MacOS X (Rhapsody) is added. Also get rid of volatile
qualifier in asm definitions as it prevents compiler from moving
the instruction(s) during optimization pass.
2000-02-06 11:15:20 +00:00
Ulf Möller
4a6222d71b BN_div bugfix. The q-- loop should not be entered in the n0==d0 case. 2000-02-06 00:25:39 +00:00
Bodo Möller
29a28ee503 Cosmetic changes. 2000-02-05 21:28:09 +00:00
Dr. Stephen Henson
66430207a4 Add support for some broken PKCS#8 formats. 2000-02-05 21:07:56 +00:00
Bodo Möller
eb5a6a55c5 Commit patch to bn.h that CVS decided to throw away during 'cvs update',
and initialize too_many because memset(..., 0, ...) is not used here.
2000-02-05 20:39:26 +00:00
Bodo Möller
37e48b88ad Generate just one error code if iterated SSL_CTX_get() fails.
Avoid enabled 'assert()' in production library.
2000-02-05 19:29:00 +00:00
Ulf Möller
6535eb1728 Use MONT_WORD macro to control if the word-based or the bignum
algorithm is used.
2000-02-05 18:23:05 +00:00
Ulf Möller
9b141126d4 New functions BN_CTX_start(), BN_CTX_get(), BN_CTX_end() to access
temporary BIGNUMs. BN_CTX still uses a fixed number of BIGNUMs, but
the BN_CTX implementation could now easily be changed.
2000-02-05 14:17:32 +00:00
Ulf Möller
c236e66d62 Document RC4. 2000-02-05 10:41:05 +00:00
Ulf Möller
981b87f712 Replace ridiculous libdes PRNG with RAND_bytes. These functions are not
used anywhere in OpenSSL, but might be used by libdes applications.
2000-02-05 10:39:54 +00:00
Andy Polyakov
d716308288 New xcbc_ok test vector is required after the parity bits in cbc2_key
were fixed up. The catch is that in the DESX test the cbc2_key is used
as whitening key where *all* 64 bits are significant.
2000-02-04 15:16:22 +00:00
Dr. Stephen Henson
af57d84312 Rename SSLeay_add_all_algorithms() et al to
OpenSSL_add_all_algorithms(). Move these into
separate files so they work properly.
2000-02-04 14:01:38 +00:00
Bodo Möller
f50c049707 Use correct, not American spelling. 2000-02-04 00:56:09 +00:00
Ulf Möller
ce76ce43ae *** empty log message *** 2000-02-03 23:38:55 +00:00
Ulf Möller
657e60fa00 ispell (and minor modifications) 2000-02-03 23:23:24 +00:00
Ulf Möller
9dbc41d7ee Document hash functions. 2000-02-03 18:22:01 +00:00