You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rootcert.c 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright (C) 2007 Michael Brown <mbrown@fensystems.co.uk>.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation; either version 2 of the
  7. * License, or any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful, but
  10. * WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. */
  18. FILE_LICENCE ( GPL2_OR_LATER );
  19. #include <ipxe/crypto.h>
  20. #include <ipxe/sha256.h>
  21. #include <ipxe/x509.h>
  22. #include <ipxe/rootcert.h>
  23. /** @file
  24. *
  25. * Root certificate store
  26. *
  27. */
  28. /* Use iPXE root CA if no trusted certificates are explicitly specified */
  29. #ifndef TRUSTED
  30. #define TRUSTED \
  31. /* iPXE root CA */ \
  32. 0x9f, 0xaf, 0x71, 0x7b, 0x7f, 0x8c, 0xa2, 0xf9, 0x3c, 0x25, \
  33. 0x6c, 0x79, 0xf8, 0xac, 0x55, 0x91, 0x89, 0x5d, 0x66, 0xd1, \
  34. 0xff, 0x3b, 0xee, 0x63, 0x97, 0xa7, 0x0d, 0x29, 0xc6, 0x5e, \
  35. 0xed, 0x1a,
  36. #endif
  37. /** Root certificate fingerprints */
  38. static const uint8_t fingerprints[] = { TRUSTED };
  39. /** Root certificates */
  40. struct x509_root root_certificates = {
  41. .digest = &sha256_algorithm,
  42. .count = ( sizeof ( fingerprints ) / SHA256_DIGEST_SIZE ),
  43. .fingerprints = fingerprints,
  44. };