{"action":"created","issue":{"url":"https://api.github.com/repos/ebourg/jsign/issues/26","repository_url":"https://api.github.com/repos/ebourg/jsign","labels_url":"https://api.github.com/repos/ebourg/jsign/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/ebourg/jsign/issues/26/comments","events_url":"https://api.github.com/repos/ebourg/jsign/issues/26/events","html_url":"https://github.com/ebourg/jsign/pull/26","id":191746576,"number":26,"title":"Add support for specifying signature algorithm and signature provider.","user":{"login":"netmackan","id":48208,"avatar_url":"https://avatars.githubusercontent.com/u/48208?v=3","gravatar_id":"","url":"https://api.github.com/users/netmackan","html_url":"https://github.com/netmackan","followers_url":"https://api.github.com/users/netmackan/followers","following_url":"https://api.github.com/users/netmackan/following{/other_user}","gists_url":"https://api.github.com/users/netmackan/gists{/gist_id}","starred_url":"https://api.github.com/users/netmackan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netmackan/subscriptions","organizations_url":"https://api.github.com/users/netmackan/orgs","repos_url":"https://api.github.com/users/netmackan/repos","events_url":"https://api.github.com/users/netmackan/events{/privacy}","received_events_url":"https://api.github.com/users/netmackan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-25T17:40:07Z","updated_at":"2016-11-25T21:58:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ebourg/jsign/pulls/26","html_url":"https://github.com/ebourg/jsign/pull/26","diff_url":"https://github.com/ebourg/jsign/pull/26.diff","patch_url":"https://github.com/ebourg/jsign/pull/26.patch"},"body":"Before this patch the signature algorithm was assumed to be the digest algorithm with the key algorithm. While this works for simple cases it does not provide support when there are multiple signature algorithms available for a certain key type. For example signature algorithms using RSA keys are both RSASSA-PKCS1_v1.5 (SHAxWithRSA) and RSASSA-PSS (SHAxWithRSAandMGF1).\r\nIn addition it is maybe not necessarily so that the same hash algorithm must be used for both the digest in the PE, in the time-stamp token and as the digest of the signature.\r\n\r\nThis patch adds support for explicitly specifying which signature algorithm to use independent of what digest algorithm is used. It also adds support for specifying which provider that should be used for the signature. This is needed if the provider that should be used is not installed or if there are multiple providers available and one don't want to use the first one in the list."},"comment":{"url":"https://api.github.com/repos/ebourg/jsign/issues/comments/263026492","html_url":"https://github.com/ebourg/jsign/pull/26#issuecomment-263026492","issue_url":"https://api.github.com/repos/ebourg/jsign/issues/26","id":263026492,"user":{"login":"ebourg","id":54304,"avatar_url":"https://avatars.githubusercontent.com/u/54304?v=3","gravatar_id":"","url":"https://api.github.com/users/ebourg","html_url":"https://github.com/ebourg","followers_url":"https://api.github.com/users/ebourg/followers","following_url":"https://api.github.com/users/ebourg/following{/other_user}","gists_url":"https://api.github.com/users/ebourg/gists{/gist_id}","starred_url":"https://api.github.com/users/ebourg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebourg/subscriptions","organizations_url":"https://api.github.com/users/ebourg/orgs","repos_url":"https://api.github.com/users/ebourg/repos","events_url":"https://api.github.com/users/ebourg/events{/privacy}","received_events_url":"https://api.github.com/users/ebourg/received_events","type":"User","site_admin":false},"created_at":"2016-11-25T21:58:48Z","updated_at":"2016-11-25T21:58:48Z","body":"We can keep the provider, but I suggest using a unique method setting the algorithm and optionally the provider:\r\n\r\n    withSignatureAlgorithm(String signatureAlgorithm)\r\n    withSignatureAlgorithm(String signatureAlgorithm, Provider provider)\r\n\r\nAnd in the sign method, if no provider was specified, we first check if the Java provider supports the specified algorithm, and if it doesn't we try the BouncyCastle provider.\r\n"}}
{"actor":{"display_login":"ebourg"}}