[win7] как преобразовать сертификат?

Temach

Есть вот такой файл test.cer
 
0‚Ќ0‚ц €СgЄг¬БњC9Sџv›M®0
 *†H†ч
 0Ѓ‹1+0)U"Created by http://www.fiddler2.com1%210%1F%06%03U%04
 D O _ N O T _ T R U S T1907U0 D O _ N O T _ T R U S T _ F i d d l e r R o o t0
140501210000Z
250501205959Z0Ѓ‹1+0)U"Created by http://www.fiddler2.com1%210%1F%06%03U%04
 D O _ N O T _ T R U S T1907U0 D O _ N O T _ T R U S T _ F i d d l e r R o o t0Ѓџ0
 *†H†ч
 ЃЌ 0Ѓ‰ЃЃ ЭЬЧiЈTЮeС¤ѕщM¶№щѕµ§n- JІaНў>Й
њЛҐqWкpu‚рRєI—,5оН`)7|Ё&Д0Що3b liЖоЊВ“Ѕд‡`RрiцТ9n'«іђЦTяjШ`Р’2GС+иTЅЉТѓИ}N+‚ЏP}ItЯ‡ ЈЃп0Ѓм0Uя0я0U% 0
+0ЃАUЃё0ЃµЂ8U]N%ш9h9Ђ;vQЎЃЋ0Ѓ‹1+0)U"Created by http://www.fiddler2.com1%210%1F%06%03U%04
 D O _ N O T _ T R U S T1907U0 D O _ N O T _ T R U S T _ F i d d l e r R o o t‚€СgЄг¬БњC9Sџv›M®0
 *†H†ч
 ЃЃ \й §чb‘}7C|ў?щэаЈ e:»кфrkЌ›J–”пu*TВаBсу’> ‹"А«BВLђgZZ }ыЯ†.jњ@MЅm"¬б¶Њж6­††
ЖЮДжNрYs:"WxЫЎў5ћxNdOѕsЇсї†AїѓNC-±wѓIТiP§

Мне надо получить из него файл вот такого вида 3ad48a91.0
 
-----BEGIN CERTIFICATE-----
MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ
RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD
VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4TAwMDUxMjE4NDYwMFoX
DTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9y
ZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVy
VHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKr
mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr
IZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK
mpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu
XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy
dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/ye
jl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1
BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3
DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT92
9hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3Wgx
jkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0
Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz
ksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS
R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
-----END CERTIFICATE-----
Certificate:
    Data:
     Version: 3 (0x2)
     Serial Number: 33554617 (0x20000b9)
    Signature Algorithm: sha1WithRSAEncryption
     Issuer: C=IE, O=Baltimore, OU=CyberTrust, CN=Baltimore CyberTrust Root
     Validity
     Not Before: May 12 18:46:00 2000 GMT
     Not After : May 12 23:59:00 2025 GMT
     Subject: C=IE, O=Baltimore, OU=CyberTrust, CN=Baltimore CyberTrust Root
     Subject Public Key Info:
     Public Key Algorithm: rsaEncryption
     Public-Key: (2048 bit)
     Modulus:
     00:a3:04:bb:22:ab:98:3d:57:e8:26:72:9a:b5:79:
     d4:29:e2:e1:e8:95:80:b1:b0:e3:5b:8e:2b:29:9a:
     64:df:a1:5d:ed:b0:09:05:6d:db:28:2e:ce:62:a2:
     62:fe:b4:88:da:12:eb:38:eb:21:9d:c0:41:2b:01:
     52:7b:88:77:d3:1c:8f:c7:ba:b9:88:b5:6a:09:e7:
     73:e8:11:40:a7:d1:cc:ca:62:8d:2d:e5:8f:0b:a6:
     50:d2:a8:50:c3:28:ea:f5:ab:25:87:8a:9a:96:1c:
     a9:67:b8:3f:0c:d5:f7:f9:52:13:2f:c2:1b:d5:70:
     70:f0:8f:c0:12:ca:06:cb:9a:e1:d9:ca:33:7a:77:
     d6:f8:ec:b9:f1:68:44:42:48:13:d2:c0:c2:a4:ae:
     5e:60:fe:b6:a6:05:fc:b4:dd:07:59:02:d4:59:18:
     98:63:f5:a5:63:e0:90:0c:7d:5d:b2:06:7a:f3:85:
     ea:eb:d4:03:ae:5e:84:3e:5f:ff:15:ed:69:bc:f9:
     39:36:72:75:cf:77:52:4d:f3:c9:90:2c:b9:3d:e5:
     c9:23:53:3f:1f:24:98:21:5c:07:99:29:bd:c6:3a:
     ec:e7:6e:86:3a:6b:97:74:63:33:bd:68:18:31:f0:
     78:8d:76:bf:fc:9e:8e:5d:2a:86:a7:4d:90:dc:27:
     1a:39
     Exponent: 65537 (0x10001)
     X509v3 extensions:
     X509v3 Subject Key Identifier:
     E5:9D:59:30:82:47:58:CC:AC:FA:08:54:36:86:7B:3A:B5:04:4D:F0
     X509v3 Basic Constraints: critical
     CA:TRUE, pathlen:3
     X509v3 Key Usage: critical
     Certificate Sign, CRL Sign
    Signature Algorithm: sha1WithRSAEncryption
     85:0c:5d:8e:e4:6f:51:68:42:05:a0:dd:bb:4f:27:25:84:03:
     bd:f7:64:fd:2d:d7:30:e3:a4:10:17:eb:da:29:29:b6:79:3f:
     76:f6:19:13:23:b8:10:0a:f9:58:a4:d4:61:70:bd:04:61:6a:
     12:8a:17:d5:0a:bd:c5:bc:30:7c:d6:e9:0c:25:8d:86:40:4f:
     ec:cc:a3:7e:38:c6:37:11:4f:ed:dd:68:31:8e:4c:d2:b3:01:
     74:ee:be:75:5e:07:48:1a:7f:70:ff:16:5c:84:c0:79:85:b8:
     05:fd:7f:be:65:11:a3:0f:c0:02:b4:f8:52:37:39:04:d5:a9:
     31:7a:18:bf:a0:2a:f4:12:99:f7:a3:45:82:e3:3c:5e:f5:9d:
     9e:b5:c8:9e:7c:2e:c8:a4:9e:4e:08:14:4b:6d:fd:70:6d:6b:
     1a:63:bd:64:e6:1f:b7:ce:f0:f2:9f:2e:bb:1b:b7:f2:50:88:
     73:92:c2:e2:e3:16:8d:9a:32:02:ab:8e:18:dd:e9:10:11:ee:
     7e:35:ab:90:af:3e:30:94:7a:d0:33:3d:a7:65:0f:f5:fc:8e:
     9e:62:cf:47:44:2c:01:5d:bb:1d:b5:32:d2:47:d2:38:2e:d0:
     fe:81:dc:32:6a:1e:b5:ee:3c:d5:fc:e7:81:1d:19:c3:24:42:
     ea:63:39:a9
SHA1 Fingerprint=D4:DE:20:D0:5E:66:FC:53:FE:1A:50:88:2C:78:DB:28:52:CA:E4:74

1) что это за форматы файлов вообще такие?
2) как это сделать безгеморно?
пс. нужно это всё чтобы сертификат установить в АНдроид как корневой

AlexV769

1) что это за форматы файлов вообще такие?
DER и PEM соответственно.
2) как это сделать безгеморно?
man x509
google: openssl x509
Что-то вроде openssl x509 -in cert.cer -inform DER -out cert.perm -outform PEM

YUAL

Certificate:
Data:
Version: 3 (0x2)
Serial Number:
(Negative)77:2e:98:55:1c:53:3e:63:bc:c6:ac:60:89:64:b2:52
Signature Algorithm: sha256WithRSAEncryption
Issuer: OU=Created by http://www.fiddler2.com, O=\x00D\x00O\x00_\x00N\x00O\x00T\x00_\x00T\x00R\x00U\x00S\x00T, CN=\x00D\x00O\x00_\x00N\x00O\x00T\x00_\x00T\x00R\x00U\x00S\x00T\x00_\x00F\x00i\x00d\x00d\x00l\x00e\x00r\x00R\x00o\x00o\x00t
Validity
Not Before: May 1 21:00:00 2014 GMT
Not After : May 1 20:59:59 2025 GMT
Subject: OU=Created by http://www.fiddler2.com, O=\x00D\x00O\x00_\x00N\x00O\x00T\x00_\x00T\x00R\x00U\x00S\x00T, CN=\x00D\x00O\x00_\x00N\x00O\x00T\x00_\x00T\x00R\x00U\x00S\x00T\x00_\x00F\x00i\x00d\x00d\x00l\x00e\x00r\x00R\x00o\x00o\x00t
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
00:dd:dc:d7:69:a3:54:de:65:d1:a4:18:be:f9:4d:
0f:b6:b9:f9:be:b5:a7:6e:2d:0c:4a:b2:61:cd:a2:
3e:c9:0d:9c:cb:06:a5:71:57:ea:70:75:82:17:f0:
52:ba:49:97:2c:35:ee:0b:cd:60:29:37:7c:a8:1c:
26:c4:30:0f:d9:ee:33:04:62:00:6c:69:c6:ee:10:
8c:c2:93:bd:e4:87:60:52:f0:69:f6:d2:39:6e:27:
ab:b3:0e:90:d6:54:ff:6a:d8:60:d0:92:04:32:47:
d1:2b:e8:54:bd:8a:d2:83:c8:06:7d:4e:2b:82:0b:
8f:50:7d:49:1b:15:74:df:87
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints: critical
CA:TRUE, pathlen:1
X509v3 Extended Key Usage:
TLS Web Server Authentication
2.5.29.1:
0....8U]N%..9.h9..;vQ...0..1+0)..U..."Created by http://www.fiddler2.com1%210...U.
...D.O._.N.O.T._.T.R.U.S.T1907..U...0.D.O._.N.O.T._.T.R.U.S.T._.F.i.d.d.l.e.r.R.o.o.t....g.....C9S.v.M.
Signature Algorithm: sha256WithRSAEncryption
5c:e9:a0:a7:f7:62:91:7d:37:43:7c:a2:3f:f9:fd:e0:a3:a0:
65:3a:bb:04:ea:f4:72:6b:8d:9b:4a:96:94:ef:75:2a:15:54:
c2:02:e0:42:1a:f1:18:f3:92:3e:0c:8b:22:17:c0:16:ab:42:
c2:4c:90:67:5a:5a:a0:7d:fb:df:86:2e:6a:9c:40:4d:bd:6d:
22:ac:e1:b6:8c:e6:36:ad:86:86:0a:c6:de:c4:e6:4e:f0:59:
73:3a:22:57:78:db:a1:a2:1c:35:9e:78:4e:64:4f:be:73:af:
f1:bf:86:41:bf:83:4e:43:2d:b1:12:0f:77:83:49:d2:69:50:
a7:02
-----BEGIN CERTIFICATE-----
MIIDjTCCAvagAwIBAgIQiNFnquOswZOVOfdptNrjANBgkqhkiG9w0BAQsFADCB
izErMCkGA1UECxMiQ3JlYXRlZCBieSBodHRwOi8vd3d3LmZpZGRsZXIyLmNvbTEh
MB8GA1UECh4YAEQATwBfAE4ATwBUAF8AVABSAFUAUwBUMTkwNwYDVQQDHjAARABP
AF8ATgBPAFQAXwBUAFIAVQBTAFQAXwBGAGkAZABkAGwAZQByAFIAbwBvAHQwHhcN
MTQwNTAxMjEwMDAwWhcNMjUwNTAxMjA1OTU5WjCBizErMCkGA1UECxMiQ3JlYXRl
ZCBieSBodHRwOi8vd3d3LmZpZGRsZXIyLmNvbTEhMB8GA1UECh4YAEQATwBfAE4A
TwBUAF8AVABSAFUAUwBUMTkwNwYDVQQDHjAARABPAF8ATgBPAFQAXwBUAFIAVQBT
AFQAXwBGAGkAZABkAGwAZQByAFIAbwBvAHQwgZ8wDQYJKoZIhvcNAQEBBQADgY0A
MIGJAoGBAN3c12mjVN5l0aQYvvlND7a5+b61p24tDEqyYc2iPskNnMsGpXFX6nB1
ghfwUrpJlyw17gvNYCk3fKgcJsQwD9nuMwRiAGxpxu4QjMKTveSHYFLwafbSOW4n
q7MOkNZU/2rYYNCSBDJH0SvoVL2K0oPIBn1OK4ILj1B9SRsVdN+HAgMBAAGjge8w
gewwEgYDVR0TAQH/BAgwBgEB/wIBATATBgNVHSUEDDAKBggrBgEFBQcDATCBwAYD
VR0BBIG4MIG1gBA4VV1OJRL4ORhoOYAWO3ZRoYGOMIGLMSswKQYDVQQLEyJDcmVh
dGVkIGJ5IGh0dHA6Ly93d3cuZmlkZGxlcjIuY29tMSEwHwYDVQQKHhgARABPAF8A
TgBPAFQAXwBUAFIAVQBTAFQxOTA3BgNVBAMeMABEAE8AXwBOAE8AVABfAFQAUgBV
AFMAVABfAEYAaQBkAGQAbABlAHIAUgBvAG8AdIIQiNFnquOswZOVOfdptNrjAN
BgkqhkiG9w0BAQsFAAOBgQBc6aCn92KRfTdDfKI/+f3go6BlOrsE6vRya42bSpaU
73UqFVTCAuBCGvEY85I+DIsiF8AWq0LCTJBnWlqgffvfhi5qnEBNvW0irOG2jOY2
rYaGCsbexOZO8FlzOiJXeNuhohw1nnhOZE++c6/xv4ZBv4NOQy2xEg93g0nSaVCn
Ag==
-----END CERTIFICATE-----
очень странный сертификат конечно.

