mirror of
https://github.com/saymrwulf/cryptography.git
synced 2026-05-14 20:37:55 +00:00
parent
f21ed73a6c
commit
4d5aa3923f
1 changed files with 4 additions and 0 deletions
|
|
@ -85,6 +85,10 @@ def _encode_name(backend, attributes):
|
|||
subject = backend._lib.X509_NAME_new()
|
||||
for attribute in attributes:
|
||||
name_entry = _encode_name_entry(backend, attribute)
|
||||
# X509_NAME_add_entry dups the object so we need to gc this copy
|
||||
name_entry = backend._ffi.gc(
|
||||
name_entry, backend._lib.X509_NAME_ENTRY_free
|
||||
)
|
||||
res = backend._lib.X509_NAME_add_entry(subject, name_entry, -1, 0)
|
||||
backend.openssl_assert(res == 1)
|
||||
return subject
|
||||
|
|
|
|||
Loading…
Reference in a new issue