OBJ_get0_data() returns a pointer to the content octets of B<obj>.
The returned pointer is an internal pointer which B<must not> be freed.
-In OpenSSL versions prior to 1.1.0 OBJ_cleanup() cleaned up OpenSSLs internal
-object table and was called before an application exits if any new objects were
-added using OBJ_create(). This function is deprecated in version 1.1.0 and now
-does nothing if called. No explicit de-initialisation is now required. See
-L<OPENSSL_init_crypto(3)> for further information.
+OBJ_cleanup() releases any resources allocated by creating new objects.
=head1 NOTES
Create an object for B<commonName>:
- ASN1_OBJECT *o;
- o = OBJ_nid2obj(NID_commonName);
+ ASN1_OBJECT *o = OBJ_nid2obj(NID_commonName);
Check if an object is B<commonName>
if (OBJ_obj2nid(obj) == NID_commonName)
- /* Do something */
+ /* Do something */
Create a new NID and initialize an object from it:
- int new_nid;
- ASN1_OBJECT *obj;
-
- new_nid = OBJ_create("1.2.3.4", "NewOID", "New Object Identifier");
-
- obj = OBJ_nid2obj(new_nid);
+ int new_nid = OBJ_create("1.2.3.4", "NewOID", "New Object Identifier");
+ ASN1_OBJECT *obj = OBJ_nid2obj(new_nid);
Create a new object directly:
=head1 HISTORY
-OBJ_cleanup() was deprecated in OpenSSL 1.1.0.
+OBJ_cleanup() was deprecated in OpenSSL 1.1.0 by L<OPENSSL_init_crypto(3)>
+and should not be used.
=head1 COPYRIGHT