diff options
author | Adam Langley <agl@google.com> | 2015-03-31 18:58:05 -0700 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-04-02 11:32:06 -0700 |
commit | f7e890d94bfb2ecad87621eed301e1897b5a6aef (patch) | |
tree | c712592a9ab361adf49b2c4500859307828aa910 /src | |
parent | f40f42df67fffec64967b000e4fdad4b435611a5 (diff) | |
download | external_boringssl-f7e890d94bfb2ecad87621eed301e1897b5a6aef.zip external_boringssl-f7e890d94bfb2ecad87621eed301e1897b5a6aef.tar.gz external_boringssl-f7e890d94bfb2ecad87621eed301e1897b5a6aef.tar.bz2 |
Add compatibility functions for OpenSSH.
Change-Id: I2fcb67fea859220e7e7bbbdb5dd910fb847c5600
Diffstat (limited to 'src')
-rw-r--r-- | src/crypto/ec/ec.c | 10 | ||||
-rw-r--r-- | src/crypto/ec/ec_key.c | 2 | ||||
-rw-r--r-- | src/crypto/rand/rand.c | 4 | ||||
-rw-r--r-- | src/crypto/rsa/rsa.c | 4 | ||||
-rw-r--r-- | src/include/openssl/ec.h | 16 | ||||
-rw-r--r-- | src/include/openssl/ec_key.h | 6 | ||||
-rw-r--r-- | src/include/openssl/rand.h | 3 | ||||
-rw-r--r-- | src/include/openssl/rsa.h | 6 |
8 files changed, 51 insertions, 0 deletions
diff --git a/src/crypto/ec/ec.c b/src/crypto/ec/ec.c index 30def15..7d16f2c 100644 --- a/src/crypto/ec/ec.c +++ b/src/crypto/ec/ec.c @@ -853,3 +853,13 @@ int ec_point_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *po return group->meth->point_set_Jprojective_coordinates_GFp(group, point, x, y, z, ctx); } + +void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag) {} + +const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group) { + return NULL; +} + +int EC_METHOD_get_field_type(const EC_METHOD *meth) { + return NID_X9_62_prime_field; +} diff --git a/src/crypto/ec/ec_key.c b/src/crypto/ec/ec_key.c index c8f0624..471ea9c 100644 --- a/src/crypto/ec/ec_key.c +++ b/src/crypto/ec/ec_key.c @@ -514,3 +514,5 @@ int EC_KEY_set_ex_data(EC_KEY *d, int idx, void *arg) { void *EC_KEY_get_ex_data(const EC_KEY *d, int idx) { return CRYPTO_get_ex_data(&d->ex_data, idx); } + +void EC_KEY_set_asn1_flag(EC_KEY *key, int flag) {} diff --git a/src/crypto/rand/rand.c b/src/crypto/rand/rand.c index 6780b6c..efd6c0a 100644 --- a/src/crypto/rand/rand.c +++ b/src/crypto/rand/rand.c @@ -26,3 +26,7 @@ void RAND_add(const void *buf, int num, double entropy) {} int RAND_poll(void) { return 1; } + +int RAND_status(void) { + return 1; +} diff --git a/src/crypto/rsa/rsa.c b/src/crypto/rsa/rsa.c index cfdd7ff..66002cc 100644 --- a/src/crypto/rsa/rsa.c +++ b/src/crypto/rsa/rsa.c @@ -759,3 +759,7 @@ int RSA_private_transform(RSA *rsa, uint8_t *out, const uint8_t *in, return RSA_default_method.private_transform(rsa, out, in, len); } + +int RSA_blinding_on(RSA *rsa, BN_CTX *ctx) { + return 1; +} diff --git a/src/include/openssl/ec.h b/src/include/openssl/ec.h index eb9a153..d266653 100644 --- a/src/include/openssl/ec.h +++ b/src/include/openssl/ec.h @@ -288,6 +288,22 @@ OPENSSL_EXPORT int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, BN_CTX *ctx); +/* Deprecated functions. */ + +/* EC_GROUP_set_asn1_flag does nothing. */ +OPENSSL_EXPORT void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag); + +#define OPENSSL_EC_NAMED_CURVE 0 + +typedef struct ec_method_st EC_METHOD; + +/* EC_GROUP_method_of returns NULL. */ +OPENSSL_EXPORT const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group); + +/* EC_METHOD_get_field_type returns NID_X9_62_prime_field. */ +OPENSSL_EXPORT int EC_METHOD_get_field_type(const EC_METHOD *meth); + + /* Old code expects to get EC_KEY from ec.h. */ #if !defined(OPENSSL_HEADER_EC_KEY_H) #include <openssl/ec_key.h> diff --git a/src/include/openssl/ec_key.h b/src/include/openssl/ec_key.h index d659216..115c0cd 100644 --- a/src/include/openssl/ec_key.h +++ b/src/include/openssl/ec_key.h @@ -273,6 +273,12 @@ struct ecdsa_method_st { }; +/* Deprecated functions. */ + +/* EC_KEY_set_asn1_flag does nothing. */ +OPENSSL_EXPORT void EC_KEY_set_asn1_flag(EC_KEY *key, int flag); + + #if defined(__cplusplus) } /* extern C */ #endif diff --git a/src/include/openssl/rand.h b/src/include/openssl/rand.h index 5a84a89..6186044 100644 --- a/src/include/openssl/rand.h +++ b/src/include/openssl/rand.h @@ -45,6 +45,9 @@ OPENSSL_EXPORT void RAND_add(const void *buf, int num, double entropy); /* RAND_poll returns one. */ OPENSSL_EXPORT int RAND_poll(void); +/* RAND_status returns one. */ +OPENSSL_EXPORT int RAND_status(void); + #if defined(__cplusplus) } /* extern C */ diff --git a/src/include/openssl/rsa.h b/src/include/openssl/rsa.h index 5f39e0b..a4596c7 100644 --- a/src/include/openssl/rsa.h +++ b/src/include/openssl/rsa.h @@ -389,6 +389,12 @@ OPENSSL_EXPORT void *RSA_get_ex_data(const RSA *r, int idx); #define RSA_F4 0x10001 +/* Deprecated functions. */ + +/* RSA_blinding_on returns one. */ +OPENSSL_EXPORT int RSA_blinding_on(RSA *rsa, BN_CTX *ctx); + + struct rsa_meth_st { struct openssl_method_common_st common; |