| Server IP : 77.68.64.21 / Your IP : 216.73.217.145 Web Server : Apache System : Linux hp3-wp-1011352.hostingp3.local 3.10.0-1160.144.1.el7.tuxcare.els9.x86_64 #1 SMP Fri Jul 10 17:06:31 UTC 2026 x86_64 User : csh2516497 ( 2094697) PHP Version : 8.3.30 Disable Function : shell_exec,exec,system,popen,set_time_limit MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib64/python2.7/site-packages/M2Crypto/SSL/ |
Upload File : |
"""SSL Ciphers
Copyright (c) 1999-2003 Ng Pheng Siong. All rights reserved."""
__all__ = ['Cipher', 'Cipher_Stack']
from M2Crypto import m2
class Cipher:
def __init__(self, cipher):
self.cipher=cipher
def __len__(self):
return m2.ssl_cipher_get_bits(self.cipher)
def __repr__(self):
return "%s-%s" % (self.name(), len(self))
def __str__(self):
return "%s-%s" % (self.name(), len(self))
def version(self):
return m2.ssl_cipher_get_version(self.cipher)
def name(self):
return m2.ssl_cipher_get_name(self.cipher)
class Cipher_Stack:
def __init__(self, stack):
self.stack=stack
def __len__(self):
return m2.sk_ssl_cipher_num(self.stack)
def __getitem__(self, idx):
if not 0 <= idx < m2.sk_ssl_cipher_num(self.stack):
raise IndexError('index out of range')
v=m2.sk_ssl_cipher_value(self.stack, idx)
return Cipher(v)
def __iter__(self):
for i in xrange(m2.sk_ssl_cipher_num(self.stack)):
yield self[i]