summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-04-24Try to clean the maze of <openssl/bn.h> defines regarding the BN internals.Miod Vallat
The intent of this change is to only keep support for two kind of architectures: - those with 32-bit int and long, and 64-bit long long, where ``long * long -> long long'' multiplication routines are available. - those with 64-bit int and long, and no 128-bit long long type. This gets rid of the SIXTY_FOUR_BIT_LONG, SIXTY_FOUR_BIT (not the same!), THIRTY_TWO_BIT, SIXTEEN_BIT and EIGHT_BIT defines. After this change, the types and defines are as follows: arch: 64bit 32bit rationale BN_LLONG undefined defined defined if l * l -> ll BN_ULLONG undefined u long long result of BN_LONG * BN_LONG BN_ULONG u long u int native register size BN_LONG long int the same, signed BN_BITS 128 64 size of 2*BN_ULONG in bits BN_BYTES 8 4 size of 2*BN_ULONG in bytes BN_BITS2 64 32 BN_BITS / 2 Tested on various 32-bit and 64-bit OpenBSD systems of various endianness.
2014-04-24Fix indentation.Ryan Thomas McBride
2014-04-24Bring back the SSL_OP_PKCS1_CHECK_* defines (defined to zero, as they alreadyMiod Vallat
were), after stumbling upon code (mis)using them in the wild.
2014-04-24rearrange a bit of code/commentsTed Unangst
2014-04-24unifdef MSDOSGiovanni Bechis
ok miod@
2014-04-24More KNF.Joel Sing
2014-04-24Make it compile again.Joel Sing
2014-04-24Remove some malloc/strlcpy/strlcat horror. Just use asprintf and avoid anJoel Sing
unchecked malloc at the same time. ok beck@
2014-04-24add ERR_asprintf_error_data, A tool to be used to get rid of the far tooBob Beck
frequent construct of 30 lines of pointer and strlcat insanity followed by an ERR_add_error_data. I will sweep through here like a chubby mongol horde in the next few days pillaging crappy ERR_add_error_data's. Oh and while we're at it fix the nasty vdata function to use something less hard on the eyes. ok jsing@
2014-04-24You want signals?!? I'll give you signals!!! Oh, and we have termios asJoel Sing
well... ok beck@
2014-04-24More KNF.Joel Sing
2014-04-24More KNF, things that couldn't be verified with md5(1), and some whitespaceRyan Thomas McBride
I missed on the first go around.
2014-04-24KNFRyan Thomas McBride
2014-04-24A fantastic way to make a large unsigned number is to assignBob Beck
a small signed one to it.. Some people on OpenSSL's list noticed - http://marc.info/?l=openssl-dev&m=139809485525663&w=2 This should fix that, and make sure we don't try to write out insane amounts of stuff. ok miod@ tedu@
2014-04-24remove redundant asign. from David HillTed Unangst
2014-04-24on today's episode of things you didn't want to learn:Ted Unangst
do_ssl3_write() is recursive. and not in the simple, obvious way, but in the sneaky called through ssl3_dispatch_alert way. (alert level: fuchsia) this then has a decent chance of releasing the buffer that we thought we were going to use. check for this happening, and if the buffer has gone missing, put another one back in place. the direct recursive call is safe because it won't call ssl3_write_pending which is the function that actually does do the writing and releasing. as reported by David Ramos to openssl-dev: http://marc.info/?l=openssl-dev&m=139809493725682&w=2 ok beck
2014-04-24repair missing semicolon. from Ian McwilliamTed Unangst
2014-04-23Unifdef -UPKCS1_CHECK and remove SSL_OP_PKCS1_CHECK_[12], this is leftoverMiod Vallat
``debug'' code from a 15+ years old bugfix and the SSL_OP_PKCS1_CHECK_* constants have had a value of zero since ages. No production code should use them. ok beck@
2014-04-23ain't nobody got time for hpuxTed Unangst
2014-04-23fix some variablesTed Unangst
2014-04-23replace a bunch of hand duped strings with strdupTed Unangst
2014-04-23Don't bother generating win64 assembly prologue.Miod Vallat
2014-04-23malloc/memset -> calloc. from peter maloneTed Unangst
2014-04-23No longer needed during build. Brings a smile on beck@'s face.Miod Vallat
2014-04-23The usual idiom to cope with systems not defining socklen_t is to add aMiod Vallat
#define socklen_t int somewhere (or a typedef, whatever gives you an integer type of the size your system expects as the 3rd argument of accept(2), really). OpenSSL here is a bit more creative by using an union of an int and a size_t, and extra code if sizeof(int) != sizeof(size_t) in order to recover the proper size. With a comment mentioning that this has no chance to work on a platform with a stack growing up and accept() returning an int, fortunately this seems to work on HP-UX. Switch to the light side of the force and declare and use socklen_t variables, period. If your system does not define socklen_t, consider bringing it back to your vendor for a refund. ok matthew@ tedu@
2014-04-23whitespaceTed Unangst
2014-04-23close socket in failure cases tooTed Unangst
2014-04-23if realloc failed, BIO_accept would leak memory and return NULL, causingTed Unangst
caller to crash. Fix leak and return an error instead. from Chad Loder
2014-04-23One last Dec C tentacle on alpha.Miod Vallat
2014-04-23When I grow up, I want to write workaround for long long multiplicationsMiod Vallat
under __TANDEM systems and compilers, using hardcoded octal numbers. NOT.
2014-04-23Remove IRIX_CC_BUG workaround.Miod Vallat
2014-04-23I'm glad to know that Ultrix CC has a bug optimizing switch() statementsMiod Vallat
lacking an explicit `case 0:' construct. But Ultrix has been dead for more than 15 years, really. Don't give it any reason to move out of its coffin.
2014-04-23Grr, the more you remove, the more there remain.Miod Vallat
2014-04-23Forgotten during latest spring cleaning of unreferenced bits.Miod Vallat
2014-04-23Unifdef -UPEDANTIC. ok beck@ tedu@Miod Vallat
2014-04-23Remove duplicate pointer assignment in ASN1_primitive_free(); Dirk EnglingMiod Vallat
2014-04-23Figure out endianness at compile-time, using _BYTE_ORDER fromMiod Vallat
<machine/endian.h>, rather than writing 1 to a 32-bit variable and checking whether the first byte is nonzero. tweaks and ok matthew@; ok beck@ tedu@
2014-04-23Casting from a const unsigned char ** to a const unsigned char ** seems...Joel Sing
unnecessary. Remove the temporary ugly casts - the comments even call them that! ok guenther@
2014-04-23Make libssl and libcrypto compile with -WerrorBob Beck
ok miod@
2014-04-23Make sure ret->name is NULL'ed before return when freeing.Bob Beck
from Dirk Engling <erdgeist@erdgeist.org>
2014-04-23Rather than sprinkling magical numbers everywhere, we can use sizeof()Bob Beck
for the size of a fixed size array. From Dirk Engling <erdgeist@erdgeist.org>
2014-04-22unifdef -UAES_LONG for we do not intend to run on platforms where int is smallerMiod Vallat
than 32 bits.
2014-04-22So it turns out that libcrypto on i386 platforms, unconditionaly compiles thisMiod Vallat
little gem called OPENSSL_indirect_call(), supposedly to be ``handy under Win32''. In my view, this is a free-win ROP entry point. Why try and return to libc when you can return to libcrypto with an easy to use interface? Better not give that much attack surface, and remove this undocumented entry point. ok beck@ tedu@
2014-04-22When compiling with AES_WRAP_TEST, make main() return a meaningful valueMiod Vallat
instead of garbage, and add this to the libcrypto regress. Note these tests are incomplete, as they always use the default IV.
2014-04-22null a pointer to prevent double free. from Dirk EnglingTed Unangst
2014-04-22Remove files which look like actual code compiled in libcrypto, but isn't.Miod Vallat
One even says (in comments): HAS BUGS! DON'T USE
2014-04-22fix memory leaks. from Dirk EnglingTed Unangst
2014-04-22Remove meat which either duplicates code found in apps/, or is only of valueMiod Vallat
for 20th century historians, and can be put in the Attic.
2014-04-22switch to reallocarrayTed Unangst
2014-04-21KNF.Joel Sing