SlideShare a Scribd company logo
1 of 17
Download to read offline
OpenSSL 
Basic Function Call Flow 
William.L 
wiliwe@gamil.com 
2006-06-13
Index 
Summary.......................................................................................................................................................... 3 
OpenSSL Data Structures .............................................................................................................................. 4 
genRANDOM() Function ............................................................................................................................. 10 
Reference ....................................................................................................................................................... 17
Summary 
Purpose 
This document provides a basic function calling flow of OpenSSL library for constructing a secure TCP 
connection to send/receive critical data. 
General Description 
The OpenSSL library implements the Secure Sockets Layer (SSL v2/v3) protocols. 
At first, the library must be initialized by calling the function : SSL_library_init() . 
Then an SSL_CTX object is created as a framework to establish TLS/SSL enabled connections. This object 
is created by calling the function : SSL_CTX_new(). 
Various options regarding certificates, algorithms etc. can be set in this object. 
When a network connection (e.g. TCP connection) has been created, it can be assigned to an SSL object. 
After the SSL object has been created using SSL_new(), SSL_set_fd() or SSL_set_bio() can be used to 
associate the network connection with the object. 
Then the TLS/SSL handshake is performed using SSL_accept() (for server side) or SSL_connect() (for 
client side) respectively. 
SSL_read() and SSL_write() are used to read and write data on the TLS/SSL connection. 
SSL_shutdown() can be used to shut down the TLS/SSL connection.
OpenSSL Data Structures 
Currently the OpenSSL library functions deals with the following data structures: 
SSL_METHOD 
The SSL Method. That's a dispatch structure describing the internal SSL library methods/functions which 
implement the various protocol versions (SSLv1, SSLv2 and TLSv1). It's needed to create an SSL_CTX. 
Data Structure SSL_METHOD 
Definded in ssl.h 
File Location OpenSSL-Srcssl 
SSL_CIPHER 
The SSL Cipher. This structure holds the algorithm information for a particular cipher which are a core part 
of the SSL/TLS protocol. The available ciphers are configured on a SSL_CTX basis and the actually used 
ones are then part of the SSL_SESSION. 
Data Structure SSL_CIPHER 
Definded in ssl.h 
File Location OpenSSL-Srcssl 
SSL_CTX 
The SSL Context. That's the global context structure which is created by a server or client once per program 
life-time and which holds mainly default values for the SSL structures which are later created for the 
connections. 
Data Structure SSL_CTX 
Definded in ssl.h 
File Location OpenSSL-Src ssl 
SSL_SESSION 
The SSL Session . This is a structure containing the current TLS/SSL session details for a connection: 
SSL_CIPHER, client and server certificates, keys, etc. 
Data Structure SSL_SESSION 
Definded in ssl.h 
File Location OpenSSL-Src ssl 
SSL 
The SSL Connection . That's the main SSL/TLS structure which is created by a server or client per 
established connection. This actually is the core structure in the SSL API. Under run-time the application 
usually deals with this structure which has links to mostly all other structures.
Data Structure SSL 
Definded in ssl.h 
File Location OpenSSL-Src ssl
Basic Calling Flow 
int SSL_library_init(void) 
Initializing the OpenSSL library. 
call 
SSL_METHOD *SSLv23_method(void) 
Constructor for the SSLv2 or SSLv3 
SSL_METHOD structure for combined 
client and server. 
call 
SSL_CTX* SSL_CTX_new(SSL_METHOD *method) 
SSL_CTX object is created as a framework to establish 
TLS/SSL enabled connections. 
call 
RAND_add() : Load the Randomness 
This step is for initializing the randomness for generating session key 
(client key). 
This phase will do automatically with RAND_poll() function which will 
call RAND_add() indirectly in below O.S platform: 
<1>OS2 <2>Unix <3>OpenBSD <4>Linux <5>Windows. 
If the platform other than the above, we must call RAND_add() explicitly. 
For example, in VxWorks RTOS, it must call RAND_add() explicitly. 
call
call 
Creates a TCP connection. 
{ This will generate a socket 
handler,e.g. file descriptor } 
call 
SSL* SSL_new(SSL_CTX *ctx) 
Creates a new SSL structure which 
is needed to hold the data for a 
TLS/SSL connection. 
call 
int SSL_set_fd (SSL *ssl, int fd) 
Sets the file descriptor fd as the input/output facility for 
the TLS/SSL (encrypted) side of ssl. fd will typically be 
the socket file descriptor of a network connection. 
call 
call 
Is this a Server 
application 
Yes, this is a 
Server application 
call 
No, this is a Client 
application 
int SSL_connect(SSL *ssl) 
Initiates the TLS/SSL handshake 
with a server. 
SSL Handshaking 
int SSL_accept(SSL *ssl) 
Waits for a TLS/SSL client to 
initiate the TLS/SSL handshake. 
Successful Handshaking
int SSL_read(SSL*ssl, void *buf, int num) 
Tries to read num bytes from the specified 
ssl into the buffer buf. 
int SSL_write(SSL *ssl, const void 
*buf, int num) 
Writes num bytes from the buffer buf into 
the specified SSL connection, ssl. 
from read from write 
Need to 
terminating the 
SSL connection? 
No, continues to 
use the active 
SSL connection. 
Yes, terminate the 
SSL connection 
int SSL_shutdown(SSL *ssl) 
Shuts down an active TLS/SSL 
connection. It sends the “close notify” 
shutdown alert to the peer. 
Going back to the 
SSL read/write 
operation 
call 
int SSL_free(SSL *ssl) 
Decrements the reference count of ssl, and removes the 
SSL structure pointed to by ssl and frees up the allocated 
memory if the the reference count has reached 0. 
call 
read 
operation? 
call 
No, this is a 
write operation 
call 
Yes, this is a 
read operation 
Successful Handshaking
call 
int SSL_CTX_free(SSL_CTX *ctx) 
Decrements the reference count of ctx, and removes the SSL_CTX 
object pointed to by ctx and frees up the allocated memory if the the 
reference count has reached 0. 
It also calls free() to release memory of items(if it is available): 
session cache, list of ciphers, list of Client CAs, certificates and keys. 
call 
int close(int socket) 
This the socket function to close a 
socket and terminate a TCP connection. 
Finish 
The above function call flow is just a basic flow to create a SSL connection without client authentication 
and doing read/write operations.
genRANDOM() Function 
This is a randomness initialization function we created. It calls the OpenSSL function, RAND_add(), to 
accomplish the randomness initialization operation(that is to seed unpredictable data to a cryptographic 
PRNG (Pseudo-Random Number Generator). The function signature is : 
void RAND_add (const void *buf, int num, double entropy) 
The followings are the steps showing how to use RAND_add() function to initailize randomness. 
Step 1) 
We created a string type variable and fill arbitrary chars (the content should be unpredictable that any one 
can’t guess it). In our codes, we do as below : 
static char* strRANDOM = 
"FreeBSD -STABLE #4: Tue g5 15:50:0PDT000 
Tiecounti8254 frequen193182 Hz 
CP: Pent II/Xeon/Celeron400.MHz 6-cls CPU) 
Prbing fdevices on PCI b: 
chp0: <Il 82443BX host tI bri> v 02 on pci0.0.0 
Prbing fPnP devices: 
sc: VGA or <16 virtualoles, flagsx0> 
ed not fd at 0x280 
ah0 not nd at 0x34 
ai0 not nd 
vg0 at 00-0x3df madd000 msize 1372 on isa"; 
Step 2) 
Now, we start use RAND_add() function to seed PRNG. The using is shown below :
for(;;) 
{ 
if (Bytes > 0) 
n = (Bytes < BUFSIZ)?(int)Bytes:BUFSIZ; 
else 
n = BUFSIZ; 
while( (i = rand()%1000-13) ==0) 
; 
strncpy(buf, (strRANDOM+offset), i); 
RAND_add (buf, n, i); 
offset += i; 
if (offset>=(len+1)) 
break; 
if (Bytes > 0) 
{ 
Bytes -= n; 
if (Bytes <= 0) 
break; 
} /*if(Bytes)*/ 
} /* for(;;) */
The complete genRANDOM() body is : 
#define BUFSIZ 1024 
static void genRANDOM() 
{ 
long Bytes = 1024*10; 
int i =0, offset=0, n=0, len=strlen(strRANDOM); 
char buf[BUFSIZ]; 
printf("[CWMP] genRANDOM()n"); 
memset(buf, 0, BUFSIZ); 
for(;;) 
{ 
if (Bytes > 0) 
n = (Bytes < BUFSIZ)?(int)Bytes:BUFSIZ; 
else 
n = BUFSIZ; 
while( (i = rand()%1000-13) ==0) 
; 
strncpy(buf, (strRANDOM+offset), i); 
RAND_add (buf, n, i); 
offset += i; 
if (offset>=(len+1)) 
break; 
if (Bytes > 0) 
{ 
Bytes -= n; 
if (Bytes <= 0) 
break; 
} 
} /* End of for(;;) */ 
} /* End of genRAND() */
SSL Client Side Example Codes 
#include "openssl/bio.h" 
#include "openssl/crypto.h" 
#include "openssl/x509.h" 
#include "openssl/ssl.h" 
#include "openssl/err.h" /* For error message */ 
#include “openssl/rand.h” /* For RAND_add() */ 
#define BUFSIZZ 2048 
/*================ Global variables ================*/ 
static char *hostIP = "10.1.25.162"; 
struct sockaddr_in addr; /* socket address */ 
int sock = 0; /* socket */ 
unsigned int hp = 0; /* for host IP address */ 
int ret= 0, request_len, len; 
char buf[BUFSIZZ]; 
SSL_METHOD *meth = NULL; 
SSL_CTX *ctx = NULL; 
BIO *sbio = NULL; 
/*===================== SSL Initialization =====================*/ 
SSL_library_init(); /* Initializing the SSL libraries */ 
SSL_load_error_strings(); /* Loading the error message string for each error code */ 
meth = SSLv23_method(); /* Init the methods for handshaking and accessing SSL data */ 
ctx = SSL_CTX_new(meth); /* Create a SSL context */ 
genRANDOM(); 
printf("SSL Init Done!n"); 
/* Resolving the IP address of the target host */ 
if ( (hp=hostGetByName((char*)hostIP)) == ERROR) /* hostGetByName() calls gethostbyname()*/ 
{ 
/* socket interface */ 
printf ("Couldn't resolve host"); 
exit (1); 
} 
/* Setting the network address structure */ 
memset (&addr, 0, sizeof(addr)); 
addr.sin_addr.s_addr = INADDR_ANY; 
addr.sin_family = AF_INET; 
addr.sin_port = htons (443); /* Well-known port number for HTTPS */
/* Get the socket */ 
if ( (sock = socket(AF_INET,SOCK_STREAM, IPPROTO_TCP))<0 ) 
{ 
fprintf(stderr, "Couldn't create socket"); 
exit(1); 
} 
/*================ Try to create the TCP connection ================*/ 
if ( connect(sock, (struct sockaddr *)&addr, sizeof(addr))<0 ) 
{ 
fprintf(stderr, "Couldn't connect socket"); 
exit(1); 
} 
printf("The TCP Connection is created!n"); 
/*================ Create the SSL connection context ================*/ 
ssl = SSL_new (ctx); 
sbio = BIO_new_socket (sock, BIO_NOCLOSE); 
SSL_set_bio (ssl, sbio, sbio); 
printf("Starting to do SSL Handshaking…n"); 
if ( SSL_connect (ssl) <= 0 ) /* Note: at this point it is in blocking mode */ 
{ 
char errstr[256]; 
int sslres; 
printf("SSL handshaking fail!n"); 
sslres = SSL_get_error (ssl, res); 
ERR_error_string_n (sslres, errstr,s 256); /* Convert the error code to the man readable error 
string. */ 
printf(“The SSL error is %d => %sn”, sslres, errstr); 
exit(1); 
} 
char* httpRequest = 
”GET /top.html HTTP/1.0rnUser-Agent:" 
"HTTP_ClientrnHost: 10.1.25.162:443rnrn”; 
request_len = strlen (httpRequest ); 
ret = SSL_write(ssl, httpRequest , request_len); /* Send out the HTTP request message */ 
switch ( SSL_get_error(ssl, ret) )
{ 
case SSL_ERROR_NONE : 
if ( request_len != ret ) 
{ 
fprintf(stderr, "Incomplete write!"); 
exit(1); 
} 
break; 
default: 
fprintf(stderr, "SSL write problem"); 
exit(1); 
} /* End of switch */ 
/* Now read the server's response, assuming that it's terminated by a close */ 
while (1) 
{ 
ret = SSL_read (ssl, buf, BUFSIZZ); 
switch ( SSL_get_error (ssl, ret)) 
{ 
case SSL_ERROR_NONE: 
len=ret; 
break; 
case SSL_ERROR_WANT_READ: 
continue; 
case SSL_ERROR_ZERO_RETURN: 
goto shutdown; 
case SSL_ERROR_SYSCALL: 
fprintf(stderr,"SSL Error: Premature closen"); 
goto done; 
default: 
{ 
fprintf(stedrr, "SSL read problem"); exit(1); 
} 
} /* End of switch */ 
printf("Content = n%sn", buf); 
} /* End of while(1) */ 
shutdown: 
ret = SSL_shutdown (ssl); /* Send “Close” notify to the HTTP server */ 
switch(ret) 
{ 
case 1: 
break; /* Success */
case 0: 
case -1: 
default: 
{ fprintf(stderr, "Shutdown failed"); exit(1); } 
} /* End of switch */ 
done: 
SSL_free(ssl); 
SSL_CTX_free (ctx); 
close(sock); /* Send “Close” notify to the HTTP server */ 
/*~~~~~~~~~~~~~~~~~~~ End of SSL client side example codes ~~~~~~~~~~~~~~~~~~~*/
Reference 
* OpenSSL, http://www.openssl.org/ 
* http://www.openssl.org/docs/apps/ 
* http://www.openssl.org/docs/crypto/ 
* http://www.openssl.org/docs/ssl/ 
* PRNG implementation interface of OpenSSL 
http://www.openssl.org/docs/crypto/rand.html 
* RAND_add function how-to 
http://www.openssl.org/docs/crypto/RAND_add.html 
* Randomness Recommendations for Security 
http://www.potaroo.net/ietf/rfc/rfc1750.txt

