Coder Social home page Coder Social logo

cyassl / cyassl Goto Github PK

View Code? Open in Web Editor NEW
174.0 37.0 86.0 12.61 MB

Please use wolfSSL now instead: https://github.com/wolfSSL/wolfssl . CyaSSL is a small, fast, portable implementation of TLS/SSL for embedded devices to the cloud.

Home Page: https://www.wolfssl.com

License: GNU General Public License v2.0

C 80.75% Shell 0.36% Assembly 7.32% Perl 0.07% Makefile 0.59% Tcl 0.26% Python 0.04% XS 0.01% M4 2.70% SWIG 7.91%

cyassl's Introduction

Deprecation Notice for CyaSSL

This repository is no longer maintained. The CyaSSL library has been moved to https://github.com/wolfssl/wolfssl. See the new wolfSSL library, which includes a compatibility layer for CyaSSL/CTaoCrypt.

Notes - Please read

Note 1

CyaSSL now needs all examples and tests to be run from the CyaSSL home
directory.  This is because it finds certs and keys from ./certs/.  Trying to
maintain the ability to run each program from its own directory, the testsuite
directory, the main directory (for make check/test), and for the various
different project layouts (with or without config) was becoming harder and 
harder.  Now to run testsuite just do:

./testsuite/testsuite

or 

make check    (when using autoconf)

On *nix or Windows the examples and testsuite will check to see if the current
directory is the source directory and if so, attempt to change to the CyaSSL
home directory.  This should work in most setup cases, if not, just follow the
beginning of the note and specify the full path.

Note 2

CyaSSL takes a different approach to certificate verification than OpenSSL does.
The default policy for the client is to verify the server, this means that if
you don't load CAs to verify the server you'll get a connect error, no signer
error to confirm failure (-188).  If you want to mimic OpenSSL behavior of
having SSL_connect succeed even if verifying the server fails and reducing
security you can do this by calling:

SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);

before calling SSL_new();  Though it's not recommended.

CyaSSL Release 3.3.2 (01/07/2015)

Release 3.3.2 CyaSSL has bug fixes and new features including:

  • Improvements in the build configuration under AIX.
  • Various compile warnings.
  • Changed a memcpy to memmove in the sniffer.

CyaSSL Release 3.3.0 (12/05/2014)

  • Countermeasuers for Handshake message duplicates, CHANGE CIPHER without FINISHED, and fast forward attempts. Thanks to Karthikeyan Bhargavan from the Prosecco team at INRIA Paris-Rocquencourt for the report.
  • FIPS version submitted
  • Removes SSLv2 Client Hello processing, can be enabled with OLD_HELLO_ALLOWED
  • User can set mimimum downgrade version with CyaSSL_SetMinVersion()
  • Small stack improvements at TLS/SSL layer
  • TLS Master Secret generation and Key Expansion are now exposed
  • Adds client side Secure Renegotiation, * not recommended *
  • Client side session ticket support, not fully tested with Secure Renegotiation
  • Allows up to 4096bit DHE at TLS Key Exchange layer
  • Handles non standard SessionID sizes in Hello Messages
  • PicoTCP Support
  • Sniffer now supports SNI Virtual Hosts
  • Sniffer now handles non HTTPS protocols using STARTTLS
  • Sniffer can now parse records with multiple messages
  • TI-RTOS updates
  • Fix for ColdFire optimized fp_digit read only in explicit 32bit case
  • ADH Cipher Suite ADH-AES128-SHA for EAP-FAST

The CyaSSL manual is available at: http://www.wolfssl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 3.2.0 (09/10/2014)

Release 3.2.0 CyaSSL has bug fixes and new features including:

  • ChaCha20 and Poly1305 crypto and suites
  • Small stack improvements for OCSP, CRL, TLS, DTLS
  • NTRU Encrypt and Decrypt benchmarks
  • Updated Visual Studio project files
  • Updated Keil MDK5 project files
  • Fix for DTLS sequence numbers with GCM/CCM
  • Updated HashDRBG with more secure struct declaration
  • TI-RTOS support and example Code Composer Studio project files
  • Ability to get enabled cipher suites, CyaSSL_get_ciphers()
  • AES-GCM/CCM/Direct support for Freescale mmCAU and CAU
  • Sniffer improvement checking for decrypt key setup
  • Support for raw ECC key import
  • Ability to convert ecc_key to DER, EccKeyToDer()
  • Security fix for RSA Padding check vulnerability reported by Intel Security Advanced Threat Research team

The CyaSSL manual is available at: http://www.wolfssl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 3.1.0 (07/14/2014)

Release 3.1.0 CyaSSL has bug fixes and new features including:

  • Fix for older versions of icc without 128-bit type
  • Intel ASM syntax for AES-NI
  • Updated NTRU support, keygen benchmark
  • FIPS check for minimum required HMAC key length
  • Small stack (--enable-smallstack) improvements for PKCS#7, ASN
  • TLS extension support for DTLS
  • Default I/O callbacks external to user
  • Updated example client with bad clock test
  • Ability to set optional ECC context info
  • Ability to enable/disable DH separate from opensslextra
  • Additional test key/cert buffers for CA and server
  • Updated example certificates

The CyaSSL manual is available at: http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 3.0.2 (05/30/2014)

Release 3.0.2 CyaSSL has bug fixes and new features including:

  • Added the following cipher suites:
    • TLS_PSK_WITH_AES_128_GCM_SHA256
    • TLS_PSK_WITH_AES_256_GCM_SHA384
    • TLS_PSK_WITH_AES_256_CBC_SHA384
    • TLS_PSK_WITH_NULL_SHA384
    • TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
    • TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
    • TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
    • TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
    • TLS_DHE_PSK_WITH_NULL_SHA256
    • TLS_DHE_PSK_WITH_NULL_SHA384
    • TLS_DHE_PSK_WITH_AES_128_CCM
    • TLS_DHE_PSK_WITH_AES_256_CCM
  • Added AES-NI support for Microsoft Visual Studio builds.
  • Changed small stack build to be disabled by default.
  • Updated the Hash DRBG and provided a configure option to enable.

The CyaSSL manual is available at: http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 3.0.0 (04/29/2014)

Release 3.0.0 CyaSSL has bug fixes and new features including:

  • FIPS release candidate
  • X.509 improvements that address items reported by Suman Jana with security researchers at UT Austin and UC Davis
  • Small stack size improvements, --enable-smallstack. Offloads large local variables to the heap. (Note this is not complete.)
  • Updated AES-CCM-8 cipher suites to use approved suite numbers.

The CyaSSL manual is available at: http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 2.9.4 (04/09/2014)

Release 2.9.4 CyaSSL has bug fixes and new features including:

  • Security fixes that address items reported by Ivan Fratric of the Google Security Team
  • X.509 Unknown critical extensions treated as errors, report by Suman Jana with security researchers at UT Austin and UC Davis
  • Sniffer fixes for corrupted packet length and Jumbo frames
  • ARM thumb mode assembly fixes
  • Xcode 5.1 support including new clang
  • PIC32 MZ hardware support
  • CyaSSL Object has enough room to read the Record Header now w/o allocs
  • FIPS wrappers for AES, 3DES, SHA1, SHA256, SHA384, HMAC, and RSA.
  • A sample I/O pool is demonstrated with --enable-iopool to overtake memory handling and reduce memory fragmentation on I/O large sizes

The CyaSSL manual is available at: http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 2.9.0 (02/07/2014)

Release 2.9.0 CyaSSL has bug fixes and new features including:

  • Freescale Kinetis RNGB support
  • Freescale Kinetis mmCAU support
  • TLS Hello extensions
    • ECC
    • Secure Renegotiation (null)
    • Truncated HMAC
  • SCEP support
    • PKCS #7 Enveloped data and signed data
    • PKCS #10 Certificate Signing Request generation
  • DTLS sliding window
  • OCSP Improvements
    • API change to integrate into Certificate Manager
    • IPv4/IPv6 agnostic
    • example client/server support for OCSP
    • OCSP nonces are optional
  • GMAC hashing
  • Windows build additions
  • Windows CYGWIN build fixes
  • Updated test certificates
  • Microchip MPLAB Harmony support
  • Update autoconf scripts
  • Additional X.509 inspection functions
  • ECC encrypt/decrypt primitives
  • ECC Certificate generation

The Freescale Kinetis K53 RNGB documentation can be found in Chapter 33 of the K53 Sub-Family Reference Manual: http://cache.freescale.com/files/32bit/doc/ref_manual/K53P144M100SF2RM.pdf

Freescale Kinetis K60 mmCAU (AES, DES, 3DES, MD5, SHA, SHA256) documentation can be found in the "ColdFire/ColdFire+ CAU and Kinetis mmCAU Software Library User Guide": http://cache.freescale.com/files/32bit/doc/user_guide/CAUAPIUG.pdf

CyaSSL Release 2.8.0 (8/30/2013)

Release 2.8.0 CyaSSL has bug fixes and new features including:

  • AES-GCM and AES-CCM use AES-NI
  • NetX default IO callback handlers
  • IPv6 fixes for DTLS Hello Cookies
  • The ability to unload Certs/Keys after the handshake, CyaSSL_UnloadCertsKeys()
  • SEP certificate extensions
  • Callback getters for easier resource freeing
  • External CYASSL_MAX_ERROR_SZ for correct error buffer sizing
  • MacEncrypt and DecryptVerify Callbacks for User Atomic Record Layer Processing
  • Public Key Callbacks for ECC and RSA
  • Client now sends blank cert upon request if doesn't have one with TLS <= 1.2

The CyaSSL manual is available at: http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 2.7.0 (6/17/2013)

Release 2.7.0 CyaSSL has bug fixes and new features including:

  • SNI support for client and server
  • KEIL MDK-ARM projects
  • Wildcard check to domain name match, and Subject altnames are checked too
  • Better error messages for certificate verification errors
  • Ability to discard session during handshake verify
  • More consistent error returns across all APIs
  • Ability to unload CAs at the CTX or CertManager level
  • Authority subject id support for Certificate matching
  • Persistent session cache functionality
  • Persistent CA cache functionality
  • Client session table lookups to push serverID table to library level
  • Camellia support to sniffer
  • User controllable settings for DTLS timeout values
  • Sniffer fixes for caching long lived sessions
  • DTLS reliability enhancements for the handshake
  • Better ThreadX support

When compiling with Mingw, libtool may give the following warning due to path conversion errors:

libtool: link: Could not determine host file name corresponding to **
libtool: link: Continuing, but uninstalled executables may not work.

If so, examples and testsuite will have problems when run, showing an error while loading shared libraries. To resolve, please run "make install".

The CyaSSL manual is available at: http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 2.6.0 (04/15/2013)

Release 2.6.0 CyaSSL has bug fixes and new features including:

  • DTLS 1.2 support including AEAD ciphers
  • SHA-3 finalist Blake2 support, it's fast and uses little resources
  • SHA-384 cipher suites including ECC ones
  • HMAC now supports SHA-512
  • Track memory use for example client/server with -t option
  • Better IPv6 examples with --enable-ipv6, before if ipv6 examples/tests were turned on, localhost only was used. Now link-local (with scope ids) and ipv6 hosts can be used as well.
  • Xcode v4.6 project for iOS v6.1 update
  • settings.h is now checked in all *.c files for true one file setting detection
  • Better alignment at SSL layer for hardware crypto alignment needs
    • Note, SSL itself isn't friendly to alignment with 5 byte TLS headers and 13 bytes DTLS headers, but every effort is now made to align with the CYASSL_GENERAL_ALIGNMENT flag which sets desired alignment requirement
  • NO_64BIT flag to turn off 64bit data type accumulators in public key code
    • Note, some systems are faster with 32bit accumulators
  • --enable-stacksize for example client/server stack use
    • Note, modern desktop Operating Systems may add bytes to each stack frame
  • Updated compression/decompression with direct crypto access
  • All ./configure options are now lowercase only for consistency
  • ./configure builds default to fastmath option
    • Note, if on ia32 and building in shared mode this may produce a problem with a missing register being available because of PIC, there are at least 5 solutions to this:
      1. --disable-fastmath , don't use fastmath
      2. --disable-shared, don't build a shared library
      3. C_EXTRA_FLAGS=-DTFM_NO_ASM , turn off assembly use
      4. use clang, it just seems to work
      5. play around with no PIC options to force all registers being open
  • Many new ./configure switches for option enable/disable for example
    • rsa
    • dh
    • dsa
    • md5
    • sha
    • arc4
    • null (allow NULL ciphers)
    • oldtls (only use TLS 1.2)
    • asn (no certs or public keys allowed)
  • ./configure generates cyassl/options.h which allows a header the user can include in their app to make sure the same options are set at the app and CyaSSL level.
  • autoconf no longer needs serial-tests which lowers version requirements of automake to 1.11 and autoconf to 2.63

