Skip to content

Commit

Permalink
Add ossl_bn_group symbols
Browse files Browse the repository at this point in the history
Partial fix for openssl#12964

Reviewed-by: Paul Dale <[email protected]>
(Merged from openssl#14473)
  • Loading branch information
slontis committed Mar 18, 2021
1 parent ff0266e commit fc27fca
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
20 changes: 10 additions & 10 deletions crypto/bn/bn_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static const BN_ULONG bn_group_1024_value[] = {
bn_pack4(0xEEAF, 0x0AB9, 0xADB3, 0x8DD6)
};

const BIGNUM bn_group_1024 = {
const BIGNUM ossl_bn_group_1024 = {
(BN_ULONG *)bn_group_1024_value,
OSSL_NELEM(bn_group_1024_value),
OSSL_NELEM(bn_group_1024_value),
Expand Down Expand Up @@ -83,7 +83,7 @@ static const BN_ULONG bn_group_1536_value[] = {
bn_pack4(0x9DEF, 0x3CAF, 0xB939, 0x277A)
};

const BIGNUM bn_group_1536 = {
const BIGNUM ossl_bn_group_1536 = {
(BN_ULONG *)bn_group_1536_value,
OSSL_NELEM(bn_group_1536_value),
OSSL_NELEM(bn_group_1536_value),
Expand Down Expand Up @@ -126,7 +126,7 @@ static const BN_ULONG bn_group_2048_value[] = {
bn_pack4(0xAC6B, 0xDB41, 0x324A, 0x9A9B)
};

const BIGNUM bn_group_2048 = {
const BIGNUM ossl_bn_group_2048 = {
(BN_ULONG *)bn_group_2048_value,
OSSL_NELEM(bn_group_2048_value),
OSSL_NELEM(bn_group_2048_value),
Expand Down Expand Up @@ -185,7 +185,7 @@ static const BN_ULONG bn_group_3072_value[] = {
bn_pack4(0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF)
};

const BIGNUM bn_group_3072 = {
const BIGNUM ossl_bn_group_3072 = {
(BN_ULONG *)bn_group_3072_value,
OSSL_NELEM(bn_group_3072_value),
OSSL_NELEM(bn_group_3072_value),
Expand Down Expand Up @@ -260,7 +260,7 @@ static const BN_ULONG bn_group_4096_value[] = {
bn_pack4(0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF)
};

const BIGNUM bn_group_4096 = {
const BIGNUM ossl_bn_group_4096 = {
(BN_ULONG *)bn_group_4096_value,
OSSL_NELEM(bn_group_4096_value),
OSSL_NELEM(bn_group_4096_value),
Expand Down Expand Up @@ -367,7 +367,7 @@ static const BN_ULONG bn_group_6144_value[] = {
bn_pack4(0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF)
};

const BIGNUM bn_group_6144 = {
const BIGNUM ossl_bn_group_6144 = {
(BN_ULONG *)bn_group_6144_value,
OSSL_NELEM(bn_group_6144_value),
OSSL_NELEM(bn_group_6144_value),
Expand Down Expand Up @@ -506,7 +506,7 @@ static const BN_ULONG bn_group_8192_value[] = {
bn_pack4(0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF)
};

const BIGNUM bn_group_8192 = {
const BIGNUM ossl_bn_group_8192 = {
(BN_ULONG *)bn_group_8192_value,
OSSL_NELEM(bn_group_8192_value),
OSSL_NELEM(bn_group_8192_value),
Expand All @@ -516,7 +516,7 @@ const BIGNUM bn_group_8192 = {

static const BN_ULONG bn_generator_19_value[] = { 19 };

const BIGNUM bn_generator_19 = {
const BIGNUM ossl_bn_generator_19 = {
(BN_ULONG *)bn_generator_19_value,
1,
1,
Expand All @@ -525,7 +525,7 @@ const BIGNUM bn_generator_19 = {
};
static const BN_ULONG bn_generator_5_value[] = { 5 };

const BIGNUM bn_generator_5 = {
const BIGNUM ossl_bn_generator_5 = {
(BN_ULONG *)bn_generator_5_value,
1,
1,
Expand All @@ -534,7 +534,7 @@ const BIGNUM bn_generator_5 = {
};
static const BN_ULONG bn_generator_2_value[] = { 2 };

const BIGNUM bn_generator_2 = {
const BIGNUM ossl_bn_generator_2 = {
(BN_ULONG *)bn_generator_2_value,
1,
1,
Expand Down
14 changes: 7 additions & 7 deletions crypto/srp/srp_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,13 @@ int SRP_Verify_A_mod_N(const BIGNUM *A, const BIGNUM *N)
}

static SRP_gN knowngN[] = {
{"8192", &bn_generator_19, &bn_group_8192},
{"6144", &bn_generator_5, &bn_group_6144},
{"4096", &bn_generator_5, &bn_group_4096},
{"3072", &bn_generator_5, &bn_group_3072},
{"2048", &bn_generator_2, &bn_group_2048},
{"1536", &bn_generator_2, &bn_group_1536},
{"1024", &bn_generator_2, &bn_group_1024},
{"8192", &ossl_bn_generator_19, &ossl_bn_group_8192},
{"6144", &ossl_bn_generator_5, &ossl_bn_group_6144},
{"4096", &ossl_bn_generator_5, &ossl_bn_group_4096},
{"3072", &ossl_bn_generator_5, &ossl_bn_group_3072},
{"2048", &ossl_bn_generator_2, &ossl_bn_group_2048},
{"1536", &ossl_bn_generator_2, &ossl_bn_group_1536},
{"1024", &ossl_bn_generator_2, &ossl_bn_group_1024},
};

# define KNOWN_GN_NUMBER sizeof(knowngN) / sizeof(SRP_gN)
Expand Down
20 changes: 10 additions & 10 deletions include/crypto/bn_srp.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@

#ifndef OPENSSL_NO_SRP

extern const BIGNUM bn_group_1024;
extern const BIGNUM ossl_bn_group_1024;

extern const BIGNUM bn_group_1536;
extern const BIGNUM ossl_bn_group_1536;

extern const BIGNUM bn_group_2048;
extern const BIGNUM ossl_bn_group_2048;

extern const BIGNUM bn_group_3072;
extern const BIGNUM ossl_bn_group_3072;

extern const BIGNUM bn_group_4096;
extern const BIGNUM ossl_bn_group_4096;

extern const BIGNUM bn_group_6144;
extern const BIGNUM ossl_bn_group_6144;

extern const BIGNUM bn_group_8192;
extern const BIGNUM ossl_bn_group_8192;

extern const BIGNUM bn_generator_19;
extern const BIGNUM ossl_bn_generator_19;

extern const BIGNUM bn_generator_5;
extern const BIGNUM ossl_bn_generator_5;

extern const BIGNUM bn_generator_2;
extern const BIGNUM ossl_bn_generator_2;

#endif

0 comments on commit fc27fca

Please sign in to comment.