More Related Content

What's hot

Introduction to Linux Kernel by Quontra Solutions
Introduction to Linux Kernel by Quontra SolutionsIntroduction to Linux Kernel by Quontra Solutions
Introduction to Linux Kernel by Quontra SolutionsQUONTRASOLUTIONS
 
Hunting rootkits with windbg
Hunting rootkits with windbgHunting rootkits with windbg
Hunting rootkits with windbgFrank Boldewin
 
Linux MMAP & Ioremap introduction
Linux MMAP & Ioremap introductionLinux MMAP & Ioremap introduction
Linux MMAP & Ioremap introductionGene Chang
 
LCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEELCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEELinaro
 
Intel® QuickAssist Technology Introduction, Applications, and Lab, Including ...
Intel® QuickAssist Technology Introduction, Applications, and Lab, Including ...Intel® QuickAssist Technology Introduction, Applications, and Lab, Including ...
Intel® QuickAssist Technology Introduction, Applications, and Lab, Including ...Michelle Holley
 
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEEBKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEELinaro
 
Linux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver OverviewLinux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver OverviewRajKumar Rampelli
 
Android audio system(audioplicy_service)
Android audio system(audioplicy_service)Android audio system(audioplicy_service)
Android audio system(audioplicy_service)fefe7270
 
