difi / felles-utility-dotnet Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
We need to use this library from a library.
When do you plan to migrate it to netstandard ?
I see there is an active pull-request - what is the status of that ?
.NET 4.6.2 Gir mulighet for å hente ut private key uten å markere sertifikatet som "exportable".
En endring i kode som trengs da er på linje 67 i
https://github.com/difi/felles-utility-dotnet/blob/master/Difi.Felles.Utility/Security/SignedXmlWithAgnosticId.cs
SigningKey = certificate.GetRSAPrivateKey(); // denne gir deg da retur av typen AsymmetricAlgorithm .
Har oppdatert ett prosjekt som har brukt en gammel versjon av denne pakken. Når jeg da bruker nuget-pakken i .net6 applikasjonen, så ender jeg opp med en nullreference exception i System.Security.Cryptography.Xml.SignedXml
. Er dette ett kjent problem?
System.Security.Cryptography.Xml.SignedXml.IsKeyTheCorrectAlgorithm(System.Security.Cryptography.AsymmetricAlgorithm, System.Type) in SignedXml.cs
System.Security.Cryptography.Xml.SignedXml.CheckSignedInfo(System.Security.Cryptography.AsymmetricAlgorithm) in SignedXml.cs
System.Security.Cryptography.Xml.SignedXml.CheckSignature(System.Security.Cryptography.AsymmetricAlgorithm) in SignedXml.cs
System.Security.Cryptography.Xml.SignedXml.CheckSignatureReturningKey(out System.Security.Cryptography.AsymmetricAlgorithm) in SignedXml.cs
Difi.SikkerDigitalPost.Klient.XmlValidering.ResponseValidator.ValidateSignatureAndCertificate(string, string)
Difi.SikkerDigitalPost.Klient.XmlValidering.ResponseValidator.ValidateHeaderSignature()
Difi.SikkerDigitalPost.Klient.XmlValidering.ResponseValidator.ValidateEmptyQueueReceipt()
Difi.SikkerDigitalPost.Klient.Api.SikkerDigitalPostKlient.SecurityValidationOfEmptyQueueReceipt(System.Xml.XmlDocument, System.Xml.XmlDocument)
Difi.SikkerDigitalPost.Klient.Api.SikkerDigitalPostKlient.HentKvitteringOgBekreftForrigeAsync(Difi.SikkerDigitalPost.Klient.Domene.Entiteter.Kvitteringer.Kvitteringsforespørsel, Difi.SikkerDigitalPost.Klient.Domene.Entiteter.Kvitteringer.Forretning.Forretningskvittering)
I SignedXml.cs ender det opp med at expectedType
er null.
private static bool IsKeyTheCorrectAlgorithm(AsymmetricAlgorithm key, Type expectedType)
{
Type actualType = key.GetType();
if (actualType == expectedType)
return true;
// This check exists solely for compatibility with 4.6. Normally, we would expect "expectedType" to be the superclass type and
// the actualType to be the subclass.
if (expectedType.IsSubclassOf(actualType))
return true;
//
// "expectedType" comes from the KeyAlgorithm property of a SignatureDescription. The BCL SignatureDescription classes have historically
// denoted provider-specific implementations ("RSACryptoServiceProvider") rather than the base class for the algorithm ("RSA"). We could
// change those (at the risk of creating other compat problems) but we have no control over third party SignatureDescriptions.
//
// So, in the absence of a better approach, walk up the parent hierarchy until we find the ancestor that's a direct subclass of
// AsymmetricAlgorithm and treat that as the algorithm identifier.
//
while (expectedType != null && expectedType.BaseType != typeof(AsymmetricAlgorithm))
{
expectedType = expectedType.BaseType;
}
if (expectedType == null)
return false; // SignatureDescription specified something that isn't even a subclass of AsymmetricAlgorithm. For compatibility with 4.6, return false rather throw.
if (actualType.IsSubclassOf(expectedType))
return true;
return false;
}
No way to resolve conflict between "Difi.Felles.Utility.Resources, Version=1.2.1.0, Culture=neutral, PublicKeyToken=03cc8be9ca792550" and "Difi.Felles.Utility.Resources, Version=1.1.0.0, Culture=neutral, PublicKeyToken=6e6972f540d5419a". Choosing "Difi.Felles.Utility.Resources, Version=1.2.1.0, Culture=neutral, PublicKeyToken=03cc8be9ca792550" arbitrarily.
not possible to use now together difi-sikker-digital-post-klient v 2.0.3 which depends on 1.2.1 and difi-oppslagstjeneste-klient or digipost-signature-api-client using 1.0.0 - 1.2.0 versions
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.