/* ====================================================================
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* openssl-core@openssl.org.
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* (eay@cryptsoft.com). This product includes software written by Tim
* Hudson (tjh@cryptsoft.com).
*
*/
#ifndef HEADER_SAFESTACK_H
#define HEADER_SAFESTACK_H
#include <openssl/stack.h>
typedef void (*openssl_fptr)(void);
#define openssl_fcast(f) ((openssl_fptr)f)
#ifdef DEBUG_SAFESTACK
#define STACK_OF(type) struct stack_st_##type
#define PREDECLARE_STACK_OF(type) STACK_OF(type);
#define DECLARE_STACK_OF(type) \
STACK_OF(type) \
{ \
STACK stack; \
};
#define IMPLEMENT_STACK_OF(type) /* nada (obsolete in new safestack approach)*/
/* SKM_sk_... stack macros are internal to safestack.h:
* never use them directly, use sk_<type>_... instead */
#define SKM_sk_new(type, cmp) \
((STACK_OF(type) * (*)(int (*)(const type * const *, const type * const *)))openssl_fcast(sk_new))(cmp)
#define SKM_sk_new_null(type) \
((STACK_OF(type) * (*)(void))openssl_fcast(sk_new_null))()
#define SKM_sk_free(type, st) \
((void (*)(STACK_OF(type) *))openssl_fcast(sk_free))(st)
#define SKM_sk_num(type, st) \
((int (*)(const STACK_OF(type) *))openssl_fcast(sk_num))(st)
#define SKM_sk_value(type, st,i) \
((type * (*)(const STACK_OF(type) *, int))openssl_fcast(sk_value))(st, i)
#define SKM_sk_set(type, st,i,val) \
((type * (*)(STACK_OF(type) *, int, type *))openssl_fcast(sk_set))(st, i, val)
#define SKM_sk_zero(type, st) \
((void (*)(STACK_OF(type) *))openssl_fcast(sk_zero))(st)
#define SKM_sk_push(type, st,val) \
((int (*)(STACK_OF(type) *, type *))openssl_fcast(sk_push))(st, val)
#define SKM_sk_unshift(type, st,val) \
((int (*)(STACK_OF(type) *, type *))openssl_fcast(sk_unshift))(st, val)
#define SKM_sk_find(type, st,val) \
((int (*)(STACK_OF(type) *, type *))openssl_fcast(sk_find))(st, val)
#define SKM_sk_delete(type, st,i) \
((type * (*)(STACK_OF(type) *, int))openssl_fcast(sk_delete))(st, i)
#define SKM_sk_delete_ptr(type, st,ptr) \
((type * (*)(STACK_OF(type) *, type *))openssl_fcast(sk_delete_ptr))(st, ptr)
#define SKM_sk_insert(type, st,val,i) \
((int (*)(STACK_OF(type) *, type *, int))openssl_fcast(sk_insert))(st, val, i)
#define SKM_sk_set_cmp_func(type, st,cmp) \
((int (*(*)(STACK_OF(type) *, int (*)(const type * const *, const type * const *))) \
(const type * const *, const type * const *))openssl_fcast(sk_set_cmp_func))\
(st, cmp)
#define SKM_sk_dup(type, st) \
((STACK_OF(type) *(*)(STACK_OF(type) *))openssl_fcast(sk_dup))(st)
#define SKM_sk_pop_free(type, st,free_func) \
((void (*)(STACK_OF(type) *, void (*)(type *)))openssl_fcast(sk_pop_free))\
(st, free_func)
#define SKM_sk_shift(type, st) \
((type * (*)(STACK_OF(type) *))openssl_fcast(sk_shift))(st)
#define SKM_sk_pop(type, st) \
((type * (*)(STACK_OF(type) *))openssl_fcast(sk_pop))(st)
#define SKM_sk_sort(type, st) \
((void (*)(STACK_OF(type) *))openssl_fcast(sk_sort))(st)
#define SKM_sk_is_sorted(type, st) \
((int (*)(const STACK_OF(type) *))openssl_fcast(sk_is_sorted))(st)
#define SKM_ASN1_SET_OF_d2i(type, st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
((STACK_OF(type) * (*) (STACK_OF(type) **,const unsigned char **, long , \
type *(*)(type **, const unsigned char **,long), \
void (*)(type *), int ,int )) openssl_fcast(d2i_ASN1_SET)) \
(st,pp,length, d2i_func, free_func, ex_tag,ex_class)
#define SKM_ASN1_SET_OF_i2d(type, st, pp, i2d_func, ex_tag, ex_class, is_set) \
((int (*)(STACK_OF(type) *,unsigned char **, \
int (*)(type *,unsigned char **), int , int , int)) openssl_fcast(i2d_ASN1_SET)) \
(st,pp,i2d_func,ex_tag,ex_class,is_set)
#define SKM_ASN1_seq_pack(type, st, i2d_func, buf, len) \
((unsigned char *(*)(STACK_OF(type) *, \
int (*)(type *,unsigned char **), unsigned char **,int *)) openssl_fcast(ASN1_seq_pack)) \
(st, i2d_func, buf, len)
#define SKM_ASN1_seq_unpack(type, buf, len, d2i_func, free_func) \
((STACK_OF(type) * (*)(const unsigned char *,int, \
type *(*)(type **,const unsigned char **, long), \
void (*)(type *)))openssl_fcast(ASN1_seq_unpack)) \
(buf,len,d2i_func, free_func)
#define SKM_PKCS12_decrypt_d2i(type, algor, d2i_func, free_func, pass, passlen, oct, seq) \
((STACK_OF(type) * (*)(X509_ALGOR *, \
type *(*)(type **, const unsigned char **, long), \
void (*)(type *), \
const char *, int, \
ASN1_STRING *, int))PKCS12_decrypt_d2i) \
(algor,d2i_func,free_func,pass,passlen,oct,seq)
#else
#define STACK_OF(type) STACK
#define PREDECLARE_STACK_OF(type) /* nada */
#define DECLARE_STACK_OF(type) /* nada */
#define IMPLEMENT_STACK_OF(type) /* nada */
#define SKM_sk_new(type, cmp) \
sk_new((int (*)(const char * const *, const char * const *))(cmp))
#define SKM_sk_new_null(type) \
sk_new_null()
#define SKM_sk_free(type, st) \
sk_free(st)
#define SKM_sk_num(type, st) \
sk_num(st)
#define SKM_sk_value(type, st,i) \
((type *)sk_value(st, i))
#define SKM_sk_set(type, st,i,val) \
((type *)sk_set(st, i,(char *)val))
#define SKM_sk_zero(type, st) \
sk_zero(st)
#define SKM_sk_push(type, st,val) \
sk_push(st, (char *)val)
#define SKM_sk_unshift(type, st,val) \
sk_unshift(st, val)
#define SKM_sk_find(type, st,val) \
sk_find(st, (char *)val)
#define SKM_sk_delete(type, st,i) \
((type *)sk_delete(st, i))
#define SKM_sk_delete_ptr(type, st,ptr) \
((type *)sk_delete_ptr(st,(char *)ptr))
#define SKM_sk_insert(type, st,val,i) \
没有合适的资源?快使用搜索试试~ 我知道了~
openssl WindowsMobile 平台移植
共73个文件
h:69个
dll:2个
lib:2个
需积分: 10 9 下载量 70 浏览量
2010-04-15
15:51:10
上传
评论
收藏 830KB RAR 举报
温馨提示
openssl 在wince 上还是比较好移植的。但是移植到WindowsMobile 上需要........
资源推荐
资源详情
资源评论
收起资源包目录
include.rar (73个子文件)
include
libeay32.lib 634KB
ssleay32.lib 50KB
ssleay32.dll 199KB
libeay32.dll 1.01MB
openssl
pqueue.h 3KB
ossl_typ.h 6KB
des.h 10KB
pkcs12.h 12KB
evp.h 35KB
dso.h 16KB
hmac.h 4KB
ec.h 21KB
pq_compat.h 6KB
dsa.h 10KB
rsa.h 17KB
asn1t.h 27KB
idea.h 4KB
md5.h 5KB
safestack.h 124KB
ocsp.h 23KB
crypto.h 22KB
krb5_asn.h 7KB
cast.h 4KB
asn1.h 45KB
ripemd.h 4KB
rc4.h 4KB
engine.h 37KB
blowfish.h 5KB
ssl23.h 4KB
comp.h 2KB
stack.h 4KB
ebcdic.h 540B
des_old.h 18KB
rc2.h 4KB
pkcs7.h 16KB
ui_compat.h 3KB
ssl3.h 21KB
conf.h 9KB
dtls1.h 6KB
symhacks.h 19KB
txt_db.h 4KB
store.h 26KB
err.h 12KB
md4.h 5KB
md2.h 4KB
dh.h 8KB
ecdsa.h 10KB
ui.h 16KB
sha.h 7KB
x509_vfy.h 20KB
e_os2.h 9KB
opensslv.h 4KB
aes.h 5KB
rand.h 5KB
ssl.h 78KB
objects.h 33KB
pem.h 28KB
bio.h 30KB
lhash.h 7KB
bn.h 32KB
kssl.h 6KB
buffer.h 4KB
tls1.h 15KB
x509.h 47KB
ssl2.h 10KB
x509v3.h 29KB
conf_api.h 4KB
tmdiff.h 4KB
asn1_mac.h 19KB
pem2.h 3KB
opensslconf.h 6KB
ecdh.h 5KB
obj_mac.h 110KB
共 73 条
- 1
资源评论
zdl5406
- 粉丝: 2
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功