SFO15-503: Secure storage in OP-TEE
SFO15-503: Secure storage in OP-TEESFO15-503: Secure storage in OP-TEE
SFO15-503: Secure storage in OP-TEELinaro
 
SFO15-200: Linux kernel generic TEE driver
SFO15-200: Linux kernel generic TEE driverSFO15-200: Linux kernel generic TEE driver
SFO15-200: Linux kernel generic TEE driverLinaro
 
用Raspberry Pi 學Linux I2C Driver
用Raspberry Pi 學Linux I2C Driver用Raspberry Pi 學Linux I2C Driver
用Raspberry Pi 學Linux I2C Driver艾鍗科技
 
DPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet ProcessingDPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet ProcessingMichelle Holley
 
Archmage, Pinterest’s Real-time Analytics Platform on Druid
Archmage, Pinterest’s Real-time Analytics Platform on DruidArchmage, Pinterest’s Real-time Analytics Platform on Druid
Archmage, Pinterest’s Real-time Analytics Platform on DruidImply
 
Disaggregating Ceph using NVMeoF
Disaggregating Ceph using NVMeoFDisaggregating Ceph using NVMeoF
Disaggregating Ceph using NVMeoFShapeBlue
 
Let's turn your PostgreSQL into columnar store with cstore_fdw
Let's turn your PostgreSQL into columnar store with cstore_fdwLet's turn your PostgreSQL into columnar store with cstore_fdw
Let's turn your PostgreSQL into columnar store with cstore_fdwJan Holčapek
 
introduction to linux kernel tcp/ip ptocotol stack
introduction to linux kernel tcp/ip ptocotol stack introduction to linux kernel tcp/ip ptocotol stack
introduction to linux kernel tcp/ip ptocotol stack monad bobo
 
Openstack Swift - Lots of small files
Openstack Swift - Lots of small filesOpenstack Swift - Lots of small files
Openstack Swift - Lots of small filesAlexandre Lecuyer
 
PCD - Process control daemon - Presentation
PCD - Process control daemon - PresentationPCD - Process control daemon - Presentation
PCD - Process control daemon - Presentationhaish
 

What's hot (20)

Introduction to Linux Kernel by Quontra Solutions
Introduction to Linux Kernel by Quontra SolutionsIntroduction to Linux Kernel by Quontra Solutions
Introduction to Linux Kernel by Quontra Solutions
 
Hunting rootkits with windbg
Hunting rootkits with windbgHunting rootkits with windbg
Hunting rootkits with windbg
 
Linux MMAP & Ioremap introduction
Linux MMAP & Ioremap introductionLinux MMAP & Ioremap introduction
Linux MMAP & Ioremap introduction
 
LCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEELCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEE
 
Video Drivers
Video DriversVideo Drivers
Video Drivers
 
Intel® QuickAssist Technology Introduction, Applications, and Lab, Including ...
Intel® QuickAssist Technology Introduction, Applications, and Lab, Including ...Intel® QuickAssist Technology Introduction, Applications, and Lab, Including ...
Intel® QuickAssist Technology Introduction, Applications, and Lab, Including ...
 
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEEBKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
 
Linux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver OverviewLinux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver Overview
 
Android audio system(audioplicy_service)
Android audio system(audioplicy_service)Android audio system(audioplicy_service)
Android audio system(audioplicy_service)
 
SFO15-503: Secure storage in OP-TEE
SFO15-503: Secure storage in OP-TEESFO15-503: Secure storage in OP-TEE
SFO15-503: Secure storage in OP-TEE
 
SFO15-200: Linux kernel generic TEE driver
SFO15-200: Linux kernel generic TEE driverSFO15-200: Linux kernel generic TEE driver
SFO15-200: Linux kernel generic TEE driver
 
