Commit Graph

52 Commits

Author SHA1 Message Date
Nicolas Williams
944eae82cf asn1: Remove alias of id-kp-clientAuth 2019-11-19 23:00:41 -06:00
Nicolas Williams
b54107ee2b asn1: Add more EKU OIDs from RFC7299, OpenSSL 2019-11-02 18:37:13 -05:00
Nicolas Williams
ed1f900cfb asn1: Add some missing OIDs from RFC5280 2019-11-02 18:37:13 -05:00
Nicolas Williams
8af2d79d35 hx509: Add missing CSR extension request support
This is necessary in order to add proper support for CSRs in kx509,
where the KDC can examine all requested KUs/EKUs/SANs, check
authorization, and issue a certificate with all those extensions if
authorized.

This is the convention used by OpenSSL, of encoding all the KU, EKUs,
and SANs being requested as Extensions as they would appear in the
TBSCertificate, then putting those in as a single Attribute in the CSR's
Attributes list with attribute OID {id-pkcs-9, 14}.

 - expose all hx509_request_*() functions
 - finish support in hx509_request_parse*() for KU, EKU, and SAN CSR
   attributes
 - finish support in hx509_request_to_pkcs10() for encoding all
   requested KU, EKU, and SAN extensions as a CSR extReq (extension request)
 - add hx509_request_add_*() support for:
    - id-pkinit-san and ms-upn-pkinit-san
    - XMPP (Jabber) SAN
    - registeredID (useless but trivial)
 - add hxtool request-create options for all supported SANs
 - add hxtool request-create options for KeyUsage
 - add hxtool request-create options for ExtKeyUsage
 - add hxtool request-print support for all these things
 - fix bugs in existing id-pkinit-san handling

