Commit Graph

105 Commits

Author SHA1 Message Date
Nicolas Williams
989fd1199b hx509: Add TCG EK and DevID certs to test with
These are sample certificates from the Trusted Computing Group
Endorsement Key Credential Profile For TPM Family 2.0; Level 0.

 - lib/hx509/data/tcg-ek-cp.pem (Endorsement Key certificate)
 - lib/hx509/data/tcg-devid.pem (DevID certificate)

https://trustedcomputinggroup.org/wp-content/uploads/Credential_Profile_EK_V2.0_R14_published.pdf
https://trustedcomputinggroup.org/wp-content/uploads/TCG_IWG_EKCredentialProfile_v2p3_r2_pub.pdf
https://trustedcomputinggroup.org/wp-content/uploads/TCG_IWG_DevID_v1r2_02dec2020.pdf

This certificate came from the Trusted Computing Group Endorsement Key
(EK) Credential Profile [0], Appendix A, page 34.

[0] https://trustedcomputinggroup.org/wp-content/uploads/TCG_IWG_EKCredentialProfile_v2p3_r2_pub.pdf

Note that hxtool at this point both certificates, including all their
extensions, HardwareModule Name SAN, certificate policies, and the new
DN attributes TPMVersion, TPMModel, and TPMManufacturer, as shown below.

The work on the ASN.1 compiler helped.

The goal of this work will be to enable a Heimdal service for device
enrolment using TPMs.  More TCG profiling has to be done, and perhaps
some ECC work as well.  But Heimdal will mostly just be a relying party
and CA, and will not include the client side piece of enrolment.

$ cd build/lib/hx509
$ ./hxtool print --content PEM-FILE:../../../lib/hx509/data/tcg-ek-cp.pem
cert: 0
    friendly name:
    private key: no
    issuer:  "CN=ExampleCA"
    subject: ""
    serial: 01
    keyusage: keyEncipherment
subject name:
issuer name: CN=ExampleCA
Validity:
        notBefore 2014-01-15 15:40:50
        notAfter  2015-01-15 15:40:50
checking extension: authorityInfoAccess
        Critical not set on MUST
        type: 1.3.6.1.5.5.7.48.2
        dirname: URI: http://www.example.com/ExampleCA.crt
checking extension: keyUsage
checking extension: subjectAltName
        Critical set on MUST NOT
        directoryName: TPMVersion=id:00010023,TPMModel=ABCDEF123456,TPMManufacturer=id:54434700
checking extension: basicConstraints
        is NOT a CA
checking extension: cRLDistributionPoints
CRL Distribution Points:
Fullname:
   URI: http://www.example.com/ExampleCA.crl
checking extension: certificatePolicies
        Policy: 1.2.3.4
checking extension: authorityKeyIdentifier
        authority key id: 347767244C44AFE79E2AE0B24C69579524B33DDA
checking extension: extKeyUsage
        eku-0: 2.23.133.8.1
checking extension: subjectDirectoryAttributes
Doesn't have SubjectKeyIdentifier
$
$
$ ./hxtool print --content PEM-FILE:../../../lib/hx509/data/tcg-devid.pem
cert: 0
    friendly name:
    private key: no
    issuer:  "CN=ExampleCA"
    subject: ""
    serial: 01
    keyusage: keyEncipherment
subject name:
issuer name: CN=ExampleCA
Validity:
        notBefore 2014-01-15 15:40:50
        notAfter  2015-01-15 15:40:50
checking extension: authorityInfoAccess
        Critical not set on MUST
        type: 1.3.6.1.5.5.7.48.2
        dirname: URI: http://www.example.com/ExampleCA.crt
checking extension: keyUsage
checking extension: subjectAltName
        Critical set on MUST NOT
        directoryName: TPMVersion=id:00010023,TPMModel=ABCDEF123456,TPMManufacturer=id:54434700
        otherName: 1.3.6.1.5.5.7.8.4 HardwareModuleName 2.23.133.1.2:tpmserialnumber
checking extension: basicConstraints
        is NOT a CA
checking extension: cRLDistributionPoints
CRL Distribution Points:
Fullname:
   URI: http://www.example.com/ExampleCA.crl
checking extension: certificatePolicies
        Policy: 1.2.3.4
checking extension: authorityKeyIdentifier
        authority key id: 347767244C44AFE79E2AE0B24C69579524B33DDA
checking extension: extKeyUsage
        eku-0: 2.23.133.8.1
checking extension: subjectDirectoryAttributes
Doesn't have SubjectKeyIdentifier
$
2021-01-15 13:21:18 -06:00
Quanah Gibson-Mount
aad5c71014 Fixes https://github.com/heimdal/heimdal/issues/533
Update certs to no longer be expired, last 500 years.
2019-03-22 20:59:04 -04:00
Quanah Gibson-Mount
2d193d380d For https://github.com/heimdal/heimdal/issues/392
Correctly reference the OID so gen-cert.sh works correctly
2019-03-22 18:23:45 -04:00
Quanah Gibson-Mount
98f904036c For https://github.com/heimdal/heimdal/issues/392
Modern OpenSSL no longer has the 2038 year restriction.  Update the
certs to last 500 years rather than 10 years.

Modern crypto requirements suggest a stronger key strength than 1024.
Update to use a minimum of 4096.