Temach

удалось в итоге этой командой
openssl x509 -inform PEM -text -in CERTIFICATE.FILE > yourcert.txt
почему странный?

Temach

кстати, исходный сертификат слегка переделал, теперь итог выглядит вот так
-----BEGIN CERTIFICATE-----
MIIDozCCAougAwIBAgIQAOymAONbPb2i7lBdZnlY2TANBgkqhkiG9w0BAQUFADBq
MSswKQYDVQQLDCJDcmVhdGVkIGJ5IGh0dHA6Ly93d3cuZmlkZGxlcjIuY29tMRgw
FgYDVQQKDA9ET19OT1RfVFJVU1RfQkMxITAfBgNVBAMMGERPX05PVF9UUlVTVF9G
aWRkbGVyUm9vdDAeFw0xNTA0MjYwMDAwMDBaFw0yNTA1MDMxMTIwMTJaMGoxKzAp
BgNVBAsMIkNyZWF0ZWQgYnkgaHR0cDovL3d3dy5maWRkbGVyM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ption
Issuer: OU=Created by http://www.fiddler2.com, O=DO_NOT_TRUST_BC, CN=DO_NOT_TRUST_FiddlerRoot
Validity
Not Before: Apr 26 00:00:00 2015 GMT
Not After : May 3 11:20:12 2025 GMT
Subject: OU=Created by http://www.fiddler2.com, O=DO_NOT_TRUST_BC, CN=DO_NOT_TRUST_FiddlerRoot
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
00:ac:53:d3:db:5a:00:75:ed:51:55:b4:dc:2a:ed:
07:4c:05:ed:e3:03:e5:fe:1e:ed:98:61:a2:ab:0d:
dd:a3:04:bb:34:e3:73:7c:ec:99:1d:64:ca:2c:a0:
3f:7f:81:5a:39:19:d3:5a:fb:a2:e5:4a:5a:01:38:
a8:fc:a6:0c:7b:f0:0a:98:7d:a0:cf:ca:e0:16:c4:
42:52:48:02:8d:e9:72:ab:68:08:5b:b0:42:25:29:
c1:c3:0e:65:da:b0:d1:76:17:ac:eb:65:5d:6f:5f:
48:21:73:ee:18:96:d3:2d:1c:12:40:fb:05:ca:82:
67:75:be:f5:84:11:d3:35:1b:0b:ff:66:a9:c1:47:
70:90:f2:79:59:f3:64:74:59:50:dd:e1:ce:fe:82:
ee:fc:08:29:43:f4:20:3c:46:6c:7b:72:4a:76:42:
9d:08:00:f9:b8:e9:70:d9:92:25:97:92:28:85:a6:
15:2e:80:93:e1:b9:7e:7e:cf:b8:4e:fd:c8:30:81:
d3:91:52:36:ab:40:ff:eb:3d:5f:09:87:1c:0c:d0:
a6:1a:3d:20:d7:a1:4c:12:45:48:73:ed:8e:09:c8:
5f:f0:7e:dd:7a:79:59:8e:33:59:21:5f:0a:0a:32:
f3:b9:9d:9e:e3:e8:42:b5:bb:75:e5:80:59:6f:55:
62:33
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints: critical
CA:TRUE, pathlen:1
X509v3 Key Usage: critical
Certificate Sign
X509v3 Subject Key Identifier:
8E:88:37:6C:B4:20:13:08:AC:C7:7B:09:C0:D2:81:57:78:B7:2F:AC
Signature Algorithm: sha1WithRSAEncryption
05:a7:23:00:db:01:9e:a3:b4:ef:a0:0d:84:2a:9b:bc:30:ba:
1b:8a:ef:ca:12:1c:cf:d1:5b:0d:69:9b:62:64:90:3d:4c:52:
55:3b:c5:86:8d:1d:b2:91:eb:26:0e:99:c7:3f:fb:23:1d:90:
2b:d2:6a:1b:15:5f:0e:07:56:49:7d:6f:87:b0:bf:30:ac:97:
50:1e:94:10:c0:4b:29:b8:91:b2:d3:42:aa:a9:81:37:6f:b7:
18:84:36:94:55:bf:62:2e:71:64:f3:6a:0d:5c:33:f6:2b:a8:
54:8e:0b:e6:01:c8:f7:51:43:f8:b7:e5:0d:35:af:b1:31:81:
9d:1e:62:63:20:1c:bc:df:70:8e:49:bf:59:da:cd:c6:8d:ae:
7a:47:93:1a:4a:65:80:14:77:e0:dc:a7:a8:29:68:e2:aa:0b:
d3:76:6c:1a:6b:da:bd:4c:39:31:fc:5d:0e:54:6d:fd:bb:e7:
27:2f:ff:b2:f8:e4:52:96:6b:ad:5e:14:ac:84:a6:d9:f5:87:
26:55:e2:a2:67:45:8d:4c:89:d0:25:64:ba:28:72:ea:ad:b2:
c9:b2:7e:ba:b3:8c:d3:6d:e4:73:cc:b7:de:c7:4b:6c:bd:ca:
36:8a:85:78:54:d8:39:63:22:c7:73:0f:bf:c2:97:fd:6d:a9:
17:13:dc:6c
SHA1 Fingerprint=5F:8A:30:94:13:7A:37:F2:45:DF:3D:10:6B:B5:9C:57:05:EA:F2:40
Оставить комментарий
Имя или ник:
Комментарий: