aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/pem/pem_lib.c
Commit message (Collapse)AuthorAgeFilesLines
* RT3140: Possibly-unit variable in pem_lib.cClang via Jeffrey Walton2014-09-021-1/+1
| | | | | | | Can't really happen, but the flow of control isn't obvious. Add an initializer. Reviewed-by: Matt Caswell <matt@openssl.org>
* Fix warning.Ben Laurie2014-02-131-2/+3
|
* Constification.Ben Laurie2013-09-101-4/+4
|
* transparently handle X9.42 DH parametersDr. Stephen Henson2011-12-071-0/+3
|
* Fix warnings.Ben Laurie2010-06-121-2/+0
|
* PR: 1904Dr. Stephen Henson2010-03-271-1/+1
| | | | | | Submitted by: David Woodhouse <dwmw2@infradead.org> Pass passphrase minimum length down to UI.
* Audit libcrypto for unchecked return values: fix all cases enounteredDr. Stephen Henson2009-09-231-10/+17
|
* Tolerate -----BEGIN PKCS #7 SIGNED DATA----- header lines as used by someDr. Stephen Henson2008-11-111-0/+3
| | | | implementations.
* And so it begins...Dr. Stephen Henson2008-03-121-0/+8
| | | | | | | | | | Initial support for CMS. Add zlib compression BIO. Add AES key wrap implementation. Generalize S/MIME MIME code to support CMS and/or PKCS7.
* Avoid use of function pointer casts in pem library. Modify safestack toDr. Stephen Henson2007-06-041-2/+2
| | | | always use inline functions.
* Update from 0.9.7-stable.Dr. Stephen Henson2007-02-211-1/+4
|
* Constify version strings and some structures.Dr. Stephen Henson2007-01-211-1/+1
|
* Complete EVP_PKEY_ASN1_METHOD ENGINE support.Dr. Stephen Henson2006-06-051-4/+23
|
* New utility pkeyparam. Enhance and bugfix algorithm specific parameterDr. Stephen Henson2006-03-281-0/+14
| | | | functions to support it.
* Add support for legacy PEM format private keys in EVP_PKEY_ASN1_METHOD.Dr. Stephen Henson2006-03-231-17/+24
|
* Add information and pem strings. Update dependencies.Dr. Stephen Henson2006-03-231-0/+22
|
* Fix more error codes.Bodo Möller2005-05-111-2/+2
| | | | | (Also improve util/ck_errf.pl script, and occasionally fix source code formatting.)
* Consistency.Ben Laurie2005-03-311-5/+4
|
* Give everything prototypes (well, everything that's actually used).Ben Laurie2005-03-311-9/+10
|
* fix potential memory leak when allocation failsBodo Möller2005-03-111-0/+3
| | | | | PR: 801 Submitted by: Nils Larsch
* The first argument to load_iv should really be a char ** instead of anRichard Levitte2005-01-271-4/+4
| | | | | | | unsigned char **, since it points at text. Thanks to Nils Larsch <nils.larsch@cybertrust.com> for pointing out the inelegance of our code :-)
* Get rid if the annoying warningRichard Levitte2005-01-271-1/+3
|
* Add lots of checks for memory allocation failure, error codes to indicateDr. Stephen Henson2004-12-051-1/+1
| | | | | | failure and freeing up memory if a failure occurs. PR:620
* Memory leak fix.Dr. Stephen Henson2004-03-051-2/+5
|
* Use BUF_strlcpy() instead of strcpy().Richard Levitte2003-12-271-6/+8
| | | | | | | Use BUF_strlcat() instead of strcat(). Use BIO_snprintf() instead of sprintf(). In some cases, keep better track of buffer lengths. This is part of a large change submitted by Markus Friedl <markus@openbsd.org>
* A general spring-cleaning (in autumn) to fix up signed/unsigned warnings.Geoff Thorpe2003-10-291-1/+1
| | | | | | | | | | 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.
* A few more memset()s converted to OPENSSL_cleanse().Richard Levitte2002-11-291-1/+1
| | | | | | I *think* I got them all covered by now, bu please, if you find any more, tell me and I'll correct it. PR: 343
* Cleanse memory using the new OPENSSL_cleanse() function.Richard Levitte2002-11-281-7/+7
| | | | I've covered all the memset()s I felt safe modifying, but may have missed some.
* Merge from 0.9.7-stable.Richard Levitte2002-11-131-1/+1
|
* Security fixes brought forward from 0.9.7.Ben Laurie2002-11-131-2/+6
|
* Plug potential memory leak.Richard Levitte2002-10-301-1/+1
| | | | Identified by Goetz Babin-Ebell <babinebell@trustcenter.de>
* don't memset(data,0,...) if data is NULLBodo Möller2002-08-291-2/+5
| | | | | Submitted by: anonymous PR: 254
* Use SEC1 format for EC private keys.Bodo Möller2002-07-261-1/+1
| | | | | | This is not ECDSA specific, so it's now PEM_STRING_ECPRIVATEKEY etc. Submitted by: Nils Larsch <nlarsch@compuserve.de>
* Stop assuming the IV is 8 bytes long, use the real size instead.Richard Levitte2002-02-201-3/+3
| | | | This is especially important for AES that has a 16 bytes IV.
* ECDSA supportBodo Möller2002-02-131-0/+2
| | | | Submitted by: Nils Larsch <nla@trustcenter.de>
* Add missing EVP_CIPHER_CTX_{init,cleanup}Dr. Stephen Henson2001-10-201-1/+4
|
* Modify EVP cipher behaviour in a similar wayDr. Stephen Henson2001-10-171-4/+4
| | | | to digests to retain compatibility.
* More linker bloat reorganisation:Dr. Stephen Henson2001-07-271-231/+20
| | | | | | | | | | | | | | | | | | | | | Split private key PEM and normal PEM handling. Private key handling needs to link in stuff like PKCS#8. Relocate the ASN1 *_dup() functions, to the relevant ASN1 modules using new macro IMPLEMENT_ASN1_DUP_FUNCTION. Previously these were all in crypto/x509/x_all.c along with every ASN1 BIO/fp function which linked in *every* ASN1 function if a single dup was used. Move the authority key id ASN1 structure to a separate file. This is used in the X509 routines and its previous location linked in all the v3 extension code. Also move ASN1_tag2bit to avoid linking in a_bytes.c which is now largely obsolete. So far under Linux stripped binary with single PEM_read_X509 is now 238K compared to 380K before these changes.
* First of several reorganisations toDr. Stephen Henson2001-07-261-0/+4
| | | | | | | | | | | | reduce linker bloat. For example the single line: PEM_read_X509() results in a binary of around 400K in Linux! This first step separates some of the PEM functions and avoids linking in some PKCS#7 and PKCS#12 code.
* Make all configuration macros available for application by makingRichard Levitte2001-02-191-7/+7
| | | | | | | | | | | | sure they are available in opensslconf.h, by giving them names starting with "OPENSSL_" to avoid conflicts with other packages and by making sure e_os2.h will cover all platform-specific cases together with opensslconf.h. I've checked fairly well that nothing breaks with this (apart from external software that will adapt if they have used something like NO_KRB5), but I can't guarantee it completely, so a review of this change would be a good thing.
* Rewrite PKCS#12 code and remove some of the oldDr. Stephen Henson2000-12-311-2/+2
| | | | | | | | | | horrible macros. Fix two evil ASN1 bugs. Attempt to use 'ctx' when NULL if input is indefinite length constructed in asn1_check_tlen() and invalid pointer to ASN1_TYPE when reusing existing structure (this took *ages* to find because the new PKCS#12 code triggered it).
* There have been a number of complaints from a number of sources that namesRichard Levitte2000-06-011-13/+13
| | | | | | | | | like Malloc, Realloc and especially Free conflict with already existing names on some operating systems or other packages. That is reason enough to change the names of the OpenSSL memory allocation macros to something that has a better chance of being unique, like prepending them with OPENSSL_. This change includes all the name changes needed throughout all C files.
* Fix for previous patch: If RAND_pseudo_bytes returns 0, this is not an error.Bodo Möller2000-03-031-1/+1
|
* Use RAND_pseudo_bytes, not RAND_bytes, for IVs/salts.Bodo Möller2000-03-021-1/+1
|
* Allow ADH to be used but not present in the default cipherDr. Stephen Henson2000-02-231-0/+4
| | | | | | | list. Allow CERTIFICATE to be used in PEM headers for PKCS#7 structures: some CAs do this.
* Pass phrase reorganisation.Dr. Stephen Henson2000-02-161-17/+7
|
* Check RAND_bytes() return value or use RAND_pseudo_bytes().Ulf Möller2000-01-211-1/+2
|
* Precautions against using the PRNG uninitialized: RAND_bytes() nowUlf Möller2000-01-131-1/+1
| | | | | | returns int (1 = ok, 0 = not seeded). New function RAND_add() is the same as RAND_seed() but takes an estimate of the entropy as an additional argument.
* Allow passwords to be included on command line for a fewDr. Stephen Henson1999-12-241-0/+16
| | | | more utilities.
* Add PKCS#8 utility functions and add PBE options.Dr. Stephen Henson1999-12-231-11/+130
|