~ubuntu-branches/ubuntu/precise/dropbear/precise

« back to all changes in this revision

Viewing changes to signkey.c

  • Committer: Bazaar Package Importer
  • Author(s): Gerrit Pape
  • Date: 2007-03-02 20:48:18 UTC
  • mfrom: (1.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070302204818-ozmbou2sbyj7dus5
Tags: 0.49-1
* new upstream release, fixes
  * CVE-2007-1099: dropbear dbclient insufficient warning on hostkey
    mismatch (closes: #412899).
  * dbclient uses static "Password:" prompt instead of using the server's
    prompt (closes: #394996).
* debian/control: Suggests: openssh-client, not ssh (closes: #405686);
  Standards-Version: 3.7.2.2.
* debian/README.Debian: ssh -> openssh-server, openssh-client; remove
  'Replacing OpenSSH "sshd" with Dropbear' part, this is simply done by not
  installing the openssh-server package.
* debian/README.runit: runsvstat -> sv status.

Show diffs side-by-side

added added

removed removed

Lines of Context:
432
432
/* Returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE when given a buffer containing
433
433
 * a key, a key, and a type. The buffer is positioned at the start of the
434
434
 * base64 data, and contains no trailing data */
 
435
/* If fingerprint is non-NULL, it will be set to a malloc()ed fingerprint
 
436
   of the key if it is successfully decoded */
435
437
int cmp_base64_key(const unsigned char* keyblob, unsigned int keybloblen, 
436
438
                                        const unsigned char* algoname, unsigned int algolen, 
437
 
                                        buffer * line) {
 
439
                                        buffer * line, char ** fingerprint) {
438
440
 
439
441
        buffer * decodekey = NULL;
440
442
        int ret = DROPBEAR_FAILURE;
456
458
        TRACE(("checkpubkey: base64_decode success"))
457
459
        buf_incrlen(decodekey, decodekeylen);
458
460
        
 
461
        if (fingerprint) {
 
462
                *fingerprint = sign_key_fingerprint(buf_getptr(decodekey, decodekeylen),
 
463
                                                                                        decodekeylen);
 
464
        }
 
465
        
459
466
        /* compare the keys */
460
467
        if ( ( decodekeylen != keybloblen )
461
468
                        || memcmp( buf_getptr(decodekey, decodekey->len),