aboutsummaryrefslogtreecommitdiff
path: root/crypto/pem
AgeCommit message (Collapse)AuthorFilesLines
2016-02-25GH715: ENGINE_finish can take NULLRich Salz1-2/+1
Simplifies calling code. Also fixed up any !ptr tests that were nearby, turning them into NULL tests. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-22Remove unused parameters from internal functionsRich Salz1-8/+8
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-22RT4320/GH705: Fix PEM parsing bug.Rich Salz1-3/+2
Also removing confusing pointer-alias variable. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-20Always build library object files with shared library cflagsRichard Levitte1-1/+1
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 Levitte1-1/+1
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-13GH643: Cleanup header analysisDmitry-Me1-4/+3
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-02-02New BN functions.Dr. Stephen Henson1-36/+6
Add new function BN_bn2binpad() which checks the length of the output buffer and pads the result with zeroes if necessary. New functions BN_bn2lebinpad() and BN_lebin2bn() which use little endian format. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-01unified build scheme: add build.info filesRichard Levitte1-0/+4
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 Salz1-2/+1
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz10-10/+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>
2016-01-20Remove update tagsRich Salz1-2/+0
Also remove depend/local_depend. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-20make EVP_PKEY opaqueDr. Stephen Henson3-8/+10
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-17Remove some old makefile targetsRich Salz1-12/+0
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 Salz2-238/+64
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 Levitte1-105/+120
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Adapt all EVP_CIPHER users for it becoming opaqueRichard Levitte2-8/+10
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Adapt all EVP_CIPHER_CTX users for it becoming opaqueRichard Levitte3-31/+28
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-08Remove all remaining traces if PEM_SealRichard Levitte1-2/+0
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-07Fix build-break; 'make update'Rich Salz1-15/+0
Commit bbd86bf5424a611cb6b77a3a17fc522931c4dcb8 broke certain builds. Commit 0674427f71ca050e3c61a7ec9dc71b208c3b39f5 missing 'make update' Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-07Remove crypto/pem/pem_seal.cRichard Levitte2-196/+2
It's functionality appears unused. If we're wrong, we will revert. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-16Rename some BUF_xxx to OPENSSL_xxxRich Salz1-6/+6
Rename BUF_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} to OPENSSL_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} Add #define's for the old names. Add CRYPTO_{memdup,strndup}, called by OPENSSL_{memdup,strndup} macros. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-12-11Adapt PEM routines to the opaque EVP_ENCODE_CTXRichard Levitte2-19/+30
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-09make updateDr. Stephen Henson1-19/+7
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-08Remove double semi (;)Richard Levitte1-1/+1
When in the middle of declarations, some C compilers will complain. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-12-07Cleanup: fix all sources that used EVP_MD_CTX_(create|init|destroy)Richard Levitte2-4/+4
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-07Adjust all accesses to EVP_MD_CTX to use accessor functions.Richard Levitte2-12/+12
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-11-09Continue standardising malloc style for libcryptoMatt Caswell3-10/+16
Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-11-05Rebuild error source files.Dr. Stephen Henson1-19/+19
Rebuild error source files: the new mkerr.pl functionality will now pick up and translate static function names properly. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-23Remove useless codeAlessandro Ghedini1-2/+0
RT#4081 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-23Fix memory leaks and other mistakes on errorsAlessandro Ghedini1-4/+4
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-09-29Fix no-stdio buildDavid Woodhouse1-1/+3
Much related/similar work also done by Ivan Nestlerode <ivan.nestlerode@sonos.com> +Replace FILE BIO's with dummy ops that fail. +Include <stdio.h> for sscanf() even with no-stdio (since the declaration is there). We rely on sscanf() to parse the OPENSSL_ia32cap environment variable, since it can be larger than a 'long'. And we don't rely on the availability of strtoull(). +Remove OPENSSL_stderr(); not used. +Make OPENSSL_showfatal() do nothing (currently without stdio there's nothing we can do). +Remove file-based functionality from ssl/. The function prototypes were already gone, but not the functions themselves. +Remove unviable conf functionality via SYS_UEFI +Add fallback definition of BUFSIZ. +Remove functions taking FILE * from header files. +Add missing DECLARE_PEM_write_fp_const +Disable X509_LOOKUP_hash_dir(). X509_LOOKUP_file() was already compiled out, so remove its prototype. +Use OPENSSL_showfatal() in CRYPTO_destroy_dynlockid(). +Eliminate SRP_VBASE_init() and supporting functions. Users will need to build the verifier manually instead. +Eliminate compiler warning for unused do_pk8pkey_fp(). +Disable TEST_ENG_OPENSSL_PKEY. +Disable GOST engine as is uses [f]printf all over the place. +Eliminate compiler warning for unused send_fp_chars(). Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-08-10RT3999: Remove sub-component version stringsRich Salz1-2/+0
Especially since after the #ifdef cleanups this is not useful. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-05-28check for error when creating PKCS#8 structureDr. Stephen Henson1-0/+2
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-22Fix the update target and remove duplicate file updatesRichard Levitte1-0/+2
We had updates of certain header files in both Makefile.org and the Makefile in the directory the header file lived in. This is error prone and also sometimes generates slightly different results (usually just a comment that differs) depending on which way the update was done. This removes the file update targets from the top level Makefile, adds an update: target in all Makefiles and has it depend on the depend: or local_depend: targets, whichever is appropriate, so we don't get a double run through the whole file tree. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-14make dependRichard Levitte1-12/+19
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-14Identify and move common internal libcrypto header filesRichard Levitte11-11/+11
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>
2015-05-11Use p==NULL not !p (in if statements, mainly)Rich Salz2-6/+8
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-06Use "==0" instead of "!strcmp" etcRich Salz2-20/+24
For the various string-compare routines (strcmp, strcasecmp, str.*cmp) use "strcmp()==0" instead of "!strcmp()" Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-06Initialize potentially uninitialized local variablesGunnar Kudrjavets1-1/+1
Compiling OpenSSL code with MSVC and /W4 results in a number of warnings. One category of warnings is particularly interesting - C4701 (potentially uninitialized local variable 'name' used). This warning pretty much means that there's a code path which results in uninitialized variables being used or returned. Depending on compiler, its options, OS, values in registers and/or stack, the results can be nondeterministic. Cases like this are very hard to debug so it's rational to fix these issues. This patch contains a set of trivial fixes for all the C4701 warnings (just initializing variables to 0 or NULL or appropriate error code) to make sure that deterministic values will be returned from all the execution paths. RT#3835 Signed-off-by: Matt Caswell <matt@openssl.org> Matt's note: All of these appear to be bogus warnings, i.e. there isn't actually a code path where an unitialised variable could be used - its just that the compiler hasn't been able to figure that out from the logic. So this commit is just about silencing spurious warnings. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-01free NULL cleanup -- codaRich Salz1-2/+2
After the finale, the "real" final part. :) Do a recursive grep with "-B1 -w [a-zA-Z0-9_]*_free" to see if any of the preceeding lines are an "if NULL" check that can be removed. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-01free null cleanup finaleRich Salz4-21/+11
Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-30free NULL cleanup 7Rich Salz1-2/+1
This gets BN_.*free: BN_BLINDING_free BN_CTX_free BN_FLG_FREE BN_GENCB_free BN_MONT_CTX_free BN_RECP_CTX_free BN_clear_free BN_free BUF_MEM_free Also fix a call to DSA_SIG_free to ccgost engine and remove some #ifdef'd dead code in engines/e_ubsec. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-30free cleanup almost the finaleRich Salz3-16/+5
Add OPENSSL_clear_free which merges cleanse and free. (Names was picked to be similar to BN_clear_free, etc.) Removed OPENSSL_freeFunc macro. Fixed the small simple ones that are left: CRYPTO_free CRYPTO_free_locked OPENSSL_free_locked Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-30free NULL cleanup 5aRich Salz1-2/+1
Don't check for NULL before calling a free routine. This gets X509_.*free: x509_name_ex_free X509_policy_tree_free X509_VERIFY_PARAM_free X509_STORE_free X509_STORE_CTX_free X509_PKEY_free X509_OBJECT_free_contents X509_LOOKUP_free X509_INFO_free Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-28remove malloc castsRich Salz3-4/+4
Following ANSI C rules, remove the casts from calls to OPENSSL_malloc and OPENSSL_realloc. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-31Remove EXHEADER, TEST, APPS, links:, install: and uninstall: where relevantRichard Levitte1-17/+1
With no more symlinks, there's no need for those variables, or the links target. This also goes for all install: and uninstall: targets that do nothing but copy $(EXHEADER) files, since that's now taken care of by the top Makefile. Also, removed METHTEST from test/Makefile. It looks like an old test that's forgotten... Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-03-31Stop symlinking, move files to intended directoryRichard Levitte2-664/+0
Rather than making include/openssl/foo.h a symlink to crypto/foo/foo.h, this change moves the file to include/openssl/foo.h once and for all. Likewise, move crypto/foo/footest.c to test/footest.c, instead of symlinking it there. Originally-by: Geoff Thorpe <geoff@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-03-28free NULL cleanupRich Salz3-12/+6
EVP_.*free; this gets: EVP_CIPHER_CTX_free EVP_PKEY_CTX_free EVP_PKEY_asn1_free EVP_PKEY_asn1_set_free EVP_PKEY_free EVP_PKEY_free_it EVP_PKEY_meth_free; and also EVP_CIPHER_CTX_cleanup Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-03-25RAND_bytes updatesMatt Caswell1-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>
2015-03-24free NULL cleanupRich Salz1-4/+2
Start ensuring all OpenSSL "free" routines allow NULL, and remove any if check before calling them. This gets DH_free, DSA_free, RSA_free Reviewed-by: Matt Caswell <matt@openssl.org>