Lines Matching refs:crypto
43 from OpenSSL import crypto, SSL
50 FILETYPE_PEM = crypto.FILETYPE_PEM
89 return crypto.load_privatekey(filetype, key)
94 return crypto.load_certificate(filetype, cert_str)
99 return crypto.dump_privatekey(filetype, key)
104 return crypto.dump_certificate(filetype, cert)
119 key = crypto.PKey()
120 key.generate_key(crypto.TYPE_RSA, 1024)
122 ca_cert = crypto.X509()
132 crypto.X509Extension('basicConstraints', True, 'CA:TRUE'),
133 crypto.X509Extension('subjectAltName', False, 'DNS:' + subject),
134 crypto.X509Extension('nsCertType', True, 'sslCA'),
135 crypto.X509Extension('extendedKeyUsage', True,
139 crypto.X509Extension('keyUsage', False, 'keyCertSign, cRLSign'),
140 crypto.X509Extension('subjectKeyIdentifier', False, 'hash',
216 p12 = crypto.PKCS12()
251 cert = crypto.X509()