~ubuntu-branches/ubuntu/vivid/nettle/vivid-proposed

« back to all changes in this revision

Viewing changes to tools/pkcs1-conv.c

  • Committer: Package Import Robot
  • Author(s): Magnus Holmgren
  • Date: 2013-05-04 19:50:28 UTC
  • mfrom: (1.4.6) (3.1.11 experimental)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: package-import@ubuntu.com-20130504195028-fp6c9fw1tsm5scwa
Tags: 2.7-1
* New upstream release (Closes: #706081).
* Include watch file improvements from Bart Martens <bartm@debian.org>
  via the QA system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
/* nettle, low-level cryptographics library
6
6
 *
7
 
 * Copyright (C) 2005, 2009 Niels M�ller, Magnus Holmgren
 
7
 * Copyright (C) 2005, 2009 Niels Möller, Magnus Holmgren
8
8
 *  
9
9
 * The nettle library is free software; you can redistribute it and/or modify
10
10
 * it under the terms of the GNU Lesser General Public License as published by
18
18
 * 
19
19
 * You should have received a copy of the GNU Lesser General Public License
20
20
 * along with the nettle library; see the file COPYING.LIB.  If not, write to
21
 
 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22
 
 * MA 02111-1307, USA.
 
21
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 
22
 * MA 02111-1301, USA.
23
23
 */
24
24
 
25
25
#if HAVE_CONFIG_H
415
415
                      nettle_buffer_reset(buffer);
416
416
                      res = dsa_keypair_to_sexp(buffer, NULL, &pub, NULL) > 0;
417
417
                    }
 
418
                  dsa_public_key_clear(&pub);
418
419
                }
419
420
              if (!res)
420
421
                werror("SubjectPublicKeyInfo: Invalid DSA key.\n");
438
439
                      nettle_buffer_reset(buffer);
439
440
                      res = rsa_keypair_to_sexp(buffer, NULL, &pub, NULL) > 0;
440
441
                    }
 
442
                  rsa_public_key_clear(&pub);
441
443
                }
442
444
              if (!res)
443
445
                werror("SubjectPublicKeyInfo: Invalid RSA key.\n");
448
450
    }
449
451
  else
450
452
    werror("SubjectPublicKeyInfo: Invalid object.\n");
451
 
  
 
453
 
452
454
  return res;
453
455
}
454
456
 
656
658
          fclose(f);
657
659
        }
658
660
    }
 
661
  nettle_buffer_clear (&buffer);
 
662
 
659
663
  return EXIT_SUCCESS;
660
664
}