The CyaSSL manual is available at: http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 2.5.0 (02/04/2013)

Release 2.5.0 CyaSSL has bug fixes and new features including:

  • Fix for TLS CBC padding timing attack identified by Nadhem Alfardan and Kenny Paterson: http://www.isg.rhul.ac.uk/tls/
  • Microchip PIC32 (MIPS16, MIPS32) support
  • Microchip MPLAB X example projects for PIC32 Ethernet Starter Kit
  • Updated CTaoCrypt benchmark app for embedded systems
  • 1024-bit test certs/keys and cert/key buffers
  • AES-CCM-8 crypto and cipher suites
  • Camellia crypto and cipher suites
  • Bumped minimum autoconf version to 2.65, automake version to 1.12
  • Addition of OCSP callbacks
  • STM32F2 support with hardware crypto and RNG
  • Cavium NITROX support

CTaoCrypt now has support for the Microchip PIC32 and has been tested with the Microchip PIC32 Ethernet Starter Kit, the XC32 compiler and MPLAB X IDE in both MIPS16 and MIPS32 instruction set modes. See the README located under the <cyassl_root>/mplabx directory for more details.

To add Cavium NITROX support do:

./configure --with-cavium=/home/user/cavium/software

pointing to your licensed cavium/software directory. Since Cavium doesn't build a library we pull in the cavium_common.o file which gives a libtool warning about the portability of this. Also, if you're using the github source tree you'll need to remove the -Wredundant-decls warning from the generated Makefile because the cavium headers don't conform to this warning. Currently CyaSSL supports Cavium RNG, AES, 3DES, RC4, HMAC, and RSA directly at the crypto layer. Support at the SSL level is partial and currently just does AES, 3DES, and RC4. RSA and HMAC are slower until the Cavium calls can be utilized in non blocking mode. The example client turns on cavium support as does the crypto test and benchmark. Please see the HAVE_CAVIUM define.

CyaSSL is able to use the STM32F2 hardware-based cryptography and random number generator through the STM32F2 Standard Peripheral Library. For necessary defines, see the CYASSL_STM32F2 define in settings.h. Documentation for the STM32F2 Standard Peripheral Library can be found in the following document: http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/USER_MANUAL/DM00023896.pdf

The CyaSSL manual is available at: http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 2.4.6 (12/20/2012)

Release 2.4.6 CyaSSL has bug fixes and a few new features including:

  • ECC into main version
  • Lean PSK build (reduced code size, RAM usage, and stack usage)
  • FreeBSD CRL monitor support
  • CyaSSL_peek()
  • CyaSSL_send() and CyaSSL_recv() for I/O flag setting
  • CodeWarrior Support
  • MQX Support
  • Freescale Kinetis support including Hardware RNG
  • autoconf builds use jobserver
  • cyassl-config
  • Sniffer memory reductions

Thanks to Brian Aker for the improved autoconf system, make rpm, cyassl-config, warning system, and general good ideas for improving CyaSSL!

The Freescale Kinetis K70 RNGA documentation can be found in Chapter 37 of the K70 Sub-Family Reference Manual: http://cache.freescale.com/files/microcontrollers/doc/ref_manual/K70P256M150SF3RM.pdf

The CyaSSL manual is available at: http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 2.4.0 (10/10/2012)

Release 2.4.0 CyaSSL has bug fixes and a few new features including:

  • DTLS reliability
  • Reduced memory usage after handshake
  • Updated build process

The CyaSSL manual is available at: http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 2.3.0 (8/10/2012)

Release 2.3.0 CyaSSL has bug fixes and a few new features including:

  • AES-GCM crypto and cipher suites
  • make test cipher suite checks
  • Subject AltName processing
  • Command line support for client/server examples
  • Sniffer SessionTicket support
  • SHA-384 cipher suites
  • Verify cipher suite validity when user overrides
  • CRL dir monitoring
  • DTLS Cookie support, reliability coming soon

The CyaSSL manual is available at: http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 2.2.0 (5/18/2012)

Release 2.2.0 CyaSSL has bug fixes and a few new features including:

  • Initial CRL support (--enable-crl)
  • Initial OCSP support (--enable-ocsp)
  • Add static ECDH suites
  • SHA-384 support
  • ECC client certificate support
  • Add medium session cache size (1055 sessions)
  • Updated unit tests
  • Protection against mutex reinitialization

The CyaSSL manual is available at: http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 2.0.8 (2/24/2012)

Release 2.0.8 CyaSSL has bug fixes and a few new features including:

  • A fix for malicious certificates pointed out by Remi Gacogne (thanks) resulting in NULL pointer use.
  • Respond to renegotiation attempt with no_renegoatation alert
  • Add basic path support for load_verify_locations()
  • Add set Temp EC-DHE key size
  • Extra checks on rsa test when porting into

The CyaSSL manual is available at: http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 2.0.6 (1/27/2012)

Release 2.0.6 CyaSSL has bug fixes and a few new features including:

  • Fixes for CA basis constraint check
  • CTX reference counting
  • Initial unit test additions
  • Lean and Mean Windows fix
  • ECC benchmarking
  • SSMTP build support
  • Ability to group handshake messages with set_group_messages(ctx/ssl)
  • CA cache addition callback
  • Export Base64_Encode for general use

The CyaSSL manual is available at: http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 2.0.2 (12/05/2011)

Release 2.0.2 CyaSSL has bug fixes and a few new features including:

  • CTaoCrypt Runtime library detection settings when directly using the crypto library
  • Default certificate generation now uses SHAwRSA and adds SHA256wRSA generation
  • All test certificates now use 2048bit and SHA-1 for better modern browser support
  • Direct AES block access and AES-CTR (counter) mode
  • Microchip pic32 support

The CyaSSL manual is available at: http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 2.0.0rc3 (9/28/2011)

