Name

pem_certificates_to_array — converts a PEM file to an array of PEM strings

Synopsis

pem_certificates_to_array ( in pem_string varchar );

Description

This gets a PEM file with (possibly) many X509 certificates among others and constructs an array containing each X509 certificate as a separate PEM string. This can serve for splitting a PEM file containing multiple certificates (for example CA file) to single certificate entries so it can be examined with get_certificate_info function. Note that the array can contain NULL elements in places where in the PEM file there are blocks other than X509 PEM certificates.

Parameters

pem_string

text of the PEM file

Return Types

Array of PEM strings

Errors

Table24.61.Errors signalled by pem_certificates_to_array

SQLState Error Code Error Text Description
42000 CR011 Can't allocate temp space. SSL error : <error text>
42000 CR012 Can't read certificates. SSL error : <error text>