Possible future improvements

 - add HX509_TRACE env var and support (it would be nice to be able to
   observe why some certificate is rejected, or not matched in a query)
 - add testing that CSR creating and printing round-trip for all KUs,
   EKUs, and SANs
   (probably in tests/kdc/check-pkinit.in)
 - add testing that OpenSSL can print a CSR made by hxtool and
   vice-versa
 - hxtool ca: add KU sanity checking (via hx509_ca_sign() and/or friends)
   (don't allow encrypt for signing-only algs)
   (don't allow encrypt for RSA at all, or for RSA with small e exponents)
 - hxtool request-print: warn about all unknown attributes and
   extensions
 - hxtool ca: MAYBE add support for adding requested extensions from the
   --req=CSR
   ("Maybe" because CA operators should really verify and authorize all
    requested attributes, and should acknowledge that they have, and the
    simplest way to do this is to make them add all the corresponding
    CLI arguments to the hxtool ca command, but too, that is
    error-prone, thus it's not clear yet which approach is best.
    Perhaps interactively prompt for yes/no for each attribute.)
 - add additional SAN types:
    - iPAddress                 (useless?)
    - dNSSrv                    (useful!)
    - directoryName             (useless, but trivial)
    - uniformResourceIdentifier (useful)
 - it would be nice if the ASN.1 compiler could generate print
   functions..., and/or even better, to-JSON functions
 - it would be nice if we had a known-OID db, including the names of the
   types they refer to in certificate extensions, otherName SANs and CSR
   attributes, then we could generate a CSR and certificate printer for
   all known options even when they are not supported by the rest of
   Heimdal
    - and we could also get friendly names for OIDs, and we could
      resolve their arc names
    - longer term, we could also stand to add some ASN.1 information
      object system functionality, just enough to make
      lib/hx509/asn1_print awesome by being able to automatically decode
      all heim_any and OCTET STRING content (better than its current
      --inner option)
2019-10-08 22:20:40 -05:00
Nicolas Williams
038ed5ec31 hx509: check Name RDN attribute size bounds 2019-10-07 21:32:00 -05:00
Chris Lamb
946caad7d0 Correct "extention" typos.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
(cherry picked from Samba commit afa9bb4ac55d616fe7816e3830bab5e3a51aed7a)
2018-09-10 14:42:18 -04:00
Viktor Dukhovni
8078e089f1 Add support for ECDSA w/ SHA-2 signature algs 2016-04-15 10:32:50 -05:00
Love Hornquist Astrand
060474df16 quel 64bit warnings, fixup implicit encoding for template, fix spelling 2013-06-03 21:46:20 -07:00
Love Hornquist Astrand
e8317b955f allow optional q in DH DomainParameters 2013-04-29 11:37:39 -07:00
Love Hornquist Astrand
a0fcf9241a add id-secsig-sha-1WithRSAEncryption 2010-08-08 15:49:18 -07:00
Love Hornquist Astrand
3a29886945 add DHParameter 2010-06-16 12:20:31 -07:00
Love Hornquist Astrand
0b144cdf8d implement teletexstring 2009-09-30 00:47:39 -07:00
Love Hörnquist Åstrand
0e6b5c5c22 remove trailing whitespace
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25232 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-05-28 01:17:17 +00:00
Love Hörnquist Åstrand
24400da6a6 Add secp160r1 and secp160r2
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24649 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-07 15:12:37 +00:00
Love Hörnquist Åstrand
476f81c4e7 add id-ecdsa-with-SHA1
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24648 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-07 15:12:22 +00:00
Love Hörnquist Åstrand
0ec483ada2 add ec-group-secp256r1
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24636 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-07 04:06:22 +00:00
Love Hörnquist Åstrand
a8d40354e1 add secp256r1
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24633 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-07 04:05:52 +00:00
Love Hörnquist Åstrand
b93daea7ea add ECDSA_Sig_Value
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24628 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-07 04:05:00 +00:00
Love Hörnquist Åstrand
e79aed842f add id-ecdsa-with-SHA256
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24626 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-07 04:04:40 +00:00
Love Hörnquist Åstrand
c916bc431e Add ECC bits
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24624 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-07 04:04:10 +00:00
Love Hörnquist Åstrand
1b1bb2ac1f Add id-heim-rsa-pkcs1-x509.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22446 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-01-14 21:23:52 +00:00
Love Hörnquist Åstrand
2a15a2647a Add back SIZE limitations.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21396 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-07-02 10:22:16 +00:00
Love Hörnquist Åstrand
5d0464a86b Add AuthorityInfoAccessSyntax.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21382 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-28 08:29:45 +00:00
Love Hörnquist Åstrand
20a2aa9ada Add authorityInfoAccess, rename proxyCertInfo.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21376 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-28 07:36:13 +00:00
Love Hörnquist Åstrand
5de627d609 Do evil things to handle IMPLICIT encoded structures.
Add id-ms-client-authentication.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20728 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-05-31 14:51:46 +00:00
Love Hörnquist Åstrand
14de225227 id-ms-cert-enroll-domaincontroller
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20710 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-05-30 22:08:14 +00:00
Love Hörnquist Åstrand
6b8e488368 Netscape extentions
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20657 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-05-10 21:43:20 +00:00
Love Hörnquist Åstrand
4418e220eb add U.S. Federal PKI Common Policy Framework
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20643 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-05-10 18:31:11 +00:00
Love Hörnquist Åstrand
af4ed121c8 add CRLDistributionPoints and friends
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20071 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-30 21:26:33 +00:00
Love Hörnquist Åstrand
7b7acfddc1 Add id-at-streetAddress.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19931 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-16 13:02:06 +00:00
Love Hörnquist Åstrand
2a0cc5cfca Add PKIXXmppAddr and id-pkix-on-xmppAddr.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19859 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-12 08:35:58 +00:00
Love Hörnquist Åstrand
beaf8c5bc2 Add id-pkix-kp oids.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19577 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-30 12:43:41 +00:00
Love Hörnquist Åstrand
5999737afa add pkix proxy cert policy lang oids
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19292 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-08 00:08:26 +00:00
Love Hörnquist Åstrand
01fde0e9c5 unbreak id-pe-proxyCertInfo
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19281 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-07 22:53:10 +00:00
Love Hörnquist Åstrand
812f7102a1 ops, remove extra stuff copied from the draft
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19277 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-07 20:24:06 +00:00
Love Hörnquist Åstrand
b8fc9ba909 Add id-pkix-on-dnsSRV and related oids
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19276 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-07 20:24:05 +00:00
Love Hörnquist Åstrand
e03eee6809 Add definitions from RFC 3820, Proxy Certificate Profile.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17248 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-26 08:02:56 +00:00
Love Hörnquist Åstrand
10ccb6b603 Add id-Userid
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17203 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-24 09:01:40 +00:00
Love Hörnquist Åstrand
28e538d9f2 Add attribute type oids from X520 and RFC 2247 DC oid
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17200 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-24 08:53:08 +00:00
Love Hörnquist Åstrand
210a05bcee add sha-1 and sha-2
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17142 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-21 21:00:14 +00:00
Love Hörnquist Åstrand
446e2cc5c9 Add id-pkcs1-sha256WithRSAEncryption and friends
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17079 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-15 11:07:59 +00:00
Love Hörnquist Åstrand
eae092d168 Add ExtKeyUsage
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16878 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-03-31 02:57:34 +00:00
Love Hörnquist Åstrand
fcc1db9eae Add CRL structures and OIDs.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16592 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-18 17:28:18 +00:00
Love Hörnquist Åstrand
a88ee830b5 Add RSAPrivateKey.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16559 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-13 13:58:00 +00:00
Love Hörnquist Åstrand
0143ed18c7 Add some X9.57 (DSA) oids.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16255 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-10-29 10:55:52 +00:00
Love Hörnquist Åstrand
3b929ad31f Add DHPublicKey, and INTEGER to for storing the DH public key in the
SubjectPublicKeyInfo.subjectPublicKey BIT STRING.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16093 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-09-23 05:27:57 +00:00
Love Hörnquist Åstrand
98f5ce58f0 add id-rsadsi-rc2-cbc
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15814 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-27 23:38:39 +00:00
Love Hörnquist Åstrand
1a653c9ed0 include SET OF in Attribute to make the type more useful
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15712 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-23 10:39:47 +00:00
Love Hörnquist Åstrand
e5fe708bc5 Include enough workarounds that this even might work.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15707 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-21 21:04:14 +00:00
Love Hörnquist Åstrand
ad8050e056 some of the structure are in the IMPLICIT TAGS module, adapt
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15691 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-21 10:20:16 +00:00