Commit 857048a7 authored by Rich Salz's avatar Rich Salz Committed by Rich Salz
Browse files

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: default avatarMatt Caswell <matt@openssl.org>
parent 2eb264a1
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -925,6 +925,13 @@ int s_client_main(int argc, char **argv)
            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:
+4 −0
Original line number Diff line number Diff line
@@ -1317,6 +1317,10 @@ int s_server_main(int argc, char *argv[])
            srpuserseed = opt_arg();
            meth = TLSv1_server_method();
            break;
#else
        case OPT_SRPVFILE:
        case OPT_SRPUSERSEED:
            break;
#endif
        case OPT_REV:
            rev = 1;
+6 −0
Original line number Diff line number Diff line
@@ -680,4 +680,10 @@ int srp_main(int argc, char **argv)
    return (ret);
}

#else

# if PEDANTIC
static void *dummy = &dummy;
# endif

#endif
+30 −27
Original line number Diff line number Diff line
@@ -60,7 +60,11 @@
#ifndef __SRP_H__
# define __SRP_H__

# ifndef OPENSSL_NO_SRP
#include <openssl/opensslconf.h>

# ifdef OPENSSL_NO_SRP
#  error SRP is disabled.
# endif

# include <stdio.h>
# include <string.h>
@@ -167,4 +171,3 @@ int SRP_Verify_B_mod_N(BIGNUM *B, BIGNUM *N);
#endif

#endif
#endif
+1 −1
Original line number Diff line number Diff line
@@ -60,11 +60,11 @@

#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/srp.h>

int SSL_CTX_SRP_CTX_free(struct ssl_ctx_st *ctx)
{