home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / cku200.zip / ck_ssl.h < prev    next >
C/C++ Source or Header  |  2001-12-03  |  4KB  |  130 lines

  1. /*
  2.   C K _ S S L . H --  OpenSSL Interface Header for C-Kermit
  3.  
  4.   Copyright (C) 1985, 2001,
  5.     Trustees of Columbia University in the City of New York.
  6.     All rights reserved.  See the C-Kermit COPYING.TXT file or the
  7.     copyright text in the ckcmai.c module for disclaimer and permissions.
  8.  
  9.   Author:  Jeffrey E Altman (jaltman@columbia.edu)
  10. */
  11.  
  12. #ifdef CK_SSL
  13. #ifndef CK_ANSIC
  14. #define NOPROTO
  15. #endif /* CK_ANSIC */
  16.  
  17. #ifdef COMMENT                          /* Not for C-Kermit 7.1 */
  18. #ifdef KRB5
  19. #ifndef NOSSLK5
  20. #ifndef SSL_KRB5
  21. #define SSL_KRB5
  22. #endif /* SSL_KRB5 */
  23. #endif /* NOSSLK5 */
  24. #endif /* KRB5 */
  25. #endif /* COMMENT */
  26.  
  27. #ifdef OS2
  28. #ifndef ZLIB
  29. #define ZLIB
  30. #endif /* ZLIB */
  31. #endif /* OS2 */
  32.  
  33. #ifdef ZLIB
  34. #include <openssl/comp.h>
  35. #endif /* ZLIB */
  36. #include <openssl/ssl.h>
  37. #include <openssl/x509v3.h>
  38. #include <openssl/rand.h>
  39. #include <openssl/x509_vfy.h>
  40. #include <openssl/err.h>
  41. #include <openssl/pem.h>
  42. #include <openssl/bn.h>
  43. #include <openssl/des.h>
  44. #include <openssl/blowfish.h>
  45. #include <openssl/dh.h>
  46. #include <openssl/rc4.h>
  47. #include <openssl/cast.h>
  48. #include <openssl/dsa.h>
  49. #include <openssl/rsa.h>
  50. #include <openssl/md5.h>
  51. #include <openssl/sha.h>
  52. #include <openssl/evp.h>
  53. #include <openssl/hmac.h>
  54. #ifdef SSL_KRB5
  55. #include <openssl/kssl.h>
  56. #endif /* SSL_KRB5 */
  57.  
  58. extern BIO *bio_err;
  59. extern SSL *ssl_con;
  60. extern SSL_CTX *ssl_ctx;
  61. extern int ssl_debug_flag;
  62. extern int ssl_only_flag;
  63. extern int ssl_active_flag;
  64. extern int ssl_verify_flag;
  65. extern int ssl_verbose_flag;
  66. extern int ssl_certsok_flag;
  67. extern int ssl_dummy_flag;
  68. extern int ssl_verify_depth;
  69.  
  70. extern char *ssl_rsa_cert_file;
  71. extern char *ssl_rsa_cert_chain_file;
  72. extern char *ssl_rsa_key_file;
  73. extern char *ssl_dsa_cert_file;
  74. extern char *ssl_dsa_cert_chain_file;
  75. extern char *ssl_dh_key_file;
  76. extern char *ssl_cipher_list;
  77. extern char *ssl_crl_file;
  78. extern char *ssl_crl_dir;
  79. extern char *ssl_verify_file;
  80. extern char *ssl_verify_dir;
  81. extern char *ssl_dh_param_file;
  82. extern char *ssl_rnd_file;
  83.  
  84. extern SSL_CTX *tls_ctx;
  85. extern SSL *tls_con;
  86. extern int tls_only_flag;
  87. extern int tls_active_flag;
  88. extern int x509_cert_valid;
  89. extern X509_STORE *crl_store;
  90.  
  91. #ifndef NOHTTP
  92. extern SSL_CTX *tls_http_ctx;
  93. extern SSL *tls_http_con;
  94. extern int tls_http_active_flag;
  95. #endif /* NOHTTP */
  96.  
  97. extern int ssl_initialized;
  98.  
  99. _PROTOTYP(int ssl_tn_init,(int));
  100. _PROTOTYP(int ssl_http_init,(char *));
  101. _PROTOTYP(int ck_ssl_http_client,(int,char *));
  102. _PROTOTYP(int ssl_display_connect_details,(SSL *,int,int));
  103. _PROTOTYP(int ssl_server_verify_callback,(int, X509_STORE_CTX *));
  104. _PROTOTYP(int ssl_client_verify_callback,(int, X509_STORE_CTX *));
  105. _PROTOTYP(int ssl_reply,(int, unsigned char *, int));
  106. _PROTOTYP(int ssl_is,(unsigned char *, int));
  107. _PROTOTYP(int ck_ssl_incoming,(int));
  108. _PROTOTYP(int ck_ssl_outgoing,(int));
  109. _PROTOTYP(int tls_is_user_valid,(SSL *, const char *));
  110. _PROTOTYP(char * ssl_get_dnsName,(SSL *));
  111. _PROTOTYP(char * ssl_get_commonName,(SSL *));
  112. _PROTOTYP(char * ssl_get_issuer_name,(SSL *));
  113. _PROTOTYP(char * ssl_get_subject_name,(SSL *));
  114. _PROTOTYP(int ssl_get_client_finished,(char *, int));
  115. _PROTOTYP(int ssl_get_server_finished,(char *, int));
  116. _PROTOTYP(int ssl_passwd_callback,(char *, int, int, VOID *));
  117. _PROTOTYP(VOID ssl_client_info_callback,(SSL *,int, int));
  118. _PROTOTYP(int ssl_anonymous_cipher,(SSL * ssl));
  119. _PROTOTYP(int tls_load_certs,(SSL_CTX * ctx, SSL * con, int server));
  120.  
  121. #ifdef OS2
  122. #include "ckosslc.h"
  123. #include "ckossl.h"
  124. #endif /* OS2 */
  125.  
  126. #define SSL_CLIENT 0
  127. #define SSL_SERVER 1
  128. #define SSL_HTTP   2
  129. #endif /* CK_SSL */
  130.