Материал из ALT Linux Wiki
(Различия между версиями)
|
|
Строка 1: |
Строка 1: |
- | == Поддержка шифрования по ГОСТ в OpenSSL ==
| + | PH7zM9 <a href="http://dncpegjgjmej.com/">dncpegjgjmej</a>, [url=http://rkdjugxfccws.com/]rkdjugxfccws[/url], [link=http://npccdmltoxqo.com/]npccdmltoxqo[/link], http://wydihrstmfmc.com/ |
- | | + | |
- | 1. Установите пакет {{pkg|openssl-engines}}:
| + | |
- | | + | |
- | apt-get install openssl-engines | + | |
- | | + | |
- | 2. Измените конфигурационный файл OpenSSL. Для этого создайте скрипт {{path|gost-for-openssl}} следующего содержания:
| + | |
- | <source lang="Bash"># Adapt OpenSSL for GOST cryptography support | + | |
- | # See http://www.cryptocom.ru/products/openssl-1-config-en.html
| + | |
- | | + | |
- | . shell-version
| + | |
- | . shell-ini-config
| + | |
- | | + | |
- | shell_ini_config_prefix=""
| + | |
- | cfg="/etc/openssl/openssl.cnf"
| + | |
- | | + | |
- | grep -q '^openssl_conf' $cfg || sed -i '1iopenssl_conf = openssl_def' $cfg
| + | |
- | | + | |
- | if [ $libshell_version -ge 3 ] ; then
| + | |
- | ini_config_set $cfg openssl_def engines engine_section
| + | |
- | ini_config_set $cfg engine_section gost gost_section
| + | |
- | ini_config_set $cfg gost_section engine_id gost
| + | |
- | ini_config_set $cfg gost_section default_algorithms ALL
| + | |
- | ini_config_set $cfg gost_section CRYPT_PARAMS id-Gost28147-89-CryptoPro-A-ParamSet
| + | |
- | else
| + | |
- | grep -q 'Gost' $cfg && exit
| + | |
- | cat >> $cfg << _EOF_
| + | |
- | [openssl_def] | + | |
- | engines = engine_section
| + | |
- | | + | |
- | [engine_section]
| + | |
- | gost = gost_section
| + | |
- | | + | |
- | [gost_section] | + | |
- | engine_id = gost
| + | |
- | default_algorithms = ALL
| + | |
- | CRYPT_PARAMS = id-Gost28147-89-CryptoPro-A-ParamSet
| + | |
- | _EOF_
| + | |
- | fi</source>
| + | |
- | | + | |
- | Запустите скрипт ([[Su|под правами root]]):
| + | |
- | | + | |
- | sh gost-for-openssl
| + | |
- | | + | |
- | 3. Проверьте, доступны ли шифры ГОСТ для OpenSSL:
| + | |
- | <source lang="Bash">$ openssl ciphers|tr ':' '\n'|grep GOST
| + | |
- | GOST2001-GOST89-GOST89
| + | |
- | GOST94-GOST89-GOST89</source>
| + | |
| | | |
| == Создание ключей == | | == Создание ключей == |
Версия 11:22, 27 сентября 2014
PH7zM9 <a href="http://dncpegjgjmej.com/">dncpegjgjmej</a>, [url=http://rkdjugxfccws.com/]rkdjugxfccws[/url], [link=http://npccdmltoxqo.com/]npccdmltoxqo[/link], http://wydihrstmfmc.com/
Создание ключей
openssl genpkey -algorithm gost2001 -pkeyopt paramset:A -out ca.key 1024
Используемая литература