Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Инструкция как собрать в отдельную директорию #468

Open
ethaniel opened this issue Dec 26, 2024 · 0 comments

Comments

@ethaniel
Copy link

ethaniel commented Dec 26, 2024

Здравствуйте,

Мне нужно было собрать openssl с gost, но чтобы он не переписывал системный openssl.
Для этого, я все собираю в /usr/local/openssl-gost.

Вот мои команды для сборки, надеюсь кому-нибудь пригодятся:

yum -y install zlib-devel perl-IPC-Cmd perl-FindBin
rm -rfv /usr/local/openssl-gost

cd ~
wget https://github.com/openssl/openssl/releases/download/openssl-3.0.15/openssl-3.0.15.tar.gz
tar zfx openssl-3.0.15.tar.gz
cd openssl-3.0.15

LDFLAGS="-Wl,--enable-new-dtags -Wl,-rpath,/usr/local/openssl-gost/lib64" ./config shared zlib enable-rfc3779 --prefix=/usr/local/openssl-gost
make depend
make
make install_sw # this installs without man pages (alleviates some weird error)

cd ~
git clone https://github.com/gost-engine/engine
cd engine
git submodule update --init
mkdir build
cd build
cmake -DOPENSSL_ENGINES_DIR=/usr/local/openssl-gost/lib64/engines-3 -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/openssl-gost -DOPENSSL_ROOT_DIR=/usr/local/openssl-gost -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --target install --config Release


cat > /usr/local/openssl-gost/ssl/openssl.cnf << EOF
openssl_conf = openssl_def
[openssl_def]
engines = engine_section

[engine_section]
gost = gost_section

[gost_section]
engine_id = gost
dynamic_path = /usr/local/openssl-gost/lib64/engines-3/gost.so
default_algorithms = ALL
EOF

/usr/local/openssl-gost/bin/openssl ciphers | grep GOST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant