mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 18:50:28 +09:00
Fix compile errors in keyfiles.
This commit is contained in:
@@ -87,17 +87,17 @@ static int load_iv(char *header, unsigned char *iv, int iv_len) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 char_to_u32(unsigned char *data, u32 size) {
|
static uint32_t char_to_u32(unsigned char *data, uint32_t size) {
|
||||||
u32 ret;
|
uint32_t ret;
|
||||||
u32 i;
|
uint32_t i;
|
||||||
|
|
||||||
for (i = 0, ret = 0; i < size; ret = ret << 8, ret += data[i++])
|
for (i = 0, ret = 0; i < size; ret = ret << 8, ret += data[i++])
|
||||||
;
|
;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 asn1_get_len(ssh_buffer buffer) {
|
static uint32_t asn1_get_len(ssh_buffer buffer) {
|
||||||
u32 len;
|
uint32_t len;
|
||||||
unsigned char tmp[4];
|
unsigned char tmp[4];
|
||||||
|
|
||||||
if (buffer_get_data(buffer,tmp,1) == 0) {
|
if (buffer_get_data(buffer,tmp,1) == 0) {
|
||||||
@@ -123,7 +123,7 @@ static u32 asn1_get_len(ssh_buffer buffer) {
|
|||||||
static ssh_string asn1_get_int(ssh_buffer buffer) {
|
static ssh_string asn1_get_int(ssh_buffer buffer) {
|
||||||
ssh_string str;
|
ssh_string str;
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
u32 size;
|
uint32_t size;
|
||||||
|
|
||||||
if (buffer_get_data(buffer, &type, 1) == 0 || type != ASN1_INTEGER) {
|
if (buffer_get_data(buffer, &type, 1) == 0 || type != ASN1_INTEGER) {
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -150,8 +150,8 @@ static int asn1_check_sequence(ssh_buffer buffer) {
|
|||||||
unsigned char *j = NULL;
|
unsigned char *j = NULL;
|
||||||
unsigned char tmp;
|
unsigned char tmp;
|
||||||
int i;
|
int i;
|
||||||
u32 size;
|
uint32_t size;
|
||||||
u32 padding;
|
uint32_t padding;
|
||||||
|
|
||||||
if (buffer_get_data(buffer, &tmp, 1) == 0 || tmp != ASN1_SEQUENCE) {
|
if (buffer_get_data(buffer, &tmp, 1) == 0 || tmp != ASN1_SEQUENCE) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user