summaryrefslogtreecommitdiffstats
path: root/crypto/evp/encode.c
AgeCommit message (Collapse)Author
2015-12-11Make EVP_ENCODE_CTX opaqueRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-09-19Fix indentationViktor Dukhovni
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-09-17base64 decode: check for high bitEmilia Kasper
Previously, the conversion would silently coerce to ASCII. Now, we error out. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-09-17RT3757: base64 encoding bugsEmilia Kasper
Rewrite EVP_DecodeUpdate. In particular: reject extra trailing padding, and padding in the middle of the content. Don't limit line length. Add tests. Previously, the behaviour was ill-defined, and depended on the position of the padding within the input. In addition, this appears to fix a possible two-byte oob read. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Dr Stephen Henson <steve@openssl.org>
2015-05-14Identify and move common internal libcrypto header filesRichard Levitte
There are header files in crypto/ that are used by a number of crypto/ submodules. Move those to crypto/include/internal and adapt the affected source code and Makefiles. The header files that got moved are: crypto/cryptolib.h crypto/md32_common.h Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-04-30Sanity check EVP_EncodeUpdate buffer lenMatt Caswell
There was already a sanity check to ensure the passed buffer length is not zero. Extend this to ensure that it also not negative. Thanks to Kevin Wojtysiak (Int3 Solutions) and Paramjot Oberoi (Int3 Solutions) for reporting this issue. Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-01-24ifdef cleanup, part 4a: '#ifdef undef'Rich Salz
This removes all code surrounded by '#ifdef undef' One case is left: memmove() replaced by open-coded for loop, in crypto/stack/stack.c That needs further review. Also removed a couple of instances of /* dead code */ if I saw them while doing the main removal. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-30mark all block comments that need format preserving so thatTim Hudson
indent will not alter them when reformatting comments Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2014-05-06evp: prevent underflow in base64 decodingGeoff Thorpe
This patch resolves RT ticket #2608. Thanks to Robert Dugal for originally spotting this, and to David Ramos for noticing that the ball had been dropped. Signed-off-by: Geoff Thorpe <geoff@openssl.org>
2013-09-05misspellings fixes by https://github.com/vlajos/misspell_fixerVeres Lajos
2010-06-12Fix warnings.Ben Laurie
2008-11-12Revert the size_t modifications from HEAD that had led to moreGeoff Thorpe
knock-on work than expected - they've been extracted into a patch series that can be completed elsewhere, or in a different branch, before merging back to HEAD.
2008-11-01More size_tification.Ben Laurie
2007-10-13Bunch of constifications.Andy Polyakov
2005-06-20Do no try to pretend we're at the end of anything unless we're at the endRichard Levitte
of a 4-character block.
2005-04-03If input is bad, we still need to clear the buffer.Ben Laurie
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.
2003-10-29A general spring-cleaning (in autumn) to fix up signed/unsigned warnings.Geoff Thorpe
I have tried to convert 'len' type variable declarations to unsigned as a means to address these warnings when appropriate, but when in doubt I have used casts in the comparisons instead. The better solution (that would get us all lynched by API users) would be to go through and convert all the function prototypes and structure definitions to use unsigned variables except when signed is necessary. The proliferation of (signed) "int" for strictly non-negative uses is unfortunate.
2002-11-13Security fixes brought forward from 0.9.7.Ben Laurie
2002-04-15Fix CRLF problem in BASE64 decode.Lutz Jänicke
2000-08-11Abdelilah Essiari <aes@george.lbl.gov> reports that for very smallRichard Levitte
records, EVP_EncodeUpdate() may misbehave. This happens when there's a record boundary between the two ending b64 equal signs, which makes EVP_EncodeUpdate think there has been more than one EOF, and therefore add an extra NUL at the end of the output buffer. This fix corrects that problem.
1999-09-06Fix warnings.Ben Laurie
1999-08-18Really undo the base64 change so that make test survivesBodo Möller
1999-08-14Undo base64 decoding change (was not a bug fix).Ulf Möller
1999-08-13Fix faulty base64 decoding of data that was 46 or 47 bytes long.Ulf Möller
Submitted by: Ivan Nejgebauer <ian@uns.ns.ac.yu>
1999-06-04Support the EBCDIC character set and BS2000/OSD-POSIX (work in progress).Ulf Möller
Submitted by: Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>
1999-04-23Change #include filenames from <foo.h> to <openssl.h>.Bodo Möller
Submitted by: Reviewed by: PR:
1999-04-19Change functions to ANSI C.Ulf Möller
1998-12-21Import of old SSLeay release: SSLeay 0.9.0bRalf S. Engelschall
1998-12-21Import of old SSLeay release: SSLeay 0.8.1bRalf S. Engelschall