/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

  • Committer: Teddy Hogeborn
  • Date: 2008-08-24 10:49:09 UTC
  • mfrom: (24.1.63 mandos)
  • Revision ID: teddy@fukt.bsnet.se-20080824104909-loh761dpgglkvos1
* mandos (fingerprint): Bug fix: Check crtverify.value, not crtverify.

* mandos-keygen (password): Also print "host = ".

* plugins.d/password-request.c (pgp_packet_decrypt): Only print
                                                     detailed result
                                                     of decryption if
                                                     it failed.

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.value != 0:
 
418
        tmp = open("/tmp/tmp.gpg", "w")
 
419
        tmp.write(openpgp)
 
420
        tmp.close()
 
421
        gnutls.library.functions.gnutls_openpgp_crt_deinit(crt)
 
422
        raise gnutls.errors.CertificateSecurityError("Verify failed")
413
423
    # New buffer for the fingerprint
414
424
    buffer = ctypes.create_string_buffer(20)
415
425
    buffer_length = ctypes.c_size_t()