Repository navigation
Include ECDsa in the netcore50 S.S.C.Algorithms implementation - #8481
Conversation
When making the contract changes to add import/export for ECDsa the netcore50 build got split off to a separate assembly. This assembly was supposed to match the 4.1 contract (which has ECDsa), but when excluding the new EC* types it also lost ECDsa. Since having more types in the implementation than required by the contract isn't bad, just go ahead and include all the files in the netcore50 build. This brings ECDsa back, and restores the ability to use ECDsa (directly or indirectly) in UWP applications.
|
I added my local build as a package source and referenced that from my UWP CryptRunner sample app; and everything works again (modulo GetECDsaPrivateKey, which we have a bug on). |
|
From a conversation with Eric last week, ECDsa.cs was specifically excluded I thought because it wasn't part of uwp. ? |
|
I think there was some confusion about UWP not being able to use the new stuff vs UWP not being able to use ECDSA at all. It can use ECDSA (and it works), but it can't use the new stuff because of some validation rules (that might be overly stringent). So netcore50 is locked to the 4.1 version of the contract; but as long as the new stuff doesn't have a runtime dependency that UWP can't meet it's fine to be extra public members as an implementation detail. Even if it couldn't use ECDSA, we'd still have to have the type defined, because it's in the contract. It should've been a build break, but apparently the ApiCompat tool is out of order. |
|
Assuming that if ECDsa.cs was included without the rest, it would have compile errors. Should we be splitting files out w.r.t. contract? At least to avoid adding in everything\newer stuff? Or is it preferred to add newer stuff to the (older) packages? |
|
Code LGTM |
|
Until we encounter a change where we have to split the implementation we leave it as unified implementations with split contracts. So two weeks ago there was the 4.0 contract and 4.1 contract, both of which pointed to the one runtime DLL (the 4.1 change was adding ECDsa 😄). Now there's the 4.0, 4.1, and 4.2 contracts, all pointing at the one DLL. I can't think of anything offhand that would require splitting the implementation across contract versions for a given flavor that wouldn't be a breaking change (like adding a new abstract member to an existing type, or removing a type). Sure, I say this like it's old hat; but I think I had all the same questions when doing the 4.0/4.1 split :) |
…thms_impl Include ECDsa in the netcore50 S.S.C.Algorithms implementation Commit migrated from dotnet/corefx@e3a1b44
Fixed by dotnet/corefx#8481 Commit migrated from dotnet/corefx@0c1cac5
When making the contract changes to add import/export for ECDsa the
netcore50 build got split off to a separate assembly. This assembly was
supposed to match the 4.1 contract (which has ECDsa), but when excluding the
new EC* types it also lost ECDsa.
Since having more types in the implementation than required by the contract
isn't bad, just go ahead and include all the files in the netcore50 build. This
brings ECDsa back, and restores the ability to use ECDsa (directly or indirectly)
in UWP applications.
Fixes #8455.
cc: @ericstj @steveharter