Release 2.0.0rc3 for CyaSSL has bug fixes and a few new features including:

  • updated autoconf support
  • better make install and uninstall (uses system directories)
  • make test / make check
  • CyaSSL headers now in <cyassl/*.h>
  • CTaocrypt headers now in <cyassl/ctaocrypt/*.h>
  • OpenSSL compatibility headers now in <cyassl/openssl/*.h>
  • examples and tests all run from home directory so can use certs in ./certs (see note 1)

So previous applications that used the OpenSSL compatibility header <openssl/ssl.h> now need to include <cyassl/openssl/ssl.h> instead, no other changes are required.

Special Thanks to Brian Aker for his autoconf, install, and header patches.

The CyaSSL manual is available at: http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 2.0.0rc2 (6/6/2011)

Release 2.0.0rc2 for CyaSSL has bug fixes and a few new features including:

  • bug fixes (Alerts, DTLS with DHE)
  • FreeRTOS support
  • lwIP support
  • Wshadow warnings removed
  • asn public header
  • CTaoCrypt public headers now all have ctc_ prefix (the manual is still being updated to reflect this change)
  • and more.

This is the 2nd and perhaps final release candidate for version 2. Please send any comments or questions to [email protected].

The CyaSSL manual is available at: http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 2.0.0rc1 (5/2/2011)

Release 2.0.0rc1 for CyaSSL has many new features including:

  • bug fixes
  • SHA-256 cipher suites
  • Root Certificate Verification (instead of needing all certs in the chain)
  • PKCS #8 private key encryption (supports PKCS #5 v1-v2 and PKCS #12)
  • Serial number retrieval for x509
  • PBKDF2 and PKCS #12 PBKDF
  • UID parsing for x509
  • SHA-256 certificate signatures
  • Client and server can send chains (SSL_CTX_use_certificate_chain_file)
  • CA loading can now parse multiple certificates per file
  • Dynamic memory runtime hooks
  • Runtime hooks for logging
  • EDH on server side
  • More informative error codes
  • More informative logging messages
  • Version downgrade more robust (use SSL_v23*)
  • Shared build only by default through ./configure
  • Compiler visibility is now used, internal functions not polluting namespace
  • Single Makefile, no recursion, for faster and simpler building
  • Turn on all warnings possible build option, warning fixes
  • and more.

Because of all the new features and the multiple OS, compiler, feature-set options that CyaSSL allows, there may be some configuration fixes needed. Please send any comments or questions to [email protected].

The CyaSSL manual is available at: http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions and comments about the new features please check the manual.

CyaSSL Release 1.9.0 (3/2/2011)

Release 1.9.0 for CyaSSL adds bug fixes, improved TLSv1.2 through testing and better hash/sig algo ids, --enable-webServer for the yaSSL embedded web server, improper AES key setup detection, user cert verify callback improvements, and more.

The CyaSSL manual offering is included in the doc/ directory. For build instructions and comments about the new features please check the manual.

Please send any comments or questions to [email protected].

CyaSSL Release 1.8.0 (12/23/2010)

Release 1.8.0 for CyaSSL adds bug fixes, x509 v3 CA signed certificate generation, a C standard library abstraction layer, lower memory use, increased portability through the os_settings.h file, and the ability to use NTRU cipher suites when used in conjunction with an NTRU license and library.

The initial CyaSSL manual offering is included in the doc/ directory. For build instructions and comments about the new features please check the manual.

Please send any comments or questions to [email protected].

Happy Holidays.

CyaSSL Release 1.6.5 (9/9/2010)

Release 1.6.5 for CyaSSL adds bug fixes and x509 v3 self signed certificate generation.

For general build instructions see doc/Building_CyaSSL.pdf.

To enable certificate generation support add this option to ./configure ./configure --enable-certgen

An example is included in ctaocrypt/test/test.c and documentation is provided in doc/CyaSSL_Extensions_Reference.pdf item 11.

CyaSSL Release 1.6.0 (8/27/2010)

Release 1.6.0 for CyaSSL adds bug fixes, RIPEMD-160, SHA-512, and RSA key generation.

For general build instructions see doc/Building_CyaSSL.pdf.

To add RIPEMD-160 support add this option to ./configure ./configure --enable-ripemd

To add SHA-512 support add this option to ./configure ./configure --enable-sha512

To add RSA key generation support add this option to ./configure ./configure --enable-keygen

Please see ctaocrypt/test/test.c for examples and usage.

For Windows, RIPEMD-160 and SHA-512 are enabled by default but key generation is off by default. To turn key generation on add the define CYASSL_KEY_GEN to CyaSSL.

CyaSSL Release 1.5.6 (7/28/2010)

Release 1.5.6 for CyaSSL adds bug fixes, compatibility for our JSSE provider, and a fix for GCC builds on some systems.

For general build instructions see doc/Building_CyaSSL.pdf.

To add AES-NI support add this option to ./configure ./configure --enable-aesni

You'll need GCC 4.4.3 or later to make use of the assembly.

CyaSSL Release 1.5.4 (7/7/2010)

Release 1.5.4 for CyaSSL adds bug fixes, support for AES-NI, SHA1 speed improvements from loop unrolling, and support for the Mongoose Web Server.

For general build instructions see doc/Building_CyaSSL.pdf.

To add AES-NI support add this option to ./configure ./configure --enable-aesni

You'll need GCC 4.4.3 or later to make use of the assembly.

CyaSSL Release 1.5.0 (5/11/2010)

Release 1.5.0 for CyaSSL adds bug fixes, GoAhead WebServer support, sniffer support, and initial swig interface support.

For general build instructions see doc/Building_CyaSSL.pdf.

To add support for GoAhead WebServer either --enable-opensslExtra or if you don't want all the features of opensslExtra you can just define GOAHEAD_WS instead. GOAHEAD_WS can be added to ./configure with CFLAGS=-DGOAHEAD_WS or you can define it yourself.

To look at the sniffer support please see the sniffertest app in sslSniffer/sslSnifferTest. Build with --enable-sniffer on *nix or use the vcproj files on windows. You'll need to have pcap installed on *nix and WinPcap on windows.

A swig interface file is now located in the swig directory for using Python, Java, Perl, and others with CyaSSL. This is initial support and experimental, please send questions or comments to [email protected].

When doing load testing with CyaSSL, on the echoserver example say, the client machine may run out of tcp ephemeral ports, they will end up in the TIME_WAIT queue, and can't be reused by default. There are generally two ways to fix this.

  1. Reduce the length sockets remain on the TIME_WAIT queue OR
  2. Allow items on the TIME_WAIT queue to be reused.

To reduce the TIME_WAIT length in OS X to 3 seconds (3000 milliseconds)

sudo sysctl -w net.inet.tcp.msl=3000

In Linux

sudo sysctl -w net.ipv4.tcp_tw_reuse=1

allows reuse of sockets in TIME_WAIT

sudo sysctl -w net.ipv4.tcp_tw_recycle=1

works but seems to remove sockets from TIME_WAIT entirely?

sudo sysctl -w net.ipv4.tcp_fin_timeout=1

doen't control TIME_WAIT, it controls FIN_WAIT(2) contrary to some posts

CyaSSL Release 1.4.0 (2/18/2010)

Release 1.3.0 for CyaSSL adds bug fixes, better multi TLS/SSL version support through SSLv23_server_method(), and improved documentation in the doc/ folder.

For general build instructions doc/Building_CyaSSL.pdf.

CyaSSL Release 1.3.0 (1/21/2010)

Release 1.3.0 for CyaSSL adds bug fixes, a potential security problem fix, better porting support, removal of assert()s, and a complete THREADX port.

For general build instructions see rc1 below.

CyaSSL Release 1.2.0 (11/2/2009)

Release 1.2.0 for CyaSSL adds bug fixes and session negotiation if first use is read or write.

For general build instructions see rc1 below.

CyaSSL Release 1.1.0 (9/2/2009)

Release 1.1.0 for CyaSSL adds bug fixes, a check against malicious session cache use, support for lighttpd, and TLS 1.2.

To get TLS 1.2 support please use the client and server functions:

SSL_METHOD *TLSv1_2_server_method(void);
SSL_METHOD *TLSv1_2_client_method(void);

CyaSSL was tested against lighttpd 1.4.23. To build CyaSSL for use with lighttpd use the following commands from the CyaSSL install dir :

./configure --disable-shared --enable-opensslExtra --enable-fastmath --without-zlib

make
make openssl-links

Then to build lighttpd with CyaSSL use the following commands from the lighttpd install dir:

./configure --with-openssl --with-openssl-includes=<CyaSSLDir>/include --with-openssl-libs=<CyaSSLDir>/lib LDFLAGS=-lm

make

On some systems you may get a linker error about a duplicate symbol for MD5_Init or other MD5 calls. This seems to be caused by the lighttpd src file md5.c, which defines MD5_Init(), and is included in liblightcomp_la-md5.o. When liblightcomp is linked with the SSL_LIBs the linker may complain about the duplicate symbol. This can be fixed by editing the lighttpd src file md5.c and adding this line to the beginning of the file:

#if 0

and this line to the end of the file

#endif

Then from the lighttpd src dir do a:

make clean
make

If you get link errors about undefined symbols more than likely the actual OpenSSL libraries are found by the linker before the CyaSSL openssl-links that point to the CyaSSL library, causing the linker confusion. This can be fixed by editing the Makefile in the lighttpd src directory and changing the line:

SSL_LIB = -lssl -lcrypto

to

SSL_LIB = -lcyassl

Then from the lighttpd src dir do a:

make clean
make

This should remove any confusion the linker may be having with missing symbols.

For any questions or concerns please contact [email protected] .

For general build instructions see rc1 below.

CyaSSL Release 1.0.6 (8/03/2009)

Release 1.0.6 for CyaSSL adds bug fixes, an improved session cache, and faster math with a huge code option.

The session cache now defaults to a client mode, also good for embedded servers. For servers not under heavy load (less than 200 new sessions per minute), define BIG_SESSION_CACHE. If the server will be under heavy load, define HUGE_SESSION_CACHE.

There is now a fasthugemath option for configure. This enables fastmath plus even faster math by greatly increasing the code size of the math library. Use the benchmark utility to compare public key operations.

For general build instructions see rc1 below.

CyaSSL Release 1.0.3 (5/10/2009)

Release 1.0.3 for CyaSSL adds bug fixes and add increased support for OpenSSL compatibility when building other applications.

Release 1.0.3 includes an alpha release of DTLS for both client and servers. This is only for testing purposes at this time. Rebroadcast and reordering aren't fully implemented at this time but will be for the next release.

For general build instructions see rc1 below.

CyaSSL Release 1.0.2 (4/3/2009)

Release 1.0.2 for CyaSSL adds bug fixes for a couple I/O issues. Some systems will send a SIGPIPE on socket recv() at any time and this should be handled by the application by turning off SIGPIPE through setsockopt() or returning from the handler.

Release 1.0.2 includes an alpha release of DTLS for both client and servers. This is only for testing purposes at this time. Rebroadcast and reordering aren't fully implemented at this time but will be for the next release.

For general build instructions see rc1 below.

CyaSSL Release Candidiate 3 rc3-1.0.0 (2/25/2009)

Release Candidate 3 for CyaSSL 1.0.0 adds bug fixes and adds a project file for iPhone development with Xcode. cyassl-iphone.xcodeproj is located in the root directory. This release also includes a fix for supporting other implementations that bundle multiple messages at the record layer, this was lost when cyassl i/o was re-implemented but is now fixed.

For general build instructions see rc1 below.

CyaSSL Release Candidiate 2 rc2-1.0.0 (1/21/2009)

Release Candidate 2 for CyaSSL 1.0.0 adds bug fixes and adds two new stream ciphers along with their respective cipher suites. CyaSSL adds support for HC-128 and RABBIT stream ciphers. The new suites are:

TLS_RSA_WITH_HC_128_SHA
TLS_RSA_WITH_RABBIT_SHA

And the corresponding cipher names are

HC128-SHA
RABBIT-SHA

CyaSSL also adds support for building with devkitPro for PPC by changing the library proper to use libogc. The examples haven't been changed yet but if there's interest they can be. Here's an example ./configure to build CyaSSL for devkitPro:

./configure --disable-shared CC=/pathTo/devkitpro/devkitPPC/bin/powerpc-gekko-gcc --host=ppc --without-zlib --enable-singleThreaded RANLIB=/pathTo/devkitpro/devkitPPC/bin/powerpc-gekko-ranlib CFLAGS="-DDEVKITPRO -DGEKKO"

For linking purposes you'll need

LDFLAGS="-g -mrvl -mcpu=750 -meabi -mhard-float -Wl,-Map,$(notdir $@).map"

For general build instructions see rc1 below.

CyaSSL Release Candidiate 1 rc1-1.0.0 (12/17/2008)

Release Candidate 1 for CyaSSL 1.0.0 contains major internal changes. Several areas have optimization improvements, less dynamic memory use, and the I/O strategy has been refactored to allow alternate I/O handling or Library use. Many thanks to Thierry Fournier for providing these ideas and most of the work.

Because of these changes, this release is only a candidate since some problems are probably inevitable on some platform with some I/O use. Please report any problems and we'll try to resolve them as soon as possible. You can contact us at [email protected] or [email protected].

Using TomsFastMath by passing --enable-fastmath to ./configure now uses assembly on some platforms. This is new so please report any problems as every compiler, mode, OS combination hasn't been tested. On ia32 all of the registers need to be available so be sure to pass these options to CFLAGS:

CFLAGS="-O3 -fomit-frame-pointer"

OS X will also need -mdynamic-no-pic added to CFLAGS

Also if you're building in shared mode for ia32 you'll need to pass options to LDFLAGS as well on OS X:

LDFLAGS=-Wl,-read_only_relocs,warning

This gives warnings for some symbols but seems to work.

To build on Linux, Solaris, *BSD, Mac OS X, or Cygwin:

./configure
make

from the ./testsuite/ directory run ./testsuite 

To make a debug build:

./configure --enable-debug --disable-shared
make

To build on Win32

Choose (Re)Build All from the project workspace

Run the testsuite program

CyaSSL version 0.9.9 (7/25/2008)

This release of CyaSSL adds bug fixes, Pre-Shared Keys, over-rideable memory handling, and optionally TomsFastMath. Thanks to Moisรฉs Guimarรฃes for the work on TomsFastMath.

To optionally use TomsFastMath pass --enable-fastmath to ./configure Or define USE_FAST_MATH in each project from CyaSSL for MSVC.

Please use the benchmark routine before and after to see the performance difference, on some platforms the gains will be little but RSA encryption always seems to be faster. On x86-64 machines with GCC the normal math library may outperform the fast one when using CFLAGS=-m64 because TomsFastMath can't yet use -m64 because of GCCs inability to do 128bit division.

 *** UPDATE GCC 4.2.1 can now do 128bit division ***

See notes below (0.2.0) for complete build instructions.

CyaSSL version 0.9.8 (5/7/2008)

This release of CyaSSL adds bug fixes, client side Diffie-Hellman, and better socket handling.

See notes below (0.2.0) for complete build instructions.

CyaSSL version 0.9.6 (1/31/2008)

This release of CyaSSL adds bug fixes, increased session management, and a fix for gnutls.

See notes below (0.2.0) for complete build instructions.

CyaSSL version 0.9.0 (10/15/2007)

This release of CyaSSL adds bug fixes, MSVC 2005 support, GCC 4.2 support, IPV6 support and test, and new test certificates.

See notes below (0.2.0) for complete build instructions.

CyaSSL version 0.8.0 (1/10/2007)

This release of CyaSSL adds increased socket support, for non-blocking writes, connects, and interrupted system calls.

See notes below (0.2.0) for complete build instructions.

CyaSSL version 0.6.3 (10/30/2006)

This release of CyaSSL adds debug logging to stderr to aid in the debugging of CyaSSL on systems that may not provide the best support.

If CyaSSL is built with debugging support then you need to call CyaSSL_Debugging_ON() to turn logging on.

On Unix use ./configure --enable-debug

On Windows define DEBUG_CYASSL when building CyaSSL

To turn logging back off call CyaSSL_Debugging_OFF()

See notes below (0.2.0) for complete build instructions.

CyaSSL version 0.6.2 (10/29/2006)

This release of CyaSSL adds TLS 1.1.

Note that CyaSSL has certificate verification on by default, unlike OpenSSL. To emulate OpenSSL behavior, you must call SSL_CTX_set_verify() with SSL_VERIFY_NONE. In order to have full security you should never do this, provide CyaSSL with the proper certificates to eliminate impostors and call CyaSSL_check_domain_name() to prevent man in the middle attacks.

See notes below (0.2.0) for build instructions.

CyaSSL version 0.6.0 (10/25/2006)

This release of CyaSSL adds more SSL functions, better autoconf, nonblocking I/O for accept, connect, and read. There is now an --enable-small configure option that turns off TLS, AES, DES3, HMAC, and ERROR_STRINGS, see configure.in for the defines. Note that TLS requires HMAC and AES requires TLS.

See notes below (0.2.0) for build instructions.

CyaSSL version 0.5.5 (09/27/2006)

This mini release of CyaSSL adds better input processing through buffered input and big message support. Added SSL_pending() and some sanity checks on user settings.

See notes below (0.2.0) for build instructions.

CyaSSL version 0.5.0 (03/27/2006)

This release of CyaSSL adds AES support and minor bug fixes.

See notes below (0.2.0) for build instructions.

CyaSSL version 0.4.0 (03/15/2006)

This release of CyaSSL adds TLSv1 client/server support and libtool.

See notes below for build instructions.

CyaSSL version 0.3.0 (02/26/2006)

This release of CyaSSL adds SSLv3 server support and session resumption.

See notes below for build instructions.

CyaSSL version 0.2.0 (02/19/2006)

This is the first release of CyaSSL and its crypt brother, CTaoCrypt. CyaSSL is written in ANSI C with the idea of a small code size, footprint, and memory usage in mind. CTaoCrypt can be as small as 32K, and the current client version of CyaSSL can be as small as 12K.

The first release of CTaoCrypt supports MD5, SHA-1, 3DES, ARC4, Big Integer Support, RSA, ASN parsing, and basic x509 (en/de)coding.

The first release of CyaSSL supports normal client RSA mode SSLv3 connections with support for SHA-1 and MD5 digests. Ciphers include 3DES and RC4.

To build on Linux, Solaris, *BSD, Mac OS X, or Cygwin:

./configure
make

from the ./testsuite/ directory run ./testsuite 

to make a debug build:

./configure --enable-debug --disable-shared
make

To build on Win32

Choose (Re)Build All from the project workspace

Run the testsuite program

*** The next release of CyaSSL will support a server and more OpenSSL compatibility functions.

Please send questions or comments to [email protected]

cyassl's People

Contributors

brianaker avatar cconlon avatar cyassl avatar dgarske avatar ejohnstown avatar ioerror avatar j3g avatar jacobbarthelmeh avatar joakimsoderberg avatar jonasnorling avatar kaleb-himes avatar kojo1 avatar lchristina26 avatar moisesguimaraes avatar rofl0r avatar shaneisrael avatar shirofurui avatar tisb-vikram avatar toddouska avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cyassl's Issues

Compilation warning in cyassl_int.c if NO_CYASSL_SERVER is defined

The following warnings are generated in cyassl_int.c if NO_CYASSL_SERVER is defined.
cyassl_int.c(1822) : warning C4101: 'b0' : unreferenced local variable
cyassl_int.c(1822) : warning C4101: 'b1' : unreferenced local variable

The line byte b0, b1; should be wrapped in #ifndef NO_CYASSL_SERVER to eliminate this warning.

cyassl\ctaocrypt\settings.h can't be used for configuration

From the comment inside file "cyassl\ctaocrypt\settings.h" i got it could be used to configure CyaSSL for compilation. I'm using VC and it is easier (for me) to define everything i need inside single file instead making long line of names in project settings.
I noticed many .h and .c files include 'settings.h' (indirectly) only after configuration #ifdef check. Example:

'sha512.h' must have #include of 'types.h' (which includes 'settings.h') above #ifdef CYASSL_SHA512, so current code is wrong:

#ifdef CYASSL_SHA512

#ifndef CTAO_CRYPT_SHA512_H
#define CTAO_CRYPT_SHA512_H

#include <cyassl/ctaocrypt/types.h>

'sha512.c' must include "sha512.h" above #ifdef CYASSL_SHA512, while now it is:

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#ifdef CYASSL_SHA512

#include <cyassl/ctaocrypt/sha512.h>

Same problem in many other files prevents using 'settings.h' as configuration file.

STM32 Board Issue

When compiling with Keil the misc.c file for the STM32 board is getting over written by the Cyassl misc.c thats in ctaocrypt/src. This creates errors. I fixed it by changing misc.c in cyassl to just wmisc.c, then change where it calls misc.c in the code to wmisc.c . It seems to fixed the problem.

aes.c

Hi there,

Just a small suggesstion ...

it's possible to dynamically calculate the static rijndael mixed column tables ( https://github.com/cyassl/cyassl/blob/master/ctaocrypt/src/aes.c#L900 ) at run time as we did it that time in phpseclib's implementation of the AES/Rijndael cipher ( see ie here: https://github.com/phpseclib/phpseclib/blob/eff0bb21c580f9360ff9a31fbe250c81427386eb/phpseclib/Crypt/Rijndael.php#L549 ... just few lines of code)

If doing so (i guess) it would reduce~5kb of the compiled cyassl library codesize in case of the enabled AES cipher C implementation ... of the cost of a small(?) CPU overhead on library init time.

#ifdef could be used to enable/disable the "run time calculating" of the tables.

Mabye this could be interessting for some devices with very limitated HDD-space or just for keeping the compiled library codesize as small as possible for other reasons.

Greetings (and thank you for cyassl)
Hans-Jรผrgen Petrich :-)

Port for arduino/pi ?

hey ,
I was wondering if there was an option for porting for arduino or Raspberry pi or similar famous esaily available platforms ..

KEIL LPC43xx: Wrong ElfDwT.exe call

$K\ARM\BIN\ElfDwT.exe !L BASEADDRESS(0x1A00000) needs to be changed to $K\ARM\BIN\ElfDwT.exe !L BASEADDRESS(0x1A000000) to match the memory address, otherwise no signature will be generated.

behaviour of SSL_connect differs from openssl when a timeout on the socket expires

when using SSL_connect on a connected blocking socket that was set to use a timeout via setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, ...) or SO_SNDTIMEO, and the timeout interruption occurs while performing the SSL_connect, cyassl returns
error #-241: record layer length error
while openssl returns ERROR_WANT_READ.
the latter is the proper behaviour as it indicates that the operation must be restarted to get it to succeed, while the cyassl error does not make that clear at all, and restarting the SSL_connect call would probably not even work.

Too short buffer allocated for DTLS

The extra header space needed for DTLS is not included in MAX_MSG_EXTRA, so the buffer space allocated in SendData() for example tends to be too short. There is an additional runtime correction for this in SendAlert(), but in other places the allocation will be too short.

This problem appeared between versions 2.8.0 and 2.9.0; the issue was masked by a too generous MAX_DIGEST_SIZE before, at least in my configuration.

I can work around the problem by setting, in internal.h:

MAX_MSG_EXTRA   = 38 + DTLS_RECORD_EXTRA + MAX_DIGEST_SIZE

It's not necessarily the most elegant way to solve the problem, thoughโ€ฆ

nonblocking version of SSL_peek that doesnt modify the underlying socket.

(Cya)SSL_peek transfers data from the underlying socket to its internal buffers, so if SSL_peek returns that there's data to read, a select() on the socket may result in a timeout or even an infinite block.

also due to a lack of a non-error zero return value, (which would indicate that there's currently no data to be read, but that the call was successfull), SSL_peek can only be implemented in a blocking fashion.

what i search is a function that basically calls select() on the socket with a 0,0 timeout (so it doesnt block) and if there's data to be read peeks at the data without removing it from the socket (can be achieved with MSG_PEEK argument to recv, for example), looks at the data and only if there's actual non-ssl-protocol data to be read returns either yes, there's data (potentially even how much) and no, there isn't any data to be read.

is there such a function, or are there other CyaSSL primitives that i could use to roll my own ?

In Function 'DoMonitor' 'wd' may be uninitialized. Make error.

When configuring with these options
./configure --enable-dtls --enable-opensslextra --enable-crl --enable-ocsp --enable-crl-monitor --enable-savesession --enable-savecert --enable-atomicuser --enable-ecc --enable-pkcallbacks --enable-aesgcm --enable-camellia

running make gives the following error.
src/crl.c: In function 'DoMonitor':
src/crl.c:578:21: error: 'wd' may be used uninitialized in this function [-Werror=maybe-uninitialized]
inotify_rm_watch(notifyFd, wd);

suites.c: undefined reference to `strnstr'

Hi,

The build of the latest cyassl 2.5.2 failed with the error output:

...
tests/suites.c: In function โ€˜test_harnessโ€™:
tests/suites.c:197:11: warning: variable โ€˜commentโ€™ set but not used [-Wunused-but-set-variable]
  CCLD     src/libcyassl.la
  CCLD     ctaocrypt/benchmark/benchmark
  CCLD     ctaocrypt/test/testctaocrypt
  CCLD     examples/client/client
  CCLD     examples/server/server
  CCLD     examples/echoclient/echoclient
  CCLD     examples/echoserver/echoserver
  CCLD     testsuite/testsuite
  CCLD     tests/unit
tests/tests_unit-suites.o: In function `execute_test_case':
suites.c:(.text+0xdf): undefined reference to `strnstr'
suites.c:(.text+0x10a): undefined reference to `strnstr'
collect2: ld returned 1 exit status
make[1]: *** [tests/unit] Error 1
make[1]: Leaving directory `/home/user/cyassl/cyassl-2.5.2'
make: *** [all] Error 2

Steps to reproduce:

sh autogen.sh
CFLAGS="-w -fpermissive" ./configure
make

wmmintrin.h: No such file or directory

In file included from ctaocrypt/test/test.c:45:0:
./cyassl/ctaocrypt/aes.h:33:23: fatal error: wmmintrin.h: No such file or directory
compilation terminated.

this is 2.2.0 on linux x64 gcc 4.5.3.

used flags

CFLAGS=-D_GNU_SOURCE ./configure --prefix=/ --enable-dtls --enable-opensslExtra
--enable-ipv6 --enable-sniffer --enable-aesni --enable-ripemd --enable-sha512
--enable-sessioncerts --enable-certgen

Setting DTLS timeout has no effect

Setting the DTLS timeout in runtime does not have an effect on the timeout of the first flight.

The default timeout values (DTLS_TIMEOUT_INIT and DTLS_TIMEOUT_MAX) are always used in the beginning of the handshake. The timeout set by the user in runtime with CyaSSL_dtls_set_timeout_init() is only used for the second flight and flights after that.

This happens because the default timeout is used up until DtlsPoolReset() is called, where the user's value is loaded.

Tested with CyaSSL 2.7.0 (as a DTLS client), and the code looks the same in the current GIT revision. The workaround is obvious: I just change the default timeout values to suit my needs.

altpkg is missing cyassl 2.8.0

cyassl-2.7.0.tar.xz is the latest tarball available from altpkg/. please update!

(and much thanks for providing the altpkg download possibility btw!)

make rpm it out of date

Go build on a Fedora/Redhat system

type "make rpm"

What you will find is that files have been moved around so the spec.in file needs to be updated.

Crash when parsing certificate containing a subject key id

I have a certificate that makes CyaSSL crash during parsing:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7934ec8 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007ffff7934ec8 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff7bc8804 in ShaUpdate ()
   from ../cyassl-2.8.0-bin/lib/libcyassl.so.5
#2  0x00007ffff7bc4e33 in ParseCertRelative ()
   from ../cyassl-2.8.0-bin/lib/libcyassl.so.5
#3  0x00007ffff7bc569b in ParseCert ()
   from ../cyassl-2.8.0-bin/lib/libcyassl.so.5
#4  0x00007ffff7bbbc9b in AddCA () from ../cyassl-2.8.0-bin/lib/libcyassl.so.5
#5  0x00007ffff7bbcc37 in ProcessBuffer ()
   from ../cyassl-2.8.0-bin/lib/libcyassl.so.5
#6  0x00007ffff7bbd078 in ProcessChainBuffer ()
   from ../cyassl-2.8.0-bin/lib/libcyassl.so.5
#7  0x00007ffff7bbd3e0 in ProcessFile ()
   from ../cyassl-2.8.0-bin/lib/libcyassl.so.5
#8  0x00007ffff7bbd4b9 in CyaSSL_CTX_load_verify_locations ()
   from ../cyassl-2.8.0-bin/lib/libcyassl.so.5
#9  0x0000000000400932 in main (argc=1, argv=0x7fffffffe098) at tc.c:16

I can avoid the crash by defining NO_SKID, but I guess it would be nice if it worked. The certificate and the simple test case I used can be found here: https://www.dropbox.com/sh/3hzp41fuzsmq1hi/e3jubYmvoA

CyaSSL_Cleanup() cause crash if called without CyaSSL_Init()

LockMutex() cause a crash if CyaSSL_Cleanup() called without having CyaSSL_Init() call before. My app initialization code has failed at some point, so didnt called CyaSSL_Init(). Cleanup code was trying to call all cleanup functions for all modules, including CyaSSL, and crashed. Can you please add a check, probably right after a "CYASSL_ENTER", or give some way to check if Cleanup is necessary? Example:

    CYASSL_ENTER("CyaSSL_Cleanup");

    /* Not yet initialized or already cleaned up */
    if(initRefCount == 0)
      return ret;

    LockMutex(&count_mutex);

    release = initRefCount-- == 1;
    if (initRefCount < 0)
        initRefCount = 0;

    UnLockMutex(&count_mutex);

    if (!release)
        return ret;

