X509getsubjectname returns the subject name of certificate x. The returned value is an internal pointer which MUST NOT be freed. X509setsubjectname sets the issuer name of certificate x to name. The name parameter is copied internally and should be freed up when it is no longer needed.
OpenSSL 1.1.0 provides built-in functionality for hostname checking and validation. Viktor Dukhovni provided the implementation in January, 2015. Contribute to franza/franza.github.io development by creating an account on GitHub.
Introduction
The example 'C' program certstack.c demonstrates how to load a list of X509 certificates, using the OpenSSL library functions.This is typically useful when we need to work with a collection of trusted Root CA certificates.
Example Code Listing
Compiling the Code
Compile the test program with:
X509 Version 1
Example Output
The program expects a certificate file called cabundle.pem in the same directory. After the file is loaded into a stack, we will cycle through it and print a list of the subjects common name (CN). I used the current Verisign CA certificate bundle for the test example below.
Remarks
X509_name_oneline(x509_get_subject_name
Compile the test program with:
X509 Version 1
Example Output
The program expects a certificate file called cabundle.pem in the same directory. After the file is loaded into a stack, we will cycle through it and print a list of the subjects common name (CN). I used the current Verisign CA certificate bundle for the test example below.
Remarks
X509_name_oneline(x509_get_subject_name
X509 Subject Field
Another good example of a Root CA certificate bundle is the one included with the Linux distribution. In OpenSuse, this is the file /etc/ssl/ca-bundle.pem .