summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/recallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-07-26Code clean up openssl(1) pkcs12inoguchi1-61/+86
- Add a space before 'export_end:' - Remove space after '*' - Wrap lines by 80 columns
2019-07-26Remove unnecessary NULL checks before free in openssl(1) pkcs12inoguchi1-14/+7
ok bcook@ tb@
2019-07-25remove superfluous commentbcook1-2/+1
2019-07-25zero tmpkeyiv buffer after use when encryptingbcook1-2/+4
from Steven Roberts
2019-07-24Capitalize cipher name and mode in help message as sync with pkcs12inoguchi2-20/+20
2019-07-24Convert openssl(1) pkcs12 to the newer style of option handlinginoguchi1-214/+409
Adapt openssl(1) pkcs12 command to new option handling. Added pkcs12_options struct, and replaced for-if-strcmp handling with options_parse(). ok and comments jsing@
2019-07-23Moving variables into struct in openssl(1) pkcs12inoguchi1-125/+136
First step to adapt openssl(1) pkcs12 command to new option handling. There is no functional changes by this diff, and just moving variables into pkcs12_config struct. I still keep long lines more than 80 for this review to minimize diffs. ok jsing@ tb@
2019-07-17Update appstest.shinoguchi1-6/+4
- Add -modulus for dsa sub command - Remove -nextprotoneg
2019-07-16Fix long line by wrapping with 80 charsinoguchi1-6/+9
2019-07-16Move option handlers up to option definition struct in gendsa.cinoguchi1-53/+50
As we did in other openssl sub command, move up option handlers above option definition struct. No functional changes and just move up and remove prototype.
2019-07-16Fix typo and -keyform argument in openssl(1) manualinoguchi1-6/+8
- s/outputed/outputted/ - s/trused/trusted/ - add der as argument and describe pem is the default
2019-07-14Mark the initialized struct options arrays as both static and const.guenther34-71/+71
This moves them from .data to .data.rel.ro ok deraadt@ inoguchi@
2019-07-13explain the acronym "CRT"; suggested by tb@schwarze2-6/+8
2019-07-12Fix manual openssl(1) s_serverinoguchi1-18/+94
- Add undocumented options below. -alpn, -cert2, -certform, -dcertform, -dkeyform, -dpass, -dtls1, -key2, -keyform, -keymatexport, -keymatexportlen, -mtu, -named_curve, -no_cache, -no_ecdhe, -no_ticket, -pass, -port, -servername, -servername_fatal, -status, -status_timeout, -status_url, -status_verbose, -timeout, -tlsextdebug, -use_srtp, -verify_return_error - Remove -hack, -psk and -psk_hint since not exist in source code. I didn't add these 5 options since these were no-op. -chain, -legacy_renegotiation, -nextprotoneg, -no_comp, -no_ssl2 This option was removed from manual in the past. -no_ssl3 ok and suggestions from jmc@
2019-07-11Using pthread_atfork instead of __register_atfork with uClibc on noMMUinoguchi1-2/+2
uClibc on noMMU doesn't provide __register_atfork(). Reported by redbirdtek on Github issue. https://github.com/libressl-portable/portable/issues/538 ok bcook@
2019-07-11Fix manual openssl(1) s_clientinoguchi1-14/+80
- Add undocumented options below. -alpn, -certform, -dtls1, -host, -keyform, -keymatexport, -keymatexportlen, -legacy_server_connect, -mtu, -no_ign_eof, -no_legacy_server_connect, -pass -port, -serverpref, -sess_in, -sess_out, -status, -timeout, -use_srtp, -verify_return_error - Remove -psk and -psk_identity since not exist in source code. I didn't add these 4 options since these were no-op. -nextprotoneg, -legacy_renegotiation, -no_comp, -no_ssl2 This option was removed from manual in the past. -no_ssl3 ok jmc@
2019-07-10Add missing option openssl dsa -modulusinoguchi1-2/+8
ok bcook@ jsing@
2019-07-09Group tls_{handshake,read,write,close}() return values documentation.jsing1-21/+21
Move the documentation for tls_error() down so that both the special return values for tls_{handshake,read,write,close}() directly follow the standard return values for the same functions. Prompted by deraadt@. ok deraadt@ schwarze@
2019-07-09Fix manual openssl(1) genrsainoguchi1-6/+14
Add missing -camellia*/-idea description to genrsa section. ok jmc@
2019-07-09Convert openssl(1) genrsa to the newer style of option handlinginoguchi1-70/+183
ok tb@ jsing@
2019-07-08Fix manual openssl(1) dsa, ocsp, rsa and smimeinoguchi1-12/+56
- dsa : add missing -pvk-none, -pvk-strong and -pvk-weak add pvk format to -inform and -outform - ocsp : add missing -header, -ignore_err, -no_explicit and -timeout - rsa : add missing -pvk-none, -pvk-strong and -pvk-weak add missing -RSAPublicKey_in and -RSAPublicKey_out add pvk format to -inform and -outform - smime : add missing -nosmimecap - add pvk description at common format part ok jmc@
2019-07-08Clean up pvkfmt.cinoguchi1-63/+66
- Replace EVP_CIPHER_CTX_init with EVP_CIPHER_CTX_new and handle return value - Replace EVP_CIPHER_CTX_cleanup with EVP_CIPHER_CTX_free - Change two 'return -1;' to 'goto err;' for avoiding leak - Remove the case if enclevel == 0 - Change enclevel checking to make more consistent - Change all goto label to 'err' and insert space before goto label ok and advise from tb@
2019-07-07Fix pvk format processing in libcryptoinoguchi1-11/+11
- Return the valid pointer in i2b_PVK() - Use EVP_Decrypt* instead of EVP_Encrypt* - Fix error handling after BIO_write() in i2b_PVK_bio() ok tb@
2019-07-07Fix manual openssl(1) pkcs12, req, verify and x509inoguchi1-13/+76
- For pkcs12, add -camellia*/-idea, -LMK and -password - For req, add -multivalue-rdn, -pkeyopt and -sigopt - For verify, add -CRLfile and -trusted, and down -check_ss_sig description - For x509, add -next_serial and -sigopt - Remove the escape in -multivalue-rdn from ca section ok jmc@
2019-07-05Fix manual openssl(1) ec, enc and pkcs7inoguchi1-2/+9
- For ec, add -param_out description - For enc, add -v usage and description - For pkcs7, add -print usage and description ok jmc@
2019-07-05improve verb-tense for explaining the calling convention of __deraadt1-3/+3
ok guenther jmc
2019-07-05Fix manual openssl(1) dgstinoguchi1-3/+5
- Add undocumented option -r ok jmc@
2019-07-05The last consumer of pre-posix realpath behaviour has stoppedderaadt1-34/+3
requiring it (sftp-server). Remove the /exists///// behaviour from here. The /nonexistant behaviour remains in the kernel and needs to be shot next. There may be ports fallout, but we doubt it. ok beck djm
2019-07-04Fix manual openssl(1) crlinoguchi1-1/+13
- Add undocumented options -crlnumber, -hash_old, -nameopt and -verify ok jmc@
2019-07-04Fix manual openssl(1) cainoguchi1-8/+15
- Add undocumented options -crlsec and -sigopt - Sync argument name between usage and options description ok jmc@
2019-07-03snprintf/vsnprintf return < 0 on error, rather than -1.deraadt8-25/+25
2019-07-02Add cpuid support for arm64 so that we can recognize whichpatrick3-3/+57
hardware crypto features are available. "no objections" kettenis@
2019-06-30tweak previous; ok guentherjmc1-5/+6
2019-06-29Document that getcwd() and realpath() are built on system calls thatguenther1-2/+16
have a different calling convention than the standard function...as seen in kdump output. ok deraadt@ schwarze@
2019-06-28When system calls indicate an error they return -1, not some arbitraryderaadt10-56/+56
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2019-06-28failed to detect asprintf() error by observing return of -1, instead thederaadt1-6/+3
code was inspecting the pointer (which is, sadly, undefined on error, because the current specification of asprintf is crazy sloppy)
2019-06-27Some asprintf() calls were checked < 0, rather than the precise == -1.deraadt1-3/+3
ok millert nicm tb, etc
2019-06-27The C89 standard only requires that atexit(3) returns a non-zero valueschwarze1-5/+12
on error, so checking for -1 only is potentially non-portable. Also mention that the C89 standard does not require errno to be set. OK deraadt@ millert@
2019-06-27Add more option tests to req, ts, x509 and verify in appstest.shinoguchi1-17/+42
2019-06-27check for asprintf failing allocationderaadt1-1/+4
2019-06-24Add more options test to ocsp in appstest.shinoguchi1-7/+30
2019-06-23Add more option test to dgst in appstest.shinoguchi1-4/+33
2019-06-22Add more option tests to ca in appstest.shinoguchi1-8/+21
2019-06-20tls_read() & tls_write() return 4 possible values: TLS_WANT_POLLOUT,deraadt1-4/+4
TLS_WANT_POLLIN, -1, or 0. After handling the first two, check for -1 rather than vaguely "< 0". ok jsing
2019-06-20sockatmark(3), recv(2), getsockopt(2), and connect(2) return specificallyderaadt1-4/+4
-1 to mark failure, not arbitrary values < 0. I believe manual pages should follow the described contract precisely and accurately.
2019-06-19Move variables into struct in openssl(1) genrsainoguchi1-25/+33
- Move local variables in genrsa_main() to struct genrsa_config - Leave long lines more than 80, still ok bcook@
2019-06-17Make BN_num_bits_word() constant time.tb1-48/+18
Previously, this function would leak the most significant word of its argument due to branching and memory access pattern. This patch is enough to fix the use of BN_num_bits() on RSA prime factors in the library. The diff is a simplified and more readable (but perhaps less efficient) version of https://github.com/openssl/openssl/commit/972c87df by Andy Polyakov and David Benjamin (pre license change). Consult that commit message for details. Subsequent fixes to follow in the near future. Issue pointed out by David Schrammel and Samuel Weiser as part of a larger report. tests & ok inoguchi, ok jsing
2019-06-17Remove old realpath(3), and the userland-vs-kernel realpath verificationderaadt1-334/+44
code. We now user the simple userland wrapper on top of __realpath(2). The non-POSIX behaviour still remains, that is the next component to fix. From a diff by beck, but I managed to chainsaw it a bit further. Tested in snaps for a couple of days. ok beck
2019-06-15oops - missing .El in previous;jmc1-1/+2
2019-06-15realpath(3) doesn't use lstat(2), readlink(2), or getcwd(3) anymore,deraadt1-21/+39
it is a thin wrapper over the syscall __readlink(2). Improve the list of possible errors. ok millert beck jmc