neon API reference NESLCERTREAD(3)
NAME
nesslcertread, nesslcertwrite, nesslcertimport,
nesslcertexport - functions to read or write certificates
to and from files or strings
SYNOPSIS
#include
nesslcertificate *nesslcertread (const char *filename);
int nesslcertwrite (const nesslcertificate *cert,
const char *filename);
nesslcertificate *nesslcertimport (const char *data);
char *nesslcertexport (const nesslcertificate *cert);
DESCRIPTION
The nesslcertwrite function writes a certificate to a
file using the PEM encoding. The nesslcertexport function
returns a base64-encoded NUL-terminated string representing
the certificate. This string is malloc-allocated and should
be destroyed using free by the caller.
The nesslcertread function reads a certificate from a
PEM-encoded file, and returns a certificate object. The
nesslcertimport function returns a certificate object
from a base64-encoded string, data, as returned by
nesslcertexport. The certificate object returned by these
functions should be destroyed using nesslcertfree(3)
after use.
RETURN VALUE
nesslcertread returns NUL if a certificate could not be
read from the file. nesslcertwrite returns non-zero if
the certificate could not be written to the file.
nesslcertexport always returns a NUL-terminated string,
and never NUL. nesslcertimport returns NUL if the
string was not a valid base64-encoded certificate.
ENCODING FORMATS
The string produced by nesslcertexport is the base64 en-
coding of the DER representation of the certificate. The
file written by nesslcertwrite uses the PEM format: this
is the base64 encoding of the DER representation with new-
lines every 64 characters, and start and end marker lines.
neon 0.25.5 Last change: 20 January 2006 1
neon API reference NESLCERTREAD(3)
AUTHOR
Joe Orton .
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
box; cbp-1 cbp-1 l l . ATRIBUTE TYPE ATRIBUTE VALUE =
Availability SUNWneon = Interface Stability Volatile
NOTES
Source for Neon is available on http:/opensolaris.org.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Availability SUNWneon
Interface Stability Volatile
NOTES
Source for Neon is available on http:/opensolaris.org.
neon 0.25.5 Last change: 20 January 2006 2
|