Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added IATSSCD v1 #73

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions src/fiskaltrust.ifPOS/fiskaltrust.interface.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,7 @@
<PackageProjectUrl>https://github.com/fiskaltrust/middleware-interface-dotnet</PackageProjectUrl>
<PackageIconUrl>https://portal.fiskaltrust.at/Content/favicons/favicon-64x64.png</PackageIconUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Description>fiskaltrust.interface describes the interface that is used to communicate with the fiskaltrust.Middleware</Description>
<PackageReleaseNotes>
20161024: Added async-interface definition.
20160528: Extended interface definition for journal.
20160525: Splitted Utilities into seperated package.
20160514: Added support for .net35 and pcl, documentation update.
20160512: ReceiptRequest und ReceiptResponse erweitert, Dokumentation aktualisiert.
20160418: Zusätzlicher Schnittstellendefinition mit der die verwendeten Signaturerstellungseinheiten veröffentlicht werden.
20160214: Zusätzliches Feld cbPreviousReceiptID im ReceiptRequest um auf einen relevanten Vorbeleg verweisen zu können.
20151030: Definitin der Schnittstelle
</PackageReleaseNotes>
<Description>fiskaltrust.interface describes the interface that is used to communicate with the fiskaltrust.Middleware</Description>
<Copyright>Copyright 2016</Copyright>
<PackageTags>fiskaltrust interface</PackageTags>
<TargetFrameworks>net40;net461;netstandard2.0;netstandard2.1</TargetFrameworks>
Expand Down
27 changes: 27 additions & 0 deletions src/fiskaltrust.ifPOS/v0/at/IATSSCD.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
using System;
using System.ServiceModel;
#if WCF
using System.ServiceModel.Web;
#endif

namespace fiskaltrust.ifPOS.v0
{
Expand All @@ -14,6 +17,10 @@ public interface IATSSCD
/// </summary>
/// <returns>certificate byte data</returns>
[OperationContract]
#if WCF
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v0/certificate", Method = "GET")]
#endif
[Obsolete("This method is obsolete, use CertificateAsync instead.")]
byte[] Certificate();

/// <summary>
Expand All @@ -23,20 +30,26 @@ public interface IATSSCD
/// <param name="state"></param>
/// <returns></returns>
[OperationContract(AsyncPattern = true)]
[Obsolete("This method is obsolete, use CertificateAsync instead.")]
IAsyncResult BeginCertificate(AsyncCallback callback, object state);

/// <summary>
/// Get the certificate of the signaturcreationdevice async end pattern
/// </summary>
/// <param name="result"></param>
/// <returns></returns>
[Obsolete("This method is obsolete, use CertificateAsync instead.")]
byte[] EndCertificate(IAsyncResult result);

/// <summary>
/// Get the certificate service operator short sign for rksv
/// </summary>
/// <returns>operator sign</returns>
[OperationContract]
#if WCF
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v0/zda", Method = "GET")]
#endif
[Obsolete("This method is obsolete, use ZdaAsync instead.")]
string ZDA();

/// <summary>
Expand All @@ -46,13 +59,15 @@ public interface IATSSCD
/// <param name="state"></param>
/// <returns></returns>
[OperationContract(AsyncPattern = true)]
[Obsolete("This method is obsolete, use ZdaAsync instead.")]
IAsyncResult BeginZDA(AsyncCallback callback, object state);

/// <summary>
/// Get the certificate service operator short sign for rksv async end pattern
/// </summary>
/// <param name="result"></param>
/// <returns></returns>
[Obsolete("This method is obsolete, use ZdaAsync instead.")]
string EndZDA(IAsyncResult result);

/// <summary>
Expand All @@ -61,6 +76,10 @@ public interface IATSSCD
/// <param name="data">payload data</param>
/// <returns>signature data</returns>
[OperationContract]
#if WCF
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v0/sign", Method = "POST")]
#endif
[Obsolete("This method is obsolete, use SignAsync instead.")]
byte[] Sign(byte[] data);

/// <summary>
Expand All @@ -71,13 +90,15 @@ public interface IATSSCD
/// <param name="state"></param>
/// <returns></returns>
[OperationContract(AsyncPattern = true)]
[Obsolete("This method is obsolete, use SignAsync instead.")]
IAsyncResult BeginSign(byte[] data, AsyncCallback callback, object state);

/// <summary>
/// Sign data with the signaturcreationdevice async end pattern
/// </summary>
/// <param name="result"></param>
/// <returns></returns>
[Obsolete("This method is obsolete, use SignAsync instead.")]
byte[] EndSign(IAsyncResult result);

/// <summary>
Expand All @@ -86,6 +107,10 @@ public interface IATSSCD
/// <param name="message">The test message</param>
/// <returns>The test message</returns>
[OperationContract]
#if WCF
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v0/echo", Method = "POST")]
#endif
[Obsolete("This method is obsolete, use EchoAsync instead.")]
string Echo(string message);

/// <summary>
Expand All @@ -96,13 +121,15 @@ public interface IATSSCD
/// <param name="state"></param>
/// <returns></returns>
[OperationContract(AsyncPattern = true)]
[Obsolete("This method is obsolete, use EchoAsync instead.")]
IAsyncResult BeginEcho(string message, AsyncCallback callback, object state);

/// <summary>
/// Function to test communication async end pattern
/// </summary>
/// <param name="result"></param>
/// <returns></returns>
[Obsolete("This method is obsolete, use EchoAsync instead.")]
string EndEcho(IAsyncResult result);
}
}
51 changes: 51 additions & 0 deletions src/fiskaltrust.ifPOS/v1/at/IATSSCD.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using System.ServiceModel;
using System.Threading.Tasks;
#if WCF
using System.ServiceModel.Web;
#endif

