summaryrefslogtreecommitdiffstats
path: root/crypto
AgeCommit message (Collapse)Author
2004-03-17Variety of belt-tightenings in the bignum code. (Please help test this!)Geoff Thorpe
- 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-15Constify d2i, s2i, c2i and r2i functions and other associatedRichard Levitte
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-15It was just pointed out to me that it's better to cast to double...Richard Levitte
2004-03-15Make sure that the last argument to RAND_add() is a float, or someRichard Levitte
compilers may complain.
2004-03-15Make sure we use unsigned constants, or come compilers may complain.Richard Levitte
2004-03-13Convert openssl code not to assume the deprecated form of BN_zero().Geoff Thorpe
Remove certain redundant BN_zero() initialisations, because BN_CTX_get(), BN_init(), [etc] already initialise to zero. Correct error checking in bn_sqr.c, and be less wishy-wash about how/why the result's 'top' value is set (note also, 'max' is always > 0 at this point).
2004-03-13The efforts to eliminate the dual-representation of zero and to ensureGeoff Thorpe
bignums are passed in and out of functions and APIs in a consistent form has highlighted that zero-valued bignums don't need any allocated word data. The use of BN_set_word() to initialise a bignum to zero causes needless allocation and gives it a return value that must be checked. This change converts BN_zero() to a self-contained macro that has no return/expression value and does not cause any expansion of bignum data. Note, it would be tempting to rewrite the deprecated version as a success-valued comma expression, such as; #define BN_zero(a) ((a)->top = (a)->neg = 0, 1) However, this evaluates 'a' twice and would confuse initialisation loops (eg. while(..) { BN_zero(bn++) } ). As such, the deprecated version continues to use BN_set_word().
2004-03-13Document a change I'd already made, and at the same time, correct theGeoff Thorpe
change to work properly; BN_zero() should set 'neg' to zero as well as 'top' to match the behaviour of BN_new().
2004-03-10staticGeoff Thorpe
2004-03-09Minimise the amount of code dependent on BN_DEBUG_RAND. In particular,Geoff Thorpe
redefine bn_clear_top2max() to be a NOP in the non-debugging case, and remove some unnecessary usages in bn_nist.c. Submitted by: Nils Larsch Reviewed by: Geoff Thorpe, Ulf Möller
2004-03-09More changes coming out of the bignum auditing. BN_CTX_get() should ideallyGeoff Thorpe
return a "zero" bignum as BN_new() does - so reset 'top'. During BN_CTX_end(), released bignums should be consistent so enforce this in debug builds. Also, reduce the number of wasted BN_clear_free() calls from BN_CTX_end() (typically by 75% or so). Submitted by: Nils Larsch Reviewed by: Geoff Thorpe, Ulf Möller
2004-03-08Fix policy constraints syntax.Dr. Stephen Henson
2004-03-08Support for inhibitAnyPolicy extension.Dr. Stephen Henson
2004-03-05Cleanup ASN1 OID module when it exits.Dr. Stephen Henson
2004-03-05Memory leak fix.Dr. Stephen Henson
2004-03-05Various X509 fixes. Disable broken certificate workaroundsDr. Stephen Henson
when X509_V_FLAG_X509_STRICT is set. Check for CRLSign in CRL issuer certificates. Reject CRLs with unhandled (any) critical extensions.
2004-03-04Typos.Dr. Stephen Henson
Reported by: Jose Castejon-Amenedo <Jose.Castejon-Amenedo@hp.com>
2004-03-01Avoid a memory leak in OCSP_parse_url().Richard Levitte
Notified by Paul Siegel <psiegel@corestreet.com>
2004-02-26Make sure the given EVP_PKEY is updated in the PEM_STRING_PKCS8INF case also.Richard Levitte
PR: 833
2004-02-22A cleanup of the ecs_ossl.c code and some (doxygen) comments for ecdsa.hGeoff Thorpe
Submitted by: Nils Larsch Reviewed by: Geoff Thorpe
2004-02-22When adding positive elements, we can use BN_uadd() instead of BN_add().Geoff Thorpe
Submitted by: Nils Larsch Reviewed by: Geoff Thorpe
2004-02-19Use an OCTET STRING for the encoding of an OCSP nonce value.Dr. Stephen Henson
The old raw format can't be handled by some implementations and updates to RFC2560 will make this mandatory.
2004-02-10minor signed/unsigned warning fixesGeoff Thorpe
2004-02-07Typo in crypto/bn/asm/x86_64.c, bn_div_words().Andy Polyakov
PR: 821
2004-02-01Add flag to avoid continuousDr. Stephen Henson
memory allocate when calling EVP_MD_CTX_copy_ex(). Without this HMAC is several times slower than < 0.9.7.
2004-01-30Typo in PA-RISC 2 rules in crypto/bn/Makefile.sslAndy Polyakov
2004-01-29HP/UX PA-RISC 2 targets update.Andy Polyakov
2004-01-29TypoRichard Levitte
2004-01-28make updateRichard Levitte
2004-01-28Add the missing parts for DES CFB1 and CFB8.Richard Levitte
Add the corresponding AES parts while I'm at it. make update
2004-01-28make updateRichard Levitte
2004-01-28Unsigned vs. signed problem removedRichard Levitte
2004-01-27#undef _POSIX_C_SOURCE in ui_openssl.c ruined IRIX builds. Comment on whyAndy Polyakov
_POSIX_C_SOURCE needed in first place.
2004-01-27CFB DES sync-up with FIPS branch.Andy Polyakov
2004-01-27Avoid signed vs. unsigned warnings (which are treated like errors onRichard Levitte
Windows).
2004-01-26S_IFBLK and S_IFCHR may not exist in some places (like Windows), soRichard Levitte
let's check for those macros, and if they aren't defined, let's assume there aren't Unixly devices on this platform.
2004-01-25Even though C specification explicitly says that constant type "stretches"Andy Polyakov
automatically to accomodate the value, some compilers fail to do so. Most notably 0x0123456789ABCDEF should come out as long long in 32-bit context, but HP compiler truncates it to 32-bit value. Which in turn breaks GF(2^m) arithmetics in hpux-parisc2-cc build. Therefore this fix...
2004-01-24Get rid of bogus warning when compiling with Sun vendor compiler.Andy Polyakov
2004-01-24We're passed p, so let's use p instead of making assumptions.Richard Levitte
2004-01-22Typo...Richard Levitte
2004-01-21SHA-1 assembler tune-up for Intel P4Andy Polyakov
2004-01-10Adding a slash between the directoryt and the file is a problem withRichard Levitte
VMS. The C RTL can handle it well if the "directory" is a logical name with no colon, therefore ending being 'logname/file'. However, if the given logical names actually has a colon, or if you use a full VMS-syntax directory, you end up with 'logname:/file' or 'dev:[dir1.dir2]/file', and that isn't handled in any good way. So, on VMS, we need to check if the directory string ends with a separator (one of ':', ']' or '>' (< and > can be used instead [ and ])), and handle that by not inserting anything between the directory spec and the file name. In all other cases, it's assumed the directory spec is a logical name, so we need to place a colon between it and the file. Notified by Kevin Greaney <kevin.greaney@hp.com>.
2004-01-04Update URILutz Jänicke
Submitted by: Gertjan van Oosten <gertjan@West.NL> PR: #804
2003-12-27Fix Perl problems on sparc64.Richard Levitte
This is part of a large change submitted by Markus Friedl <markus@openbsd.org>
2003-12-27Only use environment variables if uid and gid are the same as euid and egid.Richard Levitte
This is part of a large change submitted by Markus Friedl <markus@openbsd.org>
2003-12-27Check if a random "file" is really a device file, and treat itRichard Levitte
specially if it is. Add a few OpenBSD-specific cases. This is part of a large change submitted by Markus Friedl <markus@openbsd.org>
2003-12-27Correct documentation typos.Richard Levitte
This is part of a large change submitted by Markus Friedl <markus@openbsd.org>
2003-12-27OpenBSD-internal changes.Richard Levitte
This is part of a large change submitted by Markus Friedl <markus@openbsd.org>
2003-12-27Use sh explicitely to run point.shRichard Levitte
This is part of a large change submitted by Markus Friedl <markus@openbsd.org>
2003-12-27Include strings.h so strcasecmp() and strncasecmp() get properly declared.Richard Levitte