Converts openssl ASN1_TIME object to python datetime.datetime

def _X509__asn1date_to_datetime(asn1date):
    """ 
    Converts openssl ASN1_TIME object to python datetime.datetime
    """
    bio = Membio()
    libcrypto.ASN1_TIME_print(bio.bio, asn1date)
    pydate = datetime.strptime(str(bio), "%b %d %H:%M:%S %Y %Z")
    return pydate.replace(tzinfo=utc)