blob: d4cfcc0834f5d87da7dd1d843a30f1be2718538d [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>3.1.10 NetscapeSPKI objects </title>
<META NAME="description" CONTENT="3.1.10 NetscapeSPKI objects ">
<META NAME="keywords" CONTENT="pyOpenSSL">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<link rel="STYLESHEET" href="pyOpenSSL.css">
<LINK REL="next" href="crl.html">
<LINK REL="previous" href="openssl-509ext.html">
<LINK REL="up" href="openssl-crypto.html">
<LINK REL="next" href="crl.html">
</head>
<body>
<DIV CLASS="navigation">
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td><A href="openssl-509ext.html"><img src="previous.gif"
border="0" height="32"
alt="Previous Page" width="32"></A></td>
<td><A href="openssl-crypto.html"><img src="up.gif"
border="0" height="32"
alt="Up One Level" width="32"></A></td>
<td><A href="crl.html"><img src="next.gif"
border="0" height="32"
alt="Next Page" width="32"></A></td>
<td align="center" width="100%">Python OpenSSL Manual</td>
<td><A href="contents.html"><img src="contents.gif"
border="0" height="32"
alt="Contents" width="32"></A></td>
<td><img src="blank.gif"
border="0" height="32"
alt="" width="32"></td>
<td><img src="blank.gif"
border="0" height="32"
alt="" width="32"></td>
</tr></table>
<b class="navlabel">Previous:</b> <a class="sectref" href="openssl-509ext.html">3.1.9 X509Extension objects</A>
<b class="navlabel">Up:</b> <a class="sectref" href="openssl-crypto.html">3.1 crypto </A>
<b class="navlabel">Next:</b> <a class="sectref" href="crl.html">3.1.11 CRL objects</A>
<br><hr>
</DIV>
<!--End of Navigation Panel-->
<H3><A NAME="SECTION0004110000000000000000">&nbsp;</A>
<BR>
3.1.10 NetscapeSPKI objects
</H3>
<P>
NetscapeSPKI objects have the following methods:
<P>
<dl><dt><b><a name='l2h-101'><tt class='method'>b64_encode</tt></a></b>()
<dd>
Return a base64-encoded string representation of the object.
</dl>
<P>
<dl><dt><b><a name='l2h-102'><tt class='method'>get_pubkey</tt></a></b>()
<dd>
Return the public key of object.
</dl>
<P>
<dl><dt><b><a name='l2h-103'><tt class='method'>set_pubkey</tt></a></b>(<var>key</var>)
<dd>
Set the public key of the object to <var>key</var>.
</dl>
<P>
<dl><dt><b><a name='l2h-104'><tt class='method'>sign</tt></a></b>(<var>key, digest_name</var>)
<dd>
Sign the NetscapeSPKI object using the given <var>key</var> and
<var>digest_name</var>. <var>digest_name</var> must be a string describing a digest
algorithm supported by OpenSSL (by EVP_get_digestbyname, specifically). For
example, <tt class="constant">"md5"</tt> or <tt class="constant">"sha1"</tt>.
</dl>
<P>
<dl><dt><b><a name='l2h-105'><tt class='method'>verify</tt></a></b>(<var>key</var>)
<dd>
Verify the NetscapeSPKI object using the given <var>key</var>.
</dl>
<P>
<DIV CLASS="navigation">
<p><hr>
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td><A href="openssl-509ext.html"><img src="previous.gif"
border="0" height="32"
alt="Previous Page" width="32"></A></td>
<td><A href="openssl-crypto.html"><img src="up.gif"
border="0" height="32"
alt="Up One Level" width="32"></A></td>
<td><A href="crl.html"><img src="next.gif"
border="0" height="32"
alt="Next Page" width="32"></A></td>
<td align="center" width="100%">Python OpenSSL Manual</td>
<td><A href="contents.html"><img src="contents.gif"
border="0" height="32"
alt="Contents" width="32"></A></td>
<td><img src="blank.gif"
border="0" height="32"
alt="" width="32"></td>
<td><img src="blank.gif"
border="0" height="32"
alt="" width="32"></td>
</tr></table>
<b class="navlabel">Previous:</b> <a class="sectref" href="openssl-509ext.html">3.1.9 X509Extension objects</A>
<b class="navlabel">Up:</b> <a class="sectref" href="openssl-crypto.html">3.1 crypto </A>
<b class="navlabel">Next:</b> <a class="sectref" href="crl.html">3.1.11 CRL objects</A>
<hr>
<span class="release-info">Release 0.12.</span>
</DIV>
<!--End of Navigation Panel-->
</BODY>
</HTML>