1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- This document was generated using DocBuilder 3.3.2 -->
<HTML>
<HEAD>
<TITLE>ssl_pkix</TITLE>
<SCRIPT type="text/javascript" src="../../../../doc/erlresolvelinks.js">
</SCRIPT>
<STYLE TYPE="text/css">
<!--
.REFBODY { margin-left: 13mm }
.REFTYPES { margin-left: 8mm }
-->
</STYLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#FF00FF"
ALINK="#FF0000">
<!-- refpage -->
<CENTER>
<A HREF="http://www.erlang.se">
<IMG BORDER=0 ALT="[Ericsson AB]" SRC="min_head.gif">
</A>
<H1>ssl_pkix</H1>
</CENTER>
<H3>MODULE</H3>
<DIV CLASS=REFBODY>
ssl_pkix
</DIV>
<H3>MODULE SUMMARY</H3>
<DIV CLASS=REFBODY>
Decoding of PKIX certificates with representation in
Erlang.
</DIV>
<H3>DESCRIPTION</H3>
<DIV CLASS=REFBODY>
<P> This module provides decoding of PKIX certificates either
provided as files or as binaries.
</DIV>
<H3>EXPORTS</H3>
<P><A NAME="decode_cert/1"><STRONG><CODE>decode_cert(Bin) -> {ok, Cert} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="decode_cert/2"><STRONG><CODE>decode_cert(Bin, Opts) -> {ok, Cert} | {error, Reason}</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Bin = binary()</CODE></STRONG><BR>
<STRONG><CODE>Opts = [pkix | ssl | subject]</CODE></STRONG><BR>
<STRONG><CODE>Cert = term()</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<P> <CODE>decode_cert(Bin)</CODE> is equivalent to
<CODE>decode_cert(Bin, [])</CODE>.
<P>
<P>The form of the returned certificate depends on the
options.
<P>If the options list is empty the certificate is returned as
a DER encoded binary, i.e. <CODE>{ok, Bin}</CODE> is returned,
where <CODE>Bin></CODE> is the provided input.
<P>The options <CODE>pkix</CODE> and <CODE>ssl</CODE> imply that the
certificate is returned as a parsed ASN.1 structure in the
form of an Erlang term.
<P>The <CODE>ssl</CODE> option gives a more elaborate return
structure, with more explicit information. In particular
object identifiers are replaced by atoms.
<P>The options <CODE>pkix</CODE>, and <CODE>ssl</CODE> are mutually
exclusive.
<P>The option <CODE>subject</CODE> implies that only the subject's
distinguished name part of the certificate is returned. It
can only be used together with the option <CODE>pkix</CODE> or the
option <CODE>ssl</CODE>.
</DIV>
<P><A NAME="decode_cert_file/1"><STRONG><CODE>decode_cert_file(File) -> {ok, Cert} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="decode_cert_file/2"><STRONG><CODE>decode_cert_file(File, Opts) -> {ok, Cert} | {error, Reason}</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>File = path()</CODE></STRONG><BR>
<STRONG><CODE>Opts = [pem | pkix | ssl | subject]</CODE></STRONG><BR>
<STRONG><CODE>Cert = term()</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<P> <CODE>decode_cert_file(File)</CODE> is equivalent to
<CODE>decode_cert_file(File, [])</CODE>.
<P>
<P>The form of the returned certificate depends on the
options.
<P>If the options list is empty the certificate is returned as
a DER encoded binary, i.e. the contents of the input
<CODE>File</CODE> is returned as a binary.
<P>The options <CODE>pkix</CODE> and <CODE>ssl</CODE> implies that the
certificate is returned as a parsed ASN.1 structure in the
form of an Erlang term.
<P>The <CODE>ssl</CODE> option gives a more elaborate return
structure, with more explicit information. In particular
object identifiers are replaced by atoms.
<P>The options <CODE>pkix</CODE>, and <CODE>ssl</CODE> are mutually
exclusive.
<P>The option <CODE>subject</CODE> implies that only the subject's
distinguished name part of the peer certificate is returned.
It can only be used together with the option <CODE>pkix</CODE> or
the option <CODE>ssl</CODE>.
</DIV>
<H3>AUTHORS</H3>
<DIV CLASS=REFBODY>
Peter Hgfeldt - support@erlang.ericsson.se<BR>
</DIV>
<CENTER>
<HR>
<SMALL>ssl 3.0.4<BR>
Copyright © 1991-2004
<A HREF="http://www.erlang.se">Ericsson AB</A><BR>
</SMALL>
</CENTER>
</BODY>
</HTML>
|