Giter VIP home page Giter VIP logo

openssl's Introduction

openssl

OpenSSL build scripts and binaries

Usage:

build.ps1 [-openssl_release 1.0.0 | 1.1.0]
          [-vs_version 160 | 150 | 140 | 120 | 110 | 100 | 90]
          [-config     release | debug | both]
          [-platform   Win32 | x64] # TODO WinCE/WCE
          [-library    shared | static | both]

Example:

powershell -ExecutionPolicy RemoteSigned -File build.ps1 -openssl_release 1.1.0g -vs_version 120 -config both -platform x64 -library both

The above command will build 64-bit release/debug and shared/static libraries.

The rest of this document applies to building using pre-built OpenSL binaries. If you are building from source, you can skip it.

Notes:

OpenSSL 1.0.x and 1.1.x use similar, but not entirely same build systems. Building OpenSSL <=1.0.x is deprecated and not actively maintained. The script logic is still present, but it may be removed at any time.

OpenSSL >=1.1.0 binaries used by all POCO VS builds are built using VS 2013 (MSVC 120). While having a one set of prebuilt binaries for all VS versions is convenient, there are some challenges related to static linking (/MT) from VS version != 2013.

These could not be solved using OpenSSL build systems (eg. no-sse2 or no-asm options) and have been resolved in an unconventional way:

  1. LNK2019: unresolved external symbol ___report_rangecheckfailure

Occurs in VS versions < 2013. Solved using this method.

  1. LNK2019: unresolved external symbol __dtoul3

Occurs in VS versions < 2013, 32-bit only. Solved using this method.

Explanation:

The obj file containing the missing function is extracted from the VS 2012 msvcrt.lib, and a separate library (libMissingPreVS2013CRT.lib) is created from it. The static-linked executables (/MT)compiled with VS <2012 must link to this library (in addition to linking to libcrypto.lib and/or libssl.lib).

  1. LNK2001: unresolved external symbol __iob_func

Occurs in VS versions >= 2015. Solved using this method: https://stackoverflow.com/a/33830712/205386

Given the above, starting with POCO >=1.9.0 and >=2.0, using these binaries is transparent - all VS projects are preconfigured to use these binaries out-of-the-box.

openssl's People

Contributors

diversus23 avatar zosrothko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openssl's Issues

Problem when compile for Android

Hi, im with a problem while compile poco project for android, but the real problem is when compile openssl that poco depends on it. I get this error:

aes-armv4.S:358:2: error: out of range immediate fixup value
 sub r10,r3,#AES_encrypt-AES_Te @ Te
 ^
aes-armv4.S:994:2: error: out of range immediate fixup value
 sub r10,r3,#AES_decrypt-AES_Td @ Td
 ^
make[3]: *** [aes-armv4.o] Error 1
make[2]: *** [subdirs] Error 1
make[1]: *** [build_crypto] Error 1
OpenSSL/1.0.2o@conan/stable: 
OpenSSL/1.0.2o@conan/stable: ERROR: Package '534df50dac7c680f5f1cff0af81b32be7b5b5a24' build failed
OpenSSL/1.0.2o@conan/stable: WARN: Build folder /Users/paulo/.conan/data/OpenSSL/1.0.2o/conan/stable/build/534df50dac7c680f5f1cff0af81b32be7b5b5a24
ERROR: OpenSSL/1.0.2o@conan/stable: Error in build() method, line 112
	self.unix_build(config_options_string)
while calling 'unix_build', line 208
	self.run_in_src("make", show_output=True)
while calling 'run_in_src', line 134
	self.run(command)
	ConanException: Error 512 while executing make
make: *** [conan-android] Error 1

I dont know why, it is compiling for "armv4.s".

My profile:

include(default)

[settings]
os=Android
os.api_level=21
compiler=clang
compiler.version=7.0
arch=armv7

[build_requires]
android-ndk/r18@theodelrieu/testing

And my command is:

conan install ../../ --profile android_profile -s arch=armv7 --build=missing --update
conan install ../../ --profile android_profile -s arch=armv8 --build=missing --update
conan install ../../ --profile android_profile -s arch=x86 --build=missing --update 
conan install ../../ --profile android_profile -s arch=x86_64 --build=missing --update

And my conanfile.txt is:

[requires]
Poco/1.9.0@pocoproject/stable

[generators]
cmake

Can anyone help me?

debug dll not found

all DLLs (debug and release) are built with the same name (eg. libcrypto.dll); the problem is that, for the debug build, the DLL is later renamed (alongside lib and other artifacts). this results in debug applications (which link with the lib stub) being redirected to the original name (libcrypto.dll), which does not exist (because it was renamed to libryptod.dll)

@zosrothko fix coming soon, you'll want to update the binary distributions (if you are shipping debug binaries, otherwise this problem does not manifest)

FIPS build flag

I understand FIPs and building compatibility for FIPs is probably another whole project on it's own. Does this have any plans to include FIPS?

static lib not build

I wanted to build a static openssl library from this project. After buildall.cmd for static mode, I linked my program with produced static library (libcrypto.lib, libssl.lib) and I executed my program, "libssl.dll, libcrypto.dll is needed" alert windows appeared.

It seems that /MD{d} compile option is applied instead of /MT{d}

Please check build script..

my modified buildall.cmd is as follow..

powershell -ExecutionPolicy RemoteSigned -File build.ps1 -openssl_release 1.1.0g -vs_version 140 -config both -platform Win32 -library static
powershell -ExecutionPolicy RemoteSigned -File build.ps1 -openssl_release 1.1.0g -vs_version 140 -config both -platform x64 -library static

OpenSSL 3.0

Linux distributions and Poco are switching to OpenSSL 3.

Is it planned that Poco will still use this repository to build with OpenSSL 3?

OpenSSL version indication

It would be handy, if there is some indication in the code or in the Readme, which version (the letter after the 1.1.0) of OpenSSL is used for building the libraries. I know that it is the latest available when the libs are build or that I can build them myself, but it will be just easier for people using it to know if they have the latest sub-release.

dll with suffix

Hi,
how can I build the openssl library with version number or any other suffix in dll name: e.g. libssl_110.dll?
I use openssl in poco-library. If openssl lib/dll names are changed, what adaptions shall I do when poco is compiled?

Thank you!
Xinyu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.