diff options
author | Jean-Paul Calderone <exarkun@divmod.com> | 2010-08-22 17:04:09 -0400 |
---|---|---|
committer | Jean-Paul Calderone <exarkun@divmod.com> | 2010-08-22 17:04:09 -0400 |
commit | dc3275fb18610ef20cef810f42391f8e95f884cb (patch) | |
tree | 18f8edc955c06574578f5274b615b3dcd70d8566 /OpenSSL/crypto/x509name.c | |
parent | e890db3b45317393e866771d5bc4201aa3e60a90 (diff) | |
download | pyopenssl-dc3275fb18610ef20cef810f42391f8e95f884cb.tar.gz |
Fix X509Name getattro and update tests to expect bytes back from get_components
Diffstat (limited to 'OpenSSL/crypto/x509name.c')
-rw-r--r-- | OpenSSL/crypto/x509name.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/OpenSSL/crypto/x509name.c b/OpenSSL/crypto/x509name.c index 1c69be1..e10c5a5 100644 --- a/OpenSSL/crypto/x509name.c +++ b/OpenSSL/crypto/x509name.c @@ -154,9 +154,10 @@ crypto_X509Name_getattro(crypto_X509NameObj *self, PyObject *nameobj) char *utf8string; char *name; #ifdef PY3 - nameobj = PyUnicode_AsASCIIString(nameobj); -#endif + name = PyBytes_AsString(PyUnicode_AsASCIIString(nameobj)); +#else name = PyBytes_AsString(nameobj); +#endif if ((nid = OBJ_txt2nid(name)) == NID_undef) { /* |