summaryrefslogtreecommitdiffstats
path: root/crypto/pkcs12
AgeCommit message (Collapse)Author
2016-06-15Constify PKCS12_create, PKCS12_add_key, PKCS12_add_safe.FdaSilvaYY
Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1215)
2016-05-23Remove unused error/function codes.Rich Salz
Add script to find unused err/reason codes Remove unused reason codes. Remove entries for unused functions Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-17Copyright consolidation 09/10Rich Salz
Reviewed-by: Richard Levitte <levitte@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-04reject zero block length in PKCS12 keygenDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-28Don't leak memory on error in PKCS12_key_gen_uniMatt Caswell
The PKCS12_key_gen_uni() had one error path which did not free memory correctly. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-20Remove --classic build entirelyRichard Levitte
The Unix build was the last to retain the classic build scheme. The new unified scheme has matured enough, even though some details may need polishing. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-21Remove the remainder of util/mk1mf.pl and companion scriptsRichard Levitte
This removes all scripts that deal with MINFO as well, since that's only used by mk1mf. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-11Make X509_SIG opaque.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-07Make PKCS8_PRIV_KEY_INFO opaque.Dr. Stephen Henson
Make PKCS8_PRIV_KEY_INFO opaque. Several accessor functions already exist for this structure. Two new ones were added to handle attributes. The old handling of broken formats has been removed and the corresponding structures simplified. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-20Always build library object files with shared library cflagsRichard Levitte
This takes us away from the idea that we know exactly how our static libraries are going to get used. Instead, we make them available to build shareable things with, be it other shared libraries or DSOs. On the other hand, we also have greater control of when the shared library cflags. They will never be used with object files meant got binaries, such as apps/openssl or test/test*. With unified, we take this a bit further and prepare for having to deal with extra cflags specifically to be used with DSOs (dynamic engines), libraries and binaries (applications). Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-18Remove all special make depend flags, as well as OPENSSL_DOING_MAKEDEPENDRichard Levitte
All those flags existed because we had all the dependencies versioned in the repository, and wanted to have it be consistent, no matter what the local configuration was. Now that the dependencies are gone from the versioned Makefile.ins, it makes much more sense to use the exact same flags as when compiling the object files. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-18Remove outdated DEBUG flags.Rich Salz
Add -DBIO_DEBUG to --strict-warnings. Remove comments about outdated debugging ifdef guards. Remove md_rand ifdef guarding an assert; it doesn't seem used. Remove the conf guards in conf_api since we use OPENSSL_assert, not assert. For pkcs12 stuff put OPENSSL_ in front of the macro name. Merge TLS_DEBUG into SSL_DEBUG. Various things just turned on/off asserts, mainly for checking non-NULL arguments, which is now removed: camellia, bn_ctx, crypto/modes. Remove some old debug code, that basically just printed things to stderr: DEBUG_PRINT_UNKNOWN_CIPHERSUITES, DEBUG_ZLIB, OPENSSL_RI_DEBUG, RL_DEBUG, RSA_DEBUG, SCRYPT_DEBUG. Remove OPENSSL_SSL_DEBUG_BROKEN_PROTOCOL. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-11Typo: only return error if unrecognise bag type.Dr. Stephen Henson
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-08add missing file p12_lcl.hDr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-02-08Following the PKCS#12 update, update crypto/pkcs12/build.info as wellRichard Levitte
Reviewed-by: Stephen Henson <steve@openssl.org>
2016-02-08fix various formatting issuesDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08use new function namesDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08Add p12_sbag.c to Makefile.inDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08Reorganise functions.Dr. Stephen Henson
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>
2016-02-08Use new namesDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08Rename PKCS12 functionDr. Stephen Henson
Rename ancient PKCS12 functions to use more logical names. Include defines from old to new name. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08pkcs12 accessorsDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08more PKCS12 opacityDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08New PKCS12 accessors, change macros to functions.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08Make PKCS12 structures opaqueDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-05GH601: Various spelling fixes.FdaSilvaYY
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-02-01unified build scheme: add build.info filesRichard Levitte
Now that we have the foundation for the "unified" build scheme in place, we add build.info files. They have been generated from the Makefiles in the same directories. Things that are platform specific will appear in later commits. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-01-29Templatize util/domdRich Salz
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-20Remove update tagsRich Salz
Also remove depend/local_depend. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-17Remove some old makefile targetsRich Salz
Remove lint, tags, dclean, tests. This is prep for a new makedepend scheme. This is temporary pending unified makefile, and might help it. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-12Move Makefiles to Makefile.inRich Salz
Create Makefile's from Makefile.in Rename Makefile.org to Makefile.in Rename Makefiles to Makefile.in Address review feedback from Viktor and Richard Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-12make updateRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Adapt all EVP_CIPHER_CTX users for it becoming opaqueRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-09make updateDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-07Fix clang complaints about uninitialised variables.Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-07Cleanup: fix all sources that used EVP_MD_CTX_(create|init|destroy)Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-07Adapt the rest of the source to the opaque HMAC_CTXRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-07Adjust all accesses to EVP_MD_CTX to use accessor functions.Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-07Adapt HMAC to the EVP_MD_CTX changesRichard Levitte
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>
2015-11-09Continue standardising malloc style for libcryptoMatt Caswell
Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-10-23Set salt length after the malloc has succeededAlessandro Ghedini
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-23Fix memory leaks and other mistakes on errorsAlessandro Ghedini
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-09-21GOST PKCS12 supportMatt Caswell
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>
2015-09-01RT4002: check for NULL cipher in p12_crpt.cEmilia Kasper
The NULL cipher case can't actually happen because we have no EVP_PBE_CTL combinations where cipher_nid is -1 and keygen is PKCS12_PBE_keyivgen. But make the code more obviously correct. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-25Don't output bogus errors in PKCS12_parseDr. Stephen Henson
PR#3923 Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-06-08Use CRYPTO_memcmp when comparing authenticatorsEmilia Kasper
Pointed out by Victor Vasiliev (vasilvv@mit.edu) via Adam Langley (Google). Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-26Add function PKCS8_set0_pbeDr. Stephen Henson
This adds a new function which will encrypt a private key using PKCS#8 based on an X509_ALGOR structure and reimplements PKCS8_encrypt to use it. Update pkcs8 utlity to use PKCS8_set0_pbe. Reviewed-by: Rich Salz <rsalz@openssl.org>