def _encode_name(backend, attributes):
 subject = backend._lib.X509_NAME_new()
 for attribute in attributes:
  name_entry = _encode_name_entry(backend, attribute)
  res = backend._lib.X509_NAME_add_entry(subject, name_entry, (-1), 0)
  backend.openssl_assert((res == 1))
 return subject

def _encode_name ( backend , attributes ) : subject = backend . _lib . X509_NAME_new ( ) for attribute in attributes : name_entry = _encode_name_entry ( backend , attribute ) res = backend . _lib . X509_NAME_add_entry ( subject , name_entry , ( - 1 ) , 0 ) backend . openssl_assert ( ( res == 1 ) ) return subject
the x509_name created will not be gcd .