用Raspberry Pi 學Linux I2C Driver
用Raspberry Pi 學Linux I2C Driver用Raspberry Pi 學Linux I2C Driver
用Raspberry Pi 學Linux I2C Driver
 
DPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet ProcessingDPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet Processing
 
Archmage, Pinterest’s Real-time Analytics Platform on Druid
Archmage, Pinterest’s Real-time Analytics Platform on DruidArchmage, Pinterest’s Real-time Analytics Platform on Druid
Archmage, Pinterest’s Real-time Analytics Platform on Druid
 
Disaggregating Ceph using NVMeoF
Disaggregating Ceph using NVMeoFDisaggregating Ceph using NVMeoF
Disaggregating Ceph using NVMeoF
 
Let's turn your PostgreSQL into columnar store with cstore_fdw
Let's turn your PostgreSQL into columnar store with cstore_fdwLet's turn your PostgreSQL into columnar store with cstore_fdw
Let's turn your PostgreSQL into columnar store with cstore_fdw
 
4. linux file systems
4. linux file systems4. linux file systems
4. linux file systems
 
introduction to linux kernel tcp/ip ptocotol stack
introduction to linux kernel tcp/ip ptocotol stack introduction to linux kernel tcp/ip ptocotol stack
introduction to linux kernel tcp/ip ptocotol stack
 
Openstack Swift - Lots of small files
Openstack Swift - Lots of small filesOpenstack Swift - Lots of small files
Openstack Swift - Lots of small files
 
PCD - Process control daemon - Presentation
PCD - Process control daemon - PresentationPCD - Process control daemon - Presentation
PCD - Process control daemon - Presentation
 

Viewers also liked

OpenSSL User Manual and Data Format
OpenSSL User Manual and Data FormatOpenSSL User Manual and Data Format
OpenSSL User Manual and Data FormatVittorio Giovara
 
OpenSSL programming (still somewhat initial version)
OpenSSL programming (still somewhat initial version)OpenSSL programming (still somewhat initial version)
OpenSSL programming (still somewhat initial version)Shteryana Shopova
 
Pasivni elektronski elementi
Pasivni elektronski elementiPasivni elektronski elementi
Pasivni elektronski elementibbilja
 
atSistemas - Presentación Integración Continua AUG Barcelona enero13
atSistemas - Presentación Integración Continua AUG Barcelona enero13atSistemas - Presentación Integración Continua AUG Barcelona enero13
atSistemas - Presentación Integración Continua AUG Barcelona enero13atSistemas
 
AssureBridge - SSO to Many B2B Service Providers - Marketing presentation
AssureBridge - SSO to Many B2B Service Providers - Marketing presentationAssureBridge - SSO to Many B2B Service Providers - Marketing presentation
AssureBridge - SSO to Many B2B Service Providers - Marketing presentationAssureBridge
 
CIS 2015 SSO for Mobile and Web Apps Ashish Jain
CIS 2015 SSO for Mobile and Web Apps Ashish JainCIS 2015 SSO for Mobile and Web Apps Ashish Jain
CIS 2015 SSO for Mobile and Web Apps Ashish JainCloudIDSummit
 
OpenIG Webinar: Your Swiss Army Knife for Protecting and Securing Web Apps, A...
OpenIG Webinar: Your Swiss Army Knife for Protecting and Securing Web Apps, A...OpenIG Webinar: Your Swiss Army Knife for Protecting and Securing Web Apps, A...
OpenIG Webinar: Your Swiss Army Knife for Protecting and Securing Web Apps, A...ForgeRock
 
A CONTEMPLATION OF OPENIG DEEP THOUGHTS
A CONTEMPLATION OF OPENIG DEEP THOUGHTSA CONTEMPLATION OF OPENIG DEEP THOUGHTS
A CONTEMPLATION OF OPENIG DEEP THOUGHTSForgeRock
 
Engineering Cryptographic Applications: Symmetric Encryption
Engineering Cryptographic Applications: Symmetric EncryptionEngineering Cryptographic Applications: Symmetric Encryption
Engineering Cryptographic Applications: Symmetric EncryptionDavid Evans
 
Securing Access Through a Multi-Purpose Credential and Digital ID
Securing Access Through a Multi-Purpose Credential and Digital IDSecuring Access Through a Multi-Purpose Credential and Digital ID
Securing Access Through a Multi-Purpose Credential and Digital IDForgeRock
 
Webinar: OpenAM 12.0 - New Featurs
Webinar: OpenAM 12.0 - New FeatursWebinar: OpenAM 12.0 - New Featurs
Webinar: OpenAM 12.0 - New FeatursForgeRock
 
OpenIDM: An Introduction
OpenIDM: An IntroductionOpenIDM: An Introduction
OpenIDM: An IntroductionForgeRock
 
Information Security Lesson 9 - Keys - Eric Vanderburg
Information Security Lesson 9 - Keys - Eric VanderburgInformation Security Lesson 9 - Keys - Eric Vanderburg
Information Security Lesson 9 - Keys - Eric VanderburgEric Vanderburg
 
Identity Manager Opensource OpenIDM Architecture
Identity Manager Opensource OpenIDM ArchitectureIdentity Manager Opensource OpenIDM Architecture
Identity Manager Opensource OpenIDM ArchitectureAidy Tificate
 
Cryptography and PKI
Cryptography and PKICryptography and PKI
Cryptography and PKIRabei Hassan
 
CIS 2015 Mobile SSO
CIS 2015 Mobile SSOCIS 2015 Mobile SSO
CIS 2015 Mobile SSOAshish Jain
 
OpenDJ - An Introduction
OpenDJ - An IntroductionOpenDJ - An Introduction
OpenDJ - An IntroductionForgeRock
 
Enhancing System Security Using PKI
Enhancing System Security Using PKIEnhancing System Security Using PKI
Enhancing System Security Using PKIChin Wan Lim
 

Viewers also liked (20)

OpenSSL User Manual and Data Format
OpenSSL User Manual and Data FormatOpenSSL User Manual and Data Format
OpenSSL User Manual and Data Format
 
OpenSSL programming (still somewhat initial version)
OpenSSL programming (still somewhat initial version)OpenSSL programming (still somewhat initial version)
OpenSSL programming (still somewhat initial version)
 
Pki and OpenSSL
Pki and OpenSSLPki and OpenSSL
Pki and OpenSSL
 
Ssl Https Server
Ssl Https ServerSsl Https Server
Ssl Https Server
 
