Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经能够通过索引从 X.509 证书中提取自定义扩展:
X509_EXTENSION* ex = X509_get_ext(x509, extension_index);
如何通过 OID 而不是索引提取扩展名?
得到它与以下工作:
int my_nid = OBJ_create("1.2.3.4", "MyShortObjectName", "My Long Object Name"); int my_idx = X509_get_ext_by_NID(x509, my_nid, -1); X509_EXTENSION* ex = X509_get_ext(x509, my_idx);