1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
4
<title>3.1.7 PKCS12 objects </title>
5
<META NAME="description" CONTENT="3.1.7 PKCS12 objects ">
6
<META NAME="keywords" CONTENT="pyOpenSSL">
7
<META NAME="resource-type" CONTENT="document">
8
<META NAME="distribution" CONTENT="global">
9
<link rel="STYLESHEET" href="pyOpenSSL.css">
10
<LINK REL="next" href="openssl-509ext.html">
11
<LINK REL="previous" href="openssl-pkcs7.html">
12
<LINK REL="up" href="openssl-crypto.html">
13
<LINK REL="next" href="openssl-509ext.html">
16
<DIV CLASS="navigation">
17
<table align="center" width="100%" cellpadding="0" cellspacing="2">
19
<td><A href="openssl-pkcs7.html"><img src="previous.gif"
20
border="0" height="32"
21
alt="Previous Page" width="32"></A></td>
22
<td><A href="openssl-crypto.html"><img src="up.gif"
23
border="0" height="32"
24
alt="Up One Level" width="32"></A></td>
25
<td><A href="openssl-509ext.html"><img src="next.gif"
26
border="0" height="32"
27
alt="Next Page" width="32"></A></td>
28
<td align="center" width="100%">Python OpenSSL Manual</td>
29
<td><A href="contents.html"><img src="contents.gif"
30
border="0" height="32"
31
alt="Contents" width="32"></A></td>
32
<td><img src="blank.gif"
33
border="0" height="32"
34
alt="" width="32"></td>
35
<td><img src="blank.gif"
36
border="0" height="32"
37
alt="" width="32"></td>
39
<b class="navlabel">Previous:</b> <a class="sectref" href="openssl-pkcs7.html">3.1.6 PKCS7 objects</A>
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-509ext.html">3.1.8 X509Extension objects</A>
44
<!--End of Navigation Panel-->
46
<H3><A NAME="SECTION000417000000000000000"> </A>
52
PKCS12 objects have the following methods:
55
<dl><dt><b><a name='l2h-90'><tt class='method'>export</tt></a></b>(<big>[</big><var>passphrase=None</var><big>]</big><big>[</big><var>, iter=2048</var><big>]</big><big>[</big><var>, maciter=1</var><big>]</big>)
57
Returns a PKCS12 object as a string.
60
The optional <var>passphrase</var> must be a string not a callback.
63
See also the man page for the C function <tt class="function">PKCS12_create</tt>.
67
<dl><dt><b><a name='l2h-91'><tt class='method'>get_ca_certificates</tt></a></b>()
69
Return CA certificates within the PKCS12 object as a tuple. Returns
70
<tt class="constant">None</tt> if no CA certificates are present.
74
<dl><dt><b><a name='l2h-92'><tt class='method'>get_certificate</tt></a></b>()
76
Return certificate portion of the PKCS12 structure.
80
<dl><dt><b><a name='l2h-93'><tt class='method'>get_friendlyname</tt></a></b>()
82
Return friendlyName portion of the PKCS12 structure.
86
<dl><dt><b><a name='l2h-94'><tt class='method'>get_privatekey</tt></a></b>()
88
Return private key portion of the PKCS12 structure
92
<dl><dt><b><a name='l2h-95'><tt class='method'>set_ca_certificates</tt></a></b>(<var>cacerts</var>)
94
Replace or set the CA certificates within the PKCS12 object with the sequence <var>cacerts</var>.
97
Set <var>cacerts</var> to <tt class="constant">None</tt> to remove all CA certificates.
101
<dl><dt><b><a name='l2h-96'><tt class='method'>set_certificate</tt></a></b>(<var>cert</var>)
103
Replace or set the certificate portion of the PKCS12 structure.
107
<dl><dt><b><a name='l2h-97'><tt class='method'>set_friendlyname</tt></a></b>(<var>name</var>)
109
Replace or set the friendlyName portion of the PKCS12 structure.
113
<dl><dt><b><a name='l2h-98'><tt class='method'>set_privatekey</tt></a></b>(<var>pkey</var>)
115
Replace or set private key portion of the PKCS12 structure
120
<DIV CLASS="navigation">
122
<table align="center" width="100%" cellpadding="0" cellspacing="2">
124
<td><A href="openssl-pkcs7.html"><img src="previous.gif"
125
border="0" height="32"
126
alt="Previous Page" width="32"></A></td>
127
<td><A href="openssl-crypto.html"><img src="up.gif"
128
border="0" height="32"
129
alt="Up One Level" width="32"></A></td>
130
<td><A href="openssl-509ext.html"><img src="next.gif"
131
border="0" height="32"
132
alt="Next Page" width="32"></A></td>
133
<td align="center" width="100%">Python OpenSSL Manual</td>
134
<td><A href="contents.html"><img src="contents.gif"
135
border="0" height="32"
136
alt="Contents" width="32"></A></td>
137
<td><img src="blank.gif"
138
border="0" height="32"
139
alt="" width="32"></td>
140
<td><img src="blank.gif"
141
border="0" height="32"
142
alt="" width="32"></td>
144
<b class="navlabel">Previous:</b> <a class="sectref" href="openssl-pkcs7.html">3.1.6 PKCS7 objects</A>
145
<b class="navlabel">Up:</b> <a class="sectref" href="openssl-crypto.html">3.1 crypto </A>
146
<b class="navlabel">Next:</b> <a class="sectref" href="openssl-509ext.html">3.1.8 X509Extension objects</A>
148
<span class="release-info">Release 0.13.</span>
150
<!--End of Navigation Panel-->