moved RSA key size constraints to definitions.h
This commit is contained in:
@@ -36,12 +36,6 @@
|
|||||||
#include <utils/linked_list.h>
|
#include <utils/linked_list.h>
|
||||||
#include <utils/identification.h>
|
#include <utils/identification.h>
|
||||||
|
|
||||||
#define BITS_PER_BYTE 8
|
|
||||||
#define RSA_MIN_OCTETS (1024 / BITS_PER_BYTE)
|
|
||||||
#define RSA_MIN_OCTETS_UGH "RSA modulus too small for security: less than 1024 bits"
|
|
||||||
#define RSA_MAX_OCTETS (8192 / BITS_PER_BYTE)
|
|
||||||
#define RSA_MAX_OCTETS_UGH "RSA modulus too large: more than 8192 bits"
|
|
||||||
|
|
||||||
#define CERT_WARNING_INTERVAL 30 /* days */
|
#define CERT_WARNING_INTERVAL 30 /* days */
|
||||||
|
|
||||||
static logger_t *logger;
|
static logger_t *logger;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#ifndef DEFINITIONS_H_
|
#ifndef DEFINITIONS_H_
|
||||||
#define DEFINITIONS_H_
|
#define DEFINITIONS_H_
|
||||||
|
|
||||||
/* stolen from strongswan */
|
/* stolen from FreeS/WAN */
|
||||||
#if linux
|
#if linux
|
||||||
# if defined(i386) && !defined(__i386__)
|
# if defined(i386) && !defined(__i386__)
|
||||||
# define __i386__ 1
|
# define __i386__ 1
|
||||||
@@ -57,6 +57,12 @@
|
|||||||
#error "BYTE_ORDER must be defined"
|
#error "BYTE_ORDER must be defined"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define BITS_PER_BYTE 8
|
||||||
|
#define RSA_MIN_OCTETS (1024 / BITS_PER_BYTE)
|
||||||
|
#define RSA_MIN_OCTETS_UGH "RSA modulus too small for security: less than 1024 bits"
|
||||||
|
#define RSA_MAX_OCTETS (8192 / BITS_PER_BYTE)
|
||||||
|
#define RSA_MAX_OCTETS_UGH "RSA modulus too large: more than 8192 bits"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default length for various auxiliary text buffers
|
* Default length for various auxiliary text buffers
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user