如何在openssl中找到所有函数的来源,例如PEM_read_bio_RSA_PUBKEY

时间:2017-07-12 10:39:40

标签: c openssl

我只是在.pod文件中找到它但没有更多细节,c部分中的声明在哪里?

1 个答案:

答案 0 :(得分:0)

在crypto / pem / pem.h中:

/*
 * These macros make the PEM_read/PEM_write functions easier to maintain and
 * write. Now they are all implemented with either: IMPLEMENT_PEM_rw(...) or
 * IMPLEMENT_PEM_rw_cb(...)
 */

...

# define IMPLEMENT_PEM_read_bio(name, type, str, asn1) \
type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u)\
{ \
return PEM_ASN1_read_bio((d2i_of_void *)d2i_##asn1, str,bp,(void **)x,cb,u); \
}

RSA + PUBKEY部分位于:crypto/pem/pem_all.c