swanctl.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /*
  2. * Copyright (C) 2016-2018 Tobias Brunner
  3. * Copyright (C) 2015 Andreas Steffen
  4. * HSR Hochschule fuer Technik Rapperswil
  5. *
  6. * Copyright (C) 2014 Martin Willi
  7. * Copyright (C) 2014 revosec AG
  8. *
  9. * This program is free software; you can redistribute it and/or modify it
  10. * under the terms of the GNU General Public License as published by the
  11. * Free Software Foundation; either version 2 of the License, or (at your
  12. * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
  13. *
  14. * This program is distributed in the hope that it will be useful, but
  15. * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  16. * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  17. * for more details.
  18. */
  19. /**
  20. * @defgroup swanctl swanctl
  21. * @{
  22. */
  23. #ifndef SWANCTL_H_
  24. #define SWANCTL_H_
  25. #include <settings/settings.h>
  26. /**
  27. * Base directory for credentials and config
  28. */
  29. char *swanctl_dir;
  30. /**
  31. * Configuration file for connections, etc.
  32. */
  33. #define SWANCTL_CONF "swanctl.conf"
  34. /**
  35. * Directory for X.509 end entity certs
  36. */
  37. #define SWANCTL_X509DIR "x509"
  38. /**
  39. * Directory for X.509 CA certs
  40. */
  41. #define SWANCTL_X509CADIR "x509ca"
  42. /**
  43. * Directory for X.509 Attribute Authority certs
  44. */
  45. #define SWANCTL_X509AADIR "x509aa"
  46. /**
  47. * Directory for X.509 OCSP Signer certs
  48. */
  49. #define SWANCTL_X509OCSPDIR "x509ocsp"
  50. /**
  51. * Directory for X.509 CRLs
  52. */
  53. #define SWANCTL_X509CRLDIR "x509crl"
  54. /**
  55. * Directory for X.509 Attribute certificates
  56. */
  57. #define SWANCTL_X509ACDIR "x509ac"
  58. /**
  59. * Directory for raw public keys
  60. */
  61. #define SWANCTL_PUBKEYDIR "pubkey"
  62. /**
  63. * Directory for private keys
  64. */
  65. #define SWANCTL_PRIVATEDIR "private"
  66. /**
  67. * Directory for RSA private keys
  68. */
  69. #define SWANCTL_RSADIR "rsa"
  70. /**
  71. * Directory for ECDSA private keys
  72. */
  73. #define SWANCTL_ECDSADIR "ecdsa"
  74. /**
  75. * Directory for BLISS private keys
  76. */
  77. #define SWANCTL_BLISSDIR "bliss"
  78. /**
  79. * Directory for PKCS#8 encoded private keys
  80. */
  81. #define SWANCTL_PKCS8DIR "pkcs8"
  82. /**
  83. * Directory for PKCS#12 containers
  84. */
  85. #define SWANCTL_PKCS12DIR "pkcs12"
  86. /**
  87. * Load swanctl.conf, optionally from a custom path. Sets the base dir relative
  88. * to that file.
  89. *
  90. * @param file optional custom path to swanctl.conf, NULL to use default
  91. * @return settings, or NULL if loading failed
  92. */
  93. settings_t *load_swanctl_conf(char *file);
  94. #endif /** SWANCTL_H_ @}*/