ec_kmgmt_imexport.inc 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*
  2. * Copyright 2022 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. /*
  10. * This file is meant to be included from ec_kmgmt.c
  11. */
  12. static const OSSL_PARAM ec_private_key_types[] = {
  13. EC_IMEXPORTABLE_PRIVATE_KEY,
  14. OSSL_PARAM_END
  15. };
  16. static const OSSL_PARAM ec_public_key_types[] = {
  17. EC_IMEXPORTABLE_PUBLIC_KEY,
  18. OSSL_PARAM_END
  19. };
  20. static const OSSL_PARAM ec_key_types[] = {
  21. EC_IMEXPORTABLE_PRIVATE_KEY,
  22. EC_IMEXPORTABLE_PUBLIC_KEY,
  23. OSSL_PARAM_END
  24. };
  25. static const OSSL_PARAM ec_dom_parameters_types[] = {
  26. EC_IMEXPORTABLE_DOM_PARAMETERS,
  27. OSSL_PARAM_END
  28. };
  29. static const OSSL_PARAM ec_5_types[] = {
  30. EC_IMEXPORTABLE_PRIVATE_KEY,
  31. EC_IMEXPORTABLE_DOM_PARAMETERS,
  32. OSSL_PARAM_END
  33. };
  34. static const OSSL_PARAM ec_6_types[] = {
  35. EC_IMEXPORTABLE_PUBLIC_KEY,
  36. EC_IMEXPORTABLE_DOM_PARAMETERS,
  37. OSSL_PARAM_END
  38. };
  39. static const OSSL_PARAM ec_key_domp_types[] = {
  40. EC_IMEXPORTABLE_PRIVATE_KEY,
  41. EC_IMEXPORTABLE_PUBLIC_KEY,
  42. EC_IMEXPORTABLE_DOM_PARAMETERS,
  43. OSSL_PARAM_END
  44. };
  45. static const OSSL_PARAM ec_other_parameters_types[] = {
  46. EC_IMEXPORTABLE_OTHER_PARAMETERS,
  47. OSSL_PARAM_END
  48. };
  49. static const OSSL_PARAM ec_9_types[] = {
  50. EC_IMEXPORTABLE_PRIVATE_KEY,
  51. EC_IMEXPORTABLE_OTHER_PARAMETERS,
  52. OSSL_PARAM_END
  53. };
  54. static const OSSL_PARAM ec_10_types[] = {
  55. EC_IMEXPORTABLE_PUBLIC_KEY,
  56. EC_IMEXPORTABLE_OTHER_PARAMETERS,
  57. OSSL_PARAM_END
  58. };
  59. static const OSSL_PARAM ec_11_types[] = {
  60. EC_IMEXPORTABLE_PRIVATE_KEY,
  61. EC_IMEXPORTABLE_PUBLIC_KEY,
  62. EC_IMEXPORTABLE_OTHER_PARAMETERS,
  63. OSSL_PARAM_END
  64. };
  65. static const OSSL_PARAM ec_all_parameters_types[] = {
  66. EC_IMEXPORTABLE_DOM_PARAMETERS,
  67. EC_IMEXPORTABLE_OTHER_PARAMETERS,
  68. OSSL_PARAM_END
  69. };
  70. static const OSSL_PARAM ec_13_types[] = {
  71. EC_IMEXPORTABLE_PRIVATE_KEY,
  72. EC_IMEXPORTABLE_DOM_PARAMETERS,
  73. EC_IMEXPORTABLE_OTHER_PARAMETERS,
  74. OSSL_PARAM_END
  75. };
  76. static const OSSL_PARAM ec_14_types[] = {
  77. EC_IMEXPORTABLE_PUBLIC_KEY,
  78. EC_IMEXPORTABLE_DOM_PARAMETERS,
  79. EC_IMEXPORTABLE_OTHER_PARAMETERS,
  80. OSSL_PARAM_END
  81. };
  82. static const OSSL_PARAM ec_all_types[] = {
  83. EC_IMEXPORTABLE_PRIVATE_KEY,
  84. EC_IMEXPORTABLE_PUBLIC_KEY,
  85. EC_IMEXPORTABLE_DOM_PARAMETERS,
  86. EC_IMEXPORTABLE_OTHER_PARAMETERS,
  87. OSSL_PARAM_END
  88. };
  89. static const OSSL_PARAM *ec_types[] = {
  90. NULL,
  91. ec_private_key_types,
  92. ec_public_key_types,
  93. ec_key_types,
  94. ec_dom_parameters_types,
  95. ec_5_types,
  96. ec_6_types,
  97. ec_key_domp_types,
  98. ec_other_parameters_types,
  99. ec_9_types,
  100. ec_10_types,
  101. ec_11_types,
  102. ec_all_parameters_types,
  103. ec_13_types,
  104. ec_14_types,
  105. ec_all_types
  106. };