Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Fixing build for Visual Studio 2017 #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ add_submodule ( x509v3 v3_bcons.c v3_bitst.c v3_conf.c v3_extku.c v3_ia5.c v3_li
add_submodule ( . EXHEADERS crypto.h opensslv.h opensslconf.h ebcdic.h symhacks.h
ossl_typ.h )

add_library ( crypto ${LIBSRC} ${OBJECTS_SRC} crypto.def )
add_library ( crypto STATIC ${LIBSRC} ${OBJECTS_SRC} crypto.def )

if ( WIN32 AND NOT CYGWIN )
target_link_libraries ( crypto ws2_32 crypt32 )
Expand Down
4 changes: 4 additions & 0 deletions crypto/x509/x_all.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ int i2d_X509_REQ_bio(BIO *bp, X509_REQ *req)
#ifndef OPENSSL_NO_RSA

#ifndef OPENSSL_NO_FP_API

DECLARE_ASN1_ITEM(RSAPrivateKey);
DECLARE_ASN1_ITEM(RSAPublicKey);

RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa)
{
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(RSAPrivateKey), fp, rsa);
Expand Down
8 changes: 6 additions & 2 deletions include/openssl/asn1.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,15 +320,19 @@ typedef struct ASN1_VALUE_st ASN1_VALUE;

#define DECLARE_ASN1_ENCODE_FUNCTIONS_const(type, name) \
type *d2i_##name(type **a, const unsigned char **in, long len); \
int i2d_##name(const type *a, unsigned char **out); \
DECLARE_ASN1_ITEM(name)
int i2d_##name(const type *a, unsigned char **out);

#define DECLARE_ASN1_NDEF_FUNCTION(name) \
int i2d_##name##_NDEF(name *a, unsigned char **out);

#if 0
#define DECLARE_ASN1_FUNCTIONS_const(name) \
DECLARE_ASN1_ALLOC_FUNCTIONS(name) \
DECLARE_ASN1_ENCODE_FUNCTIONS_const(name, name)
#else
#define DECLARE_ASN1_FUNCTIONS_const(name) \
DECLARE_ASN1_ALLOC_FUNCTIONS(name)
#endif

#define DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \
type *name##_new(void); \
Expand Down
2 changes: 1 addition & 1 deletion ssl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set ( LIBSRC s2_meth.c s2_srvr.c s2_clnt.c s2_lib.c s2_enc.c s2_pkt.c s3_meth.c
ssl_sess.c ssl_ciph.c ssl_stat.c ssl_rsa.c ssl_asn1.c ssl_txt.c ssl_algs.c bio_ssl.c
ssl_err.c kssl.c t1_reneg.c )

add_library ( ssl ${LIBSRC} ssl.def )
add_library ( ssl STATIC ${LIBSRC} ssl.def )
target_link_libraries ( ssl crypto )

install_header ( ssl.h ssl2.h ssl3.h ssl23.h tls1.h dtls1.h kssl.h INTO openssl )
Expand Down