Skip to content

Commit 5ca8014

Browse files
Update documentation of X509v3_add_extensions
1 parent 116fda3 commit 5ca8014

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

doc/man3/X509v3_get_ext_by_NID.pod

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,13 @@ The passed extension I<ex> is duplicated so it must be freed after use.
9090
X509v3_add_extensions() adds the list of extensions I<exts> to STACK I<*target>.
9191
The STACK I<*target> is returned unchanged if I<exts> is NULL or an empty list.
9292
Otherwise a new stack is allocated if I<*target> is NULL.
93-
An extension to be added
94-
that has the same OID as a pre-existing one replaces this earlier one.
93+
An extension to be added that has the same OID as a pre-existing one replaces
94+
this earlier one. However in case the added extensions contains just an
95+
empty AKID and/or SKID extension, that extension is not added.
96+
Only the pre-existing extensions of the same type are deleted.
97+
In that case it is possible that the returned stack is an empty array.
98+
It is recommended to call this functions with an empty array instead of
99+
NULL I<*target> and drop the empty array return afterwards.
95100

96101
X509_get_ext_count(), X509_get_ext(), X509_get_ext_by_NID(),
97102
X509_get_ext_by_OBJ(), X509_get_ext_by_critical(), X509_delete_ext()

0 commit comments

Comments
 (0)