Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

Commit

Permalink
Merge pull request #212 from difi/256-tegn-i-emne
Browse files Browse the repository at this point in the history
256 tegn tillatt i emne
  • Loading branch information
asjafjell authored Nov 30, 2018
2 parents 3e4f64a + 6e07676 commit 8f39dd2
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 34 deletions.
Binary file not shown.
2 changes: 1 addition & 1 deletion Difi.SikkerDigitalPost.Klient.Domene/Exceptions/XmlValidationException.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Difi.SikkerDigitalPost.Klient.Domene.Exceptions
public class XmlValidationException : SikkerDigitalPostException
{
public XmlValidationException(string message, List<string> validationMessages)
: base(message)
: base(message + validationMessages)
{
ValidationMessages = validationMessages;
}
Expand Down
3 changes: 1 addition & 2 deletions Difi.SikkerDigitalPost.Klient.Tester/Api/SikkerDigitalPostKlientTests.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ public class ConstructorMethod : SikkerDigitalPostKlientTests
public void Initializes_fields()
{
//Arrange
var difiOrgNr = "991825827";
var databehandler = new Databehandler(new Organisasjonsnummer(difiOrgNr), DomainUtility.GetAvsenderCertificate());
var databehandler = new Databehandler(DomainUtility.Organisasjonsnummer(), DomainUtility.GetAvsenderCertificate());
var klientkonfigurasjon = new Klientkonfigurasjon(Miljø.FunksjoneltTestmiljø);

//Act
Expand Down
6 changes: 3 additions & 3 deletions Difi.SikkerDigitalPost.Klient.Tester/SmokeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public SmokeTests()
_t = new SmokeTestsHelper(miljø);
}

[Fact(Skip = "Skipping because it requires working certificates")]
[Fact]
public void Send_digital_with_multiple_documents()
{
_t
Expand All @@ -27,7 +27,7 @@ public void Send_digital_with_multiple_documents()
.ConfirmReceipt();
}

[Fact(Skip = "Skipping because it requires working certificates")]
[Fact]
public void Send_physical()
{
_t
Expand All @@ -39,7 +39,7 @@ public void Send_physical()
.ConfirmReceipt();
}

[Fact(Skip = "Skipping because it requires working certificates")]
[Fact]
public void Send_on_behalf_of()
{
_t
Expand Down
3 changes: 1 addition & 2 deletions Difi.SikkerDigitalPost.Klient.Tester/SmokeTestsHelper.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ namespace Difi.SikkerDigitalPost.Klient.Tester
internal class SmokeTestsHelper
{
private static readonly Organisasjonsnummer DifiOrganisasjonsnummer = new Organisasjonsnummer("991825827");
private const string DifiThumbprint = "88bdb74fadaed87f52d2f5c11aed607deb9700ba";// "b0cb922214d11e8ce993838db4c6d04c0c0970b8";
private readonly SikkerDigitalPostKlient _klient;

private Forsendelse _forsendelse;
Expand All @@ -25,7 +24,7 @@ internal class SmokeTestsHelper

public SmokeTestsHelper(Miljø miljø)
{
_klient = new SikkerDigitalPostKlient(new Databehandler(DifiOrganisasjonsnummer, DifiThumbprint), new Klientkonfigurasjon(miljø));
_klient = new SikkerDigitalPostKlient(new Databehandler(DomainUtility.Organisasjonsnummer(), DomainUtility.GetAvsenderCertificate()), new Klientkonfigurasjon(miljø));
}

public SmokeTestsHelper Create_Digital_Forsendelse_with_multiple_documents()
Expand Down
10 changes: 7 additions & 3 deletions Difi.SikkerDigitalPost.Klient.Tester/Utilities/DomainUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,12 @@ internal static string GetMimeType(string fileName)

internal static Avsender GetAvsender()
{
var orgnrDifi = new Organisasjonsnummer("991825827");
return new Avsender(orgnrDifi);
return new Avsender(Organisasjonsnummer());
}

internal static Organisasjonsnummer Organisasjonsnummer()
{
return new Organisasjonsnummer("988015814");
}

internal static string GetPersonnummerMottaker()
Expand Down Expand Up @@ -258,7 +262,7 @@ private static X509Certificate2 GetEternalTestCertificateMedPrivateKey()

internal static X509Certificate2 GetAvsenderCertificate()
{
string difiThumbprint = "88bdb74fadaed87f52d2f5c11aed607deb9700ba";//"‎b0cb922214d11e8ce993838db4c6d04c0c0970b8";
string difiThumbprint = "4addc8e8dc962889cf52c145860a017844e6399e"; //Bring Testintegrasjon, gyldig til november 2021
return CertificateUtility.SenderCertificate(difiThumbprint, Language.Norwegian);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<xsd:simpleType name="TittelString">
<xsd:restriction base="xsd:string">
<xsd:minLength value="1" />
<xsd:maxLength value="100" />
<xsd:maxLength value="255" />
</xsd:restriction>
</xsd:simpleType>

Expand Down
6 changes: 3 additions & 3 deletions SolutionItems/SharedAssemblyInfo.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
[assembly: AssemblyTrademark("Direktoratet for forvaltning og IKT (Difi)")]
[assembly: AssemblyProduct("Difi Opppslagstjeneste Klient")]
[assembly: AssemblyDescription("Klientbibliotek for integrasjon mot Oppslagstjenesten for kontakt og reservasjonregisteret")]
[assembly: AssemblyVersion("2.0.4")]
[assembly: AssemblyFileVersion("2.0.4")]
[assembly: AssemblyInformationalVersion("2.0.4")]
[assembly: AssemblyVersion("2.1.0")]
[assembly: AssemblyFileVersion("2.1.0")]
[assembly: AssemblyInformationalVersion("2.1.0")]
[assembly: AssemblyCopyright("© 2015-2016 Direktoratet for forvaltning og IKT (Difi)")]
[assembly: AssemblyCulture("")]
4 changes: 2 additions & 2 deletions SolutionItems/VersionInfo.cs
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Reflection;

[assembly: AssemblyVersion("1.5.*")]
[assembly: AssemblyVersion("1.6.*")]
#pragma warning disable CS7035 // The specified version string does not conform to the recommended format - major.minor.build.revision

[assembly: AssemblyFileVersion("1.5.*")]
[assembly: AssemblyFileVersion("1.6.*")]
#pragma warning restore CS7035 // The specified version string does not conform to the recommended format - major.minor.build.revision
22 changes: 7 additions & 15 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,17 @@
- packages -> **\packages.config
configuration: Release
environment:
strong_name_signingkey_secret:
secure: bjxsFmbUwz8FwDx9d6dqR1q+kVdZ7JGbKKShVrAIRIs=
virksomhetssertifikat_secret:
secure: bjxsFmbUwz8FwDx9d6dqR1q+kVdZ7JGbKKShVrAIRIs=
virksomhetssertifikat_pass:
secure: 1GZYP7hef/X/3sNeNpGukg==
secure: eQknhCDP94FWkv9tOvX6LnWvdhZMPBaEDIbVTvCNi2g=
virksomhetssertifikat_secret:
secure: eQknhCDP94FWkv9tOvX6LnWvdhZMPBaEDIbVTvCNi2g=
install:
- git submodule update --init --recursive
- nuget install secure-file -ExcludeVersion
- secure-file\tools\secure-file -decrypt signingkey.snk.enc -secret %strong_name_signingkey_secret%
- secure-file\tools\secure-file -decrypt bring.p12.enc -secret %virksomhetssertifikat_secret%
- secure-file\tools\secure-file -decrypt Bring_Digital_Signature_Key_Encipherment_Data_Encipherment.p12.enc -secret %virksomhetssertifikat_secret%
before_build:
- ps: >-
.\appveyor-deploy\InstallVirksomhetssertifikat.ps1 -virksomhetssertifikat bring.p12;
.\appveyor-deploy\MoveSigningKey.ps1 -signingKeyPath "$env:APPVEYOR_BUILD_FOLDER\signingkey.snk" -signingKeyDestination "C:\Keys\signingkey.snk";
.\appveyor-deploy\InstallVirksomhetssertifikat.ps1 -virksomhetssertifikat Bring_Digital_Signature_Key_Encipherment_Data_Encipherment.p12;
.\appveyor-deploy\NugetRestore.ps1;
.\appveyor-deploy\AssemblyInfoVersionPatcher.ps1 -assemblyInfoPath ".\SolutionItems\SharedAssemblyInfo.cs";
.\appveyor-deploy\BuildPreamble.ps1
Expand Down Expand Up @@ -61,21 +57,17 @@
- packages -> **\packages.config
configuration: Release
environment:
strong_name_signingkey_secret:
secure: klTrmUGElJ32M1IvA5ecksVOZoUhA22ZAEVhpi5qaZY=
virksomhetssertifikat_secret:
secure: bjxsFmbUwz8FwDx9d6dqR1q+kVdZ7JGbKKShVrAIRIs=
virksomhetssertifikat_pass:
secure: 1GZYP7hef/X/3sNeNpGukg==
install:
- git submodule update --init --recursive
- nuget install secure-file -ExcludeVersion
- secure-file\tools\secure-file -decrypt signingkey.snk.enc -secret %strong_name_signingkey_secret%
- secure-file\tools\secure-file -decrypt bring.p12.enc -secret %virksomhetssertifikat_secret%
- secure-file\tools\secure-file -decrypt Bring_Digital_Signature_Key_Encipherment_Data_Encipherment.p12.enc -secret %virksomhetssertifikat_secret%
before_build:
- ps: >-
.\appveyor-deploy\InstallVirksomhetssertifikat.ps1 -virksomhetssertifikat bring.p12;
.\appveyor-deploy\MoveSigningKey.ps1 -signingKeyPath "$env:APPVEYOR_BUILD_FOLDER\signingkey.snk" -signingKeyDestination "C:\Keys\signingkey.snk";
.\appveyor-deploy\InstallVirksomhetssertifikat.ps1 -virksomhetssertifikat Bring_Digital_Signature_Key_Encipherment_Data_Encipherment.p12;
.\appveyor-deploy\NugetRestore.ps1;
.\appveyor-deploy\BuildPreamble.ps1
build:
Expand Down
2 changes: 0 additions & 2 deletions signingkey.snk.enc

This file was deleted.

0 comments on commit 8f39dd2

Please sign in to comment.