summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2002-10-06 12:59:25 +0000
committerDr. Stephen Henson <steve@openssl.org>2002-10-06 12:59:25 +0000
commit72e04bd13f22a14c29f2cfe8f432875641b3e772 (patch)
tree3f607d0851ef839a0fd759257000c945080026b4 /doc
parent4ec0448122856e622e0ec3c87d5cc67f2d908135 (diff)
Document "0" and "1" naming convention.
Diffstat (limited to 'doc')
-rw-r--r--doc/crypto/crypto.pod16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/crypto/crypto.pod b/doc/crypto/crypto.pod
index c12eec1409..7a527992bb 100644
--- a/doc/crypto/crypto.pod
+++ b/doc/crypto/crypto.pod
@@ -62,6 +62,22 @@ L<txt_db(3)|txt_db(3)>
=back
+=head1 NOTES
+
+Some of the newer functions follow a naming convention using the numbers
+B<0> and B<1>. For example the functions:
+
+ int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
+ int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj);
+
+The B<0> version uses the supplied structure pointer directly
+in the parent and it will be freed up when the parent is freed.
+In the above example B<crl> would be freed but B<rev> would not.
+
+The B<1> function uses a copy of the supplied structure pointer
+(or in some cases increases its link count) in the parent and
+so both (B<x> and B<obj> above) should be freed up.
+
=head1 SEE ALSO
L<openssl(1)|openssl(1)>, L<ssl(3)|ssl(3)>