Exemple #1
0
def load_pkcs7(p7file):
    bio = m2.bio_new_file(p7file, "r")
    if bio is None:
        raise BIO.BIOError(Err.get_error())

    try:
        p7_ptr = m2.pkcs7_read_bio(bio)
    finally:
        m2.bio_free(bio)

    if p7_ptr is None:
        raise PKCS7_Error(Err.get_error())
    return PKCS7(p7_ptr, 1)
Exemple #2
0
def load_pkcs7(p7file):
    bio = m2.bio_new_file(p7file, 'r')
    if bio is None:
        raise Err.get_error()

    try:
        p7_ptr = m2.pkcs7_read_bio(bio)
    finally:
        m2.bio_free(bio)
        
    if p7_ptr is None:
        raise Err.get_error()
    return PKCS7(p7_ptr, 1)
Exemple #3
0
def load_pkcs7(p7file):
    bio = m2.bio_new_file(p7file, 'r')
    if bio is None:
        raise Err.get_error()

    try:
        p7_ptr = m2.pkcs7_read_bio(bio)
    finally:
        m2.bio_free(bio)

    if p7_ptr is None:
        raise Err.get_error()
    return PKCS7(p7_ptr, 1)
Exemple #4
0
def load_pkcs7_bio(p7_bio):
    p7_ptr = m2.pkcs7_read_bio(p7_bio._ptr())
    if p7_ptr is None:
        raise PKCS7_Error(Err.get_error())
    return PKCS7(p7_ptr, 1)
Exemple #5
0
def load_pkcs7_bio(p7_bio):
    p7_ptr = m2.pkcs7_read_bio(p7_bio._ptr())
    if p7_ptr is None:
        raise Err.get_error()
    return PKCS7(p7_ptr, 1)