summaryrefslogtreecommitdiffstats
path: root/crypto/objects (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Continue standardising malloc style for libcryptoMatt Caswell2015-11-092-7/+7
| | | | | | | Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Rebuild error source files.Dr. Stephen Henson2015-11-051-1/+1
| | | | | | | 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>
* New cipher and cipher modes standardized in RussiaDmitry Belyavskiy2015-10-053-3/+50
| | | | | | | | This change introduces short names and NIDs for Russian GOST ciphers according to GOST R 34.13-2015 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* remove 0 assignments.Rich Salz2015-09-031-5/+1
| | | | | | | After openssl_zalloc, cleanup more "set to 0/NULL" assignments. Many are from github feedback. Reviewed-by: Tim Hudson <tjh@openssl.org>
* Add new GOST OIDsDmitry Belyavsky2015-08-175-5/+305
| | | | | | | Add new OIDs for latest GOST updates Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Add $! to errors, use script basename.Rich Salz2015-06-231-5/+4
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* return correct NID for undefined objectDr. Stephen Henson2015-06-081-0/+3
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* RT3230: Better test for C identifierAnnie Yousar2015-06-022-5/+5
| | | | | | | | | objects.pl only looked for a space to see if the name could be used as a C identifier. Improve the test to match the real C rules. Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Matt Caswell <matt@openssl.org>
* Fix the update target and remove duplicate file updatesRichard Levitte2015-05-221-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>
* Add scrypt OID from draft-josefsson-scrypt-kdf-03Dr. Stephen Henson2015-05-213-5/+14
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* make dependRichard Levitte2015-05-141-3/+4
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Identify and move common internal libcrypto header filesRichard Levitte2015-05-142-2/+2
| | | | | | | | | | | | | 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>
* Call of memcmp with null pointers in obj_cmp()Hanno Böck2015-05-131-0/+2
| | | | | | | | | | | | | | | | | | | | | The function obj_cmp() (file crypto/objects/obj_dat.c) can in some situations call memcmp() with a null pointer and a zero length. This is invalid behaviour. When compiling openssl with undefined behaviour sanitizer (add -fsanitize=undefined to compile flags) this can be seen. One example that triggers this behaviour is the pkcs7 command (but there are others, e.g. I've seen it with the timestamp function): apps/openssl pkcs7 -in test/testp7.pem What happens is that obj_cmp takes objects of the type ASN1_OBJECT and passes their ->data pointer to memcmp. Zero-sized ASN1_OBJECT structures can have a null pointer as data. RT#3816 Signed-off-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix the heap corruption in libeay32!OBJ_add_object.Gunnar Kudrjavets2015-05-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original 'sizeof(ADDED_OBJ)' was replaced with 'sizeof(*ao)'. However, they return different sizes. Therefore as the result heap gets corrupted and at some point later debug version of malloc() detects the corruption. On x86 we can observe that as follows: sizeof(*ao) == 4 sizeof(*ao[0]) == sizeof(ADDED_OBJ) == 8 Issue reproduces with either enabling CRT debug heap or Application Verifier's full-page heap. Basic debugging data from the moment the corruption is first detected: 0:000:x86> | . 0 id: 283c create name: openssl.exe 0:000:x86> kcn # 00 MSVCR120D!_heap_alloc_dbg_impl 01 MSVCR120D!_nh_malloc_dbg_impl 02 MSVCR120D!_nh_malloc_dbg 03 MSVCR120D!malloc 04 LIBEAY32!default_malloc_ex 05 LIBEAY32!CRYPTO_malloc 06 LIBEAY32!lh_insert 07 LIBEAY32!OBJ_add_object 08 LIBEAY32!OBJ_create 09 openssl!add_oid_section 0a openssl!req_main 0b openssl!do_cmd 0c openssl!main 0d openssl!__tmainCRTStartup 0e openssl!mainCRTStartup 0f KERNEL32!BaseThreadInitThunk 10 ntdll_77d60000!__RtlUserThreadStart 11 ntdll_77d60000!_RtlUserThreadStart Signed-off-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* Use p==NULL not !p (in if statements, mainly)Rich Salz2015-05-111-5/+5
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Make sig_app, sigx_app staticRich Salz2015-05-061-1/+2
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* ZLIB compression deserves a better commentRichard Levitte2015-05-061-1/+1
| | | | | | What could be better than to refer to the RFC that defines it? Reviewed-by: Stephen Henson <steve@openssl.org>
* make updateRichard Levitte2015-05-051-1607/+1603
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Remove the last traces of the fake RLE compressionRichard Levitte2015-05-051-2/+0
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Use safer sizeof variant in mallocRich Salz2015-05-044-16/+13
| | | | | | | | | | | | | For a local variable: TYPE *p; Allocations like this are "risky": p = OPENSSL_malloc(sizeof(TYPE)); if the type of p changes, and the malloc call isn't updated, you could get memory corruption. Instead do this: p = OPENSSL_malloc(sizeof(*p)); Also fixed a few memset() calls that I noticed while doing this. Reviewed-by: Richard Levitte <levitte@openssl.org>
* fix various typo'sRich Salz2015-05-032-3/+3
| | | | | | | | https://github.com/openssl/openssl/pull/176 (CHANGES) https://rt.openssl.org/Ticket/Display.html?id=3545 (objects.txt) https://rt.openssl.org/Ticket/Display.html?id=3796 (verify.pod) Reviewed-by: Tim Hudson <tjh@openssl.org>
* Add OSSL_NELEM macro.Dr. Stephen Henson2015-05-031-7/+5
| | | | | | | Add OSSL_NELEM macro to e_os.h to determine the number of elements in an array. Reviewed-by: Tim Hudson <tjh@openssl.org>
* free NULL cleanup 11Rich Salz2015-05-011-8/+4
| | | | | | | | | | | | | | | | | | | Don't check for NULL before calling free functions. This gets: ERR_STATE_free ENGINE_free DSO_free CMAC_CTX_free COMP_CTX_free CONF_free NCONF_free NCONF_free_data _CONF_free_data A sk_free use within OBJ_sigid_free TS_TST_INFO_free (rest of TS_ API was okay) Doc update for UI_free (all uses were fine) X509V3_conf_free X509V3_section_free X509V3_string_free Reviewed-by: Richard Levitte <levitte@openssl.org>
* free null cleanup finaleRich Salz2015-05-012-14/+7
| | | | | | Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
* free NULL cleanup 7Rich Salz2015-05-011-4/+2
| | | | | | | | | | | 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>
* remove malloc castsRich Salz2015-04-282-9/+7
| | | | | | | Following ANSI C rules, remove the casts from calls to OPENSSL_malloc and OPENSSL_realloc. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Code style: space after 'if'Viktor Dukhovni2015-04-161-1/+1
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Remove EXHEADER, TEST, APPS, links:, install: and uninstall: where relevantRichard Levitte2015-03-311-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>
* Stop symlinking, move files to intended directoryRichard Levitte2015-03-313-5422/+5
| | | | | | | | | | | | | 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>
* make dependDr. Stephen Henson2015-03-251-2/+3
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* make ASN1_OBJECT opaqueDr. Stephen Henson2015-03-243-0/+19
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Unchecked malloc fixesMatt Caswell2015-03-051-6/+9
| | | | | | | Miscellaneous unchecked malloc fixes. Also fixed some mem leaks on error paths as I spotted them along the way. Reviewed-by: Tim Hudson <tjh@openssl.org>
* RT937: Enable pilotAttributeType uniqueIdentifierRich Salz2015-02-123-1633/+1641
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add more Camellia OIDs.Andy Polyakov2015-02-114-5/+161
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Bring objects.pl output even closer to new format.Andy Polyakov2015-02-091-2/+1
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Harmonize objects.pl output with new format.Andy Polyakov2015-02-091-17/+26
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* util/mkstack.pl now generates entire safestack.hRich Salz2015-02-061-1/+0
| | | | | | | | | The mkstack.pl script now generates the entire safestack.h file. It generates output that follows the coding style. Also, removed all instances of the obsolete IMPLEMENT_STACK_OF macro. Reviewed-by: Andy Polyakov <appro@openssl.org>
* Make objxref.pl output in correct formatDr. Stephen Henson2015-02-041-16/+21
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* OPENSSL_NO_xxx cleanup: many removalsRich Salz2015-01-271-14/+1
| | | | | | | | | | | | The following compile options (#ifdef's) are removed: OPENSSL_NO_BIO OPENSSL_NO_BUFFER OPENSSL_NO_CHAIN_VERIFY OPENSSL_NO_EVP OPENSSL_NO_FIPS_ERR OPENSSL_NO_HASH_COMP OPENSSL_NO_LHASH OPENSSL_NO_OBJECT OPENSSL_NO_SPEED OPENSSL_NO_STACK OPENSSL_NO_X509 OPENSSL_NO_X509_VERIFY This diff is big because of updating the indents on preprocessor lines. Reviewed-by: Richard Levitte <levitte@openssl.org>
* ifdef cleanup part 3: OPENSSL_SYSNAMERich Salz2015-01-231-1/+1
| | | | | | | | Rename OPENSSL_SYSNAME_xxx to OPENSSL_SYS_xxx Remove MS_STATIC; it's a relic from platforms <32 bits. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-228-6006/+5980
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Further comment amendments to preserve formatting prior to source reformatMatt Caswell2015-01-061-1/+2
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* mark all block comments that need format preserving so thatTim Hudson2014-12-301-2/+3
| | | | | | | indent will not alter them when reformatting comments Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Remove fipscanister build functionality from makefiles.Dr. Stephen Henson2014-12-081-1/+1
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Add EVP support for OCB modeMatt Caswell2014-12-084-3/+30
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Remove all .cvsignore filesRich Salz2014-11-291-4/+0
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Fix cross reference table generator.Dr. Stephen Henson2014-11-132-4/+4
| | | | | | | If the hash or public key algorithm is "undef" the signature type will receive special handling and shouldn't be included in the cross reference table. Reviewed-by: Tim Hudson <tjh@openssl.org>
* Fix OID handling:Emilia Kasper2014-08-061-7/+9
| | | | | | | | | | | - Upon parsing, reject OIDs with invalid base-128 encoding. - Always NUL-terminate the destination buffer in OBJ_obj2txt printing function. CVE-2014-3508 Reviewed-by: Dr. Stephen Henson <steve@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
* Please Clang's sanitizer, addendum.Andy Polyakov2014-07-081-1/+1
|
* Rebuild OID table.Dr. Stephen Henson2014-06-271-1784/+1777
|