x509.asn1 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. -- SPDX-License-Identifier: BSD-3-Clause
  2. --
  3. -- Copyright (C) 2008 IETF Trust and the persons identified as authors
  4. -- of the code
  5. --
  6. -- https://www.rfc-editor.org/rfc/rfc5280#section-4
  7. Certificate ::= SEQUENCE {
  8. tbsCertificate TBSCertificate ({ x509_note_tbs_certificate }),
  9. signatureAlgorithm AlgorithmIdentifier,
  10. signature BIT STRING ({ x509_note_signature })
  11. }
  12. TBSCertificate ::= SEQUENCE {
  13. version [ 0 ] Version DEFAULT,
  14. serialNumber CertificateSerialNumber ({ x509_note_serial }),
  15. signature AlgorithmIdentifier ({ x509_note_sig_algo }),
  16. issuer Name ({ x509_note_issuer }),
  17. validity Validity,
  18. subject Name ({ x509_note_subject }),
  19. subjectPublicKeyInfo SubjectPublicKeyInfo,
  20. issuerUniqueID [ 1 ] IMPLICIT UniqueIdentifier OPTIONAL,
  21. subjectUniqueID [ 2 ] IMPLICIT UniqueIdentifier OPTIONAL,
  22. extensions [ 3 ] Extensions OPTIONAL
  23. }
  24. Version ::= INTEGER
  25. CertificateSerialNumber ::= INTEGER
  26. AlgorithmIdentifier ::= SEQUENCE {
  27. algorithm OBJECT IDENTIFIER ({ x509_note_OID }),
  28. parameters ANY OPTIONAL ({ x509_note_params })
  29. }
  30. Name ::= SEQUENCE OF RelativeDistinguishedName
  31. RelativeDistinguishedName ::= SET OF AttributeValueAssertion
  32. AttributeValueAssertion ::= SEQUENCE {
  33. attributeType OBJECT IDENTIFIER ({ x509_note_OID }),
  34. attributeValue ANY ({ x509_extract_name_segment })
  35. }
  36. Validity ::= SEQUENCE {
  37. notBefore Time ({ x509_note_not_before }),
  38. notAfter Time ({ x509_note_not_after })
  39. }
  40. Time ::= CHOICE {
  41. utcTime UTCTime,
  42. generalTime GeneralizedTime
  43. }
  44. SubjectPublicKeyInfo ::= SEQUENCE {
  45. algorithm AlgorithmIdentifier,
  46. subjectPublicKey BIT STRING ({ x509_extract_key_data })
  47. }
  48. UniqueIdentifier ::= BIT STRING
  49. Extensions ::= SEQUENCE OF Extension
  50. Extension ::= SEQUENCE {
  51. extnid OBJECT IDENTIFIER ({ x509_note_OID }),
  52. critical BOOLEAN DEFAULT,
  53. extnValue OCTET STRING ({ x509_process_extension })
  54. }