~exarkun/pyopenssl/trunk

« back to all changes in this revision

Viewing changes to doc/html/openssl-pkey.html

  • Committer: Jean-Paul Calderone
  • Date: 2011-09-02 15:43:50 UTC
  • mfrom: (156.1.5 release-0.13)
  • Revision ID: exarkun@twistedmatrix.com-20110902154350-rwick8zfl3dgyzva
Merge 0.13 release branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
2
<html>
3
3
<head>
4
 
<title>3.1.6 PKey objects </title>
5
 
<META NAME="description" CONTENT="3.1.6 PKey objects ">
 
4
<title>3.1.5 PKey objects </title>
 
5
<META NAME="description" CONTENT="3.1.5 PKey objects ">
6
6
<META NAME="keywords" CONTENT="pyOpenSSL">
7
7
<META NAME="resource-type" CONTENT="document">
8
8
<META NAME="distribution" CONTENT="global">
36
36
  border="0" height="32"
37
37
  alt="" width="32"></td>
38
38
</tr></table>
39
 
<b class="navlabel">Previous:</b> <a class="sectref" href="openssl-x509store.html">3.1.5 X509Store objects</A>
 
39
<b class="navlabel">Previous:</b> <a class="sectref" href="openssl-x509store.html">3.1.4 X509Store objects</A>
40
40
<b class="navlabel">Up:</b> <a class="sectref" href="openssl-crypto.html">3.1 crypto  </A>
41
 
<b class="navlabel">Next:</b> <a class="sectref" href="openssl-pkcs7.html">3.1.7 PKCS7 objects</A>
 
41
<b class="navlabel">Next:</b> <a class="sectref" href="openssl-pkcs7.html">3.1.6 PKCS7 objects</A>
42
42
<br><hr>
43
43
</DIV>
44
44
<!--End of Navigation Panel-->
45
45
 
46
 
<H3><A NAME="SECTION000416000000000000000">&nbsp;</A>
 
46
<H3><A NAME="SECTION000415000000000000000">&nbsp;</A>
47
47
<BR>
48
 
3.1.6 PKey objects 
 
48
3.1.5 PKey objects 
49
49
</H3>
50
50
 
51
51
<P>
52
52
The PKey object has the following methods:
53
53
 
54
54
<P>
55
 
<dl><dt><b><a name='l2h-82'><tt class='method'>bits</tt></a></b>()
 
55
<dl><dt><b><a name='l2h-81'><tt class='method'>bits</tt></a></b>()
56
56
<dd>
57
57
Return the number of bits of the key.
58
58
</dl>
59
59
 
60
60
<P>
61
 
<dl><dt><b><a name='l2h-83'><tt class='method'>generate_key</tt></a></b>(<var>type, bits</var>)
 
61
<dl><dt><b><a name='l2h-82'><tt class='method'>generate_key</tt></a></b>(<var>type, bits</var>)
62
62
<dd>
63
63
Generate a public/private key pair of the type <var>type</var> (one of
64
64
<tt class="constant">TYPE_RSA</tt> and <tt class="constant">TYPE_DSA</tt>) with the size <var>bits</var>.
65
65
</dl>
66
66
 
67
67
<P>
68
 
<dl><dt><b><a name='l2h-84'><tt class='method'>type</tt></a></b>()
 
68
<dl><dt><b><a name='l2h-83'><tt class='method'>type</tt></a></b>()
69
69
<dd>
70
70
Return the type of the key.
71
71
</dl>
72
72
 
73
73
<P>
 
74
<dl><dt><b><a name='l2h-84'><tt class='method'>check</tt></a></b>()
 
75
<dd>
 
76
Check the consistency of this key, returning True if it is consistent and
 
77
raising an exception otherwise.  This is only valid for RSA keys.  See the
 
78
OpenSSL RSA_check_key man page for further limitations.
 
79
</dl>
 
80
 
 
81
<P>
74
82
 
75
83
<DIV CLASS="navigation">
76
84
<p><hr>
96
104
  border="0" height="32"
97
105
  alt="" width="32"></td>
98
106
</tr></table>
99
 
<b class="navlabel">Previous:</b> <a class="sectref" href="openssl-x509store.html">3.1.5 X509Store objects</A>
 
107
<b class="navlabel">Previous:</b> <a class="sectref" href="openssl-x509store.html">3.1.4 X509Store objects</A>
100
108
<b class="navlabel">Up:</b> <a class="sectref" href="openssl-crypto.html">3.1 crypto  </A>
101
 
<b class="navlabel">Next:</b> <a class="sectref" href="openssl-pkcs7.html">3.1.7 PKCS7 objects</A>
 
109
<b class="navlabel">Next:</b> <a class="sectref" href="openssl-pkcs7.html">3.1.6 PKCS7 objects</A>
102
110
<hr>
103
 
<span class="release-info">Release 0.12.</span>
 
111
<span class="release-info">Release 0.13.</span>
104
112
</DIV>
105
113
<!--End of Navigation Panel-->
106
114