parameters: (path, name, cert, key, cacert)
docstring: Package and write out a .p12 file
docstring_summary: Package and write out a .p12 file
docstring_tokens: Package and write out a . p12 file
function: def create_pkcs12(path, name, cert, key, cacert):
      """ Package and write out a .p12 file """
      p12 = crypto.PKCS12()
      p12.set_certificate(cert)
      p12.set_privatekey(key)
      p12.set_friendlyname(name.encode('utf-8'))
      p12.set_ca_certificates([cacert])
      with open(path + name + '.p12', 'wb') as fhn:
          fhn.write(p12.export(passphrase=PASSPHRASE))
function_tokens: def create_pkcs12 ( path , name , cert , key , cacert ) : p12 = crypto . PKCS12 ( ) p12 . set_certificate ( cert ) p12 . set_privatekey ( key ) p12 . set_friendlyname ( name . encode ( 'utf-8' ) ) p12 . set_ca_certificates ( [ cacert ] ) with open ( path + name + '.p12' , 'wb' ) as fhn : fhn . write ( p12 . export ( passphrase = PASSPHRASE ) )