📄 ne_ssl_cert_identity.3
字号:
.\"Generated by db2man.xsl. Don't modify this, modify the source..de Sh \" Subsection.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...de Sp \" Vertical space (when we can't use .PP).if t .sp .5v.if n .sp...de Ip \" List item.br.ie \\n(.$>=3 .ne \\$3.el .ne 3.IP "\\$1" \\$2...TH "NE_SSL_CERT_IDENTI" 3 "5 July 2004" "neon 0.24.7" "neon API reference".SH NAMEne_ssl_cert_identity, ne_ssl_cert_signedby, ne_ssl_cert_issuer, ne_ssl_cert_subject \- functions to access certificate properties.SH "SYNOPSIS".ad l.hy 0#include <ne_ssl\&.h>.sp.HP 35const\ char\ *\fBne_ssl_cert_identity\fR\ (const\ ne_ssl_certificate\ *\fIcert\fR);.HP 49const\ ne_ssl_certificate\ *\fBne_ssl_cert_signedby\fR\ (const\ ne_ssl_certificate\ *\fIcert\fR);.HP 42const\ ne_ssl_dname\ *\fBne_ssl_cert_subject\fR\ (const\ ne_ssl_certificate\ *\fIcert\fR);.HP 41const\ ne_ssl_dname\ *\fBne_ssl_cert_issuer\fR\ (const\ ne_ssl_certificate\ *\fIcert\fR);.ad.hy.SH "DESCRIPTION".PPThe function \fBne_ssl_cert_identity\fR retrieves the ``identity'' of a certificate; for an SSL server certificate, this will be the hostname for which the certificate was issued\&. In PKI parlance, the identity is the common name attribute of the distinguished name of the certificate subject\&..PPThe functions \fBne_ssl_cert_subject\fR and \fBne_ssl_cert_issuer\fR can be used to access the objects representing the distinguished name of the subject and of the issuer of a certificate, respectively\&..PPIf a certificate object is part of a certificate chain, then \fBne_ssl_cert_signedby\fR can be used to find the certificate which signed a particular certificate\&. For a self\-signed certificate or a certificate for which the full chain is not available, this function will return NULL\&..SH "RETURN VALUE".PP\fBne_ssl_cert_issuer\fR and \fBne_ssl_cert_subject\fR are guaranteed to never return NULL\&. \fBne_ssl_cert_identity\fR may return NULL if the certificate has no specific ``identity''\&. \fBne_ssl_cert_signedby\fR may return NULL as covered above\&..SH "EXAMPLES".PPThe following function could be used to display information about a given certificate:.nfvoid dump_cert(const ne_ssl_certificate *cert) { const char *id = ne_ssl_cert_identity(cert); char *dn; if (id) printf("Certificate was issued for '%s'\&.\\n", id); dn = ne_ssl_readable_dname(ne_ssl_cert_subject(cert)); printf("Subject: %s\\n", dn); free(dn); dn = ne_ssl_readable_dname(ne_ssl_cert_issuer(cert)); printf("Issuer: %s\\n", dn); free(dn);}.fi.SH "SEE ALSO".PP\fBne_ssl_cert_cmp\fR(3), \fBne_ssl_readable_dname\fR(3).SH AUTHORJoe Orton <neon@webdav\&.org>.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -