- data=X509v3_pack_string(NULL,V_ASN1_BIT_STRING,
- "\001",1);
- ex=X509_EXTENSION_create_by_NID(NULL,NID_netscape_cert_type,0,data);
+ /* Add extension using V3 code: we can set the config file as NULL
+ * because we wont reference any other sections. We can also set
+ * the context to NULL because none of these extensions below will need
+ * to access it.
+ */
+
+ ex = X509V3_EXT_conf_nid(NULL, NULL, NID_netscape_cert_type, "server");