Discrepancies between CCM and GCM with DTLS

Hi,

In current master branch (HEAD = 628e7b4), in src/internal.c around line 4204 is an adjustment for DTLS with GCM that is not the same as the one for CCM around line 4246. Similar discrepancy between l. 4387 and the block above it. Looks like at least one of these version is wrong, since CCM and GCM use the same additional data unless I'm mistaken.

Btw, byte additional[AES_BLOCK_SIZE]; might probably be replaced with byte additional[AEAD_AUTH_DATA_SZ]; (not entirely sure, but looks so) to save 3 bytes of stack memory :)

Check for pcap in configure script

[via rofl0r, split into separate issue, here]

--enable-sniffer depends on pcap.h, but instead of failing at configure time, it fails near the end of the build process. no big issue, but this is configure's job. a 700KB script that even checks for sizeof int should at least check for required libs :)

PrintableString not supported for Certificate Generation

There is a big problem in CyaSSLยดs Certificate generation code (which affects NTRU certificates):
Certificates can use either PrintableString (0x13) or UTF8String (0x0c) for all the fields in the CommonName. The ca-cert.pem that comes with cyassl uses only PrintableString fields.
(The mysterious thing is that a definition like ASN_PRINTABLESTRING = 0x13, is missing in the sourcecode, so it seems that the ca-cert.pem could not have been generated with the current codebase)
Now when CyaSSL generates a new CA-signed certificate, it does the following:
The Subject name from the CA certificate is read from the DER certificate, and only the name contents are copied with strcpyn to the cert structure from the new certificate. It ignores the DER Tags of the fields in the original CA-certificate structure.
Then it generates the certificate, and encodes most of fields as UTF8String.
But this causes the certificate to have a different DER-encoded Issuer-Name, which is not identical to the DER-encoded Subject-name of the CA certificate anymore.
Then the SHA1-hashes of the names do not match, which results in
"err = -188, ASN no signer error to confirm failure"
Now my question is: How should we fix this?
Should we add TAGS to the cert structure, so that we can preserve the tags from the issuer, so that we can issue certs for any pre-existing CA?
Or should we copy the DER encoded blob from the issuer directly into the certificate?
Or should we switch to UTF8String completely, and you generate a new ca-cert.pem which contains only UTF8Strings ?
Which is your preferred solution? (I donยดt want to waste time developing in the wrong direction)

autogen fails

./autogen.sh
autoreconf: Entering directory .' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force --warnings=all -I m4 --install autoreconf: configure.ac: tracing configure.ac:48: warning: The macroAC_TRY_COMPILE' is obsolete.
configure.ac:48: You should run autoupdate.
../../lib/autoconf/general.m4:2615: AC_TRY_COMPILE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
m4/visibility.m4:23: gl_VISIBILITY is expanded from...
configure.ac:48: the top level
autoreconf: configure.ac: not using Libtool
autoreconf: running: //bin/autoconf --force --warnings=all
configure.ac:48: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:48: You should run autoupdate.
../../lib/autoconf/general.m4:2615: AC_TRY_COMPILE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
m4/visibility.m4:23: gl_VISIBILITY is expanded from...
configure.ac:48: the top level
configure.ac:71: error: possibly undefined macro: AC_DISABLE_STATIC
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: //bin/autoconf failed with exit status: 1

this may be caused by a lack of libtool on my box, but if its possible i'd prefer not to install that.

CFLAGS passed to configure are discarded

CFLAGS="-O0 -g3 -fno-omit-frame-pointer" ./configure does not work as expected
the user provided CFLAGS are completely abandoned.

a well behaving package does not use any "own" CFLAGS (except those necessary to make the build work, such as -Iinclude/ etc) as soon as the user supplies custom options.

at the very least, it should append the user's CFLAGS to the end of the predefined ones, so one can override optimization settings and the like.
i.e. CFLAGS="$CYASSL_CLAGS $CFLAGS"

the same rule applies to CPPFLAGS and LDFLAGS

ssl_SetPrivateKey segfault

If the user running the program that calls ssl_SetPrivateKey doesn't have permissions for the specified file then the program segfaults.

Wrong Address for FSF in license headers

Hi! The FSF offices moved some time ago, so the Temple St. address is wrong. Their address is now:

Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
MA 02110-1301, USA.

SetErrorString(), CTaoCryptErrorString() - maybe return const char* and update API accordingly?

I is not a bug, but a suggestion.

SetErrorString() and CTaoCryptErrorString() do not use any kind of string formatting and their only functionality is to strcpy() original error string to the buffer. I don't know if you had some reason to implement it such way, but this copying is unnecessary and sometimes force to use additional buffers which are unnecessary as well. Maybe you could modify those function to return const char* instead of copying, or provide alternative API functions that return const char*? Also, implementation of CyaSSL_ERR_error_string_n() is incorrect. You either have to check if is at least MAX_ERROR_SZ or use local buffer and copy not more then characters to the destination buffer.

Below is explanation why I encountered a problem with the current CyaSSL_ERR_error_string() implementation:

I'm trying to add SSL functionality to an existing LUA (embeded language) socket library. They use 3 IO handlers to work with a socket:

int io_send(...) - write to socket
int io_recv(...), - read from socket
const char* io_error(int err_code) - convert error code to the string

I replace io_recv() and io_send() handlers by my functions that use CyaSSL, and my io_error(int err_code) function must return error string for CyaSSL errors. I do not control what happens with the string returned by the io_error() (it will be used as source for the LUA variable) and I can't use static buffer because my application is multithreaded. Using TLS is possible, but I think it is too much overhead while I could use static error strings.

Fail to compile on Raspberry pi

./configure --enable-opensslExtra
make

make[1]: Entering directory `/mnt/dev/cyassl'
CC src/src_libcyassl_la-internal.lo
CC ctaocrypt/src/src_libcyassl_la-hmac.lo
src/internal.c: In function 'DoCertificateVerify':
src/internal.c:8775:21: error: variable 'sigAlgo' set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[1]: *** [src/src_libcyassl_la-internal.lo] Error 1

gettimeofday() must not be used for timers

Some handshake/timeout callback functions in CyaSSL are using gettimeofday() for timers. It is not safe because server admin or NTP using ntpdate may adjust a system clock. Below is the function (just an example) how you may use clock_gettime() and fallback to gettimeofday() if clock_gettime() doesn't exists or fail. As CyaSSL used on portable devices you may prefer timeval structure instead of double. Also it will keep compatibility with the rest of the code.

Seems gettimeofday() is used only when CYASSL_CALLBACKS is enabled and it makes handshake and timeout callbacks implementation not compatible with Win32 because of gettimeofday(), setitimer() and signals functions.

It would be nice if you could make CyaSSL_ex_wrapper() Win32 compatible because it could be interesting and useful to see how much time takes each part of a handshake (i have to make some program to measure peformance of a connection, including SSL part. And sometimes it is not clear how much time takes SSL handshake with different implementations and which part is slow down).

You may check https://github.com/ThomasHabets/monotonic_clock for a MacOS code.

double perf_timer()
{
#ifdef _WIN32
    static double freq = 0.0;

    LARGE_INTEGER count;

    if(freq == 0.0) 
    {
        LARGE_INTEGER val;
        QueryPerformanceFrequency(&val);
        freq = (double)(val.QuadPart);
    }

   if(QueryPerformanceCounter(&count))
       return ((double)count.QuadPart) / freq;

    // fallback to GetTickCount() if High Performance timer is not supported
    return ((double)GetTickCount())/1000;

#else /* _WIN32 */

#if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK)
    struct timespec tp;
    if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
    {
        return (double)tp.tv_sec + ((double)tp.tv_nsec) / 1000000000L;
    }
#endif //_POSIX_TIMERS && _POSIX_MONOTONIC_CLOCK
    struct timeval tv;
    gettimeofday(&tv, NULL);
    return (double)tv.tv_sec + ((double)tv.tv_usec)/1000000;
#endif /* _WIN32 */
}

Cannot run testsuite in a path with 'build' or 'testsuite' in the name

There's some naive code in cyassl/test.h which causes it to look in the entire current working directory to figure out if the current dir has "build" or "testsuite" in it. This patch fixes that (but only for non-Windows)

=== modified file 'cyassl/test.h'
--- cyassl/test.h 2012-12-12 06:53:20 +0000
+++ cyassl/test.h 2012-12-12 17:00:16 +0000
@@ -857,7 +857,12 @@
printf("no current dir?\n");
return 0;
}

  • if (strstr(path, str))
  • char *basename = strrchr(path, '/');
  • if (basename == NULL)
  •    basename = path;
    
  • else
  •    basename++;
    
  • if (strstr(basename, str))
    return 1;

return 0;

ln: failed to create symbolic link `.git/hooks/pre-commit': No such file or directory

Hi,

The autogen.sh script prints an error:

sh autogen.sh

Output:

...
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:92: installing 'build-aux/compile'
configure.ac:14: installing 'build-aux/config.guess'
configure.ac:14: installing 'build-aux/config.sub'
configure.ac:17: installing 'build-aux/install-sh'
configure.ac:17: installing 'build-aux/missing'
Makefile.am: installing 'build-aux/depcomp'
autoreconf: Leaving directory `.'
ln: failed to create symbolic link `.git/hooks/pre-commit': No such file or directory

Code line in autogen.sh:

ln -s -f ../../pre-commit.sh .git/hooks/pre-commit

HAVE_ECC not defined

Hello,

I'm trying to use ECC but it won't work unless I manually define HAVE_ECC. I include:

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <cyassl/ctaocrypt/settings.h>
#include <cyassl/ctaocrypt/random.h>
#include <cyassl/ctaocrypt/ecc.h>
#include <cyassl/ctaocrypt/sha256.h>
#include <cyassl/ssl.h>

It finds "ecc_key" undeclared. If I add HAVE_ECC before the includes everything works well... I'm also facing another problem which might be related to this one, but let's go step by step.

Thanks

CyaSSL_connect() fails (with 2.7.0)

i get this

CyaSSL Entering CYASSL_CTX_new
CyaSSL Entering CyaSSL_CertManagerNew
CyaSSL Leaving CYASSL_CTX_new, return 0
CyaSSL Entering CyaSSL_CTX_set_verify
CyaSSL Entering SSL_new
CyaSSL Leaving SSL_new, return 0
CyaSSL Entering SSL_set_fd
CyaSSL Leaving SSL_set_fd, return 1
CyaSSL Entering CyaSSL_set_using_nonblock
CyaSSL Entering SSL_connect()
growing output buffer

Shrinking output buffer

connect state: CLIENT_HELLO_SENT
growing input buffer

Server attempting to accept with different version
growing input buffer

received record layer msg
CyaSSL Entering DoHandShakeMsg()
CyaSSL Entering DoHandShakeMsgType
processing server hello
server using lower version
    downgrading to TLSv1
CyaSSL Leaving DoHandShakeMsgType(), return 0
CyaSSL Leaving DoHandShakeMsg(), return 0
growing input buffer

received record layer msg
CyaSSL Entering DoHandShakeMsg()
CyaSSL Entering DoHandShakeMsgType
processing certificate
Loading peer's cert chain
    Put another cert into chain
    Put another cert into chain
CyaSSL Entering GetExplicitVersion
CyaSSL Entering GetMyVersion
CyaSSL Entering GetAlgoId
Getting Cert Name
Getting Cert Name
CyaSSL Entering GetAlgoId
CyaSSL Entering DecodeCertExtensions
CyaSSL Entering DecodeAuthKeyId
CyaSSL Entering DecodeSubjKeyId
        found optional critical flag, moving past
        Extension type not handled, skipping
        found optional critical flag, moving past
CyaSSL Entering DecodeBasicCaConstraint
        Extension type not handled, skipping
CyaSSL Entering DecodeCrlDist
        There are more Authority Information Access records, but we only use first one.
CyaSSL Entering GetAlgoId
Chain cert not verified by option, not adding as CA
Verifying Peer's cert
CyaSSL Entering GetExplicitVersion
CyaSSL Entering GetMyVersion
CyaSSL Entering GetAlgoId
Getting Cert Name
Getting Cert Name
CyaSSL Entering GetAlgoId
CyaSSL Entering DecodeCertExtensions
CyaSSL Entering DecodeAuthKeyId
CyaSSL Entering DecodeSubjKeyId
        found optional critical flag, moving past
        Extension type not handled, skipping
        found optional critical flag, moving past
CyaSSL Entering DecodeBasicCaConstraint
        Extension type not handled, skipping
        Extension type not handled, skipping
CyaSSL Entering DecodeCrlDist
        There are more Authority Information Access records, but we only use first one.
CyaSSL Entering DecodeAltNames
        Not DNS type
CyaSSL Entering DecodeAuthKeyId
        fail: wanted OPTIONAL item 0, not available

CyaSSL Entering GetAlgoId
Verified Peer's cert
CyaSSL Leaving DoHandShakeMsgType(), return 0
CyaSSL Leaving DoHandShakeMsg(), return 0
received record layer msg
CyaSSL Entering DoHandShakeMsg()
CyaSSL Entering DoHandShakeMsgType
processing certificate request
CyaSSL Leaving DoHandShakeMsgType(), return 0
CyaSSL Leaving DoHandShakeMsg(), return 0
More messages in record
received record layer msg
CyaSSL Entering DoHandShakeMsg()
CyaSSL Entering DoHandShakeMsgType
processing server hello done
CyaSSL Leaving DoHandShakeMsgType(), return 0
CyaSSL Leaving DoHandShakeMsg(), return 0
connect state: HELLO_AGAIN
connect state: HELLO_AGAIN_REPLY
connect state: FIRST_REPLY_DONE
connect state: FIRST_REPLY_FIRST
growing output buffer

Shrinking output buffer

sent: client key exchange
connect state: FIRST_REPLY_SECOND
connect state: FIRST_REPLY_THIRD
growing output buffer

Shrinking output buffer

sent: change cipher spec
connect state: FIRST_REPLY_FOURTH
growing output buffer

Shrinking output buffer

