aboutsummaryrefslogtreecommitdiff
path: root/crypto/asn1/a_verify.c
AgeCommit message (Collapse)AuthorFilesLines
2017-10-18Remove parentheses of return.KaoruToda1-1/+1
Since return is inconsistent, I removed unnecessary parentheses and unified them. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4541)
2017-08-25NO_SYS_TYPES_H isn't defined anywhere, stop using it as a guardRichard Levitte1-4/+1
This is a vestige from pre-1.1.0 OpenSSL Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4256)
2017-05-11Add EVP_DigestSign and EVP_DigesVerifyDr. Stephen Henson1-15/+6
Add "single part" digest sign and verify functions. These sign and verify a message in one function. This simplifies some operations and it will later be used as the API for algorithms which do not support the update/final mechanism (e.g. PureEdDSA). Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3409)
2016-05-17Copyright consolidation 08/10Rich Salz1-54/+6
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz1-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>
2016-01-20make EVP_PKEY opaqueDr. Stephen Henson1-0/+1
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-07Cleanup: fix all sources that used EVP_MD_CTX_(create|init|destroy)Richard Levitte1-4/+4
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-07Adjust all accesses to EVP_MD_CTX to use accessor functions.Richard Levitte1-13/+20
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-14Identify and move common internal libcrypto header filesRichard Levitte1-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>
2015-05-05memset, memcpy, sizeof consistency fixesRich Salz1-10/+0
Just as with the OPENSSL_malloc calls, consistently use sizeof(*ptr) for memset and memcpy. Remove needless casts for those functions. For memset, replace alternative forms of zero with 0. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-30free cleanup almost the finaleRich Salz1-4/+2
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-03-24Move some ASN.1 internals to asn1_int.hDr. Stephen Henson1-1/+1
Move ASN.1 internals used across multiple directories into new internal header file asn1_int.h remove crypto/Makefile hack which allowed other directories to include "asn1_locl.h" Reviewed-by: Matt Caswell <matt@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell1-177/+160
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-06use correct function nameDr. Stephen Henson1-1/+1
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2015-01-05Fix various certificate fingerprint issues.Dr. Stephen Henson1-0/+12
By using non-DER or invalid encodings outside the signed portion of a certificate the fingerprint can be changed without breaking the signature. Although no details of the signed portion of the certificate can be changed this can cause problems with some applications: e.g. those using the certificate fingerprint for blacklists. 1. Reject signatures with non zero unused bits. If the BIT STRING containing the signature has non zero unused bits reject the signature. All current signature algorithms require zero unused bits. 2. Check certificate algorithm consistency. Check the AlgorithmIdentifier inside TBS matches the one in the certificate signature. NB: this will result in signature failure errors for some broken certificates. 3. Check DSA/ECDSA signatures use DER. Reencode DSA/ECDSA signatures and compare with the original received signature. Return an error if there is a mismatch. This will reject various cases including garbage after signature (thanks to Antti Karjalainen and Tuomo Untinen from the Codenomicon CROSS program for discovering this case) and use of BER or invalid ASN.1 INTEGERs (negative or with leading zeroes). CVE-2014-8275 Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-08-15ASN1_verify, ASN1_item_verify: cleanse and free buf_in on error pathJonas Maebe1-10/+16
Signed-off-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2014-04-01Don't try and verify signatures if key is NULL (CVE-2013-0166)Dr. Stephen Henson1-0/+6
Add additional check to catch this in ASN1_item_verify too. (cherry picked from commit 66e8211c0b1347970096e04b18aa52567c325200)
2010-12-13Support routines for ASN1 scanning function, doesn't do much yet.Dr. Stephen Henson1-1/+1
2010-03-08RSA PSS verification support including certificates and certificateDr. Stephen Henson1-18/+39
requests. Add new ASN1 signature initialisation function to handle this case.
2010-03-07update ASN1 sign/verify to use EVP_DigestSign and EVP_DigestVerifyDr. Stephen Henson1-4/+4
2009-09-23Audit libcrypto for unchecked return values: fix all cases enounteredDr. Stephen Henson1-3/+13
2006-10-04ASN1_item_verify needs to initialize ctx before any "goto err" canBodo Möller1-2/+2
happen; the new code for the OID cross reference table failed to do so.
2006-04-19Remove link between digests and signature algorithms.Dr. Stephen Henson1-5/+21
Use cross reference table in ASN1_item_sign(), ASN1_item_verify() to eliminate the need for algorithm specific code.
2005-05-09Update util/ck_errf.pl script, and have it run automaticallyBodo Möller1-4/+4
during "make errors" and thus during "make update". Fix lots of bugs that util/ck_errf.pl can detect automatically. Various others of these are still left to fix; that's why "make update" will complain loudly when run now.
2005-04-26Port from stable branch.Dr. Stephen Henson1-6/+7
2005-03-31Consistency.Ben Laurie1-2/+1
2005-03-31Give everything prototypes (well, everything that's actually used).Ben Laurie1-2/+3
2005-01-27Check for errors from EVP_VerifyInit_ex(), or EVP_VerifyUpdate mightRichard Levitte1-1/+6
cause a segfault... This was uncovered because EVP_VerifyInit() may fail in FIPS mode if the wrong algorithm is chosen...
2002-11-28Cleanse memory using the new OPENSSL_cleanse() function.Richard Levitte1-2/+2
I've covered all the memset()s I felt safe modifying, but may have missed some.
2001-10-16Retain compatibility of EVP_DigestInit() and EVP_DigestFinal()Dr. Stephen Henson1-2/+2
with existing code. Modify library to use digest *_ex() functions.
2001-07-30Really add the EVP and all of the DES changes.Ben Laurie1-0/+4
2000-12-28Add NO_ASN1_OLD to remove some old style functions:Dr. Stephen Henson1-0/+4
currently OpenSSL itself wont compile with this set because some old style stuff remains. Change old functions X509_sign(), X509_verify() etc to use new item based functions. Replace OCSP function declarations with DECLARE macros.
2000-12-28ASN1_ITEM versions of sign, verify, pack and unpack.Dr. Stephen Henson1-0/+48
The old function pointer versions will eventually go away.
2000-06-01There have been a number of complaints from a number of sources that namesRichard Levitte1-2/+2
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.
2000-01-30Seek out and destroy another evil cast.Ulf Möller1-1/+1
1999-09-11Initial support for MacOS.Andy Polyakov1-2/+5
This will soon be complemented with MacOS specific source code files and INSTALL.MacOS. I (Andy) have decided to get rid of a number of #include <sys/types.h>. I've verified it's ok (both by examining /usr/include/*.h and compiling) on a number of Unix platforms. Unfortunately I don't have Windows box to verify this on. I really appreciate if somebody could try to compile it and contact me a.s.a.p. in case a problem occurs. Submitted by: Roy Wood <roy@centricsystems.ca> Reviewed by: Andy Polyakov <appro@fy.chalmers.se>
1999-04-23Change #include filenames from <foo.h> to <openssl.h>.Bodo Möller1-5/+5
Submitted by: Reviewed by: PR:
1999-04-19Change functions to ANSI C.Ulf Möller1-6/+2
1999-04-17Massive constification.Ben Laurie1-2/+2
1999-01-30More pissing about to get pem.h to behave properly.Ben Laurie1-1/+0
1998-12-21Import of old SSLeay release: SSLeay 0.9.0bRalf S. Engelschall1-1/+1
1998-12-21Import of old SSLeay release: SSLeay 0.8.1bRalf S. Engelschall1-0/+121