/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.h

http://github.com/zpao/v8monkey · C Header · 136 lines · 78 code · 15 blank · 43 comment · 0 complexity · f6ba570ef33c44eb0d56b72c1a0fee15 MD5 · raw file

  1. /* ***** BEGIN LICENSE BLOCK *****
  2. * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  3. *
  4. * The contents of this file are subject to the Mozilla Public License Version
  5. * 1.1 (the "License"); you may not use this file except in compliance with
  6. * the License. You may obtain a copy of the License at
  7. * http://www.mozilla.org/MPL/
  8. *
  9. * Software distributed under the License is distributed on an "AS IS" basis,
  10. * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  11. * for the specific language governing rights and limitations under the
  12. * License.
  13. *
  14. * The Original Code is the PKIX-C library.
  15. *
  16. * The Initial Developer of the Original Code is
  17. * Sun Microsystems, Inc.
  18. * Portions created by the Initial Developer are
  19. * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
  20. *
  21. * Contributor(s):
  22. * Sun Microsystems, Inc.
  23. *
  24. * Alternatively, the contents of this file may be used under the terms of
  25. * either the GNU General Public License Version 2 or later (the "GPL"), or
  26. * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27. * in which case the provisions of the GPL or the LGPL are applicable instead
  28. * of those above. If you wish to allow use of your version of this file only
  29. * under the terms of either the GPL or the LGPL, and not to allow others to
  30. * use your version of this file under the terms of the MPL, indicate your
  31. * decision by deleting the provisions above and replace them with the notice
  32. * and other provisions required by the GPL or the LGPL. If you do not delete
  33. * the provisions above, a recipient may use your version of this file under
  34. * the terms of any one of the MPL, the GPL or the LGPL.
  35. *
  36. * ***** END LICENSE BLOCK ***** */
  37. /*
  38. * pkix_pl_ocspresponse.h
  39. *
  40. * OcspResponse Object Definitions
  41. *
  42. */
  43. #ifndef _PKIX_PL_OCSPRESPONSE_H
  44. #define _PKIX_PL_OCSPRESPONSE_H
  45. #include "pkix_pl_common.h"
  46. #include "pkix_pl_ocspcertid.h"
  47. #include "hasht.h"
  48. #include "cryptohi.h"
  49. #include "ocspti.h"
  50. #include "ocspi.h"
  51. #ifdef __cplusplus
  52. extern "C" {
  53. #endif
  54. #define MAX_OCSP_RESPONSE_LEN (64*1024)
  55. struct PKIX_PL_OcspResponseStruct{
  56. PRArenaPool *arena;
  57. const PKIX_PL_OcspRequest *request;
  58. const SEC_HttpClientFcn *httpClient;
  59. SEC_HTTP_SERVER_SESSION serverSession;
  60. SEC_HTTP_REQUEST_SESSION sessionRequest;
  61. PKIX_PL_VerifyCallback verifyFcn;
  62. SECItem *encodedResponse;
  63. CERTCertDBHandle *handle;
  64. int64 producedAt;
  65. PKIX_PL_Date *producedAtDate;
  66. PKIX_PL_Cert *pkixSignerCert;
  67. CERTOCSPResponse *nssOCSPResponse;
  68. CERTCertificate *signerCert;
  69. };
  70. /* see source file for function documentation */
  71. PKIX_Error *pkix_pl_OcspResponse_RegisterSelf(void *plContext);
  72. PKIX_Error *
  73. pkix_pl_OcspResponse_Create(
  74. PKIX_PL_OcspRequest *request,
  75. void *responder,
  76. PKIX_PL_VerifyCallback verifyFcn,
  77. void **pNBIOContext,
  78. PKIX_PL_OcspResponse **pResponse,
  79. void *plContext);
  80. PKIX_Error *
  81. pkix_pl_OcspResponse_Decode(
  82. PKIX_PL_OcspResponse *response,
  83. PKIX_Boolean *passed,
  84. SECErrorCodes *pReturnCode,
  85. void *plContext);
  86. PKIX_Error *
  87. pkix_pl_OcspResponse_GetStatus(
  88. PKIX_PL_OcspResponse *response,
  89. PKIX_Boolean *passed,
  90. SECErrorCodes *pReturnCode,
  91. void *plContext);
  92. PKIX_Error *
  93. pkix_pl_OcspResponse_VerifySignature(
  94. PKIX_PL_OcspResponse *response,
  95. PKIX_PL_Cert *cert,
  96. PKIX_ProcessingParams *procParams,
  97. PKIX_Boolean *pPassed,
  98. void **pNBIOContext,
  99. void *plContext);
  100. PKIX_Error *
  101. pkix_pl_OcspResponse_GetStatusForCert(
  102. PKIX_PL_OcspCertID *cid,
  103. PKIX_PL_OcspResponse *response,
  104. PKIX_PL_Date *validity,
  105. PKIX_Boolean *pPassed,
  106. SECErrorCodes *pReturnCode,
  107. void *plContext);
  108. PKIX_Error *
  109. PKIX_PL_OcspResponse_UseBuildChain(
  110. PKIX_PL_Cert *signerCert,
  111. PKIX_PL_Date *producedAt,
  112. PKIX_ProcessingParams *procParams,
  113. void **pNBIOContext,
  114. void **pState,
  115. PKIX_BuildResult **pBuildResult,
  116. PKIX_VerifyNode **pVerifyTree,
  117. void *plContext);
  118. #ifdef __cplusplus
  119. }
  120. #endif
  121. #endif /* _PKIX_PL_OCSPRESPONSE_H */