From: Andreas Steffen Date: Tue, 13 Jun 2006 11:32:12 +0000 (-0000) Subject: moved RSA key size constraints to definitions.h X-Git-Tag: 4.0.1~38 X-Git-Url: https://git.strongswan.org/?p=strongswan.git;a=commitdiff_plain;h=3c846c630ad96b65cb627e21cd83b153342bb176 moved RSA key size constraints to definitions.h --- diff --git a/src/libstrongswan/crypto/x509.c b/src/libstrongswan/crypto/x509.c index 6899abe..54a6395 100755 --- a/src/libstrongswan/crypto/x509.c +++ b/src/libstrongswan/crypto/x509.c @@ -36,12 +36,6 @@ #include #include -#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 */ static logger_t *logger; diff --git a/src/libstrongswan/definitions.h b/src/libstrongswan/definitions.h index 4df6510..b8e6ba9 100644 --- a/src/libstrongswan/definitions.h +++ b/src/libstrongswan/definitions.h @@ -24,7 +24,7 @@ #ifndef DEFINITIONS_H_ #define DEFINITIONS_H_ -/* stolen from strongswan */ +/* stolen from FreeS/WAN */ #if linux # if defined(i386) && !defined(__i386__) # define __i386__ 1 @@ -57,6 +57,12 @@ #error "BYTE_ORDER must be defined" #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 */