sent: finished
connect state: FINISHED_DONE
received record layer msg
got ALERT!
Got alert
CyaSSL error occured, error = 10
CyaSSL error occured, error = -213
CyaSSL Entering SSL_get_error
CyaSSL Leaving SSL_get_error, return -213
-213
CyaSSL Entering ERR_error_string
ircbot.c:158 - error #-1: revcd alert fatal error from ../rocksock_cyassl.c:72

after basically doing the following on a non-blocking, connected socket:

void rocksock_init_ssl(void) {
        CyaSSL_library_init();
        //CyaSSL_add_all_algorithms();
        CyaSSL_load_error_strings();
        CyaSSL_Debugging_ON();
}
int rocksock_ssl_connect_fd(rocksock* sock) {
        sock->sslctx = CyaSSL_CTX_new(CyaSSLv23_client_method());
        if (!sock->sslctx) {
                //ERR_print_errors_fp(stderr);
                return rocksock_seterror(sock, RS_ET_OWN, RS_E_SSL_GENERIC, ROCKSOCK_FILENAME, __LINE__);
        }
        CyaSSL_CTX_set_verify(sock->sslctx, SSL_VERIFY_NONE, 0);
        sock->ssl = CyaSSL_new(sock->sslctx);
        if (!sock->ssl) {
                //ERR_print_errors_fp(stderr);
                return rocksock_seterror(sock, RS_ET_OWN, RS_E_SSL_GENERIC, ROCKSOCK_FILENAME, __LINE__);
        }
        CyaSSL_set_fd(sock->ssl, sock->socket);
        CyaSSL_set_using_nonblock(sock->ssl, 0);
        int ret = CyaSSL_connect(sock->ssl);
        if(ret != SSL_SUCCESS) {
                //ERR_print_errors_fp(stderr);
                //printf("%dxxx\n", SSL_get_error(sock->ssl, ret));
                return rocksock_seterror(sock, RS_ET_SSL, ret, ROCKSOCK_FILENAME, __LINE__);
        }
        return 0;
}

it seems that when single-stepping through the cyassl code, the error happens much later (i.e. as long as you keep stepping, no error will be raised), so sometimes the error returned by cyassl is -208, sometimes -213

(the same code works fine when using the equivalent openssl functions)

CyaSSL_CTX_der_load_verify_locations() rename to CyaSSL_CTX_load_verify_file()?

There are 3 group of functions used for context cert/private key/verify cert functionality:

CyaSSL_CTX_use_certificate_file(), CyaSSL_CTX_use_certificate_buffer()
CyaSSL_CTX_use_PrivateKey_file(), CyaSSL_CTX_use_PrivateKey_buffer()
CyaSSL_CTX_load_verify_locations(), CyaSSL_CTX_load_verify_buffer()

CyaSSL_CTX_der_load_verify_locations() is used to provide same functionality as ..._certificate_file() and ..._PrivateKey_file() functions. But name is confusing because of 'der' in the name. I would suggest to use same naming scheme for 'verify' group:

CyaSSL_CTX_load_verify_file(ctx, filename, filetype)
CyaSSL_CTX_load_verify_buffer()

Function CyaSSL_CTX_load_verify_locations() is not so useful because it lacks error reporting functionality. If used and failed, it will be impossible to tell a user which file was invalid and caused the error during loading. Imagine, you have 10 files and one of them failed to load, rest are not loaded as well and to find the one that failed, user have to add files one by one and each time restart the application. User will be angry, at least i would be :)

I think it is better to provide kind of CyaSSL_enumerate_files(path, callback, void* userdata) helper function with a callback argument. Callback may process files one by one, using standard functions (like CyaSSL_CTX_load_verify_file()) and file extension could be used to determine the filetype (PEM/DER). Or you may provide some API function to detect file type (CyaSSL_detect_file_type(filename)). For compatibility, you may implement CyaSSL_CTX_load_verify_locations() as a wrapper around this CyaSSL_enumerate_files(), but as was said above, it lacks the error reporting functionality and personally i would not use it because most users need exact reason of error.

Of course everything what was said about CTX version of those function also apply for SSL versions (for CYASSL*).

DTLS example

Is there any sample code to convert udp client/server to DTLS client/server?

Compilation error in cyassl_int.c when HAVE_LIBZ is defined

There is a compilation error in DoApplicationData() in cyassl_int.c when HAVE_LIBZ is defined. It is due to the duplicate definition of:

byte decomp[MAX_RECORD_SIZE + MAX_COMP_EXTRA];

Simply removing one of the definitions will resolve this error.

commit a281c6bc6c09193ce28b32ce1f41840f5f5b6889 causes segmentation fault

