Leaked source code of windows server 2003
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.

64 lines
1.9 KiB

  1. // pkiException.cpp -- Exception class definition
  2. // (c) Copyright Schlumberger Technology Corp., unpublished work, created
  3. // 2000. This computer program includes Confidential, Proprietary
  4. // Information and is a Trade Secret of Schlumberger Technology Corp. All
  5. // use, disclosure, and/or reproduction is prohibited unless authorized
  6. // in writing. All Rights Reserved.
  7. #include "scuExcHelp.h"
  8. #include "pkiExc.h"
  9. /////////////////////////// LOCAL/HELPER /////////////////////////////////
  10. namespace
  11. {
  12. using namespace pki;
  13. scu::CauseCodeDescriptionTable<CauseCode> ccdt[] =
  14. {
  15. {
  16. ccBERDataLengthOverflow,
  17. TEXT("Data length overflow in BER octet.")
  18. },
  19. {
  20. ccBEREmptyOctet,
  21. TEXT("BER octet is empty.")
  22. },
  23. {
  24. ccBERInconsistentDataLength,
  25. TEXT("Inconsistent data length in BER octet.")
  26. },
  27. {
  28. ccBEROIDSubIdentifierOverflow,
  29. TEXT("OID subidentifier overflow in BER octet.")
  30. },
  31. {
  32. ccBERTagValueOverflow,
  33. TEXT("Tag overflow in BER octet.")
  34. },
  35. {
  36. ccBERUnexpectedEndOfOctet,
  37. TEXT("Unexpected end of BER octet encountered.")
  38. },
  39. {
  40. ccBERUnexpectedIndefiniteLength,
  41. TEXT("Unexpected instance of indefinite length in BER octet.")
  42. },
  43. {
  44. ccX509CertExtensionNotPresent,
  45. TEXT("X509 certificate extension not present.")
  46. },
  47. {
  48. ccX509CertFormatError,
  49. TEXT("Format error encountered when parsing X509 certificate.")
  50. },
  51. };
  52. }
  53. char const *
  54. pki::Description(pki::Exception const &rExc)
  55. {
  56. return scu::FindDescription(rExc.Cause(), ccdt,
  57. sizeof ccdt / sizeof *ccdt);
  58. }