summaryrefslogtreecommitdiffstats
path: root/crypto/pkcs12/p12_mutl.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add checks for alloc failing.Rich Salz2017-09-061-2/+2
| | | | | Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/4341)
* Fix memory leak in pkcs12 -exportDmitry Belyavskiy2017-02-211-0/+3
| | | | | Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2676)
* Don't switch password formats using global state.Andy Polyakov2016-08-251-50/+2
| | | | | | | To avoid possible race conditions don't switch password format using global state in crypto/pkcs12 Reviewed-by: Richard Levitte <levitte@openssl.org>
* crypto/pkcs12: facilitate accessing data with non-interoperable password.Andy Polyakov2016-08-221-8/+76
| | | | | | | | | | | Originally PKCS#12 subroutines treated password strings as ASCII. It worked as long as they were pure ASCII, but if there were some none-ASCII characters result was non-interoperable. But fixing it poses problem accessing data protected with broken password. In order to make asscess to old data possible add retry with old-style password. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add X509_getm_notBefore, X509_getm_notAfterDr. Stephen Henson2016-08-211-2/+2
| | | | | | | | Add mutable versions of X509_get0_notBefore and X509_get0_notAfter. Rename X509_SIG_get0_mutable to X509_SIG_getm. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Convert PKCS12* functions to use const gettersMatt Caswell2016-08-191-1/+1
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
* Constify X509_SIG.Dr. Stephen Henson2016-08-171-10/+12
| | | | | | | | | Constify X509_SIG_get0() and order arguments to mactch new standard. Add X509_SIG_get0_mutable() to support modification or initialisation of an X509_SIG structure. Reviewed-by: Matt Caswell <matt@openssl.org>
* constify X509_ALGOR_get0()Dr. Stephen Henson2016-08-171-1/+1
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add ASN1_STRING_get0_data(), deprecate ASN1_STRING_data().Dr. Stephen Henson2016-08-161-1/+1
| | | | | | | | Deprecate the function ASN1_STRING_data() and replace with a new function ASN1_STRING_get0_data() which returns a constant pointer. Update library to use new function. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Copyright consolidation 09/10Rich Salz2016-05-171-54/+5
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Make X509_SIG opaque.Dr. Stephen Henson2016-03-111-12/+19
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* fix various formatting issuesDr. Stephen Henson2016-02-081-1/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Reorganise functions.Dr. Stephen Henson2016-02-081-0/+30
| | | | | | | | Move all PKCS12_SAFEBAG functions into new file p12_sbag.c. Move MAC functions into p12_mutl.c Reviewed-by: Rich Salz <rsalz@openssl.org>
* more PKCS12 opacityDr. Stephen Henson2016-02-081-0/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Remove /* foo.c */ commentsRich Salz2016-01-261-1/+0
| | | | | | | | | | | | 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>
* Adapt the rest of the source to the opaque HMAC_CTXRichard Levitte2015-12-071-8/+8
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Adapt HMAC to the EVP_MD_CTX changesRichard Levitte2015-12-071-1/+1
| | | | | | | | | | | | | This change required some special treatment, as HMAC is intertwined with EVP_MD. For now, all local HMAC_CTX variables MUST be initialised with HMAC_CTX_EMPTY, or whatever happens to be on the stack will be mistaken for actual pointers to EVP_MD_CTX. This will change as soon as HMAC_CTX becomes opaque. Also, since HMAC_CTX_init() can fail now, its return type changes from void to int, and it will return 0 on failure, 1 on success. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Set salt length after the malloc has succeededAlessandro Ghedini2015-10-231-1/+1
| | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* GOST PKCS12 supportMatt Caswell2015-09-211-3/+38
| | | | | | | | Changes required to add GOST support to PKCS12 Based on a patch provided by Dmitry Belyavsky <beldmit@gmail.com> Reviewed-by: Stephen Henson <steve@openssl.org>
* Use CRYPTO_memcmp when comparing authenticatorsEmilia Kasper2015-06-081-1/+2
| | | | | | | Pointed out by Victor Vasiliev (vasilvv@mit.edu) via Adam Langley (Google). Reviewed-by: Rich Salz <rsalz@openssl.org>
* Identify and move common internal libcrypto header filesRichard Levitte2015-05-141-1/+1
| | | | | | | | | | | | | 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>
* Use p==NULL not !p (in if statements, mainly)Rich Salz2015-05-111-5/+6
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* RAND_bytes updatesMatt Caswell2015-03-251-1/+1
| | | | | | | Ensure RAND_bytes return value is checked correctly, and that we no longer use RAND_pseudo_bytes. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove old ASN.1 code.Dr. Stephen Henson2015-03-231-2/+2
| | | | | | | | | Remove old M_ASN1_ macros and replace any occurences with the corresponding function. Remove d2i_ASN1_bytes, d2i_ASN1_SET, i2d_ASN1_SET: no longer used internally. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Remove OPENSSL_NO_HMACDr. Stephen Henson2015-02-061-2/+0
| | | | | | | Disabling HMAC doesn't work. If it did it would end up disabling a lot of OpenSSL functionality (it is required for all versions of TLS for example). Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-221-109/+113
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Audit libcrypto for unchecked return values: fix all cases enounteredDr. Stephen Henson2009-09-241-4/+8
|
* If we're going to return errors (no matter how stupid), then we shouldBen Laurie2008-12-291-2/+6
| | | | test for them!
* Update obsolete email address...Dr. Stephen Henson2008-11-051-1/+1
|
* PKCS#12 mac key length should equal digest length.Dr. Stephen Henson2006-05-171-3/+3
|
* Check PKCS7 structures in PKCS#12 files are of type data.Dr. Stephen Henson2005-06-301-0/+6
|
* Fix more error codes.Bodo Möller2005-05-111-7/+7
| | | | | (Also improve util/ck_errf.pl script, and occasionally fix source code formatting.)
* Add lots of checks for memory allocation failure, error codes to indicateDr. Stephen Henson2004-12-051-1/+4
| | | | | | failure and freeing up memory if a failure occurs. PR:620
* Initialize cipher context in KRB5Dr. Stephen Henson2002-03-141-4/+4
| | | | | | ("D. Russell" <russelld@aol.net>) Allow HMAC functions to use an alternative ENGINE.
* Improve back compatibility.Ben Laurie2001-12-091-1/+1
|
* Really add the EVP and all of the DES changes.Ben Laurie2001-07-311-1/+3
|
* Change all calls to low level digest routines in the library andDr. Stephen Henson2001-06-201-0/+1
| | | | | | | | | | applications to use EVP. Add missing calls to HMAC_cleanup() and don't assume HMAC_CTX can be copied using memcpy(). Note: this is almost identical to the patch submitted to openssl-dev by Verdon Walker <VWalker@novell.com> except some redundant EVP_add_digest_()/EVP_cleanup() calls were removed and some changes made to avoid compiler warnings.
* Change the EVP_somecipher() and EVP_somedigest()Dr. Stephen Henson2001-03-091-2/+2
| | | | | | | functions to return constant EVP_MD and EVP_CIPHER pointers. Update docs.
* Make all configuration macros available for application by makingRichard Levitte2001-02-191-1/+1
| | | | | | | | | | | | 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.
* There have been a number of complaints from a number of sources that namesRichard Levitte2000-06-021-1/+1
| | | | | | | | | 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.
* Make PKCS#12 code handle missing passwords.Dr. Stephen Henson2000-05-041-4/+1
| | | | Add a couple of FAQs.
* 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
|
* Check RAND_bytes() return value or use RAND_pseudo_bytes().Ulf Möller2000-01-211-1/+4
|
* Replace the macros in asn1.h with function equivalents. Also make UTF8StringsDr. Stephen Henson1999-10-201-4/+4
| | | | tolerated in certificates.
* Fix no-hmac and no-ripemd.Ulf Möller1999-06-301-0/+2
|
* Delete the unnecessary ERR and ERRC lines in makefiles, add some functionalityDr. Stephen Henson1999-04-241-3/+3
| | | | | | | | | | to error code script: it can now find untranslatable function codes (usually because the function is static and not defined in a header: occasionally because of a typo...) and unreferenced function and reason codes. To see this try: perl util/mkerr.pl -recurse -debug Also fixed some typos in crypto/pkcs12 that this found :-) Also tidy up some error calls that had to be all on one line: the old error script couldn't find codes unless the call was all on one line.
* Change #include filenames from <foo.h> to <openssl.h>.Bodo Möller1999-04-241-3/+3
| | | | | | Submitted by: Reviewed by: PR:
* Work with -pedantic!Ben Laurie1999-04-231-5/+6
|
* Change functions to ANSI C.Ulf Möller1999-04-191-24/+7
|