1 ====================================
2 cyassl 3.0.3: ./test-suite.log
3 ====================================
4
5 # TOTAL: 3
6 # PASS: 0
7 # SKIP: 0
8 # XFAIL: 0
9 # FAIL: 3
10 # XPASS: 0
11 # ERROR: 0
12
13 .. contents:: :depth: 2
14
15 FAIL: testsuite/testsuite
16 =========================
17
18 CyaSSL Entering AesGcmEncrypt
19 CyaSSL Entering AesGcmEncrypt
20 CyaSSL Entering AesGcmEncrypt
21 CyaSSL Entering AesGcmEncrypt
22 CyaSSL Entering AesGcmDecrypt
23 CyaSSL Entering GetMyVersion
24 CyaSSL Entering GetMyVersion
25 CyaSSL Entering GetMyVersion
26 CyaSSL Entering CyaSSL_PemCertToDer
27 CyaSSL Entering GetExplicitVersion
28 CyaSSL Entering GetMyVersion
29 Got Cert Header
30 CyaSSL Entering GetAlgoId
31 Got Algo ID
32 Getting Cert Name
33 Getting Cert Name
34 Got Subject Name
35 CyaSSL Entering GetAlgoId
36 Got Key
37 Parsed Past Key
38 CyaSSL Entering DecodeCertExtensions
39 CyaSSL Entering DecodeSubjKeyId
40 CyaSSL Entering DecodeAuthKeyId
41 CyaSSL Entering DecodeBasicCaConstraint
42 CyaSSL Entering GetAlgoId
43 CyaSSL Entering GetMyVersion
44 CyaSSL Entering CyaSSL_PemCertToDer
45 CyaSSL Entering GetExplicitVersion
46 CyaSSL Entering GetMyVersion
47 Got Cert Header
48 CyaSSL Entering GetAlgoId
49 Got Algo ID
50 Getting Cert Name
51 Getting Cert Name
52 Got Subject Name
53 CyaSSL Entering GetAlgoId
54 Got Key
55 Parsed Past Key
56 CyaSSL Entering DecodeCertExtensions
57 CyaSSL Entering DecodeSubjKeyId
58 CyaSSL Entering DecodeAuthKeyId
59 CyaSSL Entering DecodeBasicCaConstraint
60 CyaSSL Entering GetAlgoId
61 CyaSSL Entering EVP_CIPHER_MD_CTX_init
62 CyaSSL Entering EVP_md5
63 CyaSSL Entering EVP_DigestInit
64 CyaSSL Entering MD5_Init
65 CyaSSL Entering EVP_DigestUpdate
66 CyaSSL Entering CyaSSL_MD5_Update
67 CyaSSL Entering EVP_DigestFinal
68 CyaSSL Entering MD5_Final
69 CyaSSL Entering EVP_CIPHER_MD_CTX_init
70 CyaSSL Entering EVP_sha1
71 CyaSSL Entering EVP_DigestInit
72 CyaSSL Entering SHA_Init
73 CyaSSL Entering EVP_DigestUpdate
74 CyaSSL Entering SHA_Update
75 CyaSSL Entering EVP_DigestFinal
76 CyaSSL Entering SHA_Final
77 CyaSSL Entering EVP_CIPHER_MD_CTX_init
78 CyaSSL Entering EVP_sha256
79 CyaSSL Entering EVP_DigestInit
80 CyaSSL Entering SHA256_Init
81 CyaSSL Entering EVP_DigestUpdate
82 CyaSSL Entering SHA256_Update
83 CyaSSL Entering EVP_DigestFinal
84 CyaSSL Entering SHA256_Final
85 CyaSSL Entering EVP_CIPHER_MD_CTX_init
86 CyaSSL Entering EVP_sha384
87 CyaSSL Entering EVP_DigestInit
88 CyaSSL Entering SHA384_Init
89 CyaSSL Entering EVP_DigestUpdate
90 CyaSSL Entering SHA384_Update
91 CyaSSL Entering EVP_DigestFinal
92 CyaSSL Entering SHA384_Final
93 CyaSSL Entering EVP_CIPHER_MD_CTX_init
94 CyaSSL Entering EVP_sha512
95 CyaSSL Entering EVP_DigestInit
96 CyaSSL Entering SHA512_Init
97 CyaSSL Entering EVP_DigestUpdate
98 CyaSSL Entering SHA512_Update
99 CyaSSL Entering EVP_DigestFinal
100 CyaSSL Entering SHA512_Final
101 CyaSSL Entering RAND_bytes
102 CyaSSL Entering EVP_md5
103 CyaSSL Entering HMAC
104 CyaSSL Entering DES_key_sched
105 CyaSSL Entering DES_cbc_encrypt
106 CyaSSL Entering DES_cbc_encrypt
107 CyaSSL Entering DES_ncbc_encrypt
108 CyaSSL Entering DES_ncbc_encrypt
109 CyaSSL Entering EVP_CIPHER_CTX_init
110 CyaSSL Entering CyaSSL_EVP_aes_128_cbc
111 CyaSSL Entering CyaSSL_EVP_CipherInit
112 AES-128-CBC
113 CyaSSL Entering CyaSSL_EVP_Cipher
114 AES CBC
115 CyaSSL_EVP_Cipher success
116 CyaSSL Entering EVP_CIPHER_CTX_init
117 CyaSSL Entering CyaSSL_EVP_aes_128_cbc
118 CyaSSL Entering CyaSSL_EVP_CipherInit
119 AES-128-CBC
120 CyaSSL Entering CyaSSL_EVP_Cipher
121 AES CBC
122 CyaSSL_EVP_Cipher success
123 CyaSSL Entering GetExplicitVersion
124 CyaSSL Entering GetMyVersion
125 Got Cert Header
126 CyaSSL Entering GetAlgoId
127 Got Algo ID
128 Getting Cert Name
129 Getting Cert Name
130 Got Subject Name
131 CyaSSL Entering GetAlgoId
132 Got Key
133 Parsed Past Key
134 CyaSSL Entering DecodeCertExtensions
135 CyaSSL Entering DecodeSubjKeyId
136 CyaSSL Entering DecodeAuthKeyId
137 CyaSSL Entering DecodeBasicCaConstraint
138 CyaSSL Entering GetAlgoId
139 CyaSSL Entering GetExplicitVersion
140 CyaSSL Entering GetMyVersion
141 Got Cert Header
142 CyaSSL Entering GetAlgoId
143 Got Algo ID
144 Getting Cert Name
145 Getting Cert Name
146 Got Subject Name
147 CyaSSL Entering GetAlgoId
148 Got Key
149 Parsed Past Key
150 CyaSSL Entering DecodeCertExtensions
151 CyaSSL Entering DecodeSubjKeyId
152 CyaSSL Entering DecodeAuthKeyId
153 CyaSSL Entering DecodeBasicCaConstraint
154 CyaSSL Entering GetAlgoId
155 CyaSSL Entering SetSerialNumber
156 CyaSSL Entering GetContentType
157 CyaSSL Entering GetMyVersion
158 CyaSSL Entering GetMyVersion
159 CyaSSL Entering GetNameHash
160 CyaSSL Entering GetAlgoId
161 CyaSSL Entering GetContentType
162 CyaSSL Entering GetAlgoId
163 CyaSSL Entering GetMyVersion
164 CyaSSL Entering GetExplicitVersion
165 CyaSSL Entering GetMyVersion
166 Got Cert Header
167 CyaSSL Entering GetAlgoId
168 Got Algo ID
169 Getting Cert Name
170 Getting Cert Name
171 Got Subject Name
172 CyaSSL Entering GetAlgoId
173 Got Key
174 Parsed Past Key
175 CyaSSL Entering DecodeCertExtensions
176 CyaSSL Entering DecodeSubjKeyId
177 CyaSSL Entering DecodeAuthKeyId
178 CyaSSL Entering DecodeBasicCaConstraint
179 CyaSSL Entering GetAlgoId
180 CyaSSL Entering SetSerialNumber
181 CyaSSL Entering GetMyVersion
182 CyaSSL Entering GetContentType
183 CyaSSL Entering GetMyVersion
184 CyaSSL Entering GetContentType
185 CyaSSL Entering GetExplicitVersion
186 CyaSSL Entering GetMyVersion
187 Got Cert Header
188 CyaSSL Entering GetAlgoId
189 Got Algo ID
190 Getting Cert Name
191 Getting Cert Name
192 Got Subject Name
193 CyaSSL Entering GetAlgoId
194 Got Key
195 Parsed Past Key
196 CyaSSL Entering DecodeCertExtensions
197 CyaSSL Entering DecodeSubjKeyId
198 CyaSSL Entering DecodeAuthKeyId
199 CyaSSL Entering DecodeBasicCaConstraint
200 CyaSSL Entering GetAlgoId
201 CyaSSL Entering GetMyVersion
202 CyaSSL Entering CYASSL_CTX_new
203 CyaSSL Entering CyaSSL_CertManagerNew
204 CyaSSL Leaving CYASSL_CTX_new, return 0
205 CyaSSL Entering SSL_CTX_set_default_passwd_cb
206 CyaSSL Entering CyaSSL_CTX_use_certificate_file
207 Getting dynamic buffer
208 Checking cert signature type
209 CyaSSL Entering GetExplicitVersion
210 Got Cert Header
211 CyaSSL Entering GetAlgoId
212 Got Algo ID
213 Getting Cert Name
214 Getting Cert Name
215 Got Subject Name
216 CyaSSL Entering GetAlgoId
217 Got Key
218 Not ECDSA cert signature
219 CyaSSL Entering CyaSSL_CTX_use_PrivateKey_file
220 Getting dynamic buffer
221 CyaSSL Entering GetMyVersion
222 CyaSSL Entering CyaSSL_CTX_set_verify
223 CyaSSL Entering CyaSSL_CTX_load_verify_locations
224 Getting dynamic buffer
225 Processing CA PEM file
226 Adding a CA
227 CyaSSL Entering GetExplicitVersion
228 CyaSSL Entering GetMyVersion
229 Got Cert Header
230 CyaSSL Entering GetAlgoId
231 Got Algo ID
232 Getting Cert Name
233 Getting Cert Name
234 Got Subject Name
235 CyaSSL Entering GetAlgoId
236 Got Key
237 Parsed Past Key
238 CyaSSL Entering DecodeCertExtensions
239 CyaSSL Entering DecodeSubjKeyId
240 CyaSSL Entering DecodeAuthKeyId
241 CyaSSL Entering DecodeBasicCaConstraint
242 CyaSSL Entering GetAlgoId
243 Parsed new CA
244 Freeing Parsed CA
245 Freeing der CA
246 OK Freeing der CA
247 CyaSSL Leaving AddCA, return 0
248 Processed a CA
249 CyaSSL Entering SSL_new
250 CyaSSL Leaving SSL_new, return 0
251 CyaSSL Entering CyaSSL_EnableCRL
252 CyaSSL Entering CyaSSL_CertManagerEnableCRL
253 CyaSSL Entering InitCRL
254 CyaSSL Entering CyaSSL_LoadCRL
255 CyaSSL Entering CyaSSL_CertManagerLoadCRL
256 CyaSSL Entering LoadCRL
257 Getting dynamic buffer
258 CyaSSL Entering BufferLoadCRL
259 InitDecodedCRL
260 ParseCRL
261 CyaSSL Entering GetMyVersion
262 CyaSSL Entering GetAlgoId
263 CyaSSL Entering GetNameHash
264 CyaSSL Entering GetBasicDate
265 CyaSSL Entering GetBasicDate
266 CyaSSL Entering GetRevoked
267 CyaSSL Entering GetAlgoId
268 CyaSSL Entering GetCRL_Signature
269 About to verify CRL signature
270 Did NOT find CRL issuer CA
271 ParseCRL error
272 FreeDecodedCRL
273 CRL file load failed, continuing
274 not .pem file, skipping
275 Getting dynamic buffer
276 CyaSSL Entering BufferLoadCRL
277 InitDecodedCRL
278 ParseCRL
279 CyaSSL Entering GetMyVersion
280 CyaSSL Entering GetAlgoId
281 CyaSSL Entering GetNameHash
282 CyaSSL Entering GetBasicDate
283 CyaSSL Entering GetBasicDate
284 CyaSSL Entering GetRevoked
285 CyaSSL Entering GetAlgoId
286 CyaSSL Entering GetCRL_Signature
287 About to verify CRL signature
288 Found CRL issuer CA
289 ASN Key import error ECC
290 Verify Key type unknown
291 CyaSSL Entering AddCRL
292 CyaSSL Entering InitCRL_Entry
293 FreeDecodedCRL
294 Getting dynamic buffer
295 CyaSSL Entering BufferLoadCRL
296 InitDecodedCRL
297 ParseCRL
298 CyaSSL Entering GetMyVersion
299 CyaSSL Entering GetAlgoId
300 CyaSSL Entering GetNameHash
301 CyaSSL Entering GetBasicDate
302 CyaSSL Entering GetBasicDate
303 CyaSSL Entering GetAlgoId
304 CyaSSL Entering GetCRL_Signature
305 About to verify CRL signature
306 Did NOT find CRL issuer CA
307 ParseCRL error
308 FreeDecodedCRL
309 CRL file load failed, continuing
310 Getting dynamic buffer
311 CyaSSL Entering BufferLoadCRL
312 InitDecodedCRL
313 ParseCRL
314 CyaSSL Entering GetMyVersion
315 CyaSSL Entering GetAlgoId
316 CyaSSL Entering GetNameHash
317 CyaSSL Entering GetBasicDate
318 CyaSSL Entering GetBasicDate
319 CyaSSL Entering GetRevoked
320 CyaSSL Entering GetAlgoId
321 CyaSSL Entering GetCRL_Signature
322 About to verify CRL signature
323 Did NOT find CRL issuer CA
324 ParseCRL error
325 FreeDecodedCRL
326 CRL file load failed, continuing
327 not .pem file, skipping
328 not .pem file, skipping
329 monitor path requested
330 start monitoring requested
331 CyaSSL Entering StartMonitorCRL
332 Not compiled in
333 CyaSSL Entering CyaSSL_SetCRL_Cb
334 CyaSSL Entering CyaSSL_CertManagerSetCRL_Cb
335 CyaSSL Entering CYASSL_CTX_new
336 CyaSSL Entering CyaSSL_CertManagerNew
337 CyaSSL Leaving CYASSL_CTX_new, return 0
338 CyaSSL Entering SSL_CTX_set_default_passwd_cb
339 CyaSSL Entering CyaSSL_CTX_use_certificate_chain_file
340 Getting dynamic buffer
341 Checking cert signature type
342 CyaSSL Entering GetExplicitVersion
343 CyaSSL Entering GetMyVersion
344 Got Cert Header
345 CyaSSL Entering GetAlgoId
346 Got Algo ID
347 Getting Cert Name
348 Getting Cert Name
349 Got Subject Name
350 CyaSSL Entering GetAlgoId
351 Got Key
352 Not ECDSA cert signature
353 CyaSSL Entering CyaSSL_CTX_use_PrivateKey_file
354 Getting dynamic buffer
355 CyaSSL Entering GetMyVersion
356 CyaSSL Entering CyaSSL_CTX_load_verify_locations
357 Getting dynamic buffer
358 Processing CA PEM file
359 Adding a CA
360 CyaSSL Entering GetExplicitVersion
361 CyaSSL Entering GetMyVersion
362 Got Cert Header
363 CyaSSL Entering GetAlgoId
364 Got Algo ID
365 Getting Cert Name
366 Getting Cert Name
367 Got Subject Name
368 CyaSSL Entering GetAlgoId
369 Got Key
370 Parsed Past Key
371 CyaSSL Entering DecodeCertExtensions
372 CyaSSL Entering DecodeSubjKeyId
373 CyaSSL Entering DecodeAuthKeyId
374 CyaSSL Entering DecodeBasicCaConstraint
375 CyaSSL Entering GetAlgoId
376 Parsed new CA
377 Freeing Parsed CA
378 Freeing der CA
379 OK Freeing der CA
380 CyaSSL Leaving AddCA, return 0
381 Processed a CA
382 Couldn't find PEM header
383 We got one good PEM file so stuff at end ok
384 CyaSSL Entering SSL_new
385 CyaSSL Leaving SSL_new, return 0
386 CyaSSL Entering SSL_set_fd
387 CyaSSL Leaving SSL_set_fd, return 1
388 CyaSSL Entering CyaSSL_EnableCRL
389 CyaSSL Entering CyaSSL_CertManagerEnableCRL
390 CyaSSL Entering InitCRL
391 CyaSSL Entering CyaSSL_LoadCRL
392 CyaSSL Entering CyaSSL_CertManagerLoadCRL
393 CyaSSL Entering LoadCRL
394 CyaSSL Entering SSL_set_fd
395 Getting dynamic buffer
396 CyaSSL Leaving SSL_set_fd, return 1
397 CyaSSL Entering BufferLoadCRL
398 CyaSSL Entering SSL_accept()
399 InitDecodedCRL
400 ParseCRL
401 CyaSSL Entering GetMyVersion
402 CyaSSL Entering GetAlgoId
403 CyaSSL Entering GetNameHash
404 CyaSSL Entering GetBasicDate
405 CyaSSL Entering GetBasicDate
406 CyaSSL Entering GetRevoked
407 CyaSSL Entering GetAlgoId
408 CyaSSL Entering GetCRL_Signature
409 About to verify CRL signature
410 Did NOT find CRL issuer CA
411 ParseCRL error
412 FreeDecodedCRL
413 CRL file load failed, continuing
414 not .pem file, skipping
415 Getting dynamic buffer
416 CyaSSL Entering BufferLoadCRL
417 InitDecodedCRL
418 ParseCRL
419 CyaSSL Entering GetMyVersion
420 CyaSSL Entering GetAlgoId
421 CyaSSL Entering GetNameHash
422 CyaSSL Entering GetBasicDate
423 CyaSSL Entering GetBasicDate
424 CyaSSL Entering GetRevoked
425 CyaSSL Entering GetAlgoId
426 CyaSSL Entering GetCRL_Signature
427 About to verify CRL signature
428 Did NOT find CRL issuer CA
429 ParseCRL error
430 FreeDecodedCRL
431 CRL file load failed, continuing
432 Getting dynamic buffer
433 CyaSSL Entering BufferLoadCRL
434 InitDecodedCRL
435 ParseCRL
436 CyaSSL Entering GetMyVersion
437 CyaSSL Entering GetAlgoId
438 CyaSSL Entering GetNameHash
439 CyaSSL Entering GetBasicDate
440 CyaSSL Entering GetBasicDate
441 CyaSSL Entering GetAlgoId
442 CyaSSL Entering GetCRL_Signature
443 About to verify CRL signature
444 Found CRL issuer CA
445 ASN Key import error ECC
446 Verify Key type unknown
447 CyaSSL Entering AddCRL
448 CyaSSL Entering InitCRL_Entry
449 FreeDecodedCRL
450 Getting dynamic buffer
451 CyaSSL Entering BufferLoadCRL
452 InitDecodedCRL
453 ParseCRL
454 CyaSSL Entering GetMyVersion
455 CyaSSL Entering GetAlgoId
456 CyaSSL Entering GetNameHash
457 CyaSSL Entering GetBasicDate
458 CyaSSL Entering GetBasicDate
459 CyaSSL Entering GetRevoked
460 CyaSSL Entering GetAlgoId
461 CyaSSL Entering GetCRL_Signature
462 About to verify CRL signature
463 Did NOT find CRL issuer CA
464 ParseCRL error
465 FreeDecodedCRL
466 CRL file load failed, continuing
467 not .pem file, skipping
468 not .pem file, skipping
469 CyaSSL Entering CyaSSL_SetCRL_Cb
470 CyaSSL Entering CyaSSL_CertManagerSetCRL_Cb
471 CyaSSL Entering SSL_connect()
472 growing output buffer
473
474 Shrinking output buffer
475
476 connect state: CLIENT_HELLO_SENT
477 growing input buffer
478
479 received record layer msg
480 CyaSSL Entering DoHandShakeMsg()
481 CyaSSL Entering DoHandShakeMsgType
482 processing client hello
483 CyaSSL Entering MatchSuite
484 CyaSSL Entering VerifyServerSuite
485 Requires RSA
486 Requires RSA Signature
487 Verified suite validity
488 CyaSSL Leaving DoHandShakeMsgType(), return 0
489 CyaSSL Leaving DoHandShakeMsg(), return 0
490 accept state ACCEPT_CLIENT_HELLO_DONE
491 accept state HELLO_VERIFY_SENT
492 accept state ACCEPT_FIRST_REPLY_DONE
493 growing output buffer
494
495 Shrinking output buffer
496
497 accept state SERVER_HELLO_SENT
498 growing output buffer
499
500 growing input buffer
501
502 received record layer msg
503 CyaSSL Entering DoHandShakeMsg()
504 CyaSSL Entering DoHandShakeMsgType
505 processing server hello
506 CyaSSL Entering VerifyClientSuite
507 CyaSSL Leaving DoHandShakeMsgType(), return 0
508 CyaSSL Leaving DoHandShakeMsg(), return 0
509 Shrinking output buffer
510
511 accept state CERT_SENT
512 Using ephemeral ECDH
513 growing input buffer
514
515 received record layer msg
516 CyaSSL Entering DoHandShakeMsg()
517 CyaSSL Entering DoHandShakeMsgType
518 CyaSSL Entering GetMyVersion
519 processing certificate
520 Loading peer's cert chain
521 Put another cert into chain
522 Verifying Peer's cert
523 growing output buffer
524
525 CyaSSL Entering GetExplicitVersion
526 Got Cert Header
527 CyaSSL Entering GetAlgoId
528 Got Algo ID
529 Getting Cert Name
530 Getting Cert Name
531 Got Subject Name
532 CyaSSL Entering GetAlgoId
533 Got Key
534 Parsed Past Key
535 CyaSSL Entering GetAlgoId
536 About to verify certificate signature
537 ASN Key import error ECC
538
539 FAIL: tests/unit
540 ================
541
542
543 FAIL: ./client-test.sh
544 ======================
545
546 PING www.google.com (74.125.129.99) 56(84) bytes of data.
547 64 bytes from pd-in-f99.1e100.net (74.125.129.99): icmp_seq=1 ttl=46 time=40.8 ms
548 64 bytes from pd-in-f99.1e100.net (74.125.129.99): icmp_seq=2 ttl=46 time=32.7 ms
549
550 --- www.google.com ping statistics ---
551 2 packets transmitted, 2 received, 0% packet loss, time 200ms
552 rtt min/avg/max/mdev = 32.740/36.795/40.850/4.055 ms
553 CyaSSL Entering CYASSL_CTX_new
554 CyaSSL Entering CyaSSL_CertManagerNew
555 CyaSSL Leaving CYASSL_CTX_new, return 0
556 CyaSSL Entering SSL_CTX_set_default_passwd_cb
557 CyaSSL Entering CyaSSL_CTX_use_certificate_chain_file
558 Getting dynamic buffer
559 Checking cert signature type
560 CyaSSL Entering GetExplicitVersion
561 CyaSSL Entering GetMyVersion
562 Got Cert Header
563 CyaSSL Entering GetAlgoId
564 Got Algo ID
565 Getting Cert Name
566 Getting Cert Name
567 Got Subject Name
568 CyaSSL Entering GetAlgoId
569 Got Key
570 Not ECDSA cert signature
571 CyaSSL Entering CyaSSL_CTX_use_PrivateKey_file
572 Getting dynamic buffer
573 CyaSSL Entering GetMyVersion
574 CyaSSL Entering CyaSSL_CTX_load_verify_locations
575 Getting dynamic buffer
576 Processing CA PEM file
577 Adding a CA
578 CyaSSL Entering GetExplicitVersion
579 CyaSSL Entering GetMyVersion
580 Got Cert Header
581 CyaSSL Entering GetAlgoId
582 Got Algo ID
583 Getting Cert Name
584 Getting Cert Name
585 Got Subject Name
586 CyaSSL Entering GetAlgoId
587 Got Key
588 Parsed Past Key
589 CyaSSL Entering DecodeCertExtensions
590 CyaSSL Entering DecodeSubjKeyId
591 CyaSSL Entering DecodeAuthKeyId
592 CyaSSL Entering DecodeBasicCaConstraint
593 CyaSSL Entering GetAlgoId
594 Parsed new CA
595 Freeing Parsed CA
596 Freeing der CA
597 OK Freeing der CA
598 CyaSSL Leaving AddCA, return 0
599 Processed a CA
600 Couldn't find PEM header
601 We got one good PEM file so stuff at end ok
602 CyaSSL Entering CyaSSL_CTX_set_verify
603 CyaSSL Entering SSL_new
604 CyaSSL Leaving SSL_new, return 0
605 CyaSSL Entering SSL_set_fd
606 CyaSSL Leaving SSL_set_fd, return 1
607 CyaSSL Entering CyaSSL_EnableCRL
608 CyaSSL Entering CyaSSL_CertManagerEnableCRL
609 CyaSSL Entering InitCRL
610 CyaSSL Entering CyaSSL_LoadCRL
611 CyaSSL Entering CyaSSL_CertManagerLoadCRL
612 CyaSSL Entering LoadCRL
613 Getting dynamic buffer
614 CyaSSL Entering BufferLoadCRL
615 InitDecodedCRL
616 ParseCRL
617 CyaSSL Entering GetMyVersion
618 CyaSSL Entering GetAlgoId
619 CyaSSL Entering GetNameHash
620 CyaSSL Entering GetBasicDate
621 CyaSSL Entering GetBasicDate
622 CyaSSL Entering GetRevoked
623 CyaSSL Entering GetAlgoId
624 CyaSSL Entering GetCRL_Signature
625 About to verify CRL signature
626 Did NOT find CRL issuer CA
627 ParseCRL error
628 FreeDecodedCRL
629 CRL file load failed, continuing
630 not .pem file, skipping
631 Getting dynamic buffer
632 CyaSSL Entering BufferLoadCRL
633 InitDecodedCRL
634 ParseCRL
635 CyaSSL Entering GetMyVersion
636 CyaSSL Entering GetAlgoId
637 CyaSSL Entering GetNameHash
638 CyaSSL Entering GetBasicDate
639 CyaSSL Entering GetBasicDate
640 CyaSSL Entering GetRevoked
641 CyaSSL Entering GetAlgoId
642 CyaSSL Entering GetCRL_Signature
643 About to verify CRL signature
644 Did NOT find CRL issuer CA
645 ParseCRL error
646 FreeDecodedCRL
647 CRL file load failed, continuing
648 Getting dynamic buffer
649 CyaSSL Entering BufferLoadCRL
650 InitDecodedCRL
651 ParseCRL
652 CyaSSL Entering GetMyVersion
653 CyaSSL Entering GetAlgoId
654 CyaSSL Entering GetNameHash
655 CyaSSL Entering GetBasicDate
656 CyaSSL Entering GetBasicDate
657 CyaSSL Entering GetAlgoId
658 CyaSSL Entering GetCRL_Signature
659 About to verify CRL signature
660 Found CRL issuer CA
661 ASN Key import error ECC
662 ./client-test.sh: line 13: 4407 Segmentation fault (core dumped) ./examples/client/clie nt -h www.google.com -p 443 -g -d
663
664
665 Client connection failed
666

Various Minor Documentation Issues

The option for disabling the DES3 cipher is documented as NO_DES in os_settings.h and the developer manual, however, in the code it is used as NO_DES3.

There is no documentation of the option CYASSL_USER_IO. It would be helpful to have documentation of this option and possibly an example of how to use it.

There is no documentation of the option NO_PWDBASED.

There is no documentation of the option NO_DEV_RANDOM. This would be especially helpful for developers porting to environments that are not Unix-like.

There is no documentation of the option NO_WRITEV. This would be especially helpful for developers porting to environments that are not Unix-like.

There is no documentation of the options USER_TIME and USER_TICKS. This would be especially helpful for developers porting to environments that are not Unix-like.

There is no documentation of the option NO_ERROR_STRINGS in the manual.

There is a small typo in cyassl_io.c on line 32:
/* but they'll still nedd SetCallback xxx() at end of file */

Default definitions of macros when USER_TIME is defined

There is no default definition of several macros in asn.c when USER_TIME is defined. It would be helpful if there was a default no-op definition for these macros: XTIME, XGMTIME, and XVALIDATE_DATE.

Add these lines somewhere around Line 76.
#define XTIME(tl) (0)
#define XGMTIME(c) (0)
#define XVALIDATE_DATE(d, f, t) (0)

Also, note the comment typo:
/* no <time.h> strucutres used */

missing functions in openssl compat mode.

trying to use cyassl openssl compat mode to build gnu wget with --with-ssl=openssl

checking for EVP_MD_CTX_init in -lcrypto... no
checking for ERR_func_error_string in -lssl... no
configure: error: openssl development libraries not found

buildscript:

[deps]
[main]
filesize=502624
sha512=8eb51783807dab691bf480380bc37ab9d7e656c0f3ed3555313e6e15ac9bc3891ef1d05b4c01597d1d17de3c12e722ad58933fb5574a49b89f43f82273b2$

[mirrors]
http://foo.com/cyassl-2.2.0.tar.xz

[lol]
http://www.openssl.org/source/openssl-1.0.1.tar.gz

[build]
CFLAGS=-D_GNU_SOURCE ./configure --prefix=/ --enable-dtls --enable-opensslExtra \
  --enable-ipv6 --enable-ripemd --enable-sha512 \
  --enable-sessioncerts --enable-certgen || exit 1
# aesni is currently broken
# sniffer depends on pcap

make -j$MAKE_THREADS || exit 1
make DESTDIR="$butch_install_dir" install || exit 1

ln -sf cyassl/openssl/ "$butch_install_dir/include/"

ln -sf libcyassl.a "$butch_install_dir/lib/libssl.a"
ln -sf libcyassl.a "$butch_install_dir/lib/libcrypto.a"

ln -sf libcyassl.so "$butch_install_dir/lib/libssl.so"
ln -sf libcyassl.so "$butch_install_dir/lib/libssl.so.1.0.0"

ln -sf libcyassl.so "$butch_install_dir/lib/libcrypto.so"
ln -sf libcyassl.so "$butch_install_dir/lib/libcrypto.so.1.0.0"

Considered CMake?

I'm just curious if you have ever considered adding a CMake project?

Seeing that autoconf is known to be a nightmare, and that you maintain several different projects for different platforms, xcode, visual studio, make. CMake would be a perfect match:

http://www.cmake.org

pubKey issue in asn.c

./configure
make

make -j3 all-am
make[1]: Entering directory /home/sweetness/Documents/cyassl-git' CC src/src_libcyassl_la-internal.lo CC src/src_libcyassl_la-io.lo CC src/src_libcyassl_la-keys.lo CC src/src_libcyassl_la-ssl.lo CC src/src_libcyassl_la-tls.lo CC ctaocrypt/src/src_libcyassl_la-hmac.lo CC ctaocrypt/src/src_libcyassl_la-random.lo CC ctaocrypt/src/src_libcyassl_la-sha256.lo CC ctaocrypt/src/src_libcyassl_la-logging.lo CC ctaocrypt/src/src_libcyassl_la-wc_port.lo CC ctaocrypt/src/src_libcyassl_la-error.lo CC ctaocrypt/src/src_libcyassl_la-memory.lo CC ctaocrypt/src/src_libcyassl_la-rsa.lo CC ctaocrypt/src/src_libcyassl_la-asn.lo ctaocrypt/src/asn.c: In function 'ConfirmSignature': ctaocrypt/src/asn.c:2995:17: error: the address of 'pubKey' will always evaluate as 'true' [-Werror=address] cc1: all warnings being treated as errors make[1]: *** [ctaocrypt/src/src_libcyassl_la-asn.lo] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory/home/sweetness/Documents/cyassl-git'
make: *** [all] Error 2

question about library-safety of stateful CyaSSL_library_init()

imagine a program that uses a library A which uses cyassl, and another library B that uses cyassl as well.
both will call the stateful CyaSSL_library_init(), and it's even possible that library B calls it while library A already started to use CyaSSL in a thread.

is there anything that shields from one library overwriting the global cyassl state without race conditions?

optimally such a call would not be necessary if CyaSSL_CTX_new and similar functions that must be called before any other commands like CyaSSL_read used a pthread_once guard to initialize the global state.

(the same question arises with OpenSSL's equivalents, btw)

Problem running ./autogen.sh

I'm having an issue running autogen.sh:

cyassl$ ./autogen.sh
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:79: error: possibly undefined macro: AC_DISABLE_STATIC
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

This has worked before on the same computer. I even checked out an old commit that I know worked before (834ebe5). So I guess it's something on my computer, but I'm not sure what?

$ libtool --version
ltmain.sh (GNU libtool) 2.2.6b
$ autoconf --version
autoconf (GNU Autoconf) 2.67
$ automake --version
automake (GNU automake) 1.13.1
$ autoreconf --version
autoreconf (GNU Autoconf) 2.67

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.