/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to mandos

merge + small bugfix

Show diffs side-by-side

added added

removed removed

Lines of Context:
410
410
    gnutls.library.functions.gnutls_openpgp_crt_import\
411
411
                    (crt, ctypes.byref(datum),
412
412
                     gnutls.library.constants.GNUTLS_OPENPGP_FMT_RAW)
 
413
    # Verify the self signature in the key
 
414
    crtverify = ctypes.c_uint();
 
415
    gnutls.library.functions.gnutls_openpgp_crt_verify_self\
 
416
        (crt, ctypes.c_uint(0), ctypes.byref(crtverify))
 
417
    if crtverify != 0:
 
418
        gnutls.library.functions.gnutls_openpgp_crt_deinit(crt)
 
419
        raise gnutls.errors.CertificateSecurityError("Verify failed")
413
420
    # New buffer for the fingerprint
414
421
    buffer = ctypes.create_string_buffer(20)
415
422
    buffer_length = ctypes.c_size_t()