~ubuntu-branches/debian/squeeze/putty/squeeze

« back to all changes in this revision

Viewing changes to sshdss.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2008-05-28 09:28:32 UTC
  • mfrom: (4.1.4 hardy)
  • Revision ID: james.westby@ubuntu.com-20080528092832-88epkb3d4s1zsw61
Tags: 0.60-3
* Move putty to Applications/Network/Communication menu sub-section.
* Use dh_desktop.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Digital Signature Standard implementation for PuTTY.
 
3
 */
 
4
 
1
5
#include <stdio.h>
2
6
#include <stdlib.h>
3
7
#include <assert.h>
5
9
#include "ssh.h"
6
10
#include "misc.h"
7
11
 
8
 
#define GET_32BIT(cp) \
9
 
    (((unsigned long)(unsigned char)(cp)[0] << 24) | \
10
 
    ((unsigned long)(unsigned char)(cp)[1] << 16) | \
11
 
    ((unsigned long)(unsigned char)(cp)[2] << 8) | \
12
 
    ((unsigned long)(unsigned char)(cp)[3]))
13
 
 
14
 
#define PUT_32BIT(cp, value) { \
15
 
    (cp)[0] = (unsigned char)((value) >> 24); \
16
 
    (cp)[1] = (unsigned char)((value) >> 16); \
17
 
    (cp)[2] = (unsigned char)((value) >> 8); \
18
 
    (cp)[3] = (unsigned char)(value); }
19
 
 
20
12
static void sha_mpint(SHA_State * s, Bignum b)
21
13
{
22
14
    unsigned char lenbuf[4];