aboutsummaryrefslogtreecommitdiff
path: root/demos
AgeCommit message (Collapse)AuthorFilesLines
2019-03-13Fix memory leaks in pkread.c demo fileMatt Caswell1-19/+27
Also make various changes to bring the file into line with current coding style. Fixes #8456 Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Paul Yang <yang.yang@baishancloud.com> (Merged from https://github.com/openssl/openssl/pull/8457)
2019-02-05Remove unnecessary trailing whitespaceSam Roberts6-6/+6
Trim trailing whitespace. It doesn't match OpenSSL coding standards, AFAICT, and it can cause problems with git tooling. Trailing whitespace remains in test data and external source. Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8092)
2018-12-06Following the license change, modify the boilerplates in demos/Richard Levitte25-25/+25
[skip ci] Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7834)
2018-11-06Remove outdated e_chil.txt fileRich Salz1-12/+0
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7476)
2018-11-05GMAC implementationPauli2-108/+3
Remove GMAC demo program because it has been superceded by the EVP MAC one Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7548)
2018-09-19Add a GMAC demonstration program.Pauli2-3/+108
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> (Merged from https://github.com/openssl/openssl/pull/7249)
2018-09-04demos/evp: add make cleanPaulo Flabiano Smorigo1-1/+4
Add make clean for evp demos and remove whitespace from a line. CLA: trivial Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7072)
2018-06-15Update certificates in demos/bio, demos/cms, demos/smimeDavid Cooper12-291/+451
This commit replaces the certificates in demos/bio with new certificates that don't expire until 2118. The same certificates appear in both demos/smime and demos/cms. This commit copies the new certificates and keys from demos/smime to demos/cms. This PR Fixes #6412 by updating cacert.pem and signer.pem in the openssl/demos/smime/ directory. It also updates all of the keys with longer key lengths. Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6483)
2017-11-30Add "friendly name" extractorRich Salz2-3/+35
From a comment posted by GitHub user "geniuz" Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4812)
2017-11-11Many spelling fixes/typo's corrected.Josh Soref1-1/+1
Around 138 distinct errors found and fixed; thanks! Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3459)
2017-07-13Demo style fixes and modernisation.Pauli5-39/+33
Address some style issues in the demos and modernise the C. Fix the exit/return from main handling. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3914)
2017-07-07Rearrange link line so the libraries come after the source.Pauli2-2/+2
Some linkers like it this way. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3879)
2017-06-09Fix a bundle of trailing spaces in several filesPaul Yang1-1/+1
Signed-off-by: Paul Yang <paulyang.inf@gmail.com> Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3622)
2017-06-07make error tables const and separate header fileRich Salz1-0/+12
Run perltidy on util/mkerr Change some mkerr flags, write some doc comments Make generated tables "const" when genearting lib-internal ones. Add "state" file for mkerr Renerate error tables and headers Rationalize declaration of ERR_load_XXX_strings Fix out-of-tree build Add -static; sort flags/vars for options. Also tweak code output Moved engines/afalg to engines (from master) Use -static flag Standard engine #include's of errors Don't linewrap err string tables unless necessary Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3392)
2017-05-08Added a new Makefile in demos/evp directoryMeena Vyas2-1/+22
Fixed compilation warning in file aesgcm.c Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3406)
2017-05-04Remove outdated and unsupported CHIL engineRich Salz4-1457/+0
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3389)
2017-03-01Remove some obsolete/obscure internal define switches:Emilia Kasper1-5/+1
- FLAT_INC - PKCS1_CHECK (the SSL_OP_PKCS1_CHECK options have been no-oped) - PKCS_TESTVECT (debugging leftovers) - SSL_AD_MISSING_SRP_USERNAME (unfinished feature) - DTLS_AD_MISSING_HANDSHAKE_MESSAGE (unfinished feature) - USE_OBJ_MAC (note this removes a define from the public header but very unlikely someone would be depending on it) - SSL_FORBID_ENULL Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org>
2017-02-28Move the CHIL engine to demos/enginesRichard Levitte4-0/+1461
Moving out of the way, Makefile to be added Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2780)
2016-09-20Crude VMS build files for demos/bio/Richard Levitte3-0/+51
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-20Crude Makefile for demos/bio/Richard Levitte1-0/+30
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-20Fixup BIO demos for OpenSSL 1.1.xRichard Levitte2-3/+3
Call SSL_CTX_new() before doing any configuration. (or call OPENSSL_ssl_init()) Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-20Fixup BIO demos for OpenSSL 1.1.xRichard Levitte1-2/+0
'ECDHParameters = Automatic' isn't accepted. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-20Fixup BIO demos for OpenSSL 1.1.xRichard Levitte7-33/+3
Note: server-cmod doesn't seem to do things right... from loading cmod.cnf, it tries to load libssl_conf.so. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-18Consolidate copyright for demosRich Salz25-0/+223
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-20Remove --classic build entirelyRichard Levitte1-23/+0
The Unix build was the last to retain the classic build scheme. The new unified scheme has matured enough, even though some details may need polishing. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-07Remove really old demo'sRich Salz60-11367/+0
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-17Finish 02f7114a7fbb3f3ac171bae87be8c13bc69e4005David Woodhouse4-4/+4
Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-02-05GH601: Various spelling fixes.FdaSilvaYY1-1/+1
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-01-29Remove clean-dependRich Salz4-24/+0
Remove depend hacks from demos/engines. Remove clean-depend; just call makedepend (or $CC -M) and use that. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz19-29/+0
This was done by the following find . -name '*.[ch]' | /tmp/pl where /tmp/pl is the following three-line script: print unless $. == 1 && m@/\* .*\.[ch] \*/@; close ARGV if eof; # Close file to reset $. And then some hand-editing of other files. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-20Consolidate "make update"Rich Salz4-8/+4
Rename 'update' to 'generate'. Rather than recurse, just explicitly call the three generate targets directly. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-17Remove some old makefile targetsRich Salz4-0/+4
Remove lint, tags, dclean, tests. This is prep for a new makedepend scheme. This is temporary pending unified makefile, and might help it. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-12Move Makefiles to Makefile.inRich Salz8-56/+0
Create Makefile's from Makefile.in Rename Makefile.org to Makefile.in Rename Makefiles to Makefile.in Address review feedback from Viktor and Richard Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-07mem functions cleanupRich Salz1-0/+1
Only two macros CRYPTO_MDEBUG and CRYPTO_MDEBUG_ABORT to control this. If CRYPTO_MDEBUG is not set, #ifdef out the whole debug machinery. (Thanks to Jakob Bohm for the suggestion!) Make the "change wrapper functions" be the only paradigm. Wrote documentation! Format the 'set func' functions so their paramlists are legible. Format some multi-line comments. Remove ability to get/set the "memory debug" functions at runtme. Remove MemCheck_* and CRYPTO_malloc_debug_init macros. Add CRYPTO_mem_debug(int flag) function. Add test/memleaktest. Rename CRYPTO_malloc_init to OPENSSL_malloc_init; remove needless calls. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-05DANE support structures, constructructors and accessorsViktor Dukhovni5-35/+97
Also tweak some of the code in demos/bio, to enable interactive testing of BIO_s_accept's use of SSL_dup. Changed the sconnect client to authenticate the server, which now exercises the new SSL_set1_host() function. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-22Demo server using SSL_CTX_configDr. Stephen Henson3-0/+135
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-18Remove err and prime demo'sRich Salz7-198/+0
ERR is not really a public facility; remove the demo. prime shows how to generate a prime. See apps. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-12-18Remove the "eay" c-file-style indicatorsRichard Levitte2-2/+2
Since we don't use the eay style any more, there's no point tryint to tell emacs to use it. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-12-05Remove support for all 40 and 56 bit ciphers.Kurt Roeckx2-16/+0
Reviewed-by: Rich Salz <rsalz@openssl.org> MR: #364
2015-10-30Replace "SSLeay" in API with OpenSSLRich Salz8-17/+17
All instances of SSLeay (any combination of case) were replaced with the case-equivalent OpenSSL. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-26Move crypto/threads to demo/threadsRich Salz5-0/+984
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-23Fix typosAlessandro Ghedini1-1/+1
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-09-28Remove obsolete b64 demo'sRich Salz2-269/+0
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2015-09-25Remove obsolete OCSP demoRich Salz2-368/+0
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2015-07-21Update demo.Dr. Stephen Henson4-11/+61
Use new SSL_CONF options in demo. Add intermediate and root CAs and update all to use SHA256. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-07-14Conversion to UTF-8 where neededRichard Levitte1-1/+1
This leaves behind files with names ending with '.iso-8859-1'. These should be safe to remove. If something went wrong when re-encoding, there will be some files with names ending with '.utf8' left behind. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-06-10Change BIO_number_read and BIO_number_written() to be 64 bitMatt Caswell1-1/+1
The return type of BIO_number_read() and BIO_number_written() as well as the corresponding num_read and num_write members in the BIO structure has been changed from unsigned long to uint64_t. On platforms where an unsigned long is 32 bits (e.g. Windows) these counters could overflow if >4Gb is transferred. With thanks to the Open Crypto Audit Project for reporting this issue. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-16Client side version negotiation rewriteMatt Caswell5-5/+5
Continuing from the previous commit this changes the way we do client side version negotiation. Similarly all of the s23* "up front" state machine code has been avoided and again things now work much the same way as they already did for DTLS, i.e. we just do most of the work in the ssl3_get_server_hello() function. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-05-16Server side version negotiation rewriteMatt Caswell6-6/+6
This commit changes the way that we do server side protocol version negotiation. Previously we had a whole set of code that had an "up front" state machine dedicated to the negotiating the protocol version. This adds significant complexity to the state machine. Historically the justification for doing this was the support of SSLv2 which works quite differently to SSLv3+. However, we have now removed support for SSLv2 so there is little reason to maintain this complexity. The one slight difficulty is that, although we no longer support SSLv2, we do still support an SSLv3+ ClientHello in an SSLv2 backward compatible ClientHello format. This is generally only used by legacy clients. This commit adds support within the SSLv3 code for these legacy format ClientHellos. Server side version negotiation now works in much the same was as DTLS, i.e. we introduce the concept of TLS_ANY_VERSION. If s->version is set to that then when a ClientHello is received it will work out the most appropriate version to respond with. Also, SSLv23_method and SSLv23_server_method have been replaced with TLS_method and TLS_server_method respectively. The old SSLv23* names still exist as macros pointing at the new name, although they are deprecated. Subsequent commits will look at client side version negotiation, as well of removal of the old s23* code. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-05-11Use p==NULL not !p (in if statements, mainly)Rich Salz5-70/+47
Reviewed-by: Tim Hudson <tjh@openssl.org>