This change introduces the implementation of the SSLConnection methods getpeercert and cipher. The following has been added: * dtls.util: utility elements shared by other modules in this package * dtls.x509: a module for X509-certificate-related functionality, including formatting a certificate into a Python dictionary as prescribed by the Python standard library's ssl module; functionality for testing with PEM-encoded certificates in the file system is included * yahoo-cert.pem: the current certificate of www.yahoo.com: this is a good testing certificate, since it contains the subject alternate name extension Other notable changes: * sslconnection: private attributes are now preceded by "_" * openssl: null-ness in opaque FuncParam-derived return values is now properly detected and an exception is raised as expected
32 lines
692 B
Python
32 lines
692 B
Python
# PyDTLS reloader. Written by Ray Brown.
|
|
"""PyDTLS package reloader
|
|
|
|
This script reloads all modules of the DTLS package. This can be useful in
|
|
runtime environments that usually persist across package file edits, such as
|
|
the IPython shell.
|
|
"""
|
|
|
|
import dtls
|
|
import dtls.err
|
|
import dtls.util
|
|
import dtls.sslconnection
|
|
import dtls.x509
|
|
import dtls.openssl
|
|
import dtls.demux
|
|
import dtls.demux.router
|
|
|
|
def main():
|
|
reload(dtls)
|
|
reload(dtls.err)
|
|
reload(dtls.util)
|
|
reload(dtls.sslconnection)
|
|
reload(dtls.x509)
|
|
reload(dtls.openssl)
|
|
reload(dtls.demux)
|
|
reload(dtls.demux.router)
|
|
reload(dtls.sslconnection)
|
|
reload(dtls.x509)
|
|
|
|
if __name__ == "__main__":
|
|
main()
|