summaryrefslogtreecommitdiff
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* oops, i deleted the wrong wordtedu2014-07-131-2/+2
|
* remove a lie spotted by guenthertedu2014-07-131-5/+4
|
* once srandomdev() is called, switch to using arc4random() but mask off thetedu2014-07-131-12/+10
| | | | | high bit as required by posix. wouldn't want to break any standards. idea and ok deraadt
* unbreak build this needed to be an and..beck2014-07-138-16/+16
| | | | ok jsing@
* Use dl_iterate_phdr() to iterate over the segments and throw the addressesderaadt2014-07-134-4/+56
| | | | | | | into the hash; hoping the system has some ASLR or PIE. This replaces and substantially improves upon &main which proved problematic with some picky linkers. Work with kettenis, testing by beck
* Split out ntoh[ls] and hton[ls] into their own manpage.guenther2014-07-133-136/+199
| | | | | | Update byteorder(3) to cover the new functions in <endian.h> ok deraadt@ millert@
* Provide a link to the canonical API specification.deraadt2014-07-138-8/+32
| | | | ok beck
* Make sure all error conditions in RSA_padding_add_PKCS1_PSS_mgf1() causemiod2014-07-132-6/+8
| | | | EVP_MD_CTX_cleanup() to be called.
* Possible PBEPARAM leak in the error path.miod2014-07-132-12/+16
|
* dsa_priv_decode(): only destroy the object we've created, and with themiod2014-07-132-6/+10
| | | | | | appropriate function. Checking for privkey != NULL is not enough since privkey points to a member of ndsa if ndsa != NULL. dsa_priv_encode(): possible double free in error path.
* Check X509_NAME_oneline() return value when it will have to allocate memory.miod2014-07-132-2/+6
|
* EVP_DigestInit_ex() may be used to recycle an existing EVP_MD_CTX without havingmiod2014-07-132-6/+18
| | | | | | | | | | | | | to reinitialize all of it, especially if it is used with the same MD algorithm. However, when the MD algorithm changes, it needs to perform more cleanups. Make that code more closer to what EVP_MD_CTX_cleanup() does by: - only freeing md_data if EVP_MD_CTX_FLAG_REUSE is not set - performing an explicit_bzero of md_data before freeing it - making sure we call EVP_PKEY_CTX_free on the pctx if the allocation for the new md_data fails. ok tedu@
* Don't include asn1_mac.h if all you need is asn1.h.miod2014-07-132-4/+4
|
* Take out __bounded__ in the include files we use it in when not on OpenBSD.beck2014-07-138-10/+32
| | | | | | | while we can take it out in portable at compile time, it is still a problem when we install this header file on a system that doesn't support __bounded__ if this is unguarded. ok miod@ bcook@
* While we thought this would make portable life easier it actuallybeck2014-07-131-3/+1
| | | | | makes it much harder. ok bcook@ kettenis@
* No need to include evp_locl.h in there.miod2014-07-1312-36/+12
|
* Take away the use of the address of main as a source of entropy. Causesbeck2014-07-136-6/+30
| | | | | | distractions to people testing and seeing link errors in some setups. This will come back in another form ok deraadt@
* KNF and some code cleaning.jsing2014-07-132-72/+92
|
* remove silly castderaadt2014-07-132-4/+4
|
* Another large dose of KNF.jsing2014-07-132-472/+814
|
* Apply a large dose of KNF.jsing2014-07-122-252/+404
|
* duplicate function names in head1miod2014-07-122-2/+2
|
* The correct name for EDH is DHE, likewise EECDH should be ECDHE.jsing2014-07-1218-236/+236
| | | | | | Based on changes to OpenSSL trunk. ok beck@ miod@
* No need to include asn1_mac.h here.miod2014-07-124-8/+4
|
* remove double brackets. fixes build with clang.jsg2014-07-122-4/+4
| | | | ok jsing@
* Remove this sentence:miod2014-07-122-6/+4
| | | | | | | ``The probability that a randomly generated key is weak is -1/2^52, so it is not really worth checking for them.'' This kind of naively optimistic attitude is not compatible with security.
* more MLINKSmiod2014-07-121-1/+56
|
* getentropy on Windows. It compiles but has not been thoroughly tested yet.wouter2014-07-122-0/+112
| | | | OK: beck@
* Remove signed/unsigned warning, statement before declaration andwouter2014-07-126-58/+64
| | | | | | add a function to use function pointers that does not take sizeof(fptr). OK beck@
* We have EVP_CIPH_FLAG_DEFAULT_ASN1 in evp.h; no need to keep constructs tomiod2014-07-122-68/+56
| | | | | | build on pre-EVP_CIPH_FLAG_DEFAULT_ASN1 codebases. ok jsing@
* Remove private_{Camellia,RC4}_set_key FIPS indirection tentacles, as has beenmiod2014-07-1219-314/+73
| | | | done for other symmetric algorithms recently.
* Provide ssl_version_string() function, which uses one of those modern Cjsing2014-07-128-56/+62
| | | | | | | | constructs (a switch statement) and returns the appropriate string defined by SSL_TXT_* for the given version, including support for DTLSv1 and DTLSv1-bad. Use this function in SSL_get_version() and SSL_SESSION_print(). ok beck@
* In openssl_startup(), call SSL_library_init() and SSL_load_error_strings().jsing2014-07-128-28/+10
| | | | | | | | This allows us to remove the ERR_load_crypto_strings() call, along with the various SSL_load_error_strings() and OpenSSL_add_ssl_algorithms() calls scattered around the place. ok beck@
* Make the BLOCK_CIPHER_{generic,custom} macros expand to more readable structmiod2014-07-122-134/+204
| | | | definitions using C99 field initializers. No functional change.
* Wrap "thread_private.h" with #ifdef __OpenBSD__ so that other systemsderaadt2014-07-121-1/+3
| | | | | | can copy this file (plus chacha_private.h) directly and reuse it trivially. Well, as long as they have a getentropy() as well.. ok beck
* Remove extra parenthesis.jsing2014-07-122-4/+4
|
* need_cert is now always true, so remove the variable and associatedjsing2014-07-122-66/+42
| | | | | | conditionals. ok miod@
* More KNF.jsing2014-07-121-95/+108
|
* Remove #ifndefs for OPENSSL_NO_DH, OPENSSL_NO_ECDH andjsing2014-07-121-41/+0
| | | | | OPENSSL_NO_X509_VERIFY. We're not going to build with these and the same removal has already been done for libssl.
* openssl(1) is only built as a single monolithic binary, so just calljsing2014-07-1239-154/+47
| | | | | | load_config() once when we start. ok miod@
* jsing and I are investigating removal of all? most? 'getenv from library'deraadt2014-07-122-2/+6
| | | | | | | instances. This one for OPENSSL_ALLOW_PROXY_CERTS gets turned off first, especially since it had this special comment: /* A hack to keep people who don't want to modify their software happy */ ok beck jsing
* A few fixes/improvements:miod2014-07-122-40/+38
| | | | | | | | | | | | | | | | - first, BN_free == BN_clear_free in our libcrypto, so we do not need to treat CBIGNUM (crypto BN) separately from BIGNUM (regular BN). - then, in bn_i2c(), since BN_bn2bin returns BN_num_bytes(input), take advantage of this to avoid calling BN_num_bytes() a second time. BN_num_bytes() is cheap, but this not a reason to perform redundant work. - finally, in bn_c2i, if bn_new() fails, return early. Otherwise BN_bin2bn will try to create a BN too, and although this will probably fail since we were already out of memory, if we are on a threaded process and suddenly the allocation succeeds, we will leak it since it will never be stored in *pval. ok jsing@
* Make sure the return value of X509_NAME_oneline(, NULL,) is checked againstmiod2014-07-124-10/+26
| | | | | NULL. ok deraadt@ guenther@ jsing@
* if (x) FOO_free(x) -> FOO_free(x).miod2014-07-12128-1098/+638
| | | | | | | Improves readability, keeps the code smaller so that it is warmer in your cache. review & ok deraadt@
* more MLINKsmiod2014-07-121-1/+4
|
* guard inclusion of sys/sysctl.h so we can detect at compile time andbeck2014-07-122-2/+6
| | | | | keep linux distros happy that don't have it. ok bcook@
* Principle of least surprise: make CMAC_CTX_free(), OCSP_REQ_CTX_free() andmiod2014-07-126-6/+24
| | | | | X509_STORE_CTX_free() accept NULL pointers as input without dereferencing them, like all the other well-behaved *_CTX_free() functions do.
* remove gratuitous differences, ok beckderaadt2014-07-122-78/+80
|
* remove gratuitous differences, ok beck bcookderaadt2014-07-124-24/+24
|
* Split arc4random_uniform into it's own file, to assist other projectsderaadt2014-07-123-39/+60
| | | | | | now using this as upstream code. The particular problem is systems that contain older arc4random derivations lacking arc4random_uniform(). ok tedu miod