Skip to content

Commit

Permalink
Update OpenSSL to 1.0.2k
Browse files Browse the repository at this point in the history
(based on cmangos/mangos-wotlk@a043e7945)

Signed-off-by: Xfurry <xfurry.cmangos@outlook.com>
  • Loading branch information
some2 authored and xfurry committed Jan 2, 2018
1 parent 53f6d3d commit a59d9a2
Show file tree
Hide file tree
Showing 24 changed files with 342 additions and 293 deletions.
10 changes: 5 additions & 5 deletions dep/include/openssl/bio.h
Expand Up @@ -479,7 +479,7 @@ struct bio_dgram_sctp_prinfo {
# define BIO_get_conn_hostname(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0)
# define BIO_get_conn_port(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1)
# define BIO_get_conn_ip(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2)
# define BIO_get_conn_int_port(b) BIO_ctrl(b,BIO_C_GET_CONNECT,3,0,NULL)
# define BIO_get_conn_int_port(b) BIO_ctrl(b,BIO_C_GET_CONNECT,3,NULL)

# define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL)

Expand Down Expand Up @@ -559,11 +559,11 @@ int BIO_read_filename(BIO *b, const char *name);
# define BIO_get_ssl(b,sslp) BIO_ctrl(b,BIO_C_GET_SSL,0,(char *)sslp)
# define BIO_set_ssl_mode(b,client) BIO_ctrl(b,BIO_C_SSL_MODE,client,NULL)
# define BIO_set_ssl_renegotiate_bytes(b,num) \
BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_BYTES,num,NULL);
BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_BYTES,num,NULL)
# define BIO_get_num_renegotiates(b) \
BIO_ctrl(b,BIO_C_GET_SSL_NUM_RENEGOTIATES,0,NULL);
BIO_ctrl(b,BIO_C_GET_SSL_NUM_RENEGOTIATES,0,NULL)
# define BIO_set_ssl_renegotiate_timeout(b,seconds) \
BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT,seconds,NULL);
BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT,seconds,NULL)

/* defined in evp.h */
/* #define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,1,(char *)md) */
Expand Down Expand Up @@ -689,7 +689,7 @@ long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi,
long argl, long ret);

BIO_METHOD *BIO_s_mem(void);
BIO *BIO_new_mem_buf(void *buf, int len);
BIO *BIO_new_mem_buf(const void *buf, int len);
BIO_METHOD *BIO_s_socket(void);
BIO_METHOD *BIO_s_connect(void);
BIO_METHOD *BIO_s_accept(void);
Expand Down
16 changes: 14 additions & 2 deletions dep/include/openssl/bn.h
Expand Up @@ -125,6 +125,7 @@
#ifndef HEADER_BN_H
# define HEADER_BN_H

# include <limits.h>
# include <openssl/e_os2.h>
# ifndef OPENSSL_NO_FP_API
# include <stdio.h> /* FILE */
Expand Down Expand Up @@ -721,8 +722,17 @@ const BIGNUM *BN_get0_nist_prime_521(void);

/* library internal functions */

# define bn_expand(a,bits) ((((((bits+BN_BITS2-1))/BN_BITS2)) <= (a)->dmax)?\
(a):bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2))
# define bn_expand(a,bits) \
( \
bits > (INT_MAX - BN_BITS2 + 1) ? \
NULL \
: \
(((bits+BN_BITS2-1)/BN_BITS2) <= (a)->dmax) ? \
(a) \
: \
bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2) \
)

# define bn_wexpand(a,words) (((words) <= (a)->dmax)?(a):bn_expand2((a),(words)))
BIGNUM *bn_expand2(BIGNUM *a, int words);
# ifndef OPENSSL_NO_DEPRECATED
Expand Down Expand Up @@ -832,6 +842,8 @@ int RAND_pseudo_bytes(unsigned char *buf, int num);
if (*(ftl--)) break; \
(a)->top = tmp_top; \
} \
if ((a)->top == 0) \
(a)->neg = 0; \
bn_pollute(a); \
}

Expand Down
8 changes: 6 additions & 2 deletions dep/include/openssl/comp.h
Expand Up @@ -4,13 +4,17 @@

# include <openssl/crypto.h>

# ifdef OPENSSL_NO_COMP
# error COMP is disabled.
# endif

#ifdef __cplusplus
extern "C" {
#endif

typedef struct comp_ctx_st COMP_CTX;

typedef struct comp_method_st {
struct comp_method_st {
int type; /* NID for compression library */
const char *name; /* A text string to identify the library */
int (*init) (COMP_CTX *ctx);
Expand All @@ -26,7 +30,7 @@ typedef struct comp_method_st {
*/
long (*ctrl) (void);
long (*callback_ctrl) (void);
} COMP_METHOD;
};

struct comp_ctx_st {
COMP_METHOD *meth;
Expand Down
2 changes: 1 addition & 1 deletion dep/include/openssl/crypto.h
Expand Up @@ -628,7 +628,7 @@ void OPENSSL_init(void);
* into a defined order as the return value when a != b is undefined, other
* than to be non-zero.
*/
int CRYPTO_memcmp(const void *a, const void *b, size_t len);
int CRYPTO_memcmp(const volatile void *a, const volatile void *b, size_t len);

/* BEGIN ERROR CODES */
/*
Expand Down
2 changes: 1 addition & 1 deletion dep/include/openssl/dh.h
Expand Up @@ -174,7 +174,7 @@ struct dh_st {
/* DH_check_pub_key error codes */
# define DH_CHECK_PUBKEY_TOO_SMALL 0x01
# define DH_CHECK_PUBKEY_TOO_LARGE 0x02
# define DH_CHECK_PUBKEY_INVALID 0x03
# define DH_CHECK_PUBKEY_INVALID 0x04

/*
* primes p where (p-1)/2 is prime too are called "safe"; we define this for
Expand Down
6 changes: 4 additions & 2 deletions dep/include/openssl/evp.h
Expand Up @@ -1370,6 +1370,7 @@ void EVP_add_alg_module(void);
* The following lines are auto generated by the script mkerr.pl. Any changes
* made after this point may be overwritten when the script is next run.
*/

void ERR_load_EVP_strings(void);

/* Error codes for the EVP functions. */
Expand Down Expand Up @@ -1489,6 +1490,7 @@ void ERR_load_EVP_strings(void);
# define EVP_R_INPUT_NOT_INITIALIZED 111
# define EVP_R_INVALID_DIGEST 152
# define EVP_R_INVALID_FIPS_MODE 168
# define EVP_R_INVALID_KEY 171
# define EVP_R_INVALID_KEY_LENGTH 130
# define EVP_R_INVALID_OPERATION 148
# define EVP_R_IV_TOO_LARGE 102
Expand Down Expand Up @@ -1528,7 +1530,7 @@ void ERR_load_EVP_strings(void);
# define EVP_R_WRONG_FINAL_BLOCK_LENGTH 109
# define EVP_R_WRONG_PUBLIC_KEY_TYPE 110

#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
#endif

0 comments on commit a59d9a2

Please sign in to comment.