Please support .p7c and .p7b certificates
eg.
$ openssl pkcs7 -print -in a/libjcat-tests_0.1.0-2_amd64.deb/usr/libexec/installed-tests/libjcat/colorhug/firmware.bin.p7c
PKCS7:
type: pkcs7-signedData (1.2.840.113549.1.7.2)
d.sign:
version: 1
md_algs:
algorithm: sha256 (2.16.840.1.101.3.4.2.1)
parameter: <ABSENT>
contents:
type: pkcs7-data (1.2.840.113549.1.7.1)
d.data: <ABSENT>
cert:
cert_info:
version: 2
serialNumber: 0x785B3F0FBF107CC09F236B5408284BBDC95215B8
signature:
algorithm: sha256WithRSAEncryption (1.2.840.113549.1.1.11)
parameter: NULL
issuer: O=Hughski Limited
validity:
notBefore: Apr 7 11:22:15 2020 GMT
notAfter: Dec 31 23:59:59 9999 GMT
subject: O=Hughski Limited
key:
algor:
algorithm: rsaEncryption (1.2.840.113549.1.1.1)
parameter: NULL
public_key: (0 unused bits)
0000 - 30 82 01 8a 02 82 01 81-00 bd 6f 7f 8e f5 0.........o...
000e - 16 b9 9a 6f 85 39 7a 40-84 e4 e4 da 9b aa ...o.9z@......
001c - d3 b0 7c 48 4d c0 e2 f7-c0 cf 0e 30 7b fa ..|HM......0{.
002a - da 15 30 a5 55 62 57 b4-a5 39 68 de 23 64 ..0.UbW..9h.#d
0038 - 57 e0 f7 6e 1f 3d 74 c3-9d 88 31 05 c9 d1 W..n.=t...1...
0046 - 43 49 31 d4 f7 93 32 f1-31 5a e4 be 20 70 CI1...2.1Z.. p
0054 - ff 1c f1 ed 4a fd ba 19-4d c8 31 60 f6 71 ....J...M.1`.q
0062 - 39 bb be e5 76 ff f9 14-46 22 a3 18 41 47 9...v...F"..AG
0070 - 30 ad fb 64 6e e3 c8 fb-bf b4 2e b7 3c 17 0..dn.......<.
007e - de c1 ca b6 68 c3 74 e3-6b 28 d4 a6 87 60 ....h.t.k(...`
008c - f7 52 d8 db ca 92 79 6c-15 22 41 c9 48 73 .R....yl."A.Hs
009a - 3f 9e f8 29 19 e7 a9 c9-03 1a 18 c2 19 dd ?..)..........
00a8 - 49 15 a2 7e ca e0 a6 07-d7 29 ba a9 65 64 I..~.....)..ed
00b6 - 26 a5 0a cd 4f 56 5a 68-0a 68 3c e1 e8 93 &...OVZh.h<...
00c4 - a7 1d 64 7a fd 44 b9 8f-ab 04 88 79 a4 a5 ..dz.D.....y..
00d2 - 0c ec b3 d5 38 f2 ce 8d-95 fc 87 af 7e a8 ....8.......~.
00e0 - 90 c6 f0 fe 81 00 f7 ce-32 eb f5 e1 cb 4f ........2....O
00ee - 28 7c 1d f5 d1 6e 9c bb-ca 44 e7 3f 33 82 (|...n...D.?3.
00fc - f6 5a e9 f0 f9 d5 9f a5-87 b3 5a 99 07 a6 .Z........Z...
010a - 5c d3 fa 91 2c d9 b0 b7-ea a4 f6 e5 f1 35 \...,........5
0118 - 33 d5 74 8d b7 86 26 78-45 0f b6 95 99 07 3.t...&xE.....
0126 - 1a 4b 10 21 8a 70 93 26-ca cb 1e 1a 08 db .K.!.p.&......
0134 - d8 ba 6c 82 19 e5 7a a3-70 80 c6 79 3e 06 ..l...z.p..y>.
0142 - a3 42 8b e7 6d 44 85 4e-0f c8 83 eb 34 38 .B..mD.N....48
0150 - a9 3c ea 8d 4e 3e 20 0b-68 35 87 a8 cc 87 .<..N> .h5....
015e - d3 45 65 2f 9e 6a 8b 94-c4 52 6d e3 40 5e .Ee/.j...Rm.@^
016c - d6 52 13 4a 10 ff 84 99-44 f8 4d d0 5f 48 .R.J....D.M._H
017a - d3 0f 32 34 1d af bd 82-0b 7c bf a0 0c ef ..24.....|....
0188 - 41 02 03 01 00 01 A.....
issuerUID: <ABSENT>
subjectUID: <ABSENT>
extensions:
object: X509v3 Basic Constraints (2.5.29.19)
critical: TRUE
value:
0000 - 30 00 0.
object: X509v3 Subject Alternative Name (2.5.29.17)
critical: BOOL ABSENT
value:
0000 - 30 12 81 10 69 6e 66 6f-40 68 75 67 68 0...info@hugh
000d - 73 6b 69 2e 63 6f 6d ski.com
object: X509v3 Key Usage (2.5.29.15)
critical: TRUE
value:
0000 - 03 03 07 80 00 .....
object: X509v3 Subject Key Identifier (2.5.29.14)
critical: BOOL ABSENT
value:
0000 - 04 14 de cb 95 ee bc c6-c1 ee c8 a9 78 ............x
000d - 89 63 f9 0a a0 0b 92 c2-54 .c......T
sig_alg:
algorithm: sha256WithRSAEncryption (1.2.840.113549.1.1.11)
parameter: NULL
signature: (0 unused bits)
0000 - 92 49 1f 7f db 20 b1 69-f2 0d a0 31 c3 db e4 .I... .i...1...
000f - aa 9c a1 40 f8 31 6f 91-e6 78 98 2e eb 34 a1 ...@.1o..x...4.
001e - a0 03 3f 55 fb 0e fb aa-e3 63 18 b2 5b ea 32 ..?U.....c..[.2
002d - 2f aa 19 c0 ff 33 88 e7-d8 8f 2b 85 2f 2b 92 /....3....+./+.
003c - bb 13 31 7e e1 35 0b 7d-c3 59 6b f9 da 8c 22 ..1~.5.}.Yk..."
004b - 08 0c 45 60 f4 ec f0 a1-ad ed 56 1e f8 7d be ..E`......V..}.
005a - 61 e6 71 d7 fa 45 af 21-8a 21 f3 24 0e 09 1a a.q..E.!.!.$...
0069 - fd 8c 5b 61 47 75 f3 2b-e1 1d 2f e8 e4 94 f1 ..[aGu.+../....
0078 - e0 ce fc 95 6b f3 5f 74-eb 32 86 43 63 d0 71 ....k._t.2.Cc.q
0087 - 56 32 c2 c1 c8 82 aa e0-9a 2a c7 37 9a aa c9 V2.......*.7...
0096 - f4 cc 0a 4c db e1 a9 27-5d b8 a6 48 4b f3 bd ...L...']..HK..
00a5 - 93 7f 5f 33 00 2d 01 79-2b a0 b8 55 96 a4 5e .._3.-.y+..U..^
00b4 - f4 bc 75 b1 14 b6 19 ad-90 67 50 bb ec b5 d8 ..u......gP....
00c3 - 39 86 fd 9a 71 ff de 2e-c1 04 05 d6 fe 9a 19 9...q..........
00d2 - ef 38 1a 47 2c 28 32 e8-6e 48 0c 16 b0 41 b0 .8.G,(2.nH...A.
00e1 - cc fd c2 98 59 f7 55 60-12 54 36 6a 80 6f 6a ....Y.U`.T6j.oj
00f0 - cb 70 74 fb 57 91 0f 73-f5 fb e0 f8 86 75 0c .pt.W..s.....u.
00ff - 9a 61 81 b6 eb c1 f9 07-da a1 98 a9 3f 37 21 .a..........?7!
010e - 11 40 0b 82 18 57 09 fd-cf 29 f1 6a 9b 62 d6 .@...W...).j.b.
011d - 35 60 ee a1 7f 33 d1 36-7c 8a fd a6 1f 47 47 5`...3.6|....GG
012c - 84 d2 58 c4 80 5c cf 06-e4 21 63 86 83 62 17 ..X..\...!c..b.
013b - a8 5f 12 f2 21 60 84 58-3e 71 ea dd 4f 14 6d ._..!`.X>q..O.m
014a - 90 c5 ea d0 64 09 26 59-02 cb 2e ea 14 3a d3 ....d.&Y.....:.
0159 - 00 0e 59 fb 3a bf 01 ea-f9 22 ed 3e b5 f2 aa ..Y.:....".>...
0168 - 53 b5 a4 55 a8 ff e7 86-2c 3b 72 f2 30 f8 7d S..U....,;r.0.}
0177 - de 14 14 35 d9 38 2d 83-3b ...5.8-.;
crl:
<ABSENT>
signer_info:
version: 1
issuer_and_serial:
issuer: O=Hughski Limited
serial: 0x785B3F0FBF107CC09F236B5408284BBDC95215B8
digest_alg:
algorithm: sha256 (2.16.840.1.101.3.4.2.1)
parameter: <ABSENT>
auth_attr:
object: contentType (1.2.840.113549.1.9.3)
set:
OBJECT:pkcs7-data (1.2.840.113549.1.7.1)
object: signingTime (1.2.840.113549.1.9.5)
set:
UTCTIME:Apr 7 11:22:15 2020 GMT
object: messageDigest (1.2.840.113549.1.9.4)
set:
OCTET STRING:
0000 - a1 96 50 4d 09 87 1d a4-f7 d8 3b 87 4b ..PM......;.K
000d - 50 0f 8e e6 e0 61 9a b7-99 f0 74 81 4b P....a....t.K
001a - 31 6d 88 f9 6f 7f 1m..o.
digest_enc_alg:
algorithm: rsaEncryption (1.2.840.113549.1.1.1)
parameter: NULL
enc_digest:
0000 - b4 d2 1a 56 8a 5d e8 bb-21 c0 2d c3 7c 0b ff ...V.]..!.-.|..
000f - f5 b3 f0 19 e5 4b 53 4d-f4 0c 38 62 18 4a af .....KSM..8b.J.
001e - 60 f4 8c 59 4c 33 65 2a-d9 d8 32 e3 77 3f 64 `..YL3e*..2.w?d
002d - 61 e0 9d e2 bf cf 95 b4-3f 13 60 1f 0a 1c d6 a.......?.`....
003c - b7 48 ea de 68 d8 89 b2-fb ca 23 ee 5b 79 ed .H..h.....#.[y.
004b - a3 49 8e 0b b3 cd fd e0-ce cf 3b cd 51 95 f3 .I........;.Q..
005a - d7 02 2d ca b7 3a 23 c4-fe b8 58 fd e0 b7 63 ..-..:#...X...c
0069 - ee 70 7a f0 9a 3d a6 18-95 82 81 2f 11 0c 07 .pz..=...../...
0078 - ac 31 94 4b 74 e6 11 93-45 59 f1 b7 a4 0d 0e .1.Kt...EY.....
0087 - 0b 55 bd a6 cf 1d f4 54-7d 9f 61 e0 31 40 11 .U.....T}.a.1@.
0096 - eb ee 72 f1 70 42 28 6a-be 72 85 d1 08 06 e3 ..r.pB(j.r.....
00a5 - 6f 28 21 3b f6 b1 7a c7-9f 3d 25 2d d0 0f a5 o(!;..z..=%-...
00b4 - d9 60 bd 3c fc 99 a3 cb-06 75 a2 89 63 87 9e .`.<.....u..c..
00c3 - 66 ee 33 e7 bd 0b e7 1d-db d3 b2 aa dd b4 5f f.3..........._
00d2 - a6 01 10 33 e0 af be 38-de 5b 67 d3 d4 f0 0d ...3...8.[g....
00e1 - 15 47 f9 42 69 3a 9a 7a-50 38 8e 36 f9 2a d5 .G.Bi:.zP8.6.*.
00f0 - 7f 48 20 ed 92 dd 34 eb-f1 bf 3d 4c 69 f1 8f .H ...4...=Li..
00ff - bf 71 83 69 8b 89 0a 0f-ac ec ce b0 75 e9 bc .q.i........u..
010e - 57 68 fd 57 45 47 cf c6-d9 d0 2b c2 56 43 62 Wh.WEG....+.VCb
011d - 19 63 2b 76 7d 4d 71 68-81 e8 c4 27 b3 e1 fa .c+v}Mqh...'...
012c - a4 57 93 6b cc a1 f2 e0-78 e6 6c b9 a1 ba 06 .W.k....x.l....
013b - 2d ec 28 ef a6 95 36 af-e6 31 2c 98 fb c4 98 -.(...6..1,....
014a - 6b 81 c4 e3 34 6e 64 58-40 60 d3 85 74 96 f4 k...4ndX@`..t..
0159 - bf 61 01 53 e6 fa ca 35-5b 58 26 01 04 6b f8 .a.S...5[X&..k.
0168 - 26 fa 4a 1e b3 03 da 98-88 14 19 b0 0a 10 02 &.J............
0177 - 87 f2 ab 18 fa 25 4e 28-43 .....%N(C
unauth_attr:
<ABSENT>
-----BEGIN PKCS7-----
MIIGpQYJKoZIhvcNAQcCoIIGljCCBpICAQExDTALBglghkgBZQMEAgEwCwYJKoZI
hvcNAQcBoIIEJTCCBCEwggKJoAMCAQICFHhbPw+/EHzAnyNrVAgoS73JUhW4MA0G
CSqGSIb3DQEBCwUAMBoxGDAWBgNVBAoTD0h1Z2hza2kgTGltaXRlZDAgFw0yMDA0
MDcxMTIyMTVaGA85OTk5MTIzMTIzNTk1OVowGjEYMBYGA1UEChMPSHVnaHNraSBM
aW1pdGVkMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAvW9/jvUWuZpv
hTl6QITk5NqbqtOwfEhNwOL3wM8OMHv62hUwpVViV7SlOWjeI2RX4PduHz10w52I
MQXJ0UNJMdT3kzLxMVrkviBw/xzx7Ur9uhlNyDFg9nE5u77ldv/5FEYioxhBRzCt
+2Ru48j7v7QutzwX3sHKtmjDdONrKNSmh2D3UtjbypJ5bBUiQclIcz+e+CkZ56nJ
AxoYwhndSRWifsrgpgfXKbqpZWQmpQrNT1ZaaApoPOHok6cdZHr9RLmPqwSIeaSl
DOyz1Tjyzo2V/IevfqiQxvD+gQD3zjLr9eHLTyh8HfXRbpy7ykTnPzOC9lrp8PnV
n6WHs1qZB6Zc0/qRLNmwt+qk9uXxNTPVdI23hiZ4RQ+2lZkHGksQIYpwkybKyx4a
CNvYumyCGeV6o3CAxnk+BqNCi+dtRIVOD8iD6zQ4qTzqjU4+IA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