summaryrefslogtreecommitdiffstats
path: root/demos
AgeCommit message (Collapse)Author
2023-03-15demo: Fix makefile targetPauli
The makefile target was incorrect and wouldn't build the rsa_encrypt demo. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20503) (cherry picked from commit 67bfdfa17bc4ca8e2b819316299bb82748394c45)
2022-12-22Add Demos for DSA params/DSA keygen.slontis
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19853) (cherry picked from commit de1164102083730298e4f53eb465c9324aa6a0c0)
2022-12-07Replace "a RSA" with "an RSA"Daniel Fiala
Fixes openssl#19771 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19787) (cherry picked from commit a63fa5f711f1f97e623348656b42717d6904ee3e)
2022-12-01Update copyright yearTomas Mraz
Reviewed-by: Matt Caswell <matt@openssl.org> Release: yes (Merged from https://github.com/openssl/openssl/pull/19803)
2022-11-23apps & al : Fix various typos, repeated words, align some spelling to LDP.FdaSilvaYY
Mostly revamped from #16712 - fall thru -> fall through - time stamp -> timestamp - host name -> hostname - ipv6 -> IPv6 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19059) (cherry picked from commit 9929c81702381bff54f833d6fe0a3304f4e2b635)
2022-11-22Add an EVP signature demo using DSADaniel Fiala
Fixes openssl#14114 Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19492) (cherry picked from commit 858b5d12b85b0639519d21206c9da7e1bb976a00)
2022-11-21fix for sslecho in demos echoing garbage #18165philippe lhardy
- getline does set &txbufp content at return, make sure it can be done. - fixes warning 'passing argument 1 of ‘getline’ from incompatible pointer type' - remove OPENSSL_free on non allocated fixed size array - fixes 'free(): invalid pointer' Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18177) (cherry picked from commit 3c0e8bc4a797d29b2152aebc6e687ddfa941160b)
2022-11-21Added Simple SSL Echo Client/Server to demos.bobwirka
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17260) (cherry picked from commit 801c638c50406c93d683c1ab8bd1d430cff4b6d0)
2022-11-11demos/mac/cmac-aes256: Clarify the cipher algorithm usedTomas Mraz
The currently used cipher is aes256 which is an alias to AES-256-CBC, so the demo is correct. However it might be misleading so make it clear the CBC mode cipher is used. Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19401) (cherry picked from commit 9270f67059e0291a2ef73acfba5a4ac54f732ef9)
2022-11-11Add EVP RSA key encode/decode demoHugo Landau
Fixes #14116. Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17826) (cherry picked from commit 1483b37e7a2c952eed5f6c7f5c0be9635aa3a6ea)
2022-11-09Fix typosDimitris Apostolou
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17392) (cherry picked from commit e304aa87b35fac5ea97c405dd3c21549faa45e78)
2022-11-09Add RSA encrypt demoShane Lontis
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16283) (cherry picked from commit 35530b117fcf54cf733c485e9e2e267963c081ee) Reviewed-by: Hugo Landau <hlandau@openssl.org>
2022-09-19Add an EVP demo for AES key wrapDaniel Fiala
Fixes openssl#14119 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19141) (cherry picked from commit bebc6c899943cc3f519501aee221c9d0eb10fcfd)
2022-09-09Add an EVP demo for key encoding using ECDaniel Fiala
Fixes openssl#14117 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19143) (cherry picked from commit a4b7136ebfd154636f607c50aaeec778a75b2d26)
2022-07-13Add an EVP demo for CMACDaniel Fiala
Fixes openssl#14110 Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18778) (cherry picked from commit cdf0a5c46032ba4c39d93a7bec52494b4808830f)
2022-07-11Add an EVP demo for HMACDaniel Fiala
Fixes openssl#14109 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18752) (cherry picked from commit e269d8af79de7b0dcc1b72687eed340cc3822a9e)
2022-03-15Update copyright yearMatt Caswell
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2022-03-14Add EVP demo for SIPHASHHugo Landau
Fixes #14121. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17793) (cherry picked from commit 864853988e80517a563d2423d4fb742323995433)
2022-03-14Add EVP demo for RSA key generationHugo Landau
Fixes #14111. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17824) (cherry picked from commit ad083f9b0ab81d094c2dbb8f5e2a5fb7738a0bfe)
2022-03-10Drop ariacbc demo binaryTomas Mraz
Reviewed-by: Patrick Steuer <patrick.steuer@de.ibm.com> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17848) (cherry picked from commit 97896f744d9ee4f2e821e3383caac8e8c5f226cf)
2022-03-07Add EVP demos for RSA-PSS signing and verificationHugo Landau
Two demos are provided: one using RSA-PSS directly in which a digest must be provided, and one using RSA-PSS with the EVP_DigestSign APIs which performs the hashing for you. Fixes #14113. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17800) (cherry picked from commit e9492d1cecf459261f1f5ac0eb03e9c631600537)
2022-03-07Add EVP demo for Poly1305 demonstrating Poly1305-AESHugo Landau
Fixes #14122. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17796) (cherry picked from commit 3dafeacef8d7bf82e462cc52659681108db42e43)
2022-03-07Add demo for ARIA-256-CBC.Daniel
Fixes #14104 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17802) (cherry picked from commit 376972773469e59a19acb9ebdecd3ddc290e391b)
2022-03-04EVP demo for XOF digest using SHAKE256Hugo Landau
This demo optionally accepts a single command line argument, allowing the output length to be specified. Fixes #14106. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17803) (cherry picked from commit 4c8cdcd1cf74747a80b4f7dd323cd83ea6c985d8)
2022-03-04Add EVP demo for X25519 key exchangeHugo Landau
This offers both a known answer test with fixed keys and also demonstrates a more realistic usage with random keys. Fixes #14118. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17799) (cherry picked from commit 2cc7c9b6981d683711e76c3483f813701b686eb9)
2021-12-17X509_STORE_new: memory needs to be freedPeiwei Hu
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17278) (cherry picked from commit c81eed84e4e9025e933778f5e8326b1e4435e094)
2021-11-16EVP_DigestVerifyFinal: fix test function and invocationPeiwei Hu
Signed-off-by: Peiwei Hu <jlu.hpw@foxmail.com> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17029) (cherry picked from commit e2e5e72d5aec4d8d633cc5e9930f762da7973ab6)
2021-08-04Add config_diagnostics to our configuration files.Pauli
The change to a more configuration based approach to enable FIPS mode operation highlights a shortcoming in the default should do something approach we've taken for bad configuration files. Currently, a bad configuration file will be automatically loaded and once the badness is detected, it will silently stop processing the configuration and continue normal operations. This is good for remote servers, allowing changes to be made without bricking things. It's bad when a user thinks they've configured what they want but got something wrong and it still appears to work. Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/16171)
2021-07-30demo: add GMAC demonstration programPauli
Test vector from NIST's GCM mode suite. Fixes #14123 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/16113)
2021-07-20demos: update readme file with pbkdf2 and scrypt examples.Pauli
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/16109)
2021-07-20demos: add Makefile support for pbkdf2 and scrypt KDF demosPauli
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/16109)
2021-07-20demo: add scrypt demonstration programPauli
Using test vector from RTC 7914 Fixes #14108 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/16109)
2021-07-20demo: add pbkdf2 demonstration programPauli
Using test vector from RTC 7914 Fixes #14107 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/16109)
2021-07-13Remove executable mode attributes of non-executable filesTianjia Zhang
Remove the executable attributes of some C code files and key files, change the file mode from 0755 to 0644. Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16045)
2021-06-18Add demo for HKDFMarek
Fixes #14120 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15784)
2021-06-03Add an EVP demo for signatures using ECyuechen-chen
Fixes #14115 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15429)
2021-06-01Rename all getters to use get/get0 in nameTomas Mraz
For functions that exist in 1.1.1 provide a simple aliases via #define. Fixes #15236 Functions with OSSL_DECODER_, OSSL_ENCODER_, OSSL_STORE_LOADER_, EVP_KEYEXCH_, EVP_KEM_, EVP_ASYM_CIPHER_, EVP_SIGNATURE_, EVP_KEYMGMT_, EVP_RAND_, EVP_MAC_, EVP_KDF_, EVP_PKEY_, EVP_MD_, and EVP_CIPHER_ prefixes are renamed. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15405)
2021-05-31Fixes #14103 & #14102. Update AES demos with error handling and EVP fetchJon Spillett
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/15081)
2021-05-27Add demo for EC keygenShane Lontis
Fixes #14112 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15423)
2021-04-22Update copyright yearMatt Caswell
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14986)
2021-04-18Fix typo in aesccm.cNan Xiao
CLA: trivial Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14894)
2021-04-16demos: Add clean target for bio/MakefileNan Xiao
CLA: trivial Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14661)
2021-04-08Update copyright yearMatt Caswell
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14801)
2021-04-07Remove unnecessary setting SSL_MODE_AUTO_RETRYNan Xiao
Since SSL_MODE_AUTO_RETRY is enabled by default, no need to set it explicitly. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14742)
2021-04-01Remove unnecessary BIO_do_handshake()sNan Xiao
Since BIO_do_connect() and BIO_do_handshake() are same, no need to invoke BIO_do_handshake() once more after BIO_do_connect(). Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14725)
2021-03-06Update the demos/README file because it is really old. New demos should ↵Paul Nelson
provide best practice for API use. Add demonstration for computing a SHA3-512 digest - digest/EVP_MD_demo Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/14150)
2020-08-06Update copyright yearMatt Caswell
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/12595)
2020-08-03Fix certificate validation for IPv6 literals in sconnect demoDavid Woodhouse
Instead of naïvely trying to truncate at the first colon, use BIO_get_conn_hostname(). That handles IPv6 literals correctly, even stripping the [] from around them. Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/9201)
2020-07-05Fix many MarkDown issues in {NOTES*,README*,HACKING,LICENSE}.md filesDr. David von Oheimb
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12109)
2020-07-05Rename NOTES*, README*, VERSION, HACKING, LICENSE to .md or .txtDr. David von Oheimb
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12109)