Beispiel #1
0
    def get_peer_certificate(self):
        """
        Return the peer's certificate.
        Directly calls OpenSSL's SSL_get_peer_certificate().

        @rtype: ctSSL.X509.X509
        @return: The peer's certificate.

        @raise ctSSLEmptyValue: OpenSSL returned a NULL pointer, meaning there's
        no peer certificate available for the current connection.
        """
        cert = X509.X509(libssl.SSL_get_peer_certificate(self._ssl_struct_p))
        return cert
Beispiel #2
0
#100557027
#Alexander Yan
#100649393
import symmetric
import SHA512
import X509
import TripleDES
import CaesarCipher

if __name__ == "__main__":
    while (True):
        print("1. 3DES encryption")
        print("2. AES encryption")
        print("3. SHA512")
        print("4. X509 certification")
        print("5. Caesar Cipher")
        print("0. Exit")
        x = int(input("Enter the numbmer corresponding task: "))
        if (x == 1):
            TripleDES.TripleDES()
        elif (x == 2):
            symmetric.AES()
        elif (x == 3):
            SHA512.SHA512()
        elif (x == 4):
            X509.X509()
        elif (x == 5):
            CaesarCipher.CaesarCipher()
        elif (x == 0):
            break