Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add X509::Name#to_utf8 and #inspect #143

Merged
merged 4 commits into from
Sep 3, 2017

Conversation

rhenium
Copy link
Member

@rhenium rhenium commented Sep 3, 2017

Closes #26.

Allow string literals containing UTF-8 characters.
Extract the body into a function in preparation for adding #to_utf8.

Also a potential memory leak is fixed: the GetX509Name() macro can
raise TypeError.
The existing #to_s does not interact well with distinguished names
containing multi-byte UTF-8 characters since the OpenSSL function
X509_NAME_print_ex() escapes bytes with MSB set by default.

Unfortunately we can't fix it without breaking backwards compatibility.
It takes options as a bit field that is directly passed to
X509_NAME_print_ex(). Let's add a new method instead.

Fixes: ruby#26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant