Skip to content

A set of example programs that demonstrate various OpenSSL functions and enable "learning by doing".

License

Notifications You must be signed in to change notification settings

fm4dd/learn-ssl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenSSL API Examples

test License: MIT

Introduction

The programs were originally written between 2007 and 2015 with OpenSSL version 1.0. At that time, OpenSSL's documentation was sparse, which led to the creation of sample programs that demonstrate various functions and enable "learning by doing".

The programs were updated to OpenSSL 3.0.11 on Debian 12 under gcc version 12.2.0. The programs have hardcoded key and certificate input files, which are located in the demo folder.

List of Example Programs

# Name Description
1 add_ev_oids.c How to add extra/missing OID's to OpenSSL's internal NID table structure
2 certcreate.c How to create a X509 digital certificate from a CSR request
3 certextensions.c How to extract certificate extensions from a X509 digital certificate
4 certfprint.c How to generate the fingerprint hash of a X509 digital certificate
5 certpubkey.c How to extract public key data from a X509 digital certificate
6 certrenewal.c How to create a new CSR request from a existing X509 digital certificate
7 certserial.c How to extract the serial number from a X509 digital certificate
8 certsignature.c How to extract the signature data from a X509 digital certificate
9 certstack.c How to load a list of certificates, and display various subject data
10 certverify.c How to validate a X509 certificate against a CA cert or chain
11 certverify-adv.c 2nd version how to validate a X509 certificate against a CA cert or chain
12 crldisplay.c How to extract and display data from a certificate revocation list (DER CRL)
13 eckeycreate.c How to create and display elliptic curve cryptography (ECC) key pairs
14 keycompare.c How to check if a private key belongs to a X509 digital certificate
15 keytest.c How to load and display a SSL private key using OpenSSL libraries
16 pkcs12test.c How to create a PKCS12 cert bundle (e.g. for use with Windows S/MIME)
17 set_asn1_time.c How to create/set the ASN1 date and time for X509 digital certificates
18 sslconnect.c How to make a basic SSL/TLS connection and get the servers certificate

Notes

With small modificiations they are reported to work also under Windows and OSX. See also http://fm4dd.com/openssl/

About

A set of example programs that demonstrate various OpenSSL functions and enable "learning by doing".

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published