aboutsummaryrefslogtreecommitdiffstats
path: root/include/openssl/srp.h
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2015-05-14 15:21:36 -0400
committerRich Salz <rsalz@openssl.org>2015-05-15 08:16:21 -0400
commit857048a7f339913fc4e510ddf033878850c655cd (patch)
treecb6af69094c972288773c36bc56b6b27b9d74090 /include/openssl/srp.h
parent2eb264a14b93b277269b1f3311925d550d5de580 (diff)
downloadopenssl-857048a7f339913fc4e510ddf033878850c655cd.tar.gz
Use #error in openssl/srp.h
Follow the same convention the other OPENSSL_NO_xxx header files do, and use #error instead of making the header file be a no-op. Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'include/openssl/srp.h')
-rw-r--r--include/openssl/srp.h57
1 files changed, 30 insertions, 27 deletions
diff --git a/include/openssl/srp.h b/include/openssl/srp.h
index de6631d94f..3411fe571e 100644
--- a/include/openssl/srp.h
+++ b/include/openssl/srp.h
@@ -60,18 +60,22 @@
#ifndef __SRP_H__
# define __SRP_H__
-# ifndef OPENSSL_NO_SRP
+#include <openssl/opensslconf.h>
-# include <stdio.h>
-# include <string.h>
+# ifdef OPENSSL_NO_SRP
+# error SRP is disabled.
+# endif
+
+# include <stdio.h>
+# include <string.h>
#ifdef __cplusplus
extern "C" {
#endif
-# include <openssl/safestack.h>
-# include <openssl/bn.h>
-# include <openssl/crypto.h>
+# include <openssl/safestack.h>
+# include <openssl/bn.h>
+# include <openssl/crypto.h>
typedef struct SRP_gN_cache_st {
char *b64_bn;
@@ -122,25 +126,25 @@ int SRP_create_verifier_BN(const char *user, const char *pass, BIGNUM **salt,
BIGNUM **verifier, const BIGNUM *N,
const BIGNUM *g);
-# define SRP_NO_ERROR 0
-# define SRP_ERR_VBASE_INCOMPLETE_FILE 1
-# define SRP_ERR_VBASE_BN_LIB 2
-# define SRP_ERR_OPEN_FILE 3
-# define SRP_ERR_MEMORY 4
-
-# define DB_srptype 0
-# define DB_srpverifier 1
-# define DB_srpsalt 2
-# define DB_srpid 3
-# define DB_srpgN 4
-# define DB_srpinfo 5
-# undef DB_NUMBER
-# define DB_NUMBER 6
-
-# define DB_SRP_INDEX 'I'
-# define DB_SRP_VALID 'V'
-# define DB_SRP_REVOKED 'R'
-# define DB_SRP_MODIF 'v'
+# define SRP_NO_ERROR 0
+# define SRP_ERR_VBASE_INCOMPLETE_FILE 1
+# define SRP_ERR_VBASE_BN_LIB 2
+# define SRP_ERR_OPEN_FILE 3
+# define SRP_ERR_MEMORY 4
+
+# define DB_srptype 0
+# define DB_srpverifier 1
+# define DB_srpsalt 2
+# define DB_srpid 3
+# define DB_srpgN 4
+# define DB_srpinfo 5
+# undef DB_NUMBER
+# define DB_NUMBER 6
+
+# define DB_SRP_INDEX 'I'
+# define DB_SRP_VALID 'V'
+# define DB_SRP_REVOKED 'R'
+# define DB_SRP_MODIF 'v'
/* see srp.c */
char *SRP_check_known_gN_param(BIGNUM *g, BIGNUM *N);
@@ -160,11 +164,10 @@ BIGNUM *SRP_Calc_client_key(BIGNUM *N, BIGNUM *B, BIGNUM *g, BIGNUM *x,
BIGNUM *a, BIGNUM *u);
int SRP_Verify_B_mod_N(BIGNUM *B, BIGNUM *N);
-# define SRP_MINIMAL_N 1024
+# define SRP_MINIMAL_N 1024
#ifdef __cplusplus
}
#endif
-# endif
#endif