summaryrefslogtreecommitdiffstats
path: root/crypto/evp/evp_lib.c
AgeCommit message (Collapse)Author
2017-10-18Remove parentheses of return.KaoruToda
Since return is inconsistent, I removed unnecessary parentheses and unified them. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4541)
2016-12-22Fix EVP_MD_meth_get_flagsTodd Short
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2134)
2016-05-17Copyright consolidation 04/10Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-07Rename EVP_CIPHER_CTX_cipher_data to EVP_CIPHER_CTX_get_cipher_dataMatt Caswell
We had the function EVP_CIPHER_CTX_cipher_data which is newly added for 1.1.0. As we now also need an EVP_CIPHER_CTX_set_cipher_data it makes more sense for the former to be called EVP_CIPHER_CTX_get_cipher_data. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-03-07Update the dasync engine to add a pipeline cipherMatt Caswell
Implement aes128-cbc as a pipeline capable cipher in the dasync engine. As dasync is just a dummy engine, it actually just performs the parallel encrypts/decrypts in serial. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-02-08GH641: Don't care openssl_zmallocRich Salz
Don't cast malloc-family return values. Also found some places where (a) blank line was missing; and (b) the *wrong* return value was checked. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz
This was done by the following find . -name '*.[ch]' | /tmp/pl where /tmp/pl is the following three-line script: print unless $. == 1 && m@/\* .*\.[ch] \*/@; close ARGV if eof; # Close file to reset $. And then some hand-editing of other files. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-12EVP_CIPHER_CTX_new_cipher_data was a temporary measure, not needed any moreRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Make EVP_CIPHER opaque and add creator/destructor/accessor/writer functionsRichard Levitte
We follow the method used for EVP_MD. Also, move all the internal EVP_CIPHER building macros from evp_locl.h to evp_int.h. This will benefit our builtin EVP_CIPHERs. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Remove EVP_CIPHER_CTX_flags, it's only confusingRichard Levitte
EVP_CIPHER_CTX_flags was returning the flags of its associated EVP_CIPHER. However, EVP_CIPHER_CTX has flags of its own, so this function is quite confusing and therefore error prone. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Add accessors and writers for EVP_CIPHER_CTXRichard Levitte
New functions: - EVP_CIPHER_CTX_encrypting() - EVP_CIPHER_CTX_iv() - EVP_CIPHER_CTX_iv_noconst() - EVP_CIPHER_CTX_original_iv() - EVP_CIPHER_CTX_buf_noconst() - EVP_CIPHER_CTX_num() - EVP_CIPHER_CTX_set_num() - EVP_CIPHER_CTX_cipher_data() - EVP_CIPHER_CTX_new_cipher_data() Note that the accessors / writers for iv, buf and num may go away, as those rather belong in the implementation's own structure (cipher_data) when the implementation would affect them (that would be the case when they are flagged EVP_CIPH_CUSTOM_IV or EVP_CIPH_FLAG_CUSTOM_CIPHER). Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-07Make the definition of EVP_MD opaqueRichard Levitte
This moves the definition to crypto/include/internal/evp_int.h and defines all the necessary method creators, destructors, writers and accessors. The name standard for the latter is inspired from the corresponding functions to manipulate UI methods. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-07Make the definition of EVP_MD_CTX opaqueRichard Levitte
This moves the definitionto crypto/evp/evp_locl.h, along with a few associated accessor macros. A few accessor/writer functions added. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-10-13RFC5753 compliance.Dr. Stephen Henson
RFC5753 requires that we omit parameters for AES key wrap and set them to NULL for 3DES wrap. OpenSSL decrypt uses the received algorithm parameters so can transparently handle either form. Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-08-12Return error for unsupported modes.Dr. Stephen Henson
PR#3974 PR#3975 Reviewed-by: Matt Caswell <matt@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-03-24make ASN1_OBJECT opaqueDr. Stephen Henson
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>
2013-08-05Algorithm parameter support.Dr. Stephen Henson
Check and set AlgorithmIdenfier parameters for key wrap algorithms. Currently these just set parameters to NULL.
2011-02-07Use default ASN1 if flag set.Dr. Stephen Henson
2011-01-26FIPS mode EVP changes:Dr. Stephen Henson
Set EVP_CIPH_FLAG_FIPS on approved ciphers. Support "default ASN1" flag which avoids need for ASN1 dependencies in FIPS code. Include some defines to redirect operations to a "tiny EVP" implementation in some FIPS source files. Change m_sha1.c to use EVP_PKEY_NULL_method: the EVP_MD sign/verify functions are not used in OpenSSL 1.0 and later for SHA1 and SHA2 ciphers: the EVP_PKEY API is used instead.
2010-01-26Add flags functions which were added to 0.9.8 for fips but not 1.0.0 andDr. Stephen Henson
later.
2009-12-25Traditional Yuletide commit ;-)Dr. Stephen Henson
Add Triple DES CFB1 and CFB8 to algorithm list and NID translation.
2009-04-15Updates from 1.0.0-stable.Dr. Stephen Henson
2008-12-29If we're going to return errors (no matter how stupid), then we shouldBen Laurie
test for them!
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-05-31Handle NULL parameter in some EVP utility functions.Dr. Stephen Henson
2007-02-27Update from stable branch.Dr. Stephen Henson
2006-11-29replace macros with functionsNils Larsch
Submitted by: Tracy Camp <tracyx.e.camp@intel.com>
2004-07-04PKCS#8 fixes from stable branch.Dr. Stephen Henson
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
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
2000-02-22Make pkcs8 work again.Dr. Stephen Henson
Make EVP_CIPHER_type() return NID_undef if the cipher has no ASN1 OID, modify code to handle this.
1999-05-16Fix some obvious bugs in the PKCS#7 library handling. It didn't try toDr. Stephen Henson
find the right RecipientInfo based on the recipient certificate (so would fail a lot of the time) and fixup cipher structures to correctly (maybe) modify the AlgorithmIdentifiers. Largely untested at present... this will be fixed in due course. Well the stuff was broken to begin with so if its broken now then you haven't lost anything :-)
1999-05-10Various PKCS#7 fixes to properly (maybe!) handle PKCS#7 enveloped data.Dr. Stephen Henson
Containts elements of code by Sebastian Akerman <sak@parallelconsulting.com> and made a bit less "naughty" by Steve.
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.1b (unreleased)SSLeayRalf S. Engelschall
1998-12-21Import of old SSLeay release: SSLeay 0.9.0bRalf S. Engelschall