Source code of Windows XP (NT5)
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.

96 lines
2.5 KiB

  1. //+-------------------------------------------------------------------------
  2. // Microsoft Windows
  3. //
  4. // Copyright (C) Microsoft Corporation, 1996 - 1999
  5. //
  6. // File: pkioss.h
  7. //
  8. // Contents: PKI OSS support functions.
  9. //
  10. // PkiOssEncode
  11. // PkiOssEncode2
  12. // PkiOssDecode
  13. // PkiOssDecode2
  14. //
  15. // History: 23-Oct-98 philh created
  16. //--------------------------------------------------------------------------
  17. #ifndef __PKIOSS_H__
  18. #define __PKIOSS_H__
  19. #include "asn1hdr.h"
  20. #include "ossglobl.h"
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. //+-------------------------------------------------------------------------
  25. // OSS Encode function. The encoded output is allocated and must be freed
  26. // by calling ossFreeBuf
  27. //--------------------------------------------------------------------------
  28. int
  29. WINAPI
  30. PkiOssEncode(
  31. IN OssGlobal *Pog,
  32. IN void *pvOssInfo,
  33. IN int id,
  34. OUT BYTE **ppbEncoded,
  35. OUT DWORD *pcbEncoded
  36. );
  37. //+-------------------------------------------------------------------------
  38. // OSS Encode function. The encoded output isn't allocated.
  39. //
  40. // If pbEncoded is NULL, does a length only calculation.
  41. //--------------------------------------------------------------------------
  42. int
  43. WINAPI
  44. PkiOssEncode2(
  45. IN OssGlobal *Pog,
  46. IN void *pvOssInfo,
  47. IN int id,
  48. OUT OPTIONAL BYTE *pbEncoded,
  49. IN OUT DWORD *pcbEncoded
  50. );
  51. //+-------------------------------------------------------------------------
  52. // OSS Decode function. The allocated, decoded structure, **pvOssInfo, must
  53. // be freed by calling ossFreePDU().
  54. //--------------------------------------------------------------------------
  55. int
  56. WINAPI
  57. PkiOssDecode(
  58. IN OssGlobal *Pog,
  59. OUT void **ppvOssInfo,
  60. IN int id,
  61. IN const BYTE *pbEncoded,
  62. IN DWORD cbEncoded
  63. );
  64. //+-------------------------------------------------------------------------
  65. // OSS Decode function. The allocated, decoded structure, **pvOssInfo, must
  66. // be freed by calling ossFreePDU().
  67. //
  68. // For a successful decode, *ppbEncoded is advanced
  69. // past the decoded bytes and *pcbDecoded is decremented by the number
  70. // of decoded bytes.
  71. //--------------------------------------------------------------------------
  72. int
  73. WINAPI
  74. PkiOssDecode2(
  75. IN OssGlobal *Pog,
  76. OUT void **ppvOssInfo,
  77. IN int id,
  78. IN OUT BYTE **ppbEncoded,
  79. IN OUT DWORD *pcbEncoded
  80. );
  81. #ifdef __cplusplus
  82. } // Balance extern "C" above
  83. #endif
  84. #endif