namespace fiskaltrust.ifPOS.v1.at
{
/// <summary>
/// This interface is applicable only for the Austrian market and enables direct communication with the signature creation device for own purposes: it can be used for testing if the service is running (“Echo” call), for getting the certificate (“Certificate” call), or signing autono-mously (“Sign” call).
/// </summary>
[ServiceContract]
public interface IATSSCD : v0.IATSSCD
{
/// <summary>
/// Get the certificate of the signature creation device
/// </summary>
[OperationContract(Name = "v1/Certificate")]
#if WCF
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v2/certificate", Method = "GET")]
#endif
Task<CertificateResponse> CertificateAsync();

/// <summary>
/// Get the short name of the certificate service provider for RKSV
/// </summary>
[OperationContract(Name = "v1/ZDA")]
#if WCF
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v2/zda", Method = "GET")]
#endif
Task<ZdaResponse> ZdaAsync();

/// <summary>
/// Sign data with the signature creation device
/// </summary>
[OperationContract(Name = "v1/Sign")]
#if WCF
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v2/sign", Method = "POST")]
#endif
Task<SignResponse> SignAsync(SignRequest signRequest);

/// <summary>
/// Function to test communication
/// </summary>
[OperationContract(Name = "v1/Echo")]
#if WCF
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v2/echo", Method = "POST")]
#endif
Task<EchoResponse> EchoAsync(EchoRequest echoRequest);
}
}
11 changes: 11 additions & 0 deletions src/fiskaltrust.ifPOS/v1/at/Models/CertificateResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System.Runtime.Serialization;

namespace fiskaltrust.ifPOS.v1.at
{
[DataContract]
public class CertificateResponse
{
[DataMember(Order = 10)]
public byte[] Certificate { get; set; }
}
}
11 changes: 11 additions & 0 deletions src/fiskaltrust.ifPOS/v1/at/Models/EchoRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System.Runtime.Serialization;

namespace fiskaltrust.ifPOS.v1.at
{
[DataContract]
public class EchoRequest
{
[DataMember(Order = 10)]
public string Message { get; set; }
}
}
11 changes: 11 additions & 0 deletions src/fiskaltrust.ifPOS/v1/at/Models/EchoResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System.Runtime.Serialization;

namespace fiskaltrust.ifPOS.v1.at
{
[DataContract]
public class EchoResponse
{
[DataMember(Order = 10)]
public string Message { get; set; }
}
}
11 changes: 11 additions & 0 deletions src/fiskaltrust.ifPOS/v1/at/Models/SignRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System.Runtime.Serialization;

namespace fiskaltrust.ifPOS.v1.at
{
[DataContract]
public class SignRequest
{
[DataMember(Order = 10)]
public byte[] Data { get; set; }
}
}
11 changes: 11 additions & 0 deletions src/fiskaltrust.ifPOS/v1/at/Models/SignResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System.Runtime.Serialization;

namespace fiskaltrust.ifPOS.v1.at
{
[DataContract]
public class SignResponse
{
[DataMember(Order = 10)]
public byte[] SignedData { get; set; }
}
}
11 changes: 11 additions & 0 deletions src/fiskaltrust.ifPOS/v1/at/Models/ZdaResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System.Runtime.Serialization;

namespace fiskaltrust.ifPOS.v1.at
{
[DataContract]
public class ZdaResponse
{
[DataMember(Order = 10)]
public string ZDA { get; set; }
}
}
2 changes: 1 addition & 1 deletion src/fiskaltrust.ifPOS/version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.3.50-rc1",
"version": "1.3.55-rc1",
"releaseBranches": [
"^refs/heads/master$",
"^refs/tags/v\\d+(?:\\.\\d+)*(?:-.*)?$"
Expand Down