mirror of
https://github.com/fruworg/fruworg.github.io.git
synced 2024-11-16 09:27:17 +03:00
30 lines
604 B
Markdown
30 lines
604 B
Markdown
---
|
|
title: Конвертация .pfx в .pem
|
|
description: Используя OpenSSL
|
|
date: 2023-04-12T11:45:00+05:00
|
|
tags: [linux, tls]
|
|
---
|
|
## Извлечение сертификата и ключа
|
|
|
|
```shell
|
|
openssl pkcs12 -in <tls>.pfx -out <tls>.pem -nodes
|
|
```
|
|
|
|
## Извлечение сертификата
|
|
|
|
```shell
|
|
openssl pkcs12 -in <tls>.pfx -clcerts -nokeys -out <cert>.pem
|
|
```
|
|
|
|
## Извлечение ключа
|
|
|
|
```shell
|
|
openssl pkcs12 -in <tls>.pfx -nocerts -out <key>.tmp.key
|
|
```
|
|
|
|
## Обеспароливание ключа
|
|
|
|
```shell
|
|
openssl rsa -in <key>.tmp.key -out <key>.key
|
|
```
|