summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* malloc() result does not need a cast.deraadt2014-06-071-1/+1
| | | | ok miod
* There is no need for is{upper,lower}() tests before to{lower,uppper}(),deraadt2014-06-011-23/+6
| | | | | since all other characters are mapped through transparently. ok jsing
* Change the actual default for returned asn1 strings to be utf8 in the code,beck2014-05-311-1/+1
| | | | | | | rather than only in the config file, to trip people up later. Found, and fix pleaded for by <spider@skuggor.se> who apparently spent hours chasing it down. ok miod@
* Add a comment documenting where libssl depends upon the current (objectionable)miod2014-05-311-0/+1
| | | | behaviour of this code, to prevent people from blindly changing it.
* more: no need for null check before freederaadt2014-05-3012-46/+23
| | | | ok tedu guenther
* remove CONST_STRICT. ok beck deraadttedu2014-05-301-2/+0
|
* no need for null check before free. from Brendan MacDonelltedu2014-05-309-28/+14
|
* convert 53 malloc(a*b) to reallocarray(NULL, a, b). that is 53deraadt2014-05-292-2/+2
| | | | | | | | | potential integer overflows easily changed into an allocation return of NULL, with errno nicely set if need be. checks for an allocations returning NULL are commonplace, or if the object is dereferenced (quite normal) will result in a nice fault which can be detected & repaired properly. ok tedu
* Everything sane has stdio, and FILE *. we don't need ifdefs for this.beck2014-05-297-20/+0
| | | | ok to firebomb from tedu@
* remove unused shit. from Alexander Schrijvertedu2014-05-252-4/+2
|
* We have shared global variables - unifdef OPENSSL_EXPORT_VAR_AS_FUNCTION.jsing2014-05-242-69/+0
| | | | ok miod@ beck@
* Almost nothing actually needs to include <openssl/e_os2.h>, however byjsing2014-05-242-2/+6
| | | | | | | including it they get <openssl/opensslconf.h>. So instead of pulling in <openssl/e_os2.h>, just pull in <openssl/opensslconf.h>. "go ahead" miod@
* Expand OPENSSL_{GLOBAL,EXTERN} macros that I missed last time around,jsing2014-05-242-2/+2
| | | | | | since they are hiding in the #define forest. ok miod@
* if (x) free(x) -> free(x); semantic patch generated with coccinelle, carefullymiod2014-05-222-6/+3
| | | | eyeballed before applying. Contributed by Cyril Roelandt on tech@
* KNF.jsing2014-05-223-171/+154
|
* No uses of UTF8_{getc,putc}() in ports, so remove them from the public header.guenther2014-05-222-9/+8
| | | | ok miod@
* Bring UTF8_{getc,putc} up-to-date: it's been a decade since 5- and 6-byteguenther2014-05-204-93/+88
| | | | | | | | encodings and encoding of surrogate pair code points were banned. Add checks for those, both to those functions and to the code decoding the BMP and UNIV encodings. ok miod@
* If you need to allocate `a + b' bytes of memory, then don't allocate `a + b*2',miod2014-05-183-6/+6
| | | | | | this is confusing and unnecessary. Help (coz I got confused) and ok guenther@ beck@
* Make sure UTF8_getc() is invoked with the proper buffer size.miod2014-05-181-2/+2
| | | | ok beck@ guenther@
* Fix memory leaks upon failure.miod2014-05-152-27/+39
| | | | ok beck@
* Replace ASN1_GENERALIZEDTIME_adj(), ASN1_UTCTIME_adj() andmiod2014-05-153-25/+73
| | | | | | | ASN1_TIME_to_generalizedtime() with wrappers around their former implementations, making sure memory allocated is freed in all failure cases. help and ok from beck@ and Brendan MacDonell.
* Bring back ASN1_seq_pack(), ASN1_seq_unpack(), ASN1_pack_string() andmiod2014-05-122-0/+108
| | | | | | | | ASN1_unpack_string() from the NO_ASN1_OLD purge; turns out that some Ruby extensions still use them, unfortunately, so we need to give them some more time to catch up on ``recent'' interfaces. Riding on the libcrypto major bump.
* i give up. reuse problem is unfixable. dlg says puppet crashes.tedu2014-05-041-8/+4
|
* Use C99 initializers for the various FOO_METHOD structs. More readable, andmiod2014-04-272-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | avoid unreadable/unmaintainable constructs like that: const EVP_PKEY_ASN1_METHOD cmac_asn1_meth = { EVP_PKEY_CMAC, EVP_PKEY_CMAC, 0, "CMAC", "OpenSSL CMAC method", 0,0,0,0, 0,0,0, cmac_size, 0, 0,0,0,0,0,0,0, cmac_key_free, 0, 0,0 }; ok matthew@ deraadt@
* static const char * = "" -> static const char[] = "", to produce shorter code.miod2014-04-273-3/+3
| | | | No functional change.
* Unifdef -U OPENSSL_BUILD_SHLIBCRYPTO, since all it causes under Unix is tomiod2014-04-272-10/+0
| | | | redefine OPENSSL_EXTERN from `extern' to `extern'.
* Replace all use of ERR_add_error_data with ERR_asprintf_error_data.beck2014-04-265-21/+12
| | | | | | | | This avoids a lot of ugly gymnastics to do snprintfs before sending the bag of strings to ERR, and eliminates at least one place in dso_dlfctn.c where it was being called with the incorrect number of arguments and using random things off the stack as addresses of strings. ok krw@, jsing@
* Unifdef -UPEDANTIC. ok beck@ tedu@miod2014-04-231-6/+0
|
* Remove duplicate pointer assignment in ASN1_primitive_free(); Dirk Englingmiod2014-04-231-1/+0
|
* Casting from a const unsigned char ** to a const unsigned char ** seems...jsing2014-04-231-8/+4
| | | | | | | unnecessary. Remove the temporary ugly casts - the comments even call them that! ok guenther@
* Make sure ret->name is NULL'ed before return when freeing.beck2014-04-231-0/+1
| | | | from Dirk Engling <erdgeist@erdgeist.org>
* Rather than sprinkling magical numbers everywhere, we can use sizeof()beck2014-04-231-4/+4
| | | | | for the size of a fixed size array. From Dirk Engling <erdgeist@erdgeist.org>
* null a pointer to prevent double free. from Dirk Englingtedu2014-04-221-0/+1
|
* fix memory leaks. from Dirk Englingtedu2014-04-223-21/+12
|
* improve realloc/calloc/malloc patterns; ok guentherderaadt2014-04-2116-48/+23
|
* Delete #if 0'd time related functions which are totally expired.deraadt2014-04-212-74/+0
| | | | No point even seeing these when we do the 2038 audit later on...
* fix accidentally deleted deref.beck2014-04-211-1/+1
|
* ASN1_STRING cleanup - realloc has handled NULL since I had a mulletbeck2014-04-201-17/+10
| | | | | | | | | and parachute pants - and since it's obvious there is no guarantee the caller doesn't pass in the data area in the argument, use memmove instead of memcpy so overlapping areas are handled correctly. Also, pointers can be usefully printed in hex with %p, in error messaeges rather than the bizzaro stuff that was there using mystical buffer lengths and abuse of strlcpy-converted-blindly-from-strcpy
* replace a bunch of pointer-arithmatic-strcpy-converted-blindly-to-strlcpybeck2014-04-201-7/+7
| | | | | cruft with an snprintf. "better than what was there" ok guenther@
* another attempt at fixing stale x509 data. since we don't know where thetedu2014-04-191-10/+8
| | | | | initial storage came from, we can't free it. just memset in the sequence case. probably ok beck
* can't actually do this. cause unknown.tedu2014-04-191-1/+1
|
* More KNF.jsing2014-04-195-238/+296
|
* More KNF.jsing2014-04-194-261/+379
|
* More KNF.jsing2014-04-193-10/+14
|
* We'll interpret a (void) cast on snprintf() to mean it's been verified thatguenther2014-04-196-13/+13
| | | | | | truncation is either desirable, not an issue, or is detected and handled later ok deraadt@
* More KNF.jsing2014-04-194-685/+761
|
* More KNF.jsing2014-04-196-380/+471
|
* More KNF.jsing2014-04-196-363/+434
|
* More KNF.jsing2014-04-197-203/+207
|
* use intrinsic strlcpy and strlcat everywhere so we only have one set ofbeck2014-04-191-3/+3
| | | | | | funcitons to check for incorrect use. keep BUF_strlcpy and BUF_strlcat for API comptibility only. ok tedu@