• Main Page
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

ext/openssl/openssl_missing.h

Go to the documentation of this file.
00001 /*
00002  * $Id: openssl_missing.h 25189 2009-10-02 12:04:37Z akr $
00003  * 'OpenSSL for Ruby' project
00004  * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
00005  * All rights reserved.
00006  */
00007 /*
00008  * This program is licenced under the same licence as Ruby.
00009  * (See the file 'LICENCE'.)
00010  */
00011 #if !defined(_OSSL_OPENSSL_MISSING_H_)
00012 #define _OSSL_OPENSSL_MISSING_H_
00013 
00014 #if defined(__cplusplus)
00015 extern "C" {
00016 #endif
00017 
00018 #ifndef TYPEDEF_D2I_OF
00019 typedef char *d2i_of_void();
00020 #endif
00021 #ifndef TYPEDEF_I2D_OF
00022 typedef int i2d_of_void();
00023 #endif
00024 
00025 /*
00026  * These functions are not included in headers of OPENSSL <= 0.9.6b
00027  */
00028 
00029 #if !defined(PEM_read_bio_DSAPublicKey)
00030 # define PEM_read_bio_DSAPublicKey(bp,x,cb,u) (DSA *)PEM_ASN1_read_bio( \
00031         (d2i_of_void *)d2i_DSAPublicKey,PEM_STRING_DSA_PUBLIC,bp,(void **)x,cb,u)
00032 #endif
00033 
00034 #if !defined(PEM_write_bio_DSAPublicKey)
00035 # define PEM_write_bio_DSAPublicKey(bp,x) \
00036         PEM_ASN1_write_bio((i2d_of_void *)i2d_DSAPublicKey,\
00037                 PEM_STRING_DSA_PUBLIC,\
00038                 bp,(char *)x, NULL, NULL, 0, NULL, NULL)
00039 #endif
00040 
00041 #if !defined(DSAPrivateKey_dup)
00042 # define DSAPrivateKey_dup(dsa) (DSA *)ASN1_dup((i2d_of_void *)i2d_DSAPrivateKey, \
00043         (d2i_of_void *)d2i_DSAPrivateKey,(char *)dsa)
00044 #endif
00045 
00046 #if !defined(DSAPublicKey_dup)
00047 # define DSAPublicKey_dup(dsa) (DSA *)ASN1_dup((i2d_of_void *)i2d_DSAPublicKey, \
00048         (d2i_of_void *)d2i_DSAPublicKey,(char *)dsa)
00049 #endif
00050 
00051 #if !defined(X509_REVOKED_dup)
00052 # define X509_REVOKED_dup(rev) (X509_REVOKED *)ASN1_dup((i2d_of_void *)i2d_X509_REVOKED, \
00053         (d2i_of_void *)d2i_X509_REVOKED, (char *)rev)
00054 #endif
00055 
00056 #if !defined(PKCS7_SIGNER_INFO_dup)
00057 #  define PKCS7_SIGNER_INFO_dup(si) (PKCS7_SIGNER_INFO *)ASN1_dup((i2d_of_void *)i2d_PKCS7_SIGNER_INFO, \
00058         (d2i_of_void *)d2i_PKCS7_SIGNER_INFO, (char *)si)
00059 #endif
00060 
00061 #if !defined(PKCS7_RECIP_INFO_dup)
00062 #  define PKCS7_RECIP_INFO_dup(ri) (PKCS7_RECIP_INFO *)ASN1_dup((i2d_of_void *)i2d_PKCS7_RECIP_INFO, \
00063         (d2i_of_void *)d2i_PKCS7_RECIP_INFO, (char *)ri)
00064 #endif
00065 
00066 #if !defined(HAVE_EVP_MD_CTX_INIT)
00067 void HMAC_CTX_init(HMAC_CTX *ctx);
00068 #endif
00069 
00070 #if !defined(HAVE_HMAC_CTX_COPY)
00071 void HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in);
00072 #endif
00073 
00074 #if !defined(HAVE_HMAC_CTX_CLEANUP)
00075 void HMAC_CTX_cleanup(HMAC_CTX *ctx);
00076 #endif
00077 
00078 #if !defined(HAVE_EVP_MD_CTX_CREATE)
00079 EVP_MD_CTX *EVP_MD_CTX_create(void);
00080 #endif
00081 
00082 #if !defined(HAVE_EVP_MD_CTX_INIT)
00083 void EVP_MD_CTX_init(EVP_MD_CTX *ctx);
00084 #endif
00085 
00086 #if !defined(HAVE_EVP_MD_CTX_CLEANUP)
00087 int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);
00088 #endif
00089 
00090 #if !defined(HAVE_EVP_MD_CTX_DESTROY)
00091 void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
00092 #endif
00093 
00094 #if !defined(HAVE_EVP_CIPHER_CTX_COPY)
00095 int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, EVP_CIPHER_CTX *in);
00096 #endif
00097 
00098 #if !defined(HAVE_EVP_DIGESTINIT_EX)
00099 #  define EVP_DigestInit_ex(ctx, md, engine) EVP_DigestInit(ctx, md)
00100 #endif
00101 #if !defined(HAVE_EVP_DIGESTFINAL_EX)
00102 #  define EVP_DigestFinal_ex(ctx, buf, len) EVP_DigestFinal(ctx, buf, len)
00103 #endif
00104 
00105 #if !defined(HAVE_EVP_CIPHERINIT_EX)
00106 #  define EVP_CipherInit_ex(ctx, type, impl, key, iv, enc) EVP_CipherInit(ctx, type, key, iv, enc)
00107 #endif
00108 #if !defined(HAVE_EVP_CIPHERFINAL_EX)
00109 #  define EVP_CipherFinal_ex(ctx, outm, outl) EVP_CipherFinal(ctx, outm, outl)
00110 #endif
00111 
00112 #if !defined(EVP_CIPHER_name)
00113 #  define EVP_CIPHER_name(e) OBJ_nid2sn(EVP_CIPHER_nid(e))
00114 #endif
00115 
00116 #if !defined(EVP_MD_name)
00117 #  define EVP_MD_name(e) OBJ_nid2sn(EVP_MD_type(e))
00118 #endif
00119 
00120 #if !defined(HAVE_EVP_HMAC_INIT_EX)
00121 #  define HMAC_Init_ex(ctx, key, len, digest, engine) HMAC_Init(ctx, key, len, digest)
00122 #endif
00123 
00124 #if !defined(PKCS7_is_detached)
00125 #  define PKCS7_is_detached(p7) (PKCS7_type_is_signed(p7) && PKCS7_get_detached(p7))
00126 #endif
00127 
00128 #if !defined(PKCS7_type_is_encrypted)
00129 #  define PKCS7_type_is_encrypted(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted)
00130 #endif
00131 
00132 #if !defined(HAVE_OPENSSL_CLEANSE)
00133 #define OPENSSL_cleanse(p, l) memset(p, 0, l)
00134 #endif
00135 
00136 #if !defined(HAVE_X509_STORE_SET_EX_DATA)
00137 void *X509_STORE_get_ex_data(X509_STORE *str, int idx);
00138 int X509_STORE_set_ex_data(X509_STORE *str, int idx, void *data);
00139 #endif
00140 
00141 #if !defined(HAVE_X509_CRL_SET_VERSION)
00142 int X509_CRL_set_version(X509_CRL *x, long version);
00143 #endif
00144 
00145 #if !defined(HAVE_X509_CRL_SET_ISSUER_NAME)
00146 int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name);
00147 #endif
00148 
00149 #if !defined(HAVE_X509_CRL_SORT)
00150 int X509_CRL_sort(X509_CRL *c);
00151 #endif
00152 
00153 #if !defined(HAVE_X509_CRL_ADD0_REVOKED)
00154 int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
00155 #endif
00156 
00157 #if !defined(HAVE_BN_MOD_SQR)
00158 int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
00159 #endif
00160 
00161 #if !defined(HAVE_BN_MOD_ADD)
00162 int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx);
00163 #endif
00164 
00165 #if !defined(HAVE_BN_MOD_SUB)
00166 int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx);
00167 #endif
00168 
00169 #if !defined(HAVE_BN_RAND_RANGE)
00170 int BN_rand_range(BIGNUM *r, BIGNUM *range);
00171 #endif
00172 
00173 #if !defined(HAVE_BN_PSEUDO_RAND_RANGE)
00174 int BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range);
00175 #endif
00176 
00177 #if !defined(HAVE_CONF_GET1_DEFAULT_CONFIG_FILE)
00178 char *CONF_get1_default_config_file(void);
00179 #endif
00180 
00181 #if !defined(HAVE_PEM_DEF_CALLBACK)
00182 int PEM_def_callback(char *buf, int num, int w, void *key);
00183 #endif
00184 
00185 #if defined(__cplusplus)
00186 }
00187 #endif
00188 
00189 
00190 #endif /* _OSSL_OPENSSL_MISSING_H_ */
00191 
00192 

Generated on Wed Sep 8 2010 21:53:56 for Ruby by  doxygen 1.7.1