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>
srp_arg.amp = 1;
meth = TLSv1_client_method();
break;
srp_arg.amp = 1;
meth = TLSv1_client_method();
break;
+#else
+ case OPT_SRPUSER:
+ case OPT_SRPPASS:
+ case OPT_SRP_STRENGTH:
+ case OPT_SRP_LATEUSER:
+ case OPT_SRP_MOREGROUPS:
+ break;
#endif
#ifndef OPENSSL_NO_SSL3
case OPT_SSL3:
#endif
#ifndef OPENSSL_NO_SSL3
case OPT_SSL3:
srpuserseed = opt_arg();
meth = TLSv1_server_method();
break;
srpuserseed = opt_arg();
meth = TLSv1_server_method();
break;
+#else
+ case OPT_SRPVFILE:
+ case OPT_SRPUSERSEED:
+ break;
#endif
case OPT_REV:
rev = 1;
#endif
case OPT_REV:
rev = 1;
+#else
+
+# if PEDANTIC
+static void *dummy = &dummy;
+# endif
+
#ifndef __SRP_H__
# define __SRP_H__
#ifndef __SRP_H__
# define __SRP_H__
+#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
#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;
typedef struct SRP_gN_cache_st {
char *b64_bn;
BIGNUM **verifier, const BIGNUM *N,
const BIGNUM *g);
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);
/* see srp.c */
char *SRP_check_known_gN_param(BIGNUM *g, BIGNUM *N);
BIGNUM *a, BIGNUM *u);
int SRP_Verify_B_mod_N(BIGNUM *B, BIGNUM *N);
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
#ifdef __cplusplus
}
#endif
#include <openssl/crypto.h>
#include <openssl/rand.h>
#include <openssl/crypto.h>
#include <openssl/rand.h>
-#include <openssl/srp.h>
#include <openssl/err.h>
#include "ssl_locl.h"
#ifndef OPENSSL_NO_SRP
#include <openssl/err.h>
#include "ssl_locl.h"
#ifndef OPENSSL_NO_SRP
+#include <openssl/srp.h>
int SSL_CTX_SRP_CTX_free(struct ssl_ctx_st *ctx)
{
int SSL_CTX_SRP_CTX_free(struct ssl_ctx_st *ctx)
{