Use <stdbool.h> for bools.
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@275 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
parent
8073d379d2
commit
4315d76a67
4 changed files with 6 additions and 15 deletions
|
|
@ -41,11 +41,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* some bool types - just make life easier */
|
||||
typedef char bool;
|
||||
#define false 0
|
||||
#define true 1
|
||||
|
||||
#if defined(WIN32)
|
||||
typedef UINT8 uint8_t;
|
||||
typedef INT8 int8_t;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2007, Cameron Rich
|
||||
# Copyright (c) 2007-2016, Cameron Rich
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
|
|
@ -59,7 +59,8 @@ include $(AXTLS_HOME)/config/makefile.post
|
|||
ifndef CONFIG_PLATFORM_WIN32
|
||||
|
||||
$(TARGET): $(OBJ) $(LIBS)/libaxtls.a
|
||||
$(LD) $(LDFLAGS) -o $@ $(OBJ) -L$(LIBS) -laxtls
|
||||
$(LD) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)/libaxtls.a
|
||||
# $(LD) $(LDFLAGS) -o $@ $(OBJ) -L$(LIBS) -laxtls (shared library)
|
||||
ifdef CONFIG_STRIP_UNWANTED_SECTIONS
|
||||
$(STRIP) --remove-section=.comment $(TARGET)
|
||||
endif # use strip
|
||||
|
|
|
|||
|
|
@ -229,7 +229,6 @@ int asn1_get_bit_string_as_int(const uint8_t *buf, int *offset, uint32_t *val)
|
|||
{
|
||||
int res = X509_OK;
|
||||
int len, i;
|
||||
int ignore_bits;
|
||||
|
||||
if ((len = asn1_next_obj(buf, offset, ASN1_BIT_STRING)) < 0 || len > 5)
|
||||
{
|
||||
|
|
@ -238,7 +237,7 @@ int asn1_get_bit_string_as_int(const uint8_t *buf, int *offset, uint32_t *val)
|
|||
}
|
||||
|
||||
/* number of bits left unused in the final byte of content */
|
||||
ignore_bits = buf[(*offset)++];
|
||||
(*offset)++;
|
||||
len--;
|
||||
*val = 0;
|
||||
|
||||
|
|
@ -251,11 +250,6 @@ int asn1_get_bit_string_as_int(const uint8_t *buf, int *offset, uint32_t *val)
|
|||
|
||||
*offset += len;
|
||||
|
||||
/*for (i = 0; i < ignore_bits; i++)
|
||||
{
|
||||
*val >>= 1;
|
||||
}*/
|
||||
|
||||
end_bit_string_as_int:
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2007-2016, Cameron Rich
|
||||
* Copyright (c) 2007-2017, Cameron Rich
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
|
|
@ -39,6 +39,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "crypto.h"
|
||||
#include "bigint.h"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue