OpenSSL Command Builder — конструктор команд OpenSSL
Выберите задачу, заполните поля, скопируйте рабочую команду — и получите объяснение каждого её флага. Или вставьте команду, найденную где-то ещё, и инструмент разберёт её за вас.
На 100 % локально: каталог — это статические данные, а разбор команд выполняется в браузере; ничего из того, что вы вводите, никуда не отправляется
Ключи
Сгенерировать закрытый ключ EC
Современный вариант в одну команду. Записывает закрытый ключ PKCS#8, который Node.js, Go, Python, Java и WebCrypto загружают без преобразования.
Параметры
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-256 -out key.pemЧто делает каждый флаг
- openssl genpkey
- Генератор ключей OpenSSL 3.x. Одна команда подходит для всех алгоритмов и всегда записывает контейнер PKCS#8 — `-----BEGIN PRIVATE KEY-----`.
- -algorithm EC
- Генерирует ключ на эллиптической кривой. Саму кривую задаёт -pkeyopt.
- -pkeyopt ec_paramgen_curve:P-256
- Опция конкретного алгоритма: ключ генерируется на кривой P-256. Без неё openssl не знает, какую кривую использовать, и отказывается работать.
- -out key.pem
- Куда записать ключ. Без этого флага ключ выводится в терминал — удобно, чтобы взглянуть на него, но никуда не годится для всего остального.
Примечания
- Файл закрытого ключа уже содержит открытый ключ. Сохранять открытую часть отдельно нужно, только если её должен прочитать кто-то другой.
- P-256, prime256v1 и secp256r1 — три имени одной кривой. secp256k1 — действительно другая кривая, а не четвёртый псевдоним: выбирайте её, только если работаете с Bitcoin или Ethereum.
- Более старая команда `openssl ecparam -name prime256v1 -genkey -noout -out key.pem` по-прежнему работает и создаёт тот же ключевой материал, но в контейнере SEC1 (`BEGIN EC PRIVATE KEY`). WebCrypto и ряд способов загрузки ключей в JVM принимают только PKCS#8.
- Эта команда не меняет права доступа к файлу. На общей машине затем выполните для ключа `chmod 600`.
Пошаговый рецепт — та же задача в виде проверенного пошагового руководства с объяснением вывода каждой команды.
Связанные задачи
Перед публикацией каждая команда каталога была сгенерирована с параметрами по умолчанию и выполнена в OpenSSL 3.6.3 (9 Jun 2026), darwin64-arm64. Опции меняются от релиза к релизу: там, где 1.1.1 и 3.x различаются, в задаче об этом сказано.
How it works
openssl is not one program but roughly thirty, each with its own option set, and the manual page is organised around those programs rather than around what anyone is trying to do. The result is that “make a self-signed certificate with a SAN” lives under req, which is documented as the certificate request command, and that the flag which actually decides whether browsers accept your certificate — -addext — appears nowhere near the top. This page inverts that: 36 tasks phrased as goals, each producing a command whose every flag is spelled out underneath.
The explanations are the point. A command you copied and cannot read is a command you cannot adapt, and openssl’s flags are unusually easy to misread — -noout suppresses the object rather than all output, -nocrypt is the difference between a script that runs and one that hangs at a prompt, and -copy_extensions is why a certificate you issued yourself has no hostnames in it. Each task also lists the specific ways it goes wrong, because those are what actually costs the afternoon.
Values you type are quoted for a POSIX shell before they go into the command, so a path with spaces or a subject with a comma survives the copy-paste. If a value contains something a shell would normally act on — backticks, $( ), a semicolon — the builder says so, because the quoting means it will be passed through literally rather than executed, and that is occasionally the surprise rather than the reassurance. Windows users should note that cmd.exe and PowerShell quote differently; the commands here assume sh, bash or zsh.
The reverse mode splits a pasted command the way a shell would — respecting quotes, escapes, pipes and redirections — and looks each flag up in a dictionary covering 180 options across 24 subcommands. Nothing is executed, and a flag that is not in the dictionary is labelled unknown rather than given an invented meaning. For the authoritative list your build accepts, openssl <subcommand> -help is always right and always local.