You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm open to it! It could internally be a bool flag. But rather than adding a bool to an existing Signer constructor, let's create a special Signer constructor (ex NewSignerDeprecatedDraft10) that has a comment that documents:
This effective behavior behavior of exposing the algorithm.
To notify API owners that are causing clients to use this NewSignerDeprecatedDraft10 function that they are using an old version of the specification and should update their software to match the specification.
Let me know if this is something you'd like to contribute; otherwise it'll be something I can get to only when time permits.
I like the idea of the different constructors. I was thinking of some way of doing it in our fork and thought maybe branches at first but this is much better. I can see if I can put something together.
Actually @cjslep, looking around at the code: wouldn't it be simpler to just have a branch for the draft? Because work involved then is just to reset back to the pre algo hiding commit, push and we're done.
Across the board bug fixes will be more tedious I guess. But the complexity in general would be lower.
We might be talking about the same thing, and I probably wasn't being clear!
If I understand your suggestion of a "branch" to mean "branching statements" in signing.go like the following, I would definitely welcome such mostly-plumbing changes:
setSignatureHeader(..., showAlgoDeprecatedDraft10 bool) {
...
if (showAlgoDeprecatedDraft10) {
// Old behavior
} else {
// current behavior
}
where both the macSigner and asymmSigner can call this function like:
And the new NewSignerDeprecatedDraft10 constructor can call newSigner which can now set showAlgoDeprecatedDraft10 to be true on the correct kind of Signer implementation.
Did I understand you correctly, or is this more work than what you had in mind?
Hi all, seeing this discussion for the first time, a bit late :) I was about to report the same issue.
While the specification says to hide the algorithm, in practice most implementations rely on the algorithm name. Thus, using hs2019 confuses the pleroma relay application which consumes the algorithms. The long-term solution is obviously to modify the relay application, but for now I agree that there should be a feature that disables hiding the algorithm.
I am not clear on what is being said in this reply. Are you saying that this functionality is already being done?
I used the following hand-jam to replace hs20191 with 1rsa-sha2561. The specific reason was because the pleroma relay application uses the algorithm name, so hs2019` fails.
Activity
cjslep commentedon Jun 24, 2020
I'm open to it! It could internally be a
boolflag. But rather than adding aboolto an existing Signer constructor, let's create a special Signer constructor (exNewSignerDeprecatedDraft10) that has a comment that documents:NewSignerDeprecatedDraft10function that they are using an old version of the specification and should update their software to match the specification.Let me know if this is something you'd like to contribute; otherwise it'll be something I can get to only when time permits.
byrnedo commentedon Jun 25, 2020
I like the idea of the different constructors. I was thinking of some way of doing it in our fork and thought maybe branches at first but this is much better. I can see if I can put something together.
Actually @cjslep, looking around at the code: wouldn't it be simpler to just have a branch for the draft? Because work involved then is just to reset back to the pre algo hiding commit, push and we're done.
Across the board bug fixes will be more tedious I guess. But the complexity in general would be lower.
cjslep commentedon Jun 26, 2020
We might be talking about the same thing, and I probably wasn't being clear!
If I understand your suggestion of a "branch" to mean "branching statements" in
signing.golike the following, I would definitely welcome such mostly-plumbing changes:where both the
macSignerandasymmSignercan call this function like:And the new
NewSignerDeprecatedDraft10constructor can callnewSignerwhich can now setshowAlgoDeprecatedDraft10to betrueon the correct kind of Signer implementation.Did I understand you correctly, or is this more work than what you had in mind?
byrnedo commentedon Jun 26, 2020
I actually meant a git branch since I thought those kind of conditions could increase complexity.
cjslep commentedon Jun 26, 2020
Ah I see! Sorry for misunderstanding. I think I'd prefer the code complexity over the organizational complexity of maintaining two git branches.
khanzf commentedon Jan 8, 2022
Hi all, seeing this discussion for the first time, a bit late :) I was about to report the same issue.
While the specification says to hide the algorithm, in practice most implementations rely on the algorithm name. Thus, using
hs2019confuses the pleroma relay application which consumes the algorithms. The long-term solution is obviously to modify the relay application, but for now I agree that there should be a feature that disables hiding the algorithm.I am not clear on what is being said in this reply. Are you saying that this functionality is already being done?
khanzf commentedon Jan 19, 2022
I used the following hand-jam to replace
hs20191 with 1rsa-sha2561. The specific reason was because the pleroma relay application uses the algorithm name, sohs2019` fails.In my opinion the specification should be reverted.