用法:
SSLContext.get_ciphers()获取已启用密码的列表。该列表按密码优先级排序。见
SSLContext.set_ciphers()。例子:
>>> ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23) >>> ctx.set_ciphers('ECDHE+AESGCM:!ECDSA') >>> ctx.get_ciphers() [{'aead': True, 'alg_bits': 256, 'auth': 'auth-rsa', 'description': 'ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=RSA ' 'Enc=AESGCM(256) Mac=AEAD', 'digest': None, 'id': 50380848, 'kea': 'kx-ecdhe', 'name': 'ECDHE-RSA-AES256-GCM-SHA384', 'protocol': 'TLSv1.2', 'strength_bits': 256, 'symmetric': 'aes-256-gcm'}, {'aead': True, 'alg_bits': 128, 'auth': 'auth-rsa', 'description': 'ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=RSA ' 'Enc=AESGCM(128) Mac=AEAD', 'digest': None, 'id': 50380847, 'kea': 'kx-ecdhe', 'name': 'ECDHE-RSA-AES128-GCM-SHA256', 'protocol': 'TLSv1.2', 'strength_bits': 128, 'symmetric': 'aes-128-gcm'}]3.6 版中的新函数。
相关用法
- Python ssl.SSLContext.check_hostname用法及代码示例
- Python ssl.SSLContext.session_stats用法及代码示例
- Python ssl.SSLSocket.getpeercert用法及代码示例
- Python ssl.match_hostname用法及代码示例
- Python ssl.OPENSSL_VERSION_NUMBER用法及代码示例
- Python ssl.enum_certificates用法及代码示例
- Python ssl.cert_time_to_seconds用法及代码示例
- Python sklearn.cluster.MiniBatchKMeans用法及代码示例
- Python scipy.ndimage.binary_opening用法及代码示例
- Python scipy.signal.windows.tukey用法及代码示例
- Python scipy.stats.mood用法及代码示例
- Python str.isidentifier用法及代码示例
- Python sklearn.metrics.fbeta_score用法及代码示例
- Python scipy.fft.ihfftn用法及代码示例
- Python scipy.stats.normaltest用法及代码示例
- Python scipy.ndimage.convolve1d用法及代码示例
- Python scipy.stats.arcsine用法及代码示例
- Python scipy.interpolate.UnivariateSpline.antiderivative用法及代码示例
- Python scipy.linalg.hadamard用法及代码示例
- Python socket.create_server用法及代码示例
注:本文由纯净天空筛选整理自python.org大神的英文原创作品 ssl.SSLContext.get_ciphers。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
