x509_acert.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * Copyright 2021-2024 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License 2.0 (the "License"). You may not use
  5. * this file except in compliance with the License. You can obtain a copy
  6. * in the file LICENSE in the source distribution or at
  7. * https://www.openssl.org/source/license.html
  8. */
  9. #ifndef OSSL_CRYPTO_X509_ACERT_H
  10. # define OSSL_CRYPTO_X509_ACERT_H
  11. # pragma once
  12. # include <openssl/x509_acert.h>
  13. #define OSSL_ODI_TYPE_PUBLIC_KEY 0
  14. #define OSSL_ODI_TYPE_PUBLIC_KEY_CERT 1
  15. #define OSSL_ODI_TYPE_OTHER 2
  16. struct ossl_object_digest_info_st {
  17. ASN1_ENUMERATED digestedObjectType;
  18. ASN1_OBJECT *otherObjectTypeID;
  19. X509_ALGOR digestAlgorithm;
  20. ASN1_BIT_STRING objectDigest;
  21. };
  22. struct ossl_issuer_serial_st {
  23. STACK_OF(GENERAL_NAME) *issuer;
  24. ASN1_INTEGER serial;
  25. ASN1_BIT_STRING *issuerUID;
  26. };
  27. struct X509_acert_issuer_v2form_st {
  28. STACK_OF(GENERAL_NAME) *issuerName;
  29. OSSL_ISSUER_SERIAL *baseCertificateId;
  30. OSSL_OBJECT_DIGEST_INFO *objectDigestInfo;
  31. };
  32. typedef struct X509_acert_issuer_st {
  33. int type;
  34. union {
  35. STACK_OF(GENERAL_NAME) *v1Form;
  36. X509_ACERT_ISSUER_V2FORM *v2Form;
  37. } u;
  38. } X509_ACERT_ISSUER;
  39. typedef struct X509_holder_st {
  40. OSSL_ISSUER_SERIAL *baseCertificateID;
  41. STACK_OF(GENERAL_NAME) *entityName;
  42. OSSL_OBJECT_DIGEST_INFO *objectDigestInfo;
  43. } X509_HOLDER;
  44. struct X509_acert_info_st {
  45. ASN1_INTEGER version; /* default of v2 */
  46. X509_HOLDER holder;
  47. X509_ACERT_ISSUER issuer;
  48. X509_ALGOR signature;
  49. ASN1_INTEGER serialNumber;
  50. X509_VAL validityPeriod;
  51. STACK_OF(X509_ATTRIBUTE) *attributes;
  52. ASN1_BIT_STRING *issuerUID;
  53. X509_EXTENSIONS *extensions;
  54. };
  55. struct X509_acert_st {
  56. X509_ACERT_INFO *acinfo;
  57. X509_ALGOR sig_alg;
  58. ASN1_BIT_STRING signature;
  59. };
  60. #endif