summaryrefslogtreecommitdiff
path: root/lib/libcrypto/evp
AgeCommit message (Collapse)Author
2014-06-24Remove BIO_f_reliable(), guilty of playing with EVP_MD_CTX internals itMiod Vallat
should not know anything about. Verified not to be used in ports; riding upon the recent libcrypto major bump.
2014-06-21Switch to the ISC licensed versions of these files, which Google has madeJoel Sing
available via boringssl. ok deraadt@
2014-06-15free iv, then cleanse. from Cyril JouveTed Unangst
2014-06-15Simplify EVP_MD_CTX_create() by just using calloc(). Also, use 0 ratherJoel Sing
than '\0' for several memset(). ok beck@ miod@
2014-06-15Simplify EVP_CIPHER_CTX_new() - stop pretending that EVP_CIPHER_CTX_init()Joel Sing
does something special... just use calloc() instead. ok beck@ miod@
2014-06-15Add missing OPENSSL_cleanse() in aead_aes_gcm_cleanup().Joel Sing
ok beck@ miod@
2014-06-15The OPENSSL_cleanse() in aes_gcm_cleanup() only cleans the gcm field of theJoel Sing
EVP_AES_GCM_CTX, leaving the AES key untouched - clean the entire context, rather than just part of it. ok beck@ miod@
2014-06-12tags as requested by miod and teduTheo de Raadt
2014-06-11c-file-style hints, begone; ok beckTheo de Raadt
2014-06-10Abandon the auto-ENGINE /dev/crypto interface. VIA 3des cbc receivesTheo de Raadt
collateral damage. The syncronous nature of this mechanism has hampered performance for symmetric crypto relative to brute-force cpu. The assymetric crypto support never really materialized in drivers. So abandon the complexity. ok tedu beck mikeb some disagrement from djm but if he wants to test /dev/crypto ciphers he should do it without this this gigantic API in the way
2014-06-10Use C99 initialisers for EVP_MD structs, for clarity, grepability and toJoel Sing
protect from future field reordering/removal. No difference in generated assembly.
2014-06-07Remove various test stubs. The good ones have been moved by jsingTheo de Raadt
and others to the regress framework. These remaining ones just muddle us up when re-reading code repeatedly. ok jsing
2014-06-07malloc() result does not need a cast.Theo de Raadt
ok miod
2014-05-30remove CONST_STRICT. ok beck deraadtTed Unangst
2014-05-30no need for null check before free. from Brendan MacDonellTed Unangst
2014-05-26Implement an improved version of the EVP AEAD API. TheJoel Sing
EVP_AEAD_CTX_{open,seal} functions previously returned an ssize_t that was overloaded to indicate success/failure, along with the number of bytes written as output. This change adds an explicit *out_len argument which is used to return the number of output bytes and the return value is now an int that is purely used to identify success or failure. This change effectively rides the last libcrypto crank (although I do not expect there to be many users of the EVP AEAD API currently). Thanks to Adam Langley for providing the improved code that this diff is based on. ok miod@
2014-05-25calloc instead of malloc/memset. from Benjamin BaierTed Unangst
2014-05-22Convert OPENSSL_malloc stuff back to intrinsics, a few were missedBob Beck
as new stuff was brought in. ok miod@
2014-05-17no no md2Ted Unangst
2014-05-17no no seedTed Unangst
2014-05-16When OPENSSL_LOAD_CONF was added it ended up with more #if 0 code,Joel Sing
more #ifdefs and a new source file that contains a single function. Nuke the #if 0 code that is now a macro and move the single function in evp_acnf.c to c_all.c, which is where the other code lives. While here, tidy evp.h slightly, remove an unnecessary #ifdef __OpenBSD__ and nuke a comment that is now a lie. ok miod@
2014-05-15More KNF.Joel Sing
2014-05-15Use C99 initialisers for the AEAD struct.Joel Sing
2014-05-15KNF.Joel Sing
2014-05-15Add a ChaCha20-Poly1305 AEAD EVP implementation to libcrypto, from AdamJoel Sing
Langley's Chromium OpenSSL patches. ok miod@
2014-05-15KNF.Joel Sing
2014-05-15Add an AEAD EVP interface to libcrypto, along with AES-GCM AEADJoel Sing
implementations. This largely pulls in Adam Langley's AEAD patches from Chromium's OpenSSL. ok miod@
2014-05-15Stop being a dummy... presumably these are left overs from pedantic modeJoel Sing
that were not wrapped with #if PEDANTIC. ok miod@
2014-05-11More KNF.Joel Sing
2014-05-11KNF.Joel Sing
2014-05-08More KNF.Joel Sing
2014-05-08KNF.Joel Sing
2014-05-08Remove KSSL debug code.Joel Sing
"fire bomb" tedu@
2014-05-08KNF.Joel Sing
2014-05-08Nuke OPENSSL_FIPS - having #ifdefs inside a #ifndef for the same thingJoel Sing
is amusing. ok deraadt@
2014-05-08KNF.Joel Sing
2014-05-07KNF.Joel Sing
2014-05-07KNF.Joel Sing
2014-05-03Add checks for invalid base64 encoded data, specifically relating to theJoel Sing
handling of padding. This fixes a crash that can be triggered by feeding base64 data followed by 64 or more padding characters, which results in a negative output length. This issue was reported by David Ramos, although the same bug has been sitting in the OpenSSL RT since 2011: https://rt.openssl.org/Ticket/Display.html?id=2608 Worse still, BIO_read seems to be completely unable to detect that the base64 input was invalid/corrupt - in particular, enabling BIO_FLAGS_BASE64_NO_NL results in a stream of zero value bytes rather than no input (possibly a good replacement for /dev/null...), which could result in nasty consequences. Prior to this fix some zero value bytes were also injected without this flag being enabled. The recently added base64 regress triggers and documents these issues (and also ensures that this change retains functional behaviour).
2014-05-03It is definitly not the correct spelling.Joel Sing
2014-05-03KNF.Joel Sing
2014-05-03KNF.Joel Sing
2014-05-01Nuke unused evptests.txt - the real one is over in regress.Joel Sing
ok miod@
2014-05-01Provide an EVP implementation for ChaCha.Joel Sing
ok miod@
2014-04-27Use C99 initializers for the various FOO_METHOD structs. More readable, andMiod Vallat
avoid unreadable/unmaintainable constructs like that: const EVP_PKEY_ASN1_METHOD cmac_asn1_meth = { EVP_PKEY_CMAC, EVP_PKEY_CMAC, 0, "CMAC", "OpenSSL CMAC method", 0,0,0,0, 0,0,0, cmac_size, 0, 0,0,0,0,0,0,0, cmac_key_free, 0, 0,0 }; ok matthew@ deraadt@
2014-04-26Replace all use of ERR_add_error_data with ERR_asprintf_error_data.Bob Beck
This avoids a lot of ugly gymnastics to do snprintfs before sending the bag of strings to ERR, and eliminates at least one place in dso_dlfctn.c where it was being called with the incorrect number of arguments and using random things off the stack as addresses of strings. ok krw@, jsing@
2014-04-23Unifdef -UPEDANTIC. ok beck@ tedu@Miod Vallat
2014-04-23Figure out endianness at compile-time, using _BYTE_ORDER fromMiod Vallat
<machine/endian.h>, rather than writing 1 to a 32-bit variable and checking whether the first byte is nonzero. tweaks and ok matthew@; ok beck@ tedu@
2014-04-22Remove files which look like actual code compiled in libcrypto, but isn't.Miod Vallat
One even says (in comments): HAS BUGS! DON'T USE
2014-04-19use intrinsic strlcpy and strlcat everywhere so we only have one set ofBob Beck
funcitons to check for incorrect use. keep BUF_strlcpy and BUF_strlcat for API comptibility only. ok tedu@