Did I find the right examples for you? yes no

All Samples(182)  |  Call(0)  |  Derive(0)  |  Import(182)
M2Crypto is the most complete Python wrapper for OpenSSL featuring RSA, DSA,
DH, EC, HMACs, message digests, symmetric ciphers (including AES); SSL
functionality to implement clients and servers; HTTPS extensions to
Python's httplib, urllib, and xmlrpclib; unforgeable HMAC'ing AuthCookies
for web session management; FTP/TLS client and server; S/MIME; ZServerSSL:
A HTTPS server for Zope and ZSmime: An S/MIME messenger for Zope.
M2Crypto can also be used to provide SSL for Twisted. Smartcards supported
through the Engine interface.

Copyright (c) 1999-2004 Ng Pheng Siong. All rights reserved.(more...)

src/m/2/M2Crypto-HEAD/examples/x509/x509auth.py   M2Crypto(Download)
#
#----------------------------------------------------------------
import M2Crypto
import random
import base64

src/m/2/M2Crypto-HEAD/examples/perf/sha1.py   M2Crypto(Download)
 
from sha import sha
import M2Crypto
from M2Crypto import m2
from M2Crypto.EVP import MessageDigest

src/p/u/pulp-HEAD/playpen/certs/crl_example/verify.py   pulp(Download)
 
#sys.path.insert(0, "/shared/repo/m2crypto/m2crypto/build/lib.linux-x86_64-2.7")
import M2Crypto
 
from pulp_rpm.repo_auth.repo_cert_utils import RepoCertUtils

src/p/y/python-symmetric-jsonrpc-HEAD/examples/ssl_client.py   python-symmetric-jsonrpc(Download)
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim: set fileencoding=UTF-8 :
 
import M2Crypto

src/p/y/python-symmetric-jsonrpc-HEAD/examples/server_emulate.py   python-symmetric-jsonrpc(Download)
if '--ssl' in sys.argv:
    # Set up a SSL socket
    import M2Crypto
    ctx = M2Crypto.SSL.Context()
    ctx.load_cert('server.pem', 'server.key')

src/p/y/python-symmetric-jsonrpc-HEAD/examples/server.py   python-symmetric-jsonrpc(Download)
if '--ssl' in sys.argv:
    # Set up a SSL socket
    import M2Crypto
    ctx = M2Crypto.SSL.Context()
    ctx.load_cert('server.pem', 'server.key')

src/p/y/python-symmetric-jsonrpc-HEAD/examples/client_emulate.py   python-symmetric-jsonrpc(Download)
if '--ssl' in sys.argv:
    # Set up an SSL connection
    import M2Crypto
 
    ctx = M2Crypto.SSL.Context()

src/p/y/python-symmetric-jsonrpc-HEAD/examples/client.py   python-symmetric-jsonrpc(Download)
if '--ssl' in sys.argv:
    # Set up an SSL connection
    import M2Crypto
    ctx = M2Crypto.SSL.Context()
    ctx.set_verify(M2Crypto.SSL.verify_peer | M2Crypto.SSL.verify_fail_if_no_peer_cert, depth=9)

src/f/l/flask-skeleton-HEAD/default_settings.py   flask-skeleton(Download)
if len(BROWSER_SECRET_KEY) < 16:
    # Generate a a good key
    import M2Crypto, os, re
    randpw = re.sub(os.linesep, '', M2Crypto.m2.rand_bytes(24).encode('base64').rstrip())
    print "Generating a random password for BROWSER_SECRET_KEY. Copy/paste the following commands to setup a random non-fail password."
if len(DB_PASS) < 8:
    # Generate a 29char random password. Good enough.
    import M2Crypto, os, re
    randpw = re.sub(os.linesep, '', M2Crypto.m2.rand_bytes(24).encode('base64').rstrip())
    print "Generating a random password for DB_PASS. Copy/paste the following commands to setup a random non-fail password."
if len(PASSWORD_HASH) < 32:
    # Generate a decently long random secret.
    import M2Crypto, os, re
    randsec = re.sub(os.linesep, '', M2Crypto.m2.rand_bytes(256).encode('base64').rstrip())
    print "Generating a random secret for PASSWORD_HASH. Copy/paste the following commands to setup a random non-fail secret.\n"
if len(SECRET_KEY) < 32:
    # Generate a decently long random secret.
    import M2Crypto, os, re
    randsec = re.sub(os.linesep, '', M2Crypto.m2.rand_bytes(256).encode('base64').rstrip())
    print "Generating a random secret for SECRET_KEY. Copy/paste the following commands to setup a random non-fail secret.\n"

src/o/c/ocf-HEAD/vt_manager/src/python/vt_manager/communication/sfa/trust/certificate.py   ocf(Download)
 
from OpenSSL import crypto
import M2Crypto
from M2Crypto import X509
 

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next