- markus@cvs.openbsd.org 2001/12/28 14:13:13
[bufaux.c bufaux.h packet.c] buffer_get_bignum: int -> void
This commit is contained in:
parent
d432ccf740
commit
76e1e368b5
|
@ -63,6 +63,9 @@
|
||||||
- markus@cvs.openbsd.org 2001/12/28 13:57:33
|
- markus@cvs.openbsd.org 2001/12/28 13:57:33
|
||||||
[auth1.c kexdh.c kexgex.c packet.c packet.h sshconnect1.c sshd.c]
|
[auth1.c kexdh.c kexgex.c packet.c packet.h sshconnect1.c sshd.c]
|
||||||
packet_get_bignum* no longer returns a size
|
packet_get_bignum* no longer returns a size
|
||||||
|
- markus@cvs.openbsd.org 2001/12/28 14:13:13
|
||||||
|
[bufaux.c bufaux.h packet.c]
|
||||||
|
buffer_get_bignum: int -> void
|
||||||
|
|
||||||
|
|
||||||
20020121
|
20020121
|
||||||
|
@ -7211,4 +7214,4 @@
|
||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.1741 2002/01/22 12:14:44 djm Exp $
|
$Id: ChangeLog,v 1.1742 2002/01/22 12:15:57 djm Exp $
|
||||||
|
|
9
bufaux.c
9
bufaux.c
|
@ -37,7 +37,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: bufaux.c,v 1.20 2001/12/19 17:16:13 stevesk Exp $");
|
RCSID("$OpenBSD: bufaux.c,v 1.21 2001/12/28 14:13:13 markus Exp $");
|
||||||
|
|
||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
#include "bufaux.h"
|
#include "bufaux.h"
|
||||||
|
@ -77,7 +77,7 @@ buffer_put_bignum(Buffer *buffer, BIGNUM *value)
|
||||||
/*
|
/*
|
||||||
* Retrieves an BIGNUM from the buffer.
|
* Retrieves an BIGNUM from the buffer.
|
||||||
*/
|
*/
|
||||||
int
|
void
|
||||||
buffer_get_bignum(Buffer *buffer, BIGNUM *value)
|
buffer_get_bignum(Buffer *buffer, BIGNUM *value)
|
||||||
{
|
{
|
||||||
int bits, bytes;
|
int bits, bytes;
|
||||||
|
@ -93,8 +93,6 @@ buffer_get_bignum(Buffer *buffer, BIGNUM *value)
|
||||||
bin = (u_char *) buffer_ptr(buffer);
|
bin = (u_char *) buffer_ptr(buffer);
|
||||||
BN_bin2bn(bin, bytes, value);
|
BN_bin2bn(bin, bytes, value);
|
||||||
buffer_consume(buffer, bytes);
|
buffer_consume(buffer, bytes);
|
||||||
|
|
||||||
return 2 + bytes;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -130,7 +128,7 @@ buffer_put_bignum2(Buffer *buffer, BIGNUM *value)
|
||||||
xfree(buf);
|
xfree(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
void
|
||||||
buffer_get_bignum2(Buffer *buffer, BIGNUM *value)
|
buffer_get_bignum2(Buffer *buffer, BIGNUM *value)
|
||||||
{
|
{
|
||||||
/**XXX should be two's-complement */
|
/**XXX should be two's-complement */
|
||||||
|
@ -138,7 +136,6 @@ buffer_get_bignum2(Buffer *buffer, BIGNUM *value)
|
||||||
u_char *bin = (u_char *)buffer_get_string(buffer, (u_int *)&len);
|
u_char *bin = (u_char *)buffer_get_string(buffer, (u_int *)&len);
|
||||||
BN_bin2bn(bin, len, value);
|
BN_bin2bn(bin, len, value);
|
||||||
xfree(bin);
|
xfree(bin);
|
||||||
return len;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
7
bufaux.h
7
bufaux.h
|
@ -10,7 +10,7 @@
|
||||||
* called by a name other than "ssh" or "Secure Shell".
|
* called by a name other than "ssh" or "Secure Shell".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* RCSID("$OpenBSD: bufaux.h,v 1.14 2001/12/19 17:16:13 stevesk Exp $"); */
|
/* RCSID("$OpenBSD: bufaux.h,v 1.15 2001/12/28 14:13:13 markus Exp $"); */
|
||||||
|
|
||||||
#ifndef BUFAUX_H
|
#ifndef BUFAUX_H
|
||||||
#define BUFAUX_H
|
#define BUFAUX_H
|
||||||
|
@ -20,9 +20,8 @@
|
||||||
|
|
||||||
void buffer_put_bignum(Buffer *, BIGNUM *);
|
void buffer_put_bignum(Buffer *, BIGNUM *);
|
||||||
void buffer_put_bignum2(Buffer *, BIGNUM *);
|
void buffer_put_bignum2(Buffer *, BIGNUM *);
|
||||||
|
void buffer_get_bignum(Buffer *, BIGNUM *);
|
||||||
int buffer_get_bignum(Buffer *, BIGNUM *);
|
void buffer_get_bignum2(Buffer *, BIGNUM *);
|
||||||
int buffer_get_bignum2(Buffer *, BIGNUM *);
|
|
||||||
|
|
||||||
u_int buffer_get_int(Buffer *);
|
u_int buffer_get_int(Buffer *);
|
||||||
void buffer_put_int(Buffer *, u_int);
|
void buffer_put_int(Buffer *, u_int);
|
||||||
|
|
6
packet.c
6
packet.c
|
@ -37,7 +37,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: packet.c,v 1.80 2001/12/28 13:57:33 markus Exp $");
|
RCSID("$OpenBSD: packet.c,v 1.81 2001/12/28 14:13:13 markus Exp $");
|
||||||
|
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
|
@ -1002,13 +1002,13 @@ packet_get_int(void)
|
||||||
void
|
void
|
||||||
packet_get_bignum(BIGNUM * value)
|
packet_get_bignum(BIGNUM * value)
|
||||||
{
|
{
|
||||||
(void)buffer_get_bignum(&incoming_packet, value);
|
buffer_get_bignum(&incoming_packet, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
packet_get_bignum2(BIGNUM * value)
|
packet_get_bignum2(BIGNUM * value)
|
||||||
{
|
{
|
||||||
(void)buffer_get_bignum2(&incoming_packet, value);
|
buffer_get_bignum2(&incoming_packet, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
|
|
Loading…
Reference in New Issue