{"action":"opened","issue":{"url":"https://api.github.com/repos/ruby/openssl/issues/94","repository_url":"https://api.github.com/repos/ruby/openssl","labels_url":"https://api.github.com/repos/ruby/openssl/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/ruby/openssl/issues/94/comments","events_url":"https://api.github.com/repos/ruby/openssl/issues/94/events","html_url":"https://github.com/ruby/openssl/issues/94","id":197416034,"number":94,"title":"There's no way to replace a OpenSSL::X509::Name entry.","user":{"login":"evilsocket","id":86922,"avatar_url":"https://avatars.githubusercontent.com/u/86922?v=3","gravatar_id":"","url":"https://api.github.com/users/evilsocket","html_url":"https://github.com/evilsocket","followers_url":"https://api.github.com/users/evilsocket/followers","following_url":"https://api.github.com/users/evilsocket/following{/other_user}","gists_url":"https://api.github.com/users/evilsocket/gists{/gist_id}","starred_url":"https://api.github.com/users/evilsocket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evilsocket/subscriptions","organizations_url":"https://api.github.com/users/evilsocket/orgs","repos_url":"https://api.github.com/users/evilsocket/repos","events_url":"https://api.github.com/users/evilsocket/events{/privacy}","received_events_url":"https://api.github.com/users/evilsocket/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-23T19:18:48Z","updated_at":"2016-12-23T19:18:48Z","closed_at":null,"body":"Given a `OpenSSL::X509::Name` object, there's only an `add_entry` method to manipulate its entries, but this method will always append due to the `-1` argument specified [here](https://github.com/ruby/openssl/blob/5165effe4f5edd410715cb36cfc199f760ee320b/ext/openssl/ossl_x509name.c#L230).\r\n\r\nIf the object already contains an entry with the specified name, the method should instead find its index and replace it, otherwise the new appended entry won't be visible from browsers for instance, as they only get the first entry with a given name.\r\n\r\nIdeally, a new `set_entry` or `replace_entry` method would be needed.\r\n\r\nRef. to the issue where this behaviour was highlighted [this](https://github.com/evilsocket/bettercap/issues/231)."}}
{"actor":{"display_login":"evilsocket"}}