summaryrefslogtreecommitdiffstats
path: root/crypto
AgeCommit message (Collapse)Author
2016-05-17Copyright consolidation 06/10Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-17Copyright consolidation 04/10Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-17Copyright consolidation 03/10Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-17Remove repeated condition from if in X509_NAME_onelineMatt Caswell
An if checks the value of |type| to see if it is V_ASN1_VISIBLESTRING twice. We only need to do it once. GitHub Issue #656 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-16ARMv8 assembly pack: add OPENSSL_cleanse.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-16Remove an unneccessary check of cipherMatt Caswell
Due to short-circuiting we only need to check "cipher" for NULL once. PR#699 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-16Use OPENSSL_hexchar2intRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-16const correctness: make HMAC_size() take a const *Steffan Karger
CLA: none; trivial Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #1070
2016-05-16Fold threads.h into crypto.h making API publicViktor Dukhovni
Document thread-safe lock creation Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-16Don't require any length of password when decryptingRichard Levitte
RT#2534 Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-05-16Unify <TYPE>_up_ref methods signature and behaviour.FdaSilvaYY
Add a status return value instead of void. Add some sanity checks on reference counter value. Update the docs. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-16Fix some missing OBJ_dup failure checks.FdaSilvaYY
Fix some missing OBJ_dup failure checks. Merged from https://boringssl.googlesource.com/boringssl/+/0ce78a757d815c0dde9ed5884229f3a5b2cb3e9c%5E! Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1057)
2016-05-14Fix engine cryptodev: pointer to IVKirill Marinushkin
Currently point to wrong address Signed-off-by: Kirill Marinushkin <k.marinushkin@gmail.com> Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-13Fix OpenSSL_memdup error handlingInsu Yun
check source's kdf_ukm, not destination's use != NULL, instead of implicit checking don't free internal data structure like pkey_rsa_copy() Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-12DJGPP adjustmentsRichard Levitte
* Configure: Replaced -DTERMIO by -DTERMIOS in CFLAGS. * crypto/bio/bss_dgram.c [WATT32]: Remove obsolete redefinition of function names: sock_write, sock_read and sock_puts. * crypto/bio/bss_sock.c [WATT32]: For Watt-32 2.2.11 sock_write, sock_read and sock_puts are redefined to their private names so their names must be undefined first before they can be redefined again. * crypto/bio/bss_file.c (file_fopen) [__DJGPP__]: Make a copy of the passed file name and replace the leading dots in the dirname part and the basname part of the file name, unless LFN is supported. * e_os.h [__DJGPP__]: Undefine macro DEVRANDOM_EGD. Neither MS-DOS nor FreeDOS provide 'egd' sockets. New macro HAS_LFN_SUPPORT checks if underlying file system supports long file names or not. Include sys/un.h. Define WATT32_NO_OLDIES. * INSTALL.DJGPP: Update URL of WATT-32 library. Submitted by Juan Manuel Guerrero <juan.guerrero@gmx.de> RT#4217 Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-05-12Don't leak memory if realloc fails.Dr. Stephen Henson
RT#4403 Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-05-11Update pkcs8 defaults.Dr. Stephen Henson
Update pkcs8 utility to use 256 bit AES using SHA256 by default. Update documentation. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-05-11Adding missing BN_CTX_(start/end) in crypto/ec/ec_key.cSteven Valdez
RT#4363 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
2016-05-11Fix i2d_X509_AUX, update docs and add testsViktor Dukhovni
When *pp is NULL, don't write garbage, return an unexpected pointer or leak memory on error. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-05-10crypto/des: remove obsolete functions.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-10MIPS64 assembly pack: add Poly1305 module.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-10Restore the ERR_remove_thread_state() API and make it a no-opRichard Levitte
The ERR_remove_thread_state() API is restored to take a pointer argument, but does nothing more. ERR_remove_state() is also made into a no-op. Both functions are deprecated and users are recommended to use OPENSSL_thread_stop() instead. Documentation is changed to reflect this. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-09Add NULL check in i2d_PrivateKey()Richard Levitte
Originally submitted by Kurt Cancemi <kurt@x64architecture.com> Closes RT#4533 Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-09Fix BIO_eof() for BIO pairsMatt Caswell
BIO_eof() was always returning true when using a BIO pair. It should only be true if the peer BIO is empty and has been shutdown. RT#1215 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-09fix tab-space mixed indentationFdaSilvaYY
No code change Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-09fix checkJ Mohan Rao Arisankala
Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-09few missing allocation failure checks and releases on error pathsJ Mohan Rao Arisankala
- Missing checks for allocation failure. - releasing memory in few missing error paths Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-07memset() doesn't take NULL.Ben Laurie
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-05-06Constify PKCS12_newpass()Dr. Stephen Henson
PR#4449 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-06Tidy up PKCS12_newpass() fix memory leaks.Dr. Stephen Henson
PR#4466 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-06Only set CMS parameter when encryptingDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-06RT3513: req doesn't display attributes using utf8stringisnotnick
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-06poly1305/asm/poly1305-x86_64.pl: contain symbols within shared lib.Andy Polyakov
We don't need it, but external users might find it handy. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-06poly1305/asm/poly1305-x86_64.pl: make it cross-compile.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-05Use default ASN.1 for SEED.Dr. Stephen Henson
The default ASN.1 handling can be used for SEED. This also makes CMS work with SEED. PR#4504 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-05typoDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-05Always try to set ASN.1 parameters for CMS.Dr. Stephen Henson
Try to set the ASN.1 parameters for CMS encryption even if the IV length is zero as the underlying cipher should still set the type. This will correctly result in errors if an attempt is made to use an unsupported cipher type. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-05Document inversion ladder in curve25519Emilia Kasper
This demystifies two for-loops that do nothing. They were used to write the ladder in a unified way. Now that the ladder is otherwise commented, remove the dead loops. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-05Script changed; update the generated file.Rich Salz
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-05-04support embed in ASN.1 printDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-04Fix name length limit check.Dr. Stephen Henson
The name length limit check in x509_name_ex_d2i() includes the containing structure as well as the actual X509_NAME. This will cause large CRLs to be rejected. Fix by limiting the length passed to ASN1_item_ex_d2i() which will then return an error if the passed X509_NAME exceeds the length. RT#4531 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-04DEFINE_STACK_OF(ASN1_UTF8STRING) moved from ts_lcl.h to asn1.hMarek Klein
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1020)
2016-05-04Handle malloc failures in BIO_acceptMatt Caswell
The old BIO_accept() function can encounter errors during malloc. We need to ensure we properly clean up if that occurs. GH Issue #817 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-04reject zero block length in PKCS12 keygenDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-04Fix Blake block lengthDr. Stephen Henson
PR#4514 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-04Fix double free in d2i_PrivateKey().Dr. Stephen Henson
RT#4527 Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-04Alpha assembly pack: make it work on Linux.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-04MIPS assembly pack: fix MIPS64 assembler warnings.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-03Tru64 fixes.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-03Drop duplicate ctx->verify_cb assignmentViktor Dukhovni
The right variant is ~18 lines below. Reviewed-by: Matt Caswell <matt@openssl.org>