CMS_ContentInfo_print_ctx函数的源代码

时间:2016-09-26 14:57:41

标签: openssl

我正在尝试查找OpenSSL函数CMS_ContentInfo_print_ctx的源代码。我搜索了代码并没有找到任何东西,所以我假设代码是自动生成的。

有人能告诉我这段代码的生成位置或方式吗?

由于

1 个答案:

答案 0 :(得分:1)

  

我正在尝试找到OpenSSL函数的源代码...我搜索了代码而没有找到任何内容,所以我假设代码是自动生成的。

很多时候,OpenSSL使用宏来获取基本名称,如ASIdOrRange,并将其扩展为函数集合。 grep是你的朋友:

openssl-1.0.2h$ grep -IR sk_ * | grep '#' | grep define
crypto/stack/safestack.h:# define SKM_sk_new(type, cmp) \
crypto/stack/safestack.h:# define SKM_sk_new_null(type) \
crypto/stack/safestack.h:# define SKM_sk_free(type, st) \
crypto/stack/safestack.h:# define SKM_sk_num(type, st) \
crypto/stack/safestack.h:# define SKM_sk_value(type, st,i) \
crypto/stack/safestack.h:# define SKM_sk_set(type, st,i,val) \
crypto/stack/safestack.h:# define SKM_sk_zero(type, st) \
crypto/stack/safestack.h:# define SKM_sk_push(type, st, val) \
crypto/stack/safestack.h:# define SKM_sk_unshift(type, st, val) \
crypto/stack/safestack.h:# define SKM_sk_find(type, st, val) \
crypto/stack/safestack.h:# define SKM_sk_find_ex(type, st, val) \
crypto/stack/safestack.h:# define SKM_sk_delete(type, st, i) \
crypto/stack/safestack.h:# define SKM_sk_delete_ptr(type, st, ptr) \
crypto/stack/safestack.h:# define SKM_sk_insert(type, st,val, i) \
crypto/stack/safestack.h:# define SKM_sk_set_cmp_func(type, st, cmp) \
crypto/stack/safestack.h:# define SKM_sk_dup(type, st) \
crypto/stack/safestack.h:# define SKM_sk_pop_free(type, st, free_func) \
crypto/stack/safestack.h:# define SKM_sk_deep_copy(type, st, copy_func, free_func) \
crypto/stack/safestack.h:# define SKM_sk_shift(type, st) \
crypto/stack/safestack.h:# define SKM_sk_pop(type, st) \
crypto/stack/safestack.h:# define SKM_sk_sort(type, st) \
crypto/stack/safestack.h:# define SKM_sk_is_sorted(type, st) \
...

在这种特殊情况下:

openssl-1.0.2h$ grep -iIR CMS_ContentInfo * | grep void
apps/cms.c:static void receipt_request_print(BIO *out, CMS_ContentInfo *cms);
apps/cms.c:static void receipt_request_print(BIO *out, CMS_ContentInfo *cms)
crypto/cms/cms_lcl.h:CMS_ContentInfo *cms_Data_create(void);
crypto/cms/cms_lib.c:CMS_ContentInfo *cms_Data_create(void)