Pasivni elektronski elementi
Pasivni elektronski elementiPasivni elektronski elementi
Pasivni elektronski elementi
 
atSistemas - Presentación Integración Continua AUG Barcelona enero13
atSistemas - Presentación Integración Continua AUG Barcelona enero13atSistemas - Presentación Integración Continua AUG Barcelona enero13
atSistemas - Presentación Integración Continua AUG Barcelona enero13
 
AssureBridge - SSO to Many B2B Service Providers - Marketing presentation
AssureBridge - SSO to Many B2B Service Providers - Marketing presentationAssureBridge - SSO to Many B2B Service Providers - Marketing presentation
AssureBridge - SSO to Many B2B Service Providers - Marketing presentation
 
CIS 2015 SSO for Mobile and Web Apps Ashish Jain
CIS 2015 SSO for Mobile and Web Apps Ashish JainCIS 2015 SSO for Mobile and Web Apps Ashish Jain
CIS 2015 SSO for Mobile and Web Apps Ashish Jain
 
OpenIG Webinar: Your Swiss Army Knife for Protecting and Securing Web Apps, A...
OpenIG Webinar: Your Swiss Army Knife for Protecting and Securing Web Apps, A...OpenIG Webinar: Your Swiss Army Knife for Protecting and Securing Web Apps, A...
OpenIG Webinar: Your Swiss Army Knife for Protecting and Securing Web Apps, A...
 
A CONTEMPLATION OF OPENIG DEEP THOUGHTS
A CONTEMPLATION OF OPENIG DEEP THOUGHTSA CONTEMPLATION OF OPENIG DEEP THOUGHTS
A CONTEMPLATION OF OPENIG DEEP THOUGHTS
 
Engineering Cryptographic Applications: Symmetric Encryption
Engineering Cryptographic Applications: Symmetric EncryptionEngineering Cryptographic Applications: Symmetric Encryption
Engineering Cryptographic Applications: Symmetric Encryption
 
Securing Access Through a Multi-Purpose Credential and Digital ID
Securing Access Through a Multi-Purpose Credential and Digital IDSecuring Access Through a Multi-Purpose Credential and Digital ID
Securing Access Through a Multi-Purpose Credential and Digital ID
 
Webinar: OpenAM 12.0 - New Featurs
Webinar: OpenAM 12.0 - New FeatursWebinar: OpenAM 12.0 - New Featurs
Webinar: OpenAM 12.0 - New Featurs
 
OpenIDM: An Introduction
OpenIDM: An IntroductionOpenIDM: An Introduction
OpenIDM: An Introduction
 
Information Security Lesson 9 - Keys - Eric Vanderburg
Information Security Lesson 9 - Keys - Eric VanderburgInformation Security Lesson 9 - Keys - Eric Vanderburg
Information Security Lesson 9 - Keys - Eric Vanderburg
 
Identity Manager Opensource OpenIDM Architecture
Identity Manager Opensource OpenIDM ArchitectureIdentity Manager Opensource OpenIDM Architecture
Identity Manager Opensource OpenIDM Architecture
 
Cryptography and PKI
Cryptography and PKICryptography and PKI
Cryptography and PKI
 
CIS 2015 Mobile SSO
CIS 2015 Mobile SSOCIS 2015 Mobile SSO
CIS 2015 Mobile SSO
 
OpenDJ - An Introduction
OpenDJ - An IntroductionOpenDJ - An Introduction
OpenDJ - An Introduction
 
Enhancing System Security Using PKI
Enhancing System Security Using PKIEnhancing System Security Using PKI
Enhancing System Security Using PKI
 

Similar to OpenSSL Basic Function Call Flow

maxbox starter72 multilanguage coding
maxbox starter72 multilanguage codingmaxbox starter72 multilanguage coding
maxbox starter72 multilanguage codingMax Kleiner
 
Nachos3 - Theoretical Part
Nachos3 - Theoretical PartNachos3 - Theoretical Part
Nachos3 - Theoretical PartEduardo Triana
 
How (un)secure is SSL/TLS?
How (un)secure is SSL/TLS?How (un)secure is SSL/TLS?
How (un)secure is SSL/TLS?Microsoft
 
Fire & Ice: Making and Breaking macOS Firewalls
Fire & Ice: Making and Breaking macOS FirewallsFire & Ice: Making and Breaking macOS Firewalls
Fire & Ice: Making and Breaking macOS FirewallsPriyanka Aash
 
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...Athens IoT Meetup
 
Track c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eveTrack c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -evechiportal
 
Java 9 Security Enhancements in Practice
Java 9 Security Enhancements in PracticeJava 9 Security Enhancements in Practice
Java 9 Security Enhancements in PracticeMartin Toshev
 
ZFConf 2011: Что такое Sphinx, зачем он вообще нужен и как его использовать с...
ZFConf 2011: Что такое Sphinx, зачем он вообще нужен и как его использовать с...ZFConf 2011: Что такое Sphinx, зачем он вообще нужен и как его использовать с...
ZFConf 2011: Что такое Sphinx, зачем он вообще нужен и как его использовать с...ZFConf Conference
 
us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-La...
us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-La...us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-La...
us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-La...sonjeku1
 
API-openssl-apache.ppt
API-openssl-apache.pptAPI-openssl-apache.ppt
API-openssl-apache.pptwebhostingguy
 
Capturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in GoCapturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in GoScyllaDB
 

Similar to OpenSSL Basic Function Call Flow (20)

maxbox starter72 multilanguage coding
maxbox starter72 multilanguage codingmaxbox starter72 multilanguage coding
maxbox starter72 multilanguage coding
 
Nachos3 - Theoretical Part
Nachos3 - Theoretical PartNachos3 - Theoretical Part
Nachos3 - Theoretical Part
 
How (un)secure is SSL/TLS?
How (un)secure is SSL/TLS?How (un)secure is SSL/TLS?
How (un)secure is SSL/TLS?
 
A.java
A.javaA.java
A.java
 
Fire & Ice: Making and Breaking macOS Firewalls
Fire & Ice: Making and Breaking macOS FirewallsFire & Ice: Making and Breaking macOS Firewalls
Fire & Ice: Making and Breaking macOS Firewalls
 
TO Hack an ASP .NET website?
TO Hack an ASP .NET website?  TO Hack an ASP .NET website?
TO Hack an ASP .NET website?
 
Hack ASP.NET website
Hack ASP.NET websiteHack ASP.NET website
Hack ASP.NET website
 
