aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/rsa/rsa_sign.c
Commit message (Collapse)AuthorAgeFilesLines
* Make X509_SIG opaque.Dr. Stephen Henson2016-03-111-0/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Remove outdated DEBUG flags.Rich Salz2016-02-181-5/+0
| | | | | | | | | | | | | | | | | 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>
* 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>
* Remove RSA_FLAG_SIGN_VER flag.Dr. Stephen Henson2015-12-021-2/+2
| | | | | | | | Remove RSA_FLAG_SIGN_VER: this was origininally used to retain binary compatibility after RSA_METHOD was extended to include rsa_sign and rsa_verify fields. It is no longer needed. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Don't treat a bare OCTETSTRING as DigestInfo in int_rsa_verifyMatt Caswell2015-10-081-6/+5
| | | | | | | | | | | | | | | | | | | | | | The function int_rsa_verify is an internal function used for verifying an RSA signature. It takes an argument |dtype| which indicates the digest type that was used. Dependant on that digest type the processing of the signature data will vary. In particular if |dtype == NID_mdc2| and the signature data is a bare OCTETSTRING then it is treated differently to the default case where the signature data is treated as a DigestInfo (X509_SIG). Due to a missing "else" keyword the logic actually correctly processes the OCTETSTRING format signature first, and then attempts to continue and process it as DigestInfo. This will invariably fail because we already know that it is a bare OCTETSTRING. This failure doesn't actualy make a real difference because it ends up at the |err| label regardless and still returns a "success" result. This patch just cleans things up to make it look a bit more sane. RT#4076 Reviewed-by: Richard Levitte <levitte@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>
* free cleanup almost the finaleRich Salz2015-04-301-10/+4
| | | | | | | | | | 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>
* free NULL cleanup 5aRich Salz2015-04-301-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>
* remove malloc castsRich Salz2015-04-281-2/+2
| | | | | | | Following ANSI C rules, remove the casts from calls to OPENSSL_malloc and OPENSSL_realloc. Reviewed-by: Richard Levitte <levitte@openssl.org>
* make ASN1_OBJECT opaqueDr. Stephen Henson2015-03-241-1/+1
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Remove obsolete support for old code.Rich Salz2015-01-261-13/+2
| | | | | Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-221-232/+210
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* RT3548: Remove unsupported platformsRich Salz2015-01-121-1/+1
| | | | | | | This last one for this ticket. Removes WIN16. So long, MS_CALLBACK and MS_FAR. We won't miss you. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add additional DigestInfo checks.Dr. Stephen Henson2014-09-291-1/+20
| | | | | | | | | | | Reencode DigestInto in DER and check against the original: this will reject any improperly encoded DigestInfo structures. Note: this is a precautionary measure, there is no known attack which can exploit this. Thanks to Brian Smith for reporting this issue. Reviewed-by: Tim Hudson <tjh@openssl.org>
* An incompatibility has always existed between the format used for RSADr. Stephen Henson2012-02-151-0/+16
| | | | | | | | | | | | | signatures and MDC2 using EVP or RSA_sign. This has become more apparent when the dgst utility in OpenSSL 1.0.0 and later switched to using the EVP_DigestSign functions which call RSA_sign. This means that the signature format OpenSSL 1.0.0 and later used with dgst -sign and MDC2 is incompatible with previous versions. Add detection in RSA_verify so either format works. Note: MDC2 is disabled by default in OpenSSL and very rarely used in practice.
* fix function codes for errorBodo Möller2007-04-241-2/+2
|
* Make int_rsa_sign function match prototype.Dr. Stephen Henson2006-09-211-2/+2
| | | | PR: 1383
* Avoid PKCS #1 v1.5 signature attack discovered by Daniel BleichenbacherMark J. Cox2006-09-051-0/+17
| | | | | | | (CVE-2006-4339) Submitted by: Ben Laurie, Google Security Team Reviewed by: bmoeller, mjc, shenson
* Make things static that should be. Declare stuff in headers that should be.Ben Laurie2006-08-281-4/+6
| | | | Fix warnings.
* Fix various error codes to match functions.Dr. Stephen Henson2006-07-171-7/+7
|
* Implementation of pkey_rsa_verify. Some constification.Dr. Stephen Henson2006-04-101-2/+2
|
* Store digests as EVP_MD instead of a NID.Dr. Stephen Henson2006-04-091-3/+12
| | | | Add digest size sanity checks.
* Support for digest signing and X931 in rsa_pkey_meth.Dr. Stephen Henson2006-04-091-6/+31
|
* Port from stable branch.Dr. Stephen Henson2005-04-261-2/+2
|
* Add lots of checks for memory allocation failure, error codes to indicateDr. Stephen Henson2004-12-051-3/+6
| | | | | | failure and freeing up memory if a failure occurs. PR:620
* Constify d2i, s2i, c2i and r2i functions and other associatedRichard Levitte2004-03-151-2/+2
| | | | | | | | functions and macros. This change has associated tags: LEVITTE_before_const and LEVITTE_after_const. Those will be removed when this change has been properly reviewed.
* DO NOT constify RSA* in RSA_sign() and RSA_verify(), since there are functionRichard Levitte2003-05-071-2/+2
| | | | | | | called downstream that need it to be non-const. The fact that the RSA_METHOD functions take the RSA* as a const doesn't matter, it just expresses that *they* won't touch it. PR: 602
* Constify RSA_sign() and RSA_verify().Richard Levitte2003-05-051-2/+2
| | | | PR: 602
* We seem to carry some rests of the 0.9.6 [engine] ENGINE framework, here inRichard Levitte2003-04-081-13/+0
| | | | form of unneeded direct calls through the engine pointer..
* RSA_FLAG_SIGN_VER indicates the special rsa_sign and rsa_verify functionRichard Levitte2003-04-071-8/+16
| | | | | pointers should be used. It doesn't necessarely mean it should go through the ENGINE framework.
* Add the possibility to build without the ENGINE framework.Richard Levitte2003-01-301-0/+6
| | | | PR: 287
* Cleanse memory using the new OPENSSL_cleanse() function.Richard Levitte2002-11-281-2/+2
| | | | I've covered all the memset()s I felt safe modifying, but may have missed some.
* The logic in the main signing and verifying functions to check lengths wasRichard Levitte2002-11-261-1/+1
| | | | | | incorrect. Fortunately, there is a second check that's correct, when adding the pads. PR: 355
* Add support for MS CSP Name PKCS#12 attribute.Dr. Stephen Henson2001-06-111-2/+4
|
* Use new-style system-id macros everywhere possible. I hope I haven'tRichard Levitte2001-02-201-1/+1
| | | | | | | missed any. This compiles and runs on Linux, and external applications have no problems with it. The definite test will be to build this on VMS.
* Make all configuration macros available for application by makingRichard Levitte2001-02-191-2/+2
| | | | | | | | | | | | 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.
* Constify the RSA library.Richard Levitte2000-11-061-9/+11
|
* Merge the engine branch into the main trunk. All conflicts resolved.Richard Levitte2000-10-261-2/+5
| | | | At the same time, add VMS support for Rijndael.
* There have been a number of complaints from a number of sources that namesRichard Levitte2000-06-011-4/+4
| | | | | | | | | 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.
* ispell (and minor modifications)Ulf Möller2000-02-031-1/+1
|
* Add new sign and verify members to RSA_METHOD and change SSL code to use signDr. Stephen Henson1999-09-181-60/+93
| | | | and verify rather than direct encrypt/decrypt.
* Change #include filenames from <foo.h> to <openssl.h>.Bodo Möller1999-04-231-4/+4
| | | | | | Submitted by: Reviewed by: PR:
* Change functions to ANSI C.Ulf Möller1999-04-191-14/+4
|
* Import of old SSLeay release: SSLeay 0.9.1b (unreleased)Ralf S. Engelschall1998-12-211-0/+2
|
* Import of old SSLeay release: SSLeay 0.9.0bRalf S. Engelschall1998-12-211-2/+2
|
* Import of old SSLeay release: SSLeay 0.8.1bRalf S. Engelschall1998-12-211-0/+196