Fix executable bit on gen-req.sh
2019-03-22 17:49:46 -04:00
Luke Howard
6561afff3a hx509: update gen_req.sh for OpenSSL 1.1 (#392)
OpenSSL 1.1 has the pkInitKDC OID built in, which breaks as it was redefined by
openssl.cnf in Heimdal. Try to determine if OpenSSL >= 1.1 and if so, use a
configuration file that omits this OID definition. The implementation is not
robust but as this is simply an example (not run by the test suites), it should
be adequete.
2018-12-24 12:13:29 -06:00
Jelmer Vernooij
70e43e9808 Fix some typos. 2014-04-25 02:42:17 +02:00
Viktor Dukhovni
46e0bd3c68 Use P-256 for EC tests
Fedora/RedHat OpenSSL supports only P-256, P-384 and P-521.

The new mkcert.sh script can create updated certs when these
expire on Jan 17th 2038.
2014-03-12 21:18:03 -04:00
Love Hornquist Astrand
fa4c84e6d6 make printablestring and ia5string octetstrings 2010-08-08 15:51:33 -07:00
Love Hornquist Astrand
e745e97c3f 4.3.5 failes 2010-05-26 11:20:21 -05:00
Love Hornquist Astrand
24f9a30864 reference to where cert comes from 2009-09-30 01:20:25 -07:00
Love Hornquist Astrand
b17ad58fe5 n0ll names check 2009-09-30 01:18:04 -07:00
Love Hörnquist Åstrand
8b2ed3a418 regen with unbroken otherName parser
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25145 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-04-27 02:19:11 +00:00
Love Hörnquist Åstrand
71ca2c0415 shuffle for openssl-1.0.0-beta1
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25144 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-04-27 02:18:56 +00:00
Love Hörnquist Åstrand
c7e0279abd regen
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25127 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-04-16 08:29:32 +00:00
Love Hörnquist Åstrand
f73d077b5b regen
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25126 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-04-16 08:27:48 +00:00
Love Hörnquist Åstrand
16db7f341f extra sha-2 and sha-1
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25123 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-04-16 08:22:38 +00:00
Love Hörnquist Åstrand
da2d803cf6 regen with sha256 + sha512
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25122 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-04-16 08:20:51 +00:00
Love Hörnquist Åstrand
e4ab29a7bb regen
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24710 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-14 20:15:05 +00:00
Love Hörnquist Åstrand
1ebe934837 regen
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24655 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-07 15:13:28 +00:00
Love Hörnquist Åstrand
9d14f64819 gen ec-cert
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24654 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-07 15:13:19 +00:00
Love Hörnquist Åstrand
929121644a add pre-generated ec certs
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24653 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-07 15:13:11 +00:00
Love Hörnquist Åstrand
747f6e9f77 some failes pass or succeed based on size_t size, lets have it either way for now
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24062 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-12-11 04:51:19 +00:00
Love Hörnquist Åstrand
98fe8646a7 rebuild
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22076 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-11-15 07:01:22 +00:00
Love Hörnquist Åstrand
5fed824f37 its vs it\'s etc. From Bjorn Sandell
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22071 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-11-14 20:04:50 +00:00
Love Hörnquist Åstrand
ae8b16b029 Make work on case senstive filesystems too.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21917 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-08-16 13:54:25 +00:00
Love Hörnquist Åstrand
6df0c89dc8 nist pkits tests
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21802 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-08-03 10:38:52 +00:00
Love Hörnquist Åstrand
ab672e9abe regen
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21786 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-08-01 19:37:45 +00:00
Love Hörnquist Åstrand
31a03ec5c7 NIST PKITS tests
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21780 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-08-01 19:20:04 +00:00
Love Hörnquist Åstrand
cc4333b758 remove cvs ignore files
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21026 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-09 03:09:59 +00:00
Love Hörnquist Åstrand
91a69074fd x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20893 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-04 22:53:18 +00:00
Love Hörnquist Åstrand
de625c0116 regen
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19773 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-09 09:31:45 +00:00
Love Hörnquist Åstrand
d009417320 Generate a no password pkcs12 file.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19772 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-09 09:31:15 +00:00
Love Hörnquist Åstrand
25ad1864fd another key
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19659 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-04 01:56:37 +00:00
Love Hörnquist Åstrand
ab8e83ff53 regen
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19609 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-31 01:34:20 +00:00
Love Hörnquist Åstrand
9ab3c38b3a (proxy_cert) make length 0
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19607 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-31 01:28:44 +00:00
Love Hörnquist Åstrand
64e2e55060 regen, this time with openssl 0.9.8x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19294 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-08 02:22:06 +00:00
Love Hörnquist Åstrand
2728037bfe regen
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19288 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-07 23:46:06 +00:00
Love Hörnquist Åstrand
13438750b1 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19285 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-07 23:41:53 +00:00
Love Hörnquist Åstrand
72a670336e Fix names and restrictions on the proxy certificates
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19284 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-07 23:41:06 +00:00
Love Hörnquist Åstrand
b10833408a regen
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19095 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-23 18:09:59 +00:00
Love Hörnquist Åstrand
36b3f8b61a Build pk-init proxy cert.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19093 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-23 18:06:10 +00:00
Love Hörnquist Åstrand
3580cf19b8 Change realm to TEST.H5L.SE
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19023 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-13 08:22:52 +00:00
Love Hörnquist Åstrand
8835bc2f1f Update all strings
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19020 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-13 08:19:07 +00:00
Love Hörnquist Åstrand
ef6a951382 SE not ORG
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19019 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-13 07:44:50 +00:00
Love Hörnquist Åstrand
bd69f9fb24 regen with TEST.H5L.SE
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19018 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-13 05:50:22 +00:00
Love Hörnquist Åstrand
314fb19bfd Use TEST.H5L.ORG instead of EXAMPLE.ORG
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19015 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-13 05:34:56 +00:00
Love Hörnquist Åstrand
a8a340457c starfield test root cert and Ralf-Philipp and Andreis correctly padded bad cert
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18121 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-09-19 14:02:43 +00:00
Love Hörnquist Åstrand
1b8fc81fde yutaka test certs
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18089 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-09-15 06:07:55 +00:00
Love Hörnquist Åstrand
d6ac5d5275 test bleichenbacher from eay
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18084 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-09-12 22:04:42 +00:00
Love Hörnquist Åstrand
ba77542a0e generate pkinit password protected file
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17542 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-12 06:21:43 +00:00