OpenSSL certificate lacks key identifiers

后端 未结 1 1027
不知归路
不知归路 2021-02-08 15:36

How do i add these sections to certificate (i am manualy building it using C++).

    X509v3 Subject Key Identifier: 
        A4:F7:38:55:8D:35:1E:1D:4D:66:55:54:         


        
相关标签:
1条回答
  • 2021-02-08 16:18

    Found solution - add these lines to code

    ex = X509V3_EXT_conf_nid(NULL, NULL, NID_subject_key_identifier, "hash");
    X509_add_ext(x, ex, -1);
    X509_EXTENSION_free(ex);
    
    ex = X509V3_EXT_conf_nid(NULL, NULL, NID_authority_key_identifier, "keyid:always");
    X509_add_ext(x, ex, -1);
    X509_EXTENSION_free(ex);
    
    0 讨论(0)
提交回复
热议问题