secglue.c 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. /** --- BEGIN COPYRIGHT BLOCK ---
  2. * This Program is free software; you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation; version 2 of the License.
  5. *
  6. * This Program is distributed in the hope that it will be useful, but WITHOUT
  7. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  8. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  9. *
  10. * You should have received a copy of the GNU General Public License along with
  11. * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
  12. * Place, Suite 330, Boston, MA 02111-1307 USA.
  13. *
  14. * In addition, as a special exception, Red Hat, Inc. gives You the additional
  15. * right to link the code of this Program with code not covered under the GNU
  16. * General Public License ("Non-GPL Code") and to distribute linked combinations
  17. * including the two, subject to the limitations in this paragraph. Non-GPL Code
  18. * permitted under this exception must only link to the code of this Program
  19. * through those well defined interfaces identified in the file named EXCEPTION
  20. * found in the source code files (the "Approved Interfaces"). The files of
  21. * Non-GPL Code may instantiate templates or use macros or inline functions from
  22. * the Approved Interfaces without causing the resulting work to be covered by
  23. * the GNU General Public License. Only Red Hat, Inc. may make changes or
  24. * additions to the list of Approved Interfaces. You must obey the GNU General
  25. * Public License in all respects for all of the Program code and other code used
  26. * in conjunction with the Program except the Non-GPL Code covered by this
  27. * exception. If you modify this file, you may extend this exception to your
  28. * version of the file, but you are not obligated to do so. If you do not wish to
  29. * provide this exception without modification, you must delete this exception
  30. * statement from your version and license this file solely under the GPL without
  31. * exception.
  32. *
  33. *
  34. * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  35. * Copyright (C) 2005 Red Hat, Inc.
  36. * All rights reserved.
  37. --- END COPYRIGHT BLOCK --- */
  38. /*
  39. * secglue.c: Glue routines for the httpd.so shared object. These are
  40. * necessary because on many system no garbage collection is performed for
  41. * shared objects.
  42. *
  43. * Rob McCool
  44. *
  45. * Adapted for DSGW by Mark Smith 18 Aug 1997.
  46. * Copied from revision 1.4.4.6.4.1 of ldapserver/httpd/newadmin/src/secglue.c
  47. */
  48. #include "base/systems.h"
  49. #ifdef __cplusplus
  50. #define FUNC(name) extern "C" { void name (void) {} }
  51. #else
  52. #define FUNC(name) void name (void) {}
  53. #endif
  54. FUNC(DS_Alloc)
  55. FUNC(DS_Free)
  56. FUNC(DS_Zfree)
  57. FUNC(SEC_CertChainFromCert)
  58. FUNC(SEC_CertTimesValid)
  59. FUNC(SEC_CheckPassword)
  60. FUNC(SEC_CloseKeyDB)
  61. FUNC(SEC_CompareItem)
  62. FUNC(SEC_ConvertToPublicKey)
  63. FUNC(CERT_DestroyCertificate)
  64. FUNC(SECKEY_DestroyPrivateKey)
  65. FUNC(SEC_DestroyPublicKey)
  66. FUNC(SECITEM_DupItem)
  67. FUNC(SEC_ExtractPublicKey)
  68. FUNC(SEC_FindCertByNickname)
  69. FUNC(SEC_FindKeyByName)
  70. FUNC(SECITEM_FreeItem)
  71. FUNC(CERT_GetAVATag)
  72. FUNC(SEC_GetPassword)
  73. FUNC(SEC_GetSSLCACerts)
  74. FUNC(CERT_NameToAscii)
  75. FUNC(SEC_OpenCertDB)
  76. FUNC(CERT_RFC1485_EscapeAndQuote)
  77. FUNC(SEC_ResetRandom)
  78. FUNC(SEC_UTCTimeToAscii)
  79. FUNC(SECKEY_UpdateKeyDBPass1)
  80. FUNC(SECKEY_UpdateKeyDBPass2)
  81. FUNC(SSL_Accept)
  82. FUNC(SSL_AcceptHook)
  83. FUNC(SSL_AuthCertificate)
  84. FUNC(SSL_AuthCertificateHook)
  85. FUNC(SSL_BadCertHook)
  86. FUNC(SSL_Bind)
  87. FUNC(SSL_BindForSockd)
  88. FUNC(SSL_CheckDirectSock)
  89. FUNC(SSL_Close)
  90. FUNC(SSL_ConfigSecureServer)
  91. FUNC(SSL_ConfigServerSessionIDCache)
  92. FUNC(SSL_ConfigSockd)
  93. FUNC(SSL_Connect)
  94. FUNC(SSL_DataPending)
  95. FUNC(SSL_DataPendingHack)
  96. FUNC(SSL_Enable)
  97. FUNC(SSL_EnableCipher)
  98. FUNC(SSL_EnableDefault)
  99. FUNC(SSL_ForceHandshake)
  100. FUNC(SSL_GetClientAuthDataHook)
  101. FUNC(SSL_GetPeerName)
  102. FUNC(SSL_GetSessionID)
  103. FUNC(SSL_GetSockOpt)
  104. FUNC(SSL_HandshakeCallback)
  105. FUNC(SSL_Import)
  106. FUNC(SSL_ImportFd)
  107. FUNC(SSL_InvalidateSession)
  108. FUNC(SSL_Ioctl)
  109. FUNC(SSL_IsDomestic)
  110. FUNC(SSL_Listen)
  111. FUNC(SSL_PeerCertificate)
  112. FUNC(SSL_Read)
  113. FUNC(SSL_Recv)
  114. FUNC(SSL_RedoHandshake)
  115. FUNC(SSL_ResetHandshake)
  116. FUNC(SSL_SecurityCapabilities)
  117. FUNC(SSL_SecurityStatus)
  118. FUNC(SSL_Send)
  119. FUNC(SSL_SetSockOpt)
  120. FUNC(SSL_SetURL)
  121. FUNC(SSL_Shutdown)
  122. FUNC(SSL_Socket)
  123. FUNC(SSL_Write)
  124. /*
  125. * DSGWmcs: added the functions below:
  126. */
  127. FUNC(SEC_RNGInit)
  128. FUNC(SEC_CheckKeyDBPassword)
  129. FUNC(SEC_ZfreeItem)
  130. FUNC(SEC_DataToAscii)
  131. FUNC(SEC_AsciiToData)
  132. FUNC(ldapssl_init) /* called by something in ns-httpd.so */
  133. FUNC(SSL_DefaultBadCertHandler) /* called by something in ns-httpd.so */
  134. /* DSGW kristian added: */
  135. FUNC(CERT_GetDomainComponentName)
  136. FUNC(CERT_GetCertEmailAddress)
  137. FUNC(CERT_GetCertUid)
  138. FUNC(CERT_GetCommonName)
  139. FUNC(CERT_GetCountryName)
  140. FUNC(CERT_GetLocalityName)
  141. FUNC(CERT_GetOrgName)
  142. FUNC(CERT_GetStateName)
  143. FUNC(CERT_IsExportVersion)
  144. FUNC(CERT_PublicModulusLen)
  145. #ifdef FORTEZZA
  146. FUNC(SSL_EnableGroup)
  147. FUNC(SEC_OpenVolatileCertDB)
  148. FUNC(FortezzaConfigureServer)
  149. FUNC(SSL_IsEnabledGroup)
  150. #endif /* FORTEZZA */
  151. /* DSGW pkennedy added, for HCL integration */
  152. FUNC(BTOA_DataToAscii)
  153. FUNC(ATOB_AsciiToData)
  154. FUNC(SSL_ImportFD)
  155. FUNC(PK11_FindKeyByAnyCert)
  156. FUNC(PK11_GetTokenName)
  157. FUNC(PK11_SetPasswordFunc)
  158. FUNC(PK11_FindCertFromNickname)
  159. FUNC(PK11_FortezzaHasKEA)
  160. FUNC(PK11_ConfigurePKCS11)
  161. FUNC(SSL_SetPolicy)
  162. FUNC(CERT_VerifyCertNow)
  163. FUNC(SSL_RevealURL)
  164. FUNC(CERT_VerifyCertName)
  165. FUNC(PORT_SetError)
  166. /* DSGW richm added, for nss 2.8.x support */
  167. FUNC(SSL_OptionSet)
  168. FUNC(NSS_SetDomesticPolicy)
  169. /* DSGW powers added, for NSS 3.4.x support*/
  170. FUNC(NSS_NoDB_Init)
  171. FUNC(NSS_Initialize)
  172. FUNC(NSS_Init)
  173. FUNC(PK11_GenerateRandom)
  174. FUNC(PK11_GetInternalKeySlot)
  175. FUNC(PK11_KeyGen)
  176. FUNC(PK11_ImportSymKey)
  177. FUNC(PK11_GenerateNewParam)
  178. FUNC(PK11_CreateContextBySymKey)
  179. FUNC(PK11_CipherOp)
  180. FUNC(PK11_DigestFinal)
  181. FUNC(PK11_Finalize)
  182. FUNC(PK11_DestroyContext)
  183. FUNC(PK11_FreeSlot)
  184. FUNC(PK11_DigestBegin)
  185. FUNC(PK11_FreeSymKey)
  186. FUNC(PK11_DigestOp)
  187. FUNC(PK11_CloneContext)
  188. FUNC(PK11_HashBuf)
  189. FUNC(PK11_CreateDigestContext)
  190. FUNC(SECITEM_ZfreeItem)
  191. FUNC(SSL_CipherPrefSetDefault)
  192. FUNC(SSL_OptionGetDefault)
  193. FUNC(SSL_OptionSetDefault)
  194. FUNC(SSL_CipherPolicySet )
  195. FUNC(CERT_GetDefaultCertDB)
  196. FUNC(CERT_OpenCertDBFilename)