gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] (fairly minor) SECURITY ISSUE


From: James Blackwell
Subject: Re: [Gnu-arch-users] (fairly minor) SECURITY ISSUE
Date: Tue, 20 Jan 2004 21:09:58 -0500
User-agent: Mutt/1.5.5.1+cvs20040105i

> 
>   -----BEGIN PGP SIGNED MESSAGE-----
>   Hash: SHA1
> 
>   Signature-for: address@hidden/tla--devo--1.2--patch-42
>   md5 log 125cdb8180b8c02741531aa2b2b547ca
>   md5 tla--devo--1.2--patch-42.patches.tar.gz b49b6cc662454ca8ffa91269be75a4f4
>   -----BEGIN PGP SIGNATURE-----
>   Version: GnuPG v1.2.2 (FreeBSD)
> 
>   iD8DBQE/76rkYiL4ten68SkRAsswAKCSGWt5ujzBqwYGIU0u51n1SUlRygCfWdui
>   NzrkjNvPg0iDaMbuDUcGrYk=
>   =NDB+
>   -----END PGP SIGNATURE-----

Think you could do something like this?  (slightly reformatted for mail)



int
verify_checksum ( t_uchar * checksum_file )
  {
    int x = 0;
    int valid_checksum = 1;
    int in_fd;
    rel_table signature_file;

    
    in_fd = safe_open (checksum_file, O_RDONLY, 0);
    signature_file = rel_read_table (in_fd, 1, "verify_checksum" , 
checksum_file);
    safe_close (in_fd);


    if (str_cmp (line, "   -----BEGIN PGP SIGNED MESSAGE-----")
      valid_checksum = 0;

    do
      {
        if ( str_cmp (signature_file[x][0],
                      "   -----END PGP SIGNATURE-----") == 0)
          valid_checksum = 0;
        x++;
      }
    while ( x < rel_n_records(signature_file);

    if ( str_cmp (signature_file[x][0], "   -----END PGP SIGNATURE-----"))
      valid_checksum = 0;

  rel_free_table(patch_output);
  return valid_checksum;
  }


-- 
James Blackwell      Using I.T. to bring more             570-407-0488
Owner, Inframix      business to your business     http://inframix.com

GnuPG (ID 06357400) AAE4 8C76 58DA 5902 761D  247A 8A55 DA73 0635 7400




reply via email to

[Prev in Thread] Current Thread [Next in Thread]