runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Remove/fix NotImplementedExceptions in S.S.Cryptography.Xml

Open krwq opened this issue 9 years ago • 11 comments

CryptoHelpers.cs contains few NotImplementedExceptions.

For each one of them we should add a test which will trigger that NIE or remove a case. Each removed case should be understood (i.e. algorithm is not longer secure and we do not want to support verification)

As part of this issue we should also identify if there are any "TODO" "fix me" etc in the code.

cc: @anthonylangsworth @tintoy

List of remaining items which either throw NotImplementedException or are not implemented and should be:

  • [x] Signing/verifying HMACMD5 needs tests
  • [x] All symmetric encryption algorithms need tests
  • [x] RSA with OAEP padding needs tests
  • [x] Decryption transform needs tests (there could be some but there is no explicit usage of algorithm in the test – there could be an implied usage though)
  • [x] License transform needs tests

krwq avatar Mar 06 '17 19:03 krwq

algorithm is not longer secure and we do not want to support verification

Generally, we should have parity with desktop -- that includes deprecated algorithms. Thus ported code should work, but we can strongly recommend against their use and advise the code be modified as soon as practical.

danmoseley avatar Mar 07 '17 20:03 danmoseley

Ok, I'll try to have a look at this over the weekend :)

tintoy avatar Mar 10 '17 01:03 tintoy

@tintoy @anthonylangsworth @peterwurzinger - I just edited the first post with updated list of remaining items for 2.0.0 work. I do not think there is much left here. Please let me know in here if you'd like to help with any of those items.

krwq avatar Mar 20 '17 20:03 krwq

Hi @krwq - today's a bit hectic, do you mind if I have a look at this later and get back to you tomorrow morning (AEST)?

tintoy avatar Mar 20 '17 21:03 tintoy

@krwq I am currently on holidy in Hawaii. I am typing this overlooking waves gently caressing the the beach under a blue, cloudless sky. I want to help but forgive me for not doing so until I get back to Austrlia.

On Mon, 20 Mar 2017, 11:45 AM Adam Friedman [email protected] wrote:

Hi @krwq https://github.com/krwq - today's a bit hectic, do you mind if I have a look at this later and get back to you tomorrow morning (AEST)?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dotnet/corefx/issues/16781#issuecomment-287907892, or mute the thread https://github.com/notifications/unsubscribe-auth/ABHVAHNSnuARX8Dh3plOViIg67SKgX2Nks5rnvNggaJpZM4MUmlx .

-- Anthony Langsworth

anthonylangsworth avatar Mar 20 '17 22:03 anthonylangsworth

@anthonylangsworth enjoy 😉 @tintoy no worries - if you will be starting to work just let me know - I will eventually get back to those but will need to wait until I finish some other stuff I'm doing right now at work - Thank you for quick response! 😃

krwq avatar Mar 20 '17 23:03 krwq

@krwq I am currently working on my Bachelors thesis, so I won't have much time to help atm. I would like to raise my hand again when I got time to spend for corefx.

peterwurzinger avatar Mar 21 '17 09:03 peterwurzinger

" License transform needs tests" remains

danmoseley avatar Apr 03 '17 22:04 danmoseley

The 5th item is done in PR 17952 Also a small bug for XmlLicenseTransform is fixed:

if ((type != typeof(XmlDocument)) || (!type.IsSubclassOf(typeof(XmlDocument))))
    throw new ArgumentException(SR.Cryptography_Xml_TransformIncorrectInputType, nameof(type));

should be

if ((type != typeof(XmlDocument)) && (!type.IsSubclassOf(typeof(XmlDocument))))
    throw new ArgumentException(SR.Cryptography_Xml_TransformIncorrectInputType, nameof(type));

Because we will throw an exception only if type is not XmlDocument and is not a subclass of XmlDocument. With OR this check is always true for all classes.

StanislavUshakov avatar Apr 05 '17 16:04 StanislavUshakov

@StanislavUshakov thank you for contribution!

krwq avatar Apr 05 '17 18:04 krwq

Agreed, thank you @StanislavUshakov! If you want to help us even more to land 2.0, see dotnet/corefx#17619 for details how you can help best.

karelz avatar Apr 06 '17 09:04 karelz