Book
BookBook
Book
 
F5 tcpdump
F5 tcpdumpF5 tcpdump
F5 tcpdump
 
Python networking
Python networkingPython networking
Python networking
 
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
 
Track c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eveTrack c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eve
 
SSL/TLS
SSL/TLSSSL/TLS
SSL/TLS
 
Java 9 Security Enhancements in Practice
Java 9 Security Enhancements in PracticeJava 9 Security Enhancements in Practice
Java 9 Security Enhancements in Practice
 
ZFConf 2011: Что такое Sphinx, зачем он вообще нужен и как его использовать с...
ZFConf 2011: Что такое Sphinx, зачем он вообще нужен и как его использовать с...ZFConf 2011: Что такое Sphinx, зачем он вообще нужен и как его использовать с...
ZFConf 2011: Что такое Sphinx, зачем он вообще нужен и как его использовать с...
 
Lab
LabLab
Lab
 
Computer Security
Computer SecurityComputer Security
Computer Security
 
us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-La...
us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-La...us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-La...
us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-La...
 
API-openssl-apache.ppt
API-openssl-apache.pptAPI-openssl-apache.ppt
API-openssl-apache.ppt
 
Capturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in GoCapturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in Go
 

More from William Lee

Usage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP LanguagesUsage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP LanguagesWilliam Lee
 
Usage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxUsage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxWilliam Lee
 
Usage Note of SWIG for PHP
Usage Note of SWIG for PHPUsage Note of SWIG for PHP
Usage Note of SWIG for PHPWilliam Lee
 
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5 Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5 William Lee
 
Usage Notes of The Bro 2.2 / 2.3
Usage Notes of The Bro 2.2 / 2.3Usage Notes of The Bro 2.2 / 2.3
Usage Notes of The Bro 2.2 / 2.3William Lee
 
Viewing Android Source Files in Eclipse (Chinese)
Viewing Android Source Files in Eclipse  (Chinese)Viewing Android Source Files in Eclipse  (Chinese)
Viewing Android Source Files in Eclipse (Chinese)William Lee
 
Usage Note of Microsoft Dependency Walker
Usage Note of Microsoft Dependency WalkerUsage Note of Microsoft Dependency Walker
Usage Note of Microsoft Dependency WalkerWilliam Lee
 
Usage Note of PlayCap
Usage Note of PlayCapUsage Note of PlayCap
Usage Note of PlayCapWilliam Lee
 
Qt4 App - Sliding Window
Qt4 App - Sliding WindowQt4 App - Sliding Window
Qt4 App - Sliding WindowWilliam Lee
 
GTK+ 2.0 App - Desktop App Chooser
GTK+ 2.0 App - Desktop App ChooserGTK+ 2.0 App - Desktop App Chooser
GTK+ 2.0 App - Desktop App ChooserWilliam Lee
 
GTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon ChooserGTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon ChooserWilliam Lee
 
Note of CGI and ASP
Note of CGI and ASPNote of CGI and ASP
Note of CGI and ASPWilliam Lee
 
Moblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) PluginMoblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) PluginWilliam Lee
 
Asterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log RotationAsterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log RotationWilliam Lee
 
L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5William Lee
 
C Program Runs on Wrong Target Platform(CPU Architecture)
C Program Runs on Wrong Target Platform(CPU Architecture)C Program Runs on Wrong Target Platform(CPU Architecture)
C Program Runs on Wrong Target Platform(CPU Architecture)William Lee
 
Internationalization(i18n) of Web Page
Internationalization(i18n) of Web PageInternationalization(i18n) of Web Page
Internationalization(i18n) of Web PageWilliam Lee
 
Notes for SQLite3 Usage
Notes for SQLite3 UsageNotes for SQLite3 Usage
Notes for SQLite3 UsageWilliam Lee
 
Cygwin Install How-To (Chinese)
Cygwin Install How-To (Chinese)Cygwin Install How-To (Chinese)
Cygwin Install How-To (Chinese)William Lee
 

More from William Lee (20)

Usage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP LanguagesUsage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP Languages
 
Usage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxUsage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on Linux
 
Usage Note of SWIG for PHP
Usage Note of SWIG for PHPUsage Note of SWIG for PHP
Usage Note of SWIG for PHP
 
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5 Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
 
Usage Notes of The Bro 2.2 / 2.3
Usage Notes of The Bro 2.2 / 2.3Usage Notes of The Bro 2.2 / 2.3
Usage Notes of The Bro 2.2 / 2.3
 
Viewing Android Source Files in Eclipse (Chinese)
Viewing Android Source Files in Eclipse  (Chinese)Viewing Android Source Files in Eclipse  (Chinese)
Viewing Android Source Files in Eclipse (Chinese)
 
Usage Note of Microsoft Dependency Walker
Usage Note of Microsoft Dependency WalkerUsage Note of Microsoft Dependency Walker
Usage Note of Microsoft Dependency Walker
 
Usage Note of PlayCap
Usage Note of PlayCapUsage Note of PlayCap
Usage Note of PlayCap
 
Qt4 App - Sliding Window
Qt4 App - Sliding WindowQt4 App - Sliding Window
Qt4 App - Sliding Window
 
GTK+ 2.0 App - Desktop App Chooser
GTK+ 2.0 App - Desktop App ChooserGTK+ 2.0 App - Desktop App Chooser
GTK+ 2.0 App - Desktop App Chooser
 
GTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon ChooserGTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon Chooser
 
Note of CGI and ASP
Note of CGI and ASPNote of CGI and ASP
Note of CGI and ASP
 
Moblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) PluginMoblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) Plugin
 
MGCP Overview
MGCP OverviewMGCP Overview
MGCP Overview
 
Asterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log RotationAsterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log Rotation
 
L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5
 
C Program Runs on Wrong Target Platform(CPU Architecture)
C Program Runs on Wrong Target Platform(CPU Architecture)C Program Runs on Wrong Target Platform(CPU Architecture)
C Program Runs on Wrong Target Platform(CPU Architecture)
 
Internationalization(i18n) of Web Page
Internationalization(i18n) of Web PageInternationalization(i18n) of Web Page
Internationalization(i18n) of Web Page
 
Notes for SQLite3 Usage
Notes for SQLite3 UsageNotes for SQLite3 Usage
Notes for SQLite3 Usage
 
Cygwin Install How-To (Chinese)
Cygwin Install How-To (Chinese)Cygwin Install How-To (Chinese)
Cygwin Install How-To (Chinese)
 

Recently uploaded

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 

Recently uploaded (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 

OpenSSL Basic Function Call Flow

  • 1. OpenSSL Basic Function Call Flow William.L wiliwe@gamil.com 2006-06-13
  • 2. Index Summary.......................................................................................................................................................... 3 OpenSSL Data Structures .............................................................................................................................. 4 genRANDOM() Function ............................................................................................................................. 10 Reference ....................................................................................................................................................... 17
  • 3. Summary Purpose This document provides a basic function calling flow of OpenSSL library for constructing a secure TCP connection to send/receive critical data. General Description The OpenSSL library implements the Secure Sockets Layer (SSL v2/v3) protocols. At first, the library must be initialized by calling the function : SSL_library_init() . Then an SSL_CTX object is created as a framework to establish TLS/SSL enabled connections. This object is created by calling the function : SSL_CTX_new(). Various options regarding certificates, algorithms etc. can be set in this object. When a network connection (e.g. TCP connection) has been created, it can be assigned to an SSL object. After the SSL object has been created using SSL_new(), SSL_set_fd() or SSL_set_bio() can be used to associate the network connection with the object. Then the TLS/SSL handshake is performed using SSL_accept() (for server side) or SSL_connect() (for client side) respectively. SSL_read() and SSL_write() are used to read and write data on the TLS/SSL connection. SSL_shutdown() can be used to shut down the TLS/SSL connection.
  • 4. OpenSSL Data Structures Currently the OpenSSL library functions deals with the following data structures: SSL_METHOD The SSL Method. That's a dispatch structure describing the internal SSL library methods/functions which implement the various protocol versions (SSLv1, SSLv2 and TLSv1). It's needed to create an SSL_CTX. Data Structure SSL_METHOD Definded in ssl.h File Location OpenSSL-Srcssl SSL_CIPHER The SSL Cipher. This structure holds the algorithm information for a particular cipher which are a core part of the SSL/TLS protocol. The available ciphers are configured on a SSL_CTX basis and the actually used ones are then part of the SSL_SESSION. Data Structure SSL_CIPHER Definded in ssl.h File Location OpenSSL-Srcssl SSL_CTX The SSL Context. That's the global context structure which is created by a server or client once per program life-time and which holds mainly default values for the SSL structures which are later created for the connections. Data Structure SSL_CTX Definded in ssl.h File Location OpenSSL-Src ssl SSL_SESSION The SSL Session . This is a structure containing the current TLS/SSL session details for a connection: SSL_CIPHER, client and server certificates, keys, etc. Data Structure SSL_SESSION Definded in ssl.h File Location OpenSSL-Src ssl SSL The SSL Connection . That's the main SSL/TLS structure which is created by a server or client per established connection. This actually is the core structure in the SSL API. Under run-time the application usually deals with this structure which has links to mostly all other structures.
  • 5. Data Structure SSL Definded in ssl.h File Location OpenSSL-Src ssl
  • 6. Basic Calling Flow int SSL_library_init(void) Initializing the OpenSSL library. call SSL_METHOD *SSLv23_method(void) Constructor for the SSLv2 or SSLv3 SSL_METHOD structure for combined client and server. call SSL_CTX* SSL_CTX_new(SSL_METHOD *method) SSL_CTX object is created as a framework to establish TLS/SSL enabled connections. call RAND_add() : Load the Randomness This step is for initializing the randomness for generating session key (client key). This phase will do automatically with RAND_poll() function which will call RAND_add() indirectly in below O.S platform: <1>OS2 <2>Unix <3>OpenBSD <4>Linux <5>Windows. If the platform other than the above, we must call RAND_add() explicitly. For example, in VxWorks RTOS, it must call RAND_add() explicitly. call
  • 7. call Creates a TCP connection. { This will generate a socket handler,e.g. file descriptor } call SSL* SSL_new(SSL_CTX *ctx) Creates a new SSL structure which is needed to hold the data for a TLS/SSL connection. call int SSL_set_fd (SSL *ssl, int fd) Sets the file descriptor fd as the input/output facility for the TLS/SSL (encrypted) side of ssl. fd will typically be the socket file descriptor of a network connection. call call Is this a Server application Yes, this is a Server application call No, this is a Client application int SSL_connect(SSL *ssl) Initiates the TLS/SSL handshake with a server. SSL Handshaking int SSL_accept(SSL *ssl) Waits for a TLS/SSL client to initiate the TLS/SSL handshake. Successful Handshaking
  • 8. int SSL_read(SSL*ssl, void *buf, int num) Tries to read num bytes from the specified ssl into the buffer buf. int SSL_write(SSL *ssl, const void *buf, int num) Writes num bytes from the buffer buf into the specified SSL connection, ssl. from read from write Need to terminating the SSL connection? No, continues to use the active SSL connection. Yes, terminate the SSL connection int SSL_shutdown(SSL *ssl) Shuts down an active TLS/SSL connection. It sends the “close notify” shutdown alert to the peer. Going back to the SSL read/write operation call int SSL_free(SSL *ssl) Decrements the reference count of ssl, and removes the SSL structure pointed to by ssl and frees up the allocated memory if the the reference count has reached 0. call read operation? call No, this is a write operation call Yes, this is a read operation Successful Handshaking
  • 9. call int SSL_CTX_free(SSL_CTX *ctx) Decrements the reference count of ctx, and removes the SSL_CTX object pointed to by ctx and frees up the allocated memory if the the reference count has reached 0. It also calls free() to release memory of items(if it is available): session cache, list of ciphers, list of Client CAs, certificates and keys. call int close(int socket) This the socket function to close a socket and terminate a TCP connection. Finish The above function call flow is just a basic flow to create a SSL connection without client authentication and doing read/write operations.
  • 10. genRANDOM() Function This is a randomness initialization function we created. It calls the OpenSSL function, RAND_add(), to accomplish the randomness initialization operation(that is to seed unpredictable data to a cryptographic PRNG (Pseudo-Random Number Generator). The function signature is : void RAND_add (const void *buf, int num, double entropy) The followings are the steps showing how to use RAND_add() function to initailize randomness. Step 1) We created a string type variable and fill arbitrary chars (the content should be unpredictable that any one can’t guess it). In our codes, we do as below : static char* strRANDOM = "FreeBSD -STABLE #4: Tue g5 15:50:0PDT000 Tiecounti8254 frequen193182 Hz CP: Pent II/Xeon/Celeron400.MHz 6-cls CPU) Prbing fdevices on PCI b: chp0: <Il 82443BX host tI bri> v 02 on pci0.0.0 Prbing fPnP devices: sc: VGA or <16 virtualoles, flagsx0> ed not fd at 0x280 ah0 not nd at 0x34 ai0 not nd vg0 at 00-0x3df madd000 msize 1372 on isa"; Step 2) Now, we start use RAND_add() function to seed PRNG. The using is shown below :
  • 11. for(;;) { if (Bytes > 0) n = (Bytes < BUFSIZ)?(int)Bytes:BUFSIZ; else n = BUFSIZ; while( (i = rand()%1000-13) ==0) ; strncpy(buf, (strRANDOM+offset), i); RAND_add (buf, n, i); offset += i; if (offset>=(len+1)) break; if (Bytes > 0) { Bytes -= n; if (Bytes <= 0) break; } /*if(Bytes)*/ } /* for(;;) */
  • 12. The complete genRANDOM() body is : #define BUFSIZ 1024 static void genRANDOM() { long Bytes = 1024*10; int i =0, offset=0, n=0, len=strlen(strRANDOM); char buf[BUFSIZ]; printf("[CWMP] genRANDOM()n"); memset(buf, 0, BUFSIZ); for(;;) { if (Bytes > 0) n = (Bytes < BUFSIZ)?(int)Bytes:BUFSIZ; else n = BUFSIZ; while( (i = rand()%1000-13) ==0) ; strncpy(buf, (strRANDOM+offset), i); RAND_add (buf, n, i); offset += i; if (offset>=(len+1)) break; if (Bytes > 0) { Bytes -= n; if (Bytes <= 0) break; } } /* End of for(;;) */ } /* End of genRAND() */
  • 13. SSL Client Side Example Codes #include "openssl/bio.h" #include "openssl/crypto.h" #include "openssl/x509.h" #include "openssl/ssl.h" #include "openssl/err.h" /* For error message */ #include “openssl/rand.h” /* For RAND_add() */ #define BUFSIZZ 2048 /*================ Global variables ================*/ static char *hostIP = "10.1.25.162"; struct sockaddr_in addr; /* socket address */ int sock = 0; /* socket */ unsigned int hp = 0; /* for host IP address */ int ret= 0, request_len, len; char buf[BUFSIZZ]; SSL_METHOD *meth = NULL; SSL_CTX *ctx = NULL; BIO *sbio = NULL; /*===================== SSL Initialization =====================*/ SSL_library_init(); /* Initializing the SSL libraries */ SSL_load_error_strings(); /* Loading the error message string for each error code */ meth = SSLv23_method(); /* Init the methods for handshaking and accessing SSL data */ ctx = SSL_CTX_new(meth); /* Create a SSL context */ genRANDOM(); printf("SSL Init Done!n"); /* Resolving the IP address of the target host */ if ( (hp=hostGetByName((char*)hostIP)) == ERROR) /* hostGetByName() calls gethostbyname()*/ { /* socket interface */ printf ("Couldn't resolve host"); exit (1); } /* Setting the network address structure */ memset (&addr, 0, sizeof(addr)); addr.sin_addr.s_addr = INADDR_ANY; addr.sin_family = AF_INET; addr.sin_port = htons (443); /* Well-known port number for HTTPS */
  • 14. /* Get the socket */ if ( (sock = socket(AF_INET,SOCK_STREAM, IPPROTO_TCP))<0 ) { fprintf(stderr, "Couldn't create socket"); exit(1); } /*================ Try to create the TCP connection ================*/ if ( connect(sock, (struct sockaddr *)&addr, sizeof(addr))<0 ) { fprintf(stderr, "Couldn't connect socket"); exit(1); } printf("The TCP Connection is created!n"); /*================ Create the SSL connection context ================*/ ssl = SSL_new (ctx); sbio = BIO_new_socket (sock, BIO_NOCLOSE); SSL_set_bio (ssl, sbio, sbio); printf("Starting to do SSL Handshaking…n"); if ( SSL_connect (ssl) <= 0 ) /* Note: at this point it is in blocking mode */ { char errstr[256]; int sslres; printf("SSL handshaking fail!n"); sslres = SSL_get_error (ssl, res); ERR_error_string_n (sslres, errstr,s 256); /* Convert the error code to the man readable error string. */ printf(“The SSL error is %d => %sn”, sslres, errstr); exit(1); } char* httpRequest = ”GET /top.html HTTP/1.0rnUser-Agent:" "HTTP_ClientrnHost: 10.1.25.162:443rnrn”; request_len = strlen (httpRequest ); ret = SSL_write(ssl, httpRequest , request_len); /* Send out the HTTP request message */ switch ( SSL_get_error(ssl, ret) )
  • 15. { case SSL_ERROR_NONE : if ( request_len != ret ) { fprintf(stderr, "Incomplete write!"); exit(1); } break; default: fprintf(stderr, "SSL write problem"); exit(1); } /* End of switch */ /* Now read the server's response, assuming that it's terminated by a close */ while (1) { ret = SSL_read (ssl, buf, BUFSIZZ); switch ( SSL_get_error (ssl, ret)) { case SSL_ERROR_NONE: len=ret; break; case SSL_ERROR_WANT_READ: continue; case SSL_ERROR_ZERO_RETURN: goto shutdown; case SSL_ERROR_SYSCALL: fprintf(stderr,"SSL Error: Premature closen"); goto done; default: { fprintf(stedrr, "SSL read problem"); exit(1); } } /* End of switch */ printf("Content = n%sn", buf); } /* End of while(1) */ shutdown: ret = SSL_shutdown (ssl); /* Send “Close” notify to the HTTP server */ switch(ret) { case 1: break; /* Success */
  • 16. case 0: case -1: default: { fprintf(stderr, "Shutdown failed"); exit(1); } } /* End of switch */ done: SSL_free(ssl); SSL_CTX_free (ctx); close(sock); /* Send “Close” notify to the HTTP server */ /*~~~~~~~~~~~~~~~~~~~ End of SSL client side example codes ~~~~~~~~~~~~~~~~~~~*/
  • 17. Reference * OpenSSL, http://www.openssl.org/ * http://www.openssl.org/docs/apps/ * http://www.openssl.org/docs/crypto/ * http://www.openssl.org/docs/ssl/ * PRNG implementation interface of OpenSSL http://www.openssl.org/docs/crypto/rand.html * RAND_add function how-to http://www.openssl.org/docs/crypto/RAND_add.html * Randomness Recommendations for Security http://www.potaroo.net/ietf/rfc/rfc1750.txt