liberic 0.1.3 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.tool-versions +1 -0
- data/CHANGELOG.md +67 -0
- data/Gemfile +2 -0
- data/README.md +19 -9
- data/lib/liberic/boot.rb +1 -1
- data/lib/liberic/certificate.rb +69 -0
- data/lib/liberic/helpers/invocation.rb +1 -1
- data/lib/liberic/process.rb +5 -2
- data/lib/liberic/response/version.rb +1 -0
- data/lib/liberic/sdk/api.rb +107 -51
- data/lib/liberic/sdk/configuration.rb +1 -1
- data/lib/liberic/sdk/fehlercodes.rb +224 -176
- data/lib/liberic/sdk/types.rb +2 -1
- data/lib/liberic/version.rb +1 -1
- data/lib/liberic.rb +3 -0
- data/liberic.gemspec +5 -5
- metadata +16 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6348962b78e06d7c6d3bcbf5a88dc4769bff77e8ce5fb58b7abb6d5bc9f6e798
|
4
|
+
data.tar.gz: c392458f17282493fb5ac485c9d53e429f35a913589ad45431c4504b3c61e215
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 702ca9b85f8078adf43b4e93d5985ee3101a7aee90f46133b3355ddc528567836aab7a33722e887c7e38346a2016c175d6e9df9b4faeb1ae34d7373b2b9ffd72
|
7
|
+
data.tar.gz: 35039a0225ef54ec6e5d6730f798e3702d7bb8f6fdcedfdb0bf70fd18b41178212a3b56318fb42132f5792622775bd7ebd6642e9534b967fbb01c93a8b2ff8e5
|
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 3.3.0
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
|
+
|
8
|
+
## [1.2.0]
|
9
|
+
|
10
|
+
Add support to sign a submission with a POZ (Portalzertifikat)
|
11
|
+
|
12
|
+
Usage:
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
# Uses the example Einkommensteuer & Zertifikat that comes with the ERIC SDK
|
16
|
+
tax_filing = File.read(File.expand_path('Beispiel/ericdemo-java/ESt_2020.xml', Liberic.eric_home))
|
17
|
+
cert_path = File.expand_path('Beispiel/ericdemo-java/test-softidnr-pse.pfx', Liberic.eric_home)
|
18
|
+
cert = Liberic::Certificate.new(cert_path, '123456')
|
19
|
+
|
20
|
+
submission = Liberic::Process.new(tax_filing, 'ESt_2020')
|
21
|
+
result = submission.execute({action: :submit, encryption: cert.encryption_params})
|
22
|
+
cert.release_handle!
|
23
|
+
```
|
24
|
+
|
25
|
+
### Added
|
26
|
+
|
27
|
+
- Added `Liberic::Certificate` class
|
28
|
+
|
29
|
+
## [1.1.0]
|
30
|
+
|
31
|
+
Eric now requires a call to an initialization function. This happens
|
32
|
+
when the gem is required. However, this is possibly not thread safe
|
33
|
+
(no research was done on this).
|
34
|
+
|
35
|
+
In a single thread context, the gem should be backwards compatible.
|
36
|
+
|
37
|
+
Names of the error codes (see `Liberic::SDK::Fehlercodes`) have been
|
38
|
+
updated according to the constant names used in `eric_fehlercodes.h`
|
39
|
+
from the ERiC sources from ERIC 39.
|
40
|
+
|
41
|
+
So technically this update is not 100% backwards compatible. However, I
|
42
|
+
find a bump to 2.0.0 excessive for this release.
|
43
|
+
|
44
|
+
### Added
|
45
|
+
|
46
|
+
- Updated documentation and added a changelog.
|
47
|
+
- Added `Liberic::SDK::hole_zertifikat_eigenschaften`
|
48
|
+
- Added `Liberic::SDK::initialisiere` and `Liberic::SDK::beende`
|
49
|
+
|
50
|
+
### Changed
|
51
|
+
|
52
|
+
- Updated dependencies of this gem. Since it has been a couple of years
|
53
|
+
since the last update, minimum required versions haven't been tested.
|
54
|
+
The gem probably also works with Ruby 2.x and older versions of ffi
|
55
|
+
and nokogiri.
|
56
|
+
- Updated API for ERIC 39 (2023).
|
57
|
+
image that will render properly (although in English for all languages)
|
58
|
+
|
59
|
+
## [1.0.2] - Prior 2024
|
60
|
+
|
61
|
+
This gem was originally developed for a company that became later
|
62
|
+
wundertax. A [fork of the gem](https://github.com/wundertax/liberic-ruby)
|
63
|
+
was maintained by them for a while but has been archived in 2019.
|
64
|
+
|
65
|
+
Development of [the original version](https://github.com/mpm/liberic-ruby) of
|
66
|
+
this gem (where this changelog belongs to) was picked up by me in 2024
|
67
|
+
for a different project.
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -27,7 +27,7 @@ Or install it yourself (not possible yet) as:
|
|
27
27
|
$ gem install liberic
|
28
28
|
|
29
29
|
The ERiC library files are not distributed with this gem. They must be
|
30
|
-
obtained from the [ELSTER Downloads Page](https://www.elster.de/
|
30
|
+
obtained from the [ELSTER Downloads Page](https://www.elster.de/elsterweb/entwickler/infoseite/eric). (Requires your personal credentials which have to be requested from ELSTER).
|
31
31
|
|
32
32
|
Follow the installation instructions from the ERiC documentation.
|
33
33
|
|
@@ -40,33 +40,43 @@ include/
|
|
40
40
|
lib/
|
41
41
|
```
|
42
42
|
|
43
|
-
Currently, the environment variable `
|
43
|
+
Currently, the environment variable `ERIC_HOME_39` needs to be set to this
|
44
44
|
folder or the gem will not find the library files.
|
45
45
|
|
46
46
|
For example:
|
47
47
|
|
48
48
|
```sh
|
49
|
-
$ export
|
49
|
+
$ export ERIC_HOME_39=/opt/ERiC-39.3.2.0/Linux-x86_64
|
50
50
|
```
|
51
51
|
|
52
|
+
The gem will raise an `Liberic::InitializationError` if the environment variable is not set.
|
53
|
+
In a Rails project this can interfere with running rake (for example
|
54
|
+
when building the app in Docker). In this case, use `gem 'liberic', require: false` in your `Gemfile`.
|
55
|
+
And require the gem later in your Rails code (for example a model) by
|
56
|
+
calling `require 'liberic'`.
|
57
|
+
|
52
58
|
### Additional steps on OS X
|
59
|
+
|
60
|
+
The following OS X specific information dates back to the first version of this
|
61
|
+
library (from 2016). Might be outdated or incorrect by now.
|
62
|
+
|
53
63
|
On *Mac OS X* you need to process the libraries to fix the interal paths
|
54
64
|
(credits to @deviantbits):
|
55
65
|
|
56
66
|
```
|
57
|
-
libs=`ls $
|
58
|
-
plugins=`ls $
|
67
|
+
libs=`ls $ERIC_HOME_27/lib/*.dylib`
|
68
|
+
plugins=`ls $ERIC_HOME_27/lib/plugins2/*.dylib`
|
59
69
|
|
60
70
|
for target in $libs
|
61
71
|
do
|
62
72
|
for lib in $libs
|
63
73
|
do
|
64
|
-
install_name_tool -change "@rpath/"`basename $lib` "$
|
74
|
+
install_name_tool -change "@rpath/"`basename $lib` "$ERIC_HOME_27/lib/"`basename $lib` $target
|
65
75
|
done
|
66
76
|
|
67
77
|
for plugin in $plugins
|
68
78
|
do
|
69
|
-
install_name_tool -change "@rpath/plugins2/"`basename $plugin` "$
|
79
|
+
install_name_tool -change "@rpath/plugins2/"`basename $plugin` "$ERIC_HOME_27/lib/plugins2/"`basename $plugin` $target
|
70
80
|
done
|
71
81
|
done
|
72
82
|
|
@@ -74,7 +84,7 @@ for target in $plugins
|
|
74
84
|
do
|
75
85
|
for lib in $libs
|
76
86
|
do
|
77
|
-
install_name_tool -change "@rpath/"`basename $lib` "$
|
87
|
+
install_name_tool -change "@rpath/"`basename $lib` "$ERIC_HOME_27/lib/"`basename $lib` $target
|
78
88
|
done
|
79
89
|
done
|
80
90
|
```
|
@@ -82,7 +92,7 @@ done
|
|
82
92
|
Check your settings by running:
|
83
93
|
|
84
94
|
```sh
|
85
|
-
$ ls $
|
95
|
+
$ ls $ERIC_HOME_27/lib/libericapi.*
|
86
96
|
```
|
87
97
|
This should list you one file with an operating system dependend suffix.
|
88
98
|
|
data/lib/liberic/boot.rb
CHANGED
@@ -19,7 +19,7 @@ module Liberic
|
|
19
19
|
File.expand_path("libericapi.#{suffix}", ERIC_LIB_FOLDER)
|
20
20
|
end
|
21
21
|
|
22
|
-
ERIC_HOME = ENV['
|
22
|
+
ERIC_HOME = ENV['ERIC_HOME_39'] || raise(InitializationError.new('ERIC_HOME_39 environment variable not found (set it to the path to the ERiC libraries)'))
|
23
23
|
ERIC_LIB_FOLDER = File.expand_path('lib', ERIC_HOME)
|
24
24
|
|
25
25
|
def check_eric_version!
|
@@ -0,0 +1,69 @@
|
|
1
|
+
module Liberic
|
2
|
+
# +Certificate+ encapsulates functionality regarding certificates (for signing).
|
3
|
+
# An instance of Certificate is passed on to +EricBearbeiteVorgang()+ where necessary.
|
4
|
+
class Certificate
|
5
|
+
attr_reader :features, :handle
|
6
|
+
|
7
|
+
# +cert_file+ path to a pfx file (Portal-Zertifikat)
|
8
|
+
# +pin+ the pin for the certificate (if applicable, string)
|
9
|
+
def initialize(cert_file, pin)
|
10
|
+
@pin = pin
|
11
|
+
ch = FFI::MemoryPointer.new(:uint32, 1)
|
12
|
+
cert_feature_flag_pointer = FFI::MemoryPointer.new(:uint32, 1)
|
13
|
+
|
14
|
+
Liberic::Helpers::Invocation.raise_on_error(
|
15
|
+
Liberic::SDK::API.get_handle_to_certificate(ch, cert_feature_flag_pointer, cert_file)
|
16
|
+
)
|
17
|
+
|
18
|
+
@handle = ch.get_uint32(0)
|
19
|
+
|
20
|
+
flags = cert_feature_flag_pointer.get_uint32(0)
|
21
|
+
@features = PinFeatures.new(
|
22
|
+
(flags & 0x00) != 0,
|
23
|
+
(flags & 0x01) != 0,
|
24
|
+
(flags & 0x02) != 0,
|
25
|
+
(flags & 0x04) != 0,
|
26
|
+
(flags & 0x10) != 0,
|
27
|
+
(flags & 0x20) != 0,
|
28
|
+
(flags & 0x40) != 0,
|
29
|
+
(flags & 0x80) != 0
|
30
|
+
)
|
31
|
+
end
|
32
|
+
|
33
|
+
# Returns the result of +EricHoleZertifikatEigenschaften()+
|
34
|
+
# This will be XML describing fields and properties associated with the certificate.
|
35
|
+
def properties
|
36
|
+
Helpers::Invocation.with_result_buffer do |buffer_handle|
|
37
|
+
SDK::API.hole_zertifikat_eigenschaften(@handle, @pin, buffer_handle)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
# Returns a +SDK::Types::VerschluesselungsParameter+ data structure that can be passed on to
|
42
|
+
# Process.execute
|
43
|
+
def encryption_params
|
44
|
+
params = SDK::Types::VerschluesselungsParameter.new
|
45
|
+
|
46
|
+
params[:version] = 2
|
47
|
+
params[:zertifikatHandle] = @handle
|
48
|
+
params[:pin] = FFI::MemoryPointer.from_string(@pin).address
|
49
|
+
params[:abrufCode] = nil
|
50
|
+
|
51
|
+
params
|
52
|
+
end
|
53
|
+
|
54
|
+
def release_handle!
|
55
|
+
SDK::API.close_handle_to_certificate(@handle)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
PinFeatures = Struct.new(
|
60
|
+
:no_pin,
|
61
|
+
:requires_pin_for_signature,
|
62
|
+
:requires_pin_for_decryption,
|
63
|
+
:requires_pin_for_cert_decryption,
|
64
|
+
:supports_pin_check,
|
65
|
+
:supports_last_attempt_failed,
|
66
|
+
:supports_pin_lock_on_next_fail,
|
67
|
+
:supports_pin_is_locked
|
68
|
+
)
|
69
|
+
end
|
data/lib/liberic/process.rb
CHANGED
@@ -59,6 +59,7 @@ module Liberic
|
|
59
59
|
def execute(options = {})
|
60
60
|
action = options[:action] ||= :validate
|
61
61
|
eric_action = ACTIONS[action] || (raise ExecutionError.new("Invalid action: #{action}. Valid actions are #{ACTIONS.keys.join(', ')}"))
|
62
|
+
is_printing = %w[submit print_and_submit print_and_submit_auth].include?(action.to_s)
|
62
63
|
print_params = create_print_params(options)
|
63
64
|
server_buffer = SDK::API.rueckgabepuffer_erzeugen
|
64
65
|
result = Helpers::Invocation.with_result_buffer(false) do |local_buffer|
|
@@ -66,7 +67,7 @@ module Liberic
|
|
66
67
|
eric_action,
|
67
68
|
(action == :submit ? nil : print_params),
|
68
69
|
options[:encryption],
|
69
|
-
(
|
70
|
+
(is_printing ? FFI::MemoryPointer.new(:uint32, 1) : nil), # transferHandle
|
70
71
|
local_buffer,
|
71
72
|
server_buffer)
|
72
73
|
end
|
@@ -85,9 +86,11 @@ module Liberic
|
|
85
86
|
validate: :validiere,
|
86
87
|
print: :drucke,
|
87
88
|
print_and_submit: :sende,
|
88
|
-
submit: :sende
|
89
|
+
submit: :sende,
|
90
|
+
print_and_submit_auth: :sende_auth
|
89
91
|
}
|
90
92
|
|
93
|
+
# TODO: check for updates regarding version
|
91
94
|
def create_print_params(options)
|
92
95
|
params = SDK::Types::DruckParameter.new
|
93
96
|
params[:version] = 2
|
data/lib/liberic/sdk/api.rb
CHANGED
@@ -9,7 +9,7 @@ module Liberic
|
|
9
9
|
attach_function(name, original_name, params, return_type)
|
10
10
|
end
|
11
11
|
|
12
|
-
#
|
12
|
+
# ERICAPI_IMPORT int STDCALL EricBearbeiteVorgang(
|
13
13
|
# const char* datenpuffer,
|
14
14
|
# const char* datenartVersion,
|
15
15
|
# uint32_t bearbeitungsFlags,
|
@@ -27,66 +27,83 @@ module Liberic
|
|
27
27
|
:pointer,
|
28
28
|
:pointer], :int
|
29
29
|
|
30
|
-
|
31
|
-
#
|
30
|
+
|
31
|
+
# ERICAPI_IMPORT int STDCALL EricBeende(void);
|
32
|
+
attach_eric_function :beende, [], :int
|
33
|
+
|
34
|
+
# ERICAPI_IMPORT int STDCALL EricChangePassword(const byteChar* psePath, const byteChar* oldPin,
|
35
|
+
# const byteChar* newPin);
|
32
36
|
attach_eric_function :change_password, [:string, :string, :string], :int
|
33
37
|
|
34
|
-
#
|
35
|
-
attach_eric_function :
|
38
|
+
# ERICAPI_IMPORT int STDCALL EricPruefeBuFaNummer(const byteChar* steuernummer);
|
39
|
+
attach_eric_function :pruefe_bu_fa_nummer, [:string], :int
|
36
40
|
|
37
|
-
#
|
41
|
+
# ERICAPI_IMPORT int STDCALL EricCheckXML(const char* xml, const char* datenartVersion,
|
38
42
|
# EricRueckgabepufferHandle fehlertextPuffer);
|
39
43
|
attach_eric_function :check_xml, [:string, :string, :pointer], :int, :EricCheckXML
|
40
44
|
|
41
|
-
#
|
45
|
+
# ERICAPI_IMPORT int STDCALL EricCloseHandleToCertificate(EricZertifikatHandle hToken);
|
42
46
|
attach_eric_function :close_handle_to_certificate, [:uint], :int
|
43
47
|
|
44
48
|
# TODO
|
45
|
-
#
|
46
|
-
#
|
49
|
+
# ERICAPI_IMPORT int STDCALL EricCreateKey(
|
50
|
+
# const byteChar* pin,
|
51
|
+
# const byteChar* pfad,
|
52
|
+
# const eric_zertifikat_parameter_t* zertifikatInfo);
|
47
53
|
attach_eric_function :create_key, [:string, :string, :pointer], :int
|
48
54
|
|
49
|
-
#
|
55
|
+
# ERICAPI_IMPORT int STDCALL EricCreateTH(const char* xml, const char* verfahren,
|
50
56
|
# const char* datenart, const char* vorgang,
|
51
57
|
# const char* testmerker, const char* herstellerId,
|
52
58
|
# const char* datenLieferant, const char* versionClient,
|
53
|
-
# const
|
59
|
+
# const byteChar* publicKey,
|
54
60
|
# EricRueckgabepufferHandle xmlRueckgabePuffer);
|
55
61
|
attach_eric_function :create_th, [:string, :string, :string, :string,
|
56
62
|
:string, :string, :string, :string, :string, :pointer], :int, :EricCreateTH
|
57
63
|
|
58
|
-
#
|
64
|
+
# TODO:
|
65
|
+
# ERICAPI_IMPORT int STDCALL EricCreateUUID(
|
66
|
+
# EricRueckgabepufferHandle uuidRueckgabePuffer);
|
67
|
+
|
68
|
+
# ERICAPI_IMPORT int STDCALL EricDekodiereDaten(
|
59
69
|
# EricZertifikatHandle zertifikatHandle,
|
60
|
-
# const
|
61
|
-
# const
|
70
|
+
# const byteChar* pin,
|
71
|
+
# const byteChar* base64Eingabe,
|
62
72
|
# EricRueckgabepufferHandle rueckgabePuffer);
|
63
73
|
attach_eric_function :dekodiere_daten, [:uint, :string, :string, :pointer], :int
|
64
74
|
|
65
|
-
# ERICAPI_DECL int STDCALL EricEinstellungAlleZuruecksetzen(void);
|
66
75
|
attach_eric_function :einstellung_alle_zuruecksetzen, [:void], :int
|
67
76
|
|
68
|
-
#
|
77
|
+
# ERICAPI_IMPORT int STDCALL EricEinstellungLesen(
|
78
|
+
# const char* name,
|
69
79
|
# EricRueckgabepufferHandle rueckgabePuffer);
|
70
80
|
attach_eric_function :einstellung_lesen, [:string, :pointer], :int
|
71
81
|
|
72
|
-
#
|
82
|
+
# ERICAPI_IMPORT int STDCALL EricEinstellungSetzen(
|
83
|
+
# const char* name,
|
84
|
+
# const char* wert);
|
73
85
|
attach_eric_function :einstellung_setzen, [:string, :string], :int
|
74
86
|
|
75
|
-
#
|
87
|
+
# ERICAPI_IMPORT int STDCALL EricEinstellungZuruecksetzen(
|
88
|
+
# const char* name);
|
76
89
|
attach_eric_function :einstellung_zuruecksetzen, [:string], :int
|
77
90
|
|
78
|
-
#
|
91
|
+
# ERICAPI_IMPORT int STDCALL EricEntladePlugins(
|
92
|
+
# void);
|
79
93
|
attach_eric_function :entlade_plugins, [], :int
|
80
94
|
|
81
|
-
#
|
95
|
+
# ERICAPI_IMPORT int STDCALL EricFormatStNr(
|
96
|
+
# const byteChar* eingabeSteuernummer,
|
82
97
|
# EricRueckgabepufferHandle rueckgabePuffer);
|
83
98
|
attach_eric_function :format_st_nr, [:string, :pointer], :int
|
84
99
|
|
85
|
-
#
|
100
|
+
# ERICAPI_IMPORT int STDCALL EricGetAuswahlListen(
|
101
|
+
# const char* datenartVersion,
|
102
|
+
# const char* feldkennung,
|
86
103
|
# EricRueckgabepufferHandle rueckgabeXmlPuffer);
|
87
104
|
attach_eric_function :get_auswahl_listen, [:string, :string, :pointer], :int
|
88
105
|
|
89
|
-
#
|
106
|
+
# ERICAPI_IMPORT int STDCALL EricGetErrormessagesFromXMLAnswer(
|
90
107
|
# const char* xml,
|
91
108
|
# EricRueckgabepufferHandle transferticketPuffer,
|
92
109
|
# EricRueckgabepufferHandle returncodeTHPuffer,
|
@@ -94,75 +111,108 @@ module Liberic
|
|
94
111
|
# EricRueckgabepufferHandle returncodesUndFehlertexteNDHXmlPuffer);
|
95
112
|
attach_eric_function :get_errormessages_from_xml_answer, [:string, :pointer, :pointer, :pointer, :pointer], :int, :EricGetErrormessagesFromXMLAnswer
|
96
113
|
|
97
|
-
#
|
114
|
+
# ERICAPI_IMPORT int STDCALL EricGetHandleToCertificate(
|
115
|
+
# EricZertifikatHandle* hToken,
|
98
116
|
# uint32_t* iInfoPinSupport,
|
99
|
-
# const
|
117
|
+
# const byteChar* pathToKeystore);
|
100
118
|
attach_eric_function :get_handle_to_certificate, [:pointer, :pointer, :string], :int
|
101
119
|
|
102
|
-
#
|
120
|
+
# ERICAPI_IMPORT int STDCALL EricGetPinStatus(
|
121
|
+
# EricZertifikatHandle hToken,
|
122
|
+
# uint32_t* pinStatus,
|
103
123
|
# uint32_t keyType);
|
104
124
|
attach_eric_function :get_pin_status, [:uint, :pointer, :uint], :int
|
105
125
|
|
106
|
-
#
|
126
|
+
# ERICAPI_IMPORT int STDCALL EricGetPublicKey(
|
127
|
+
# const eric_verschluesselungs_parameter_t* cryptoParameter,
|
107
128
|
# EricRueckgabepufferHandle rueckgabePuffer);
|
108
129
|
attach_eric_function :get_public_key, [:pointer, :pointer], :int
|
109
130
|
|
110
|
-
#
|
131
|
+
# ERICAPI_IMPORT int STDCALL EricHoleFehlerText(
|
132
|
+
# int fehlerkode,
|
111
133
|
# EricRueckgabepufferHandle rueckgabePuffer);
|
112
134
|
attach_eric_function :hole_fehler_text, [:int, :pointer], :int
|
113
135
|
|
114
|
-
#
|
136
|
+
# ERICAPI_IMPORT int STDCALL EricHoleFinanzaemter(
|
137
|
+
# const byteChar* finanzamtLandNummer,
|
115
138
|
# EricRueckgabepufferHandle rueckgabeXmlPuffer);
|
116
139
|
attach_eric_function :hole_finanzaemter, [:string, :pointer], :int
|
117
140
|
|
118
|
-
#
|
141
|
+
# ERICAPI_IMPORT int STDCALL EricHoleFinanzamtLandNummern(
|
142
|
+
# EricRueckgabepufferHandle rueckgabeXmlPuffer);
|
119
143
|
attach_eric_function :hole_finanzamt_land_nummern, [:pointer], :int
|
120
144
|
|
121
145
|
# TODO
|
122
|
-
#
|
123
|
-
#
|
146
|
+
# ERICAPI_IMPORT int STDCALL EricHoleFinanzamtsdaten(
|
147
|
+
# const byteChar bufaNr[5],
|
148
|
+
# EricRueckgabepufferHandle rueckgabeXmlPuffer);
|
124
149
|
|
125
|
-
#
|
150
|
+
# ERICAPI_IMPORT int STDCALL EricHoleTestfinanzaemter(
|
151
|
+
# EricRueckgabepufferHandle rueckgabeXmlPuffer);
|
126
152
|
attach_eric_function :hole_testfinanzaemter, [:pointer], :int
|
127
153
|
|
128
|
-
#
|
154
|
+
# ERICAPI_IMPORT int STDCALL EricHoleZertifikatEigenschaften(
|
155
|
+
# EricZertifikatHandle hToken,
|
156
|
+
# const byteChar * pin,
|
157
|
+
# EricRueckgabepufferHandle rueckgabeXmlPuffer);
|
158
|
+
attach_eric_function :hole_zertifikat_eigenschaften, [:uint, :string, :pointer], :int
|
159
|
+
|
160
|
+
# ERICAPI_IMPORT int STDCALL EricHoleZertifikatFingerabdruck(
|
129
161
|
# const eric_verschluesselungs_parameter_t* cryptoParameter,
|
130
162
|
# EricRueckgabepufferHandle fingerabdruckPuffer,
|
131
163
|
# EricRueckgabepufferHandle signaturPuffer);
|
132
164
|
attach_eric_function :hole_zertifikat_fingerabdruck, [:pointer, :pointer, :pointer], :int
|
133
165
|
|
134
|
-
#
|
135
|
-
|
166
|
+
# ERICAPI_IMPORT int STDCALL EricInitialisiere(
|
167
|
+
# const byteChar *pluginPfad,
|
168
|
+
# const byteChar *logPfad);
|
169
|
+
attach_eric_function :initialisiere, [:string, :string], :int
|
136
170
|
|
137
|
-
#
|
138
|
-
# const
|
139
|
-
# const
|
171
|
+
# ERICAPI_IMPORT int STDCALL EricMakeElsterStnr(
|
172
|
+
# const byteChar* steuernrBescheid,
|
173
|
+
# const byteChar landesnr[2+1],
|
174
|
+
# const byteChar bundesfinanzamtsnr[4+1],
|
140
175
|
# EricRueckgabepufferHandle steuernrPuffer);
|
141
176
|
# FIXME: non-pointer string
|
142
177
|
attach_eric_function :make_elster_stnr, [:string, :string, :string, :pointer], :int
|
143
178
|
|
144
|
-
#
|
179
|
+
# ERICAPI_IMPORT int STDCALL EricPruefeBIC(
|
180
|
+
# const byteChar* bic);
|
145
181
|
attach_eric_function :pruefe_bic, [:string], :int, :EricPruefeBIC
|
146
182
|
|
147
|
-
#
|
183
|
+
# ERICAPI_IMPORT int STDCALL EricPruefeIBAN(
|
184
|
+
# const byteChar* iban);
|
148
185
|
attach_eric_function :pruefe_iban, [:string], :int, :EricPruefeIBAN
|
149
186
|
|
150
|
-
#
|
187
|
+
# TODO
|
188
|
+
# ERICAPI_IMPORT int STDCALL EricPruefeEWAz(
|
189
|
+
# const byteChar* einheitswertAz);
|
190
|
+
|
191
|
+
# ERICAPI_IMPORT int STDCALL EricPruefeIdentifikationsMerkmal(
|
192
|
+
# const byteChar* steuerId);
|
151
193
|
attach_eric_function :pruefe_identifikations_merkmal, [:string], :int
|
152
194
|
|
153
|
-
#
|
195
|
+
# ERICAPI_IMPORT int STDCALL EricPruefeSteuernummer(
|
196
|
+
# const byteChar* steuernummer);
|
154
197
|
attach_eric_function :pruefe_steuernummer, [:string], :int
|
155
198
|
|
156
199
|
# TODO
|
157
|
-
#
|
200
|
+
# ERICAPI_IMPORT int STDCALL EricPruefeZertifikatPin(
|
201
|
+
# const byteChar *pathToKeystore,
|
202
|
+
# const byteChar *pin,
|
203
|
+
# uint32_t keyType);
|
204
|
+
|
205
|
+
# TODO
|
206
|
+
# ERICAPI_IMPORT int STDCALL EricRegistriereFortschrittCallback(
|
158
207
|
# EricFortschrittCallback funktion,
|
159
208
|
# void* benutzerdaten);
|
160
209
|
|
161
210
|
# TODO
|
162
|
-
#
|
211
|
+
# ERICAPI_IMPORT int STDCALL EricRegistriereGlobalenFortschrittCallback(
|
163
212
|
# EricFortschrittCallback funktion,
|
164
213
|
# void* benutzerdaten);
|
165
214
|
|
215
|
+
# check if this still works...
|
166
216
|
# typedef void(STDCALL *EricLogCallback)(
|
167
217
|
# const char* kategorie,
|
168
218
|
# eric_log_level_t loglevel,
|
@@ -170,7 +220,7 @@ module Liberic
|
|
170
220
|
# void* benutzerdaten);
|
171
221
|
callback :log_callback, [:string, :int, :string, :pointer], :void
|
172
222
|
|
173
|
-
#
|
223
|
+
# ERICAPI_IMPORT int STDCALL EricRegistriereLogCallback(
|
174
224
|
# EricLogCallback funktion,
|
175
225
|
# uint32_t schreibeEricLogDatei,
|
176
226
|
# void* benutzerdaten);
|
@@ -182,22 +232,28 @@ module Liberic
|
|
182
232
|
end
|
183
233
|
end
|
184
234
|
|
185
|
-
#
|
235
|
+
# ERICAPI_IMPORT EricRueckgabepufferHandle STDCALL EricRueckgabepufferErzeugen(
|
236
|
+
# void);
|
186
237
|
attach_eric_function :rueckgabepuffer_erzeugen, [], :pointer
|
187
238
|
|
188
|
-
#
|
239
|
+
# ERICAPI_IMPORT int STDCALL EricRueckgabepufferFreigeben(
|
240
|
+
# EricRueckgabepufferHandle handle);
|
189
241
|
attach_eric_function :rueckgabepuffer_freigeben, [:pointer], :int
|
190
242
|
|
191
|
-
#
|
243
|
+
# ERICAPI_IMPORT const char* STDCALL EricRueckgabepufferInhalt(
|
244
|
+
# EricRueckgabepufferHandle handle);
|
192
245
|
attach_eric_function :rueckgabepuffer_inhalt, [:pointer], :string
|
193
246
|
|
194
|
-
#
|
247
|
+
# ERICAPI_IMPORT uint32_t STDCALL EricRueckgabepufferLaenge(
|
248
|
+
# EricRueckgabepufferHandle handle);
|
195
249
|
attach_eric_function :rueckgabepuffer_laenge, [:pointer], :uint
|
196
250
|
|
197
|
-
#
|
251
|
+
# ERICAPI_IMPORT int STDCALL EricSystemCheck(
|
252
|
+
# void);
|
198
253
|
attach_eric_function :system_check, [], :int
|
199
254
|
|
200
|
-
#
|
255
|
+
# ERICAPI_IMPORT int STDCALL EricVersion(
|
256
|
+
# EricRueckgabepufferHandle rueckgabeXmlPuffer);
|
201
257
|
attach_eric_function :version, [:pointer], :int
|
202
258
|
end
|
203
259
|
end
|
@@ -2,186 +2,234 @@ module Liberic
|
|
2
2
|
module SDK
|
3
3
|
module Fehlercodes
|
4
4
|
CODES = {
|
5
|
-
0 => '
|
6
|
-
610001001 => '
|
7
|
-
610001002 => '
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
5
|
+
0 => 'ERIC_OK',
|
6
|
+
610001001 => 'ERIC_GLOBAL_UNKNOWN',
|
7
|
+
610001002 => 'ERIC_GLOBAL_PRUEF_FEHLER',
|
8
|
+
610001003 => 'ERIC_GLOBAL_HINWEISE',
|
9
|
+
610001007 => 'ERIC_GLOBAL_FEHLERMELDUNG_NICHT_VORHANDEN',
|
10
|
+
610001008 => 'ERIC_GLOBAL_KEINE_DATEN_VORHANDEN',
|
11
|
+
610001013 => 'ERIC_GLOBAL_NICHT_GENUEGEND_ARBEITSSPEICHER',
|
12
|
+
610001014 => 'ERIC_GLOBAL_DATEI_NICHT_GEFUNDEN',
|
13
|
+
610001016 => 'ERIC_GLOBAL_HERSTELLER_ID_NICHT_ERLAUBT',
|
14
|
+
610001017 => 'ERIC_GLOBAL_ILLEGAL_STATE',
|
15
|
+
610001018 => 'ERIC_GLOBAL_FUNKTION_NICHT_ERLAUBT',
|
16
|
+
610001019 => 'ERIC_GLOBAL_ECHTFALL_NICHT_ERLAUBT',
|
17
|
+
610001020 => 'ERIC_GLOBAL_NO_VERSAND_IN_BETA_VERSION',
|
18
|
+
610001025 => 'ERIC_GLOBAL_TESTMERKER_UNGUELTIG',
|
19
|
+
610001026 => 'ERIC_GLOBAL_DATENSATZ_ZU_GROSS',
|
20
|
+
610001027 => 'ERIC_GLOBAL_VERSCHLUESSELUNGS_PARAMETER_NICHT_ERLAUBT',
|
21
|
+
610001028 => 'ERIC_GLOBAL_NUR_PORTALZERTIFIKAT_ERLAUBT',
|
22
|
+
610001029 => 'ERIC_GLOBAL_ABRUFCODE_NICHT_ERLAUBT',
|
23
|
+
610001030 => 'ERIC_GLOBAL_ERROR_XML_CREATE',
|
24
|
+
610001031 => 'ERIC_GLOBAL_TEXTPUFFERGROESSE_FIX',
|
25
|
+
610001032 => 'ERIC_GLOBAL_INTERNER_FEHLER',
|
26
|
+
610001033 => 'ERIC_GLOBAL_ARITHMETIKFEHLER',
|
27
|
+
610001034 => 'ERIC_GLOBAL_STEUERNUMMER_UNGUELTIG',
|
28
|
+
610001035 => 'ERIC_GLOBAL_STEUERNUMMER_FALSCHE_LAENGE',
|
29
|
+
610001036 => 'ERIC_GLOBAL_STEUERNUMMER_NICHT_NUMERISCH',
|
30
|
+
610001037 => 'ERIC_GLOBAL_LANDESNUMMER_UNBEKANNT',
|
31
|
+
610001038 => 'ERIC_GLOBAL_BUFANR_UNBEKANNT',
|
32
|
+
610001039 => 'ERIC_GLOBAL_LANDESNUMMER_BUFANR',
|
33
|
+
610001040 => 'ERIC_GLOBAL_PUFFER_ZUGRIFFSKONFLIKT',
|
34
|
+
610001041 => 'ERIC_GLOBAL_PUFFER_UEBERLAUF',
|
35
|
+
610001042 => 'ERIC_GLOBAL_DATENARTVERSION_UNBEKANNT',
|
36
|
+
610001044 => 'ERIC_GLOBAL_DATENARTVERSION_XML_INKONSISTENT',
|
37
|
+
610001045 => 'ERIC_GLOBAL_COMMONDATA_NICHT_VERFUEGBAR',
|
38
|
+
610001046 => 'ERIC_GLOBAL_LOG_EXCEPTION',
|
39
|
+
610001047 => 'ERIC_GLOBAL_TRANSPORTSCHLUESSEL_NICHT_ERLAUBT',
|
40
|
+
610001048 => 'ERIC_GLOBAL_OEFFENTLICHER_SCHLUESSEL_UNGUELTIG',
|
41
|
+
610001049 => 'ERIC_GLOBAL_TRANSPORTSCHLUESSEL_TYP_FALSCH',
|
42
|
+
610001050 => 'ERIC_GLOBAL_PUFFER_UNGLEICHER_INSTANZ',
|
43
|
+
610001051 => 'ERIC_GLOBAL_VORSATZ_UNGUELTIG',
|
44
|
+
610001053 => 'ERIC_GLOBAL_DATEIZUGRIFF_VERWEIGERT',
|
45
|
+
610001080 => 'ERIC_GLOBAL_UNGUELTIGE_INSTANZ',
|
46
|
+
610001081 => 'ERIC_GLOBAL_NICHT_INITIALISIERT',
|
47
|
+
610001082 => 'ERIC_GLOBAL_MEHRFACHE_INITIALISIERUNG',
|
48
|
+
610001083 => 'ERIC_GLOBAL_FEHLER_INITIALISIERUNG',
|
49
|
+
610001102 => 'ERIC_GLOBAL_UNKNOWN_PARAMETER_ERROR',
|
50
|
+
610001108 => 'ERIC_GLOBAL_CHECK_CORRUPTED_NDS',
|
51
|
+
610001206 => 'ERIC_GLOBAL_VERSCHLUESSELUNGS_PARAMETER_NICHT_ANGEGEBEN',
|
52
|
+
610001209 => 'ERIC_GLOBAL_SEND_FLAG_MEHR_ALS_EINES',
|
53
|
+
610001218 => 'ERIC_GLOBAL_UNGUELTIGE_FLAG_KOMBINATION',
|
54
|
+
610001220 => 'ERIC_GLOBAL_ERSTE_SEITE_DRUCK_NICHT_UNTERSTUETZT',
|
55
|
+
610001222 => 'ERIC_GLOBAL_UNGUELTIGER_PARAMETER',
|
56
|
+
610001224 => 'ERIC_GLOBAL_DRUCK_FUER_VERFAHREN_NICHT_ERLAUBT',
|
57
|
+
610001225 => 'ERIC_GLOBAL_VERSAND_ART_NICHT_UNTERSTUETZT',
|
58
|
+
610001226 => 'ERIC_GLOBAL_UNGUELTIGE_PARAMETER_VERSION',
|
59
|
+
610001227 => 'ERIC_GLOBAL_TRANSFERHANDLE',
|
60
|
+
610001228 => 'ERIC_GLOBAL_PLUGININITIALISIERUNG',
|
61
|
+
610001229 => 'ERIC_GLOBAL_INKOMPATIBLE_VERSIONEN',
|
62
|
+
610001230 => 'ERIC_GLOBAL_VERSCHLUESSELUNGSVERFAHREN_NICHT_UNTERSTUETZT',
|
63
|
+
610001231 => 'ERIC_GLOBAL_MEHRFACHAUFRUFE_NICHT_UNTERSTUETZT',
|
64
|
+
610001404 => 'ERIC_GLOBAL_UTI_COUNTRY_NOT_SUPPORTED',
|
65
|
+
610001501 => 'ERIC_GLOBAL_IBAN_FORMALER_FEHLER',
|
66
|
+
610001502 => 'ERIC_GLOBAL_IBAN_LAENDERCODE_FEHLER',
|
67
|
+
610001503 => 'ERIC_GLOBAL_IBAN_LANDESFORMAT_FEHLER',
|
68
|
+
610001504 => 'ERIC_GLOBAL_IBAN_PRUEFZIFFER_FEHLER',
|
69
|
+
610001510 => 'ERIC_GLOBAL_BIC_FORMALER_FEHLER',
|
70
|
+
610001511 => 'ERIC_GLOBAL_BIC_LAENDERCODE_FEHLER',
|
71
|
+
610001519 => 'ERIC_GLOBAL_ZULASSUNGSNUMMER_ZU_LANG',
|
72
|
+
610001525 => 'ERIC_GLOBAL_IDNUMMER_UNGUELTIG',
|
73
|
+
610001526 => 'ERIC_GLOBAL_NULL_PARAMETER',
|
74
|
+
610001527 => 'ERIC_GLOBAL_EWAZ_UNGUELTIG',
|
75
|
+
610001528 => 'ERIC_GLOBAL_EWAZ_LANDESKUERZEL_UNBEKANNT',
|
76
|
+
610001851 => 'ERIC_GLOBAL_UPDATE_NECESSARY',
|
77
|
+
610001860 => 'ERIC_GLOBAL_EINSTELLUNG_NAME_UNGUELTIG',
|
78
|
+
610001861 => 'ERIC_GLOBAL_EINSTELLUNG_WERT_UNGUELTIG',
|
79
|
+
610001862 => 'ERIC_GLOBAL_ERR_DEKODIEREN',
|
80
|
+
610001863 => 'ERIC_GLOBAL_FUNKTION_NICHT_UNTERSTUETZT',
|
81
|
+
610001865 => 'ERIC_GLOBAL_NUTZDATENTICKETS_NICHT_EINDEUTIG',
|
82
|
+
610001866 => 'ERIC_GLOBAL_NUTZDATENHEADERVERSIONEN_UNEINHEITLICH',
|
83
|
+
610001867 => 'ERIC_GLOBAL_BUNDESLAENDER_UNEINHEITLICH',
|
84
|
+
610001868 => 'ERIC_GLOBAL_ZEITRAEUME_UNEINHEITLICH',
|
85
|
+
610001869 => 'ERIC_GLOBAL_NUTZDATENHEADER_EMPFAENGER_NICHT_KORREKT',
|
80
86
|
|
81
|
-
610101200 => '
|
82
|
-
610101201 => '
|
83
|
-
610101210 => '
|
84
|
-
610101251 => '
|
85
|
-
610101253 => '
|
86
|
-
610101255 => '
|
87
|
-
610101256 => '
|
88
|
-
610101257 => '
|
89
|
-
610101258 => '
|
90
|
-
610101259 => '
|
91
|
-
610101260 => '
|
92
|
-
610101271 => '
|
93
|
-
610101274 => '
|
94
|
-
610101276 => '
|
95
|
-
610101278 => '
|
96
|
-
610101279 => '
|
97
|
-
610101280 => '
|
98
|
-
610101282 => '
|
99
|
-
610101283 => '
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
87
|
+
610101200 => 'ERIC_TRANSFER_COM_ERROR',
|
88
|
+
610101201 => 'ERIC_TRANSFER_VORGANG_NICHT_UNTERSTUETZT',
|
89
|
+
610101210 => 'ERIC_TRANSFER_ERR_XML_THEADER',
|
90
|
+
610101251 => 'ERIC_TRANSFER_ERR_PARAM',
|
91
|
+
610101253 => 'ERIC_TRANSFER_ERR_DATENTEILENDNOTFOUND',
|
92
|
+
610101255 => 'ERIC_TRANSFER_ERR_BEGINDATENLIEFERANT',
|
93
|
+
610101256 => 'ERIC_TRANSFER_ERR_ENDDATENLIEFERANT',
|
94
|
+
610101257 => 'ERIC_TRANSFER_ERR_BEGINTRANSPORTSCHLUESSEL',
|
95
|
+
610101258 => 'ERIC_TRANSFER_ERR_ENDTRANSPORTSCHLUESSEL',
|
96
|
+
610101259 => 'ERIC_TRANSFER_ERR_BEGINDATENGROESSE',
|
97
|
+
610101260 => 'ERIC_TRANSFER_ERR_ENDDATENGROESSE',
|
98
|
+
610101271 => 'ERIC_TRANSFER_ERR_SEND',
|
99
|
+
610101274 => 'ERIC_TRANSFER_ERR_NOTENCRYPTED',
|
100
|
+
610101276 => 'ERIC_TRANSFER_ERR_PROXYCONNECT',
|
101
|
+
610101278 => 'ERIC_TRANSFER_ERR_CONNECTSERVER',
|
102
|
+
610101279 => 'ERIC_TRANSFER_ERR_NORESPONSE',
|
103
|
+
610101280 => 'ERIC_TRANSFER_ERR_PROXYAUTH',
|
104
|
+
610101282 => 'ERIC_TRANSFER_ERR_SEND_INIT',
|
105
|
+
610101283 => 'ERIC_TRANSFER_ERR_TIMEOUT',
|
106
|
+
610101284 => 'ERIC_TRANSFER_ERR_PROXYPORT_INVALID',
|
107
|
+
610101291 => 'ERIC_TRANSFER_ERR_OTHER',
|
108
|
+
610101292 => 'ERIC_TRANSFER_ERR_XML_NHEADER',
|
109
|
+
610101293 => 'ERIC_TRANSFER_ERR_XML_ENCODING',
|
110
|
+
610101294 => 'ERIC_TRANSFER_ERR_ENDSIGUSER',
|
111
|
+
610101295 => 'ERIC_TRANSFER_ERR_XMLTAG_NICHT_GEFUNDEN',
|
112
|
+
610101297 => 'ERIC_TRANSFER_ERR_DATENTEILFEHLER',
|
113
|
+
610101500 => 'ERIC_TRANSFER_EID_ZERTIFIKATFEHLER',
|
114
|
+
610101510 => 'ERIC_TRANSFER_EID_KEINKONTO',
|
115
|
+
610101511 => 'ERIC_TRANSFER_EID_IDNRNICHTEINDEUTIG',
|
116
|
+
610101512 => 'ERIC_TRANSFER_EID_SERVERFEHLER',
|
117
|
+
610101520 => 'ERIC_TRANSFER_EID_KEINCLIENT',
|
118
|
+
610101521 => 'ERIC_TRANSFER_EID_CLIENTFEHLER',
|
119
|
+
610101522 => 'ERIC_TRANSFER_EID_FEHLENDEFELDER',
|
120
|
+
610101523 => 'ERIC_TRANSFER_EID_IDENTIFIKATIONABGEBROCHEN',
|
121
|
+
610101524 => 'ERIC_TRANSFER_EID_NPABLOCKIERT',
|
106
122
|
|
107
|
-
610201016 => '
|
108
|
-
610201101 => '
|
109
|
-
610201102 => '
|
110
|
-
610201103 => '
|
111
|
-
610201104 => '
|
112
|
-
610201105 => '
|
113
|
-
610201106 => '
|
114
|
-
610201107 => '
|
115
|
-
610201108 => '
|
116
|
-
610201109 => '
|
117
|
-
610201110 => '
|
118
|
-
610201111 => '
|
119
|
-
610201112 => '
|
120
|
-
610201113 => '
|
121
|
-
610201114 => '
|
122
|
-
610201115 => '
|
123
|
-
610201116 => '
|
124
|
-
610201117 => '
|
125
|
-
610201118 => '
|
126
|
-
610201119 => '
|
127
|
-
610201120 => '
|
128
|
-
610201121 => '
|
129
|
-
610201122 => '
|
130
|
-
610201123 => '
|
131
|
-
610201124 => '
|
132
|
-
610201125 => '
|
133
|
-
610201126 => '
|
134
|
-
610201127 => '
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
123
|
+
610201016 => 'ERIC_CRYPT_ERROR_CREATE_KEY',
|
124
|
+
610201101 => 'ERIC_CRYPT_E_INVALID_HANDLE',
|
125
|
+
610201102 => 'ERIC_CRYPT_E_MAX_SESSION',
|
126
|
+
610201103 => 'ERIC_CRYPT_E_BUSY',
|
127
|
+
610201104 => 'ERIC_CRYPT_E_OUT_OF_MEM',
|
128
|
+
610201105 => 'ERIC_CRYPT_E_PSE_PATH',
|
129
|
+
610201106 => 'ERIC_CRYPT_E_PIN_WRONG',
|
130
|
+
610201107 => 'ERIC_CRYPT_E_PIN_LOCKED',
|
131
|
+
610201108 => 'ERIC_CRYPT_E_P7_READ',
|
132
|
+
610201109 => 'ERIC_CRYPT_E_P7_DECODE',
|
133
|
+
610201110 => 'ERIC_CRYPT_E_P7_RECIPIENT',
|
134
|
+
610201111 => 'ERIC_CRYPT_E_P12_READ',
|
135
|
+
610201112 => 'ERIC_CRYPT_E_P12_DECODE',
|
136
|
+
610201113 => 'ERIC_CRYPT_E_P12_SIG_KEY',
|
137
|
+
610201114 => 'ERIC_CRYPT_E_P12_ENC_KEY',
|
138
|
+
610201115 => 'ERIC_CRYPT_E_P11_SIG_KEY',
|
139
|
+
610201116 => 'ERIC_CRYPT_E_P11_ENC_KEY',
|
140
|
+
610201117 => 'ERIC_CRYPT_E_XML_PARSE',
|
141
|
+
610201118 => 'ERIC_CRYPT_E_XML_SIG_ADD',
|
142
|
+
610201119 => 'ERIC_CRYPT_E_XML_SIG_TAG',
|
143
|
+
610201120 => 'ERIC_CRYPT_E_XML_SIG_SIGN',
|
144
|
+
610201121 => 'ERIC_CRYPT_E_ENCODE_UNKNOWN',
|
145
|
+
610201122 => 'ERIC_CRYPT_E_ENCODE_ERROR',
|
146
|
+
610201123 => 'ERIC_CRYPT_E_XML_INIT',
|
147
|
+
610201124 => 'ERIC_CRYPT_E_ENCRYPT',
|
148
|
+
610201125 => 'ERIC_CRYPT_E_DECRYPT',
|
149
|
+
610201126 => 'ERIC_CRYPT_E_P11_SLOT_EMPTY',
|
150
|
+
610201127 => 'ERIC_CRYPT_E_NO_SIG_ENC_KEY',
|
151
|
+
610201128 => 'ERIC_CRYPT_E_LOAD_DLL',
|
152
|
+
610201129 => 'ERIC_CRYPT_E_NO_SERVICE',
|
153
|
+
610201130 => 'ERIC_CRYPT_E_ESICL_EXCEPTION',
|
154
|
+
610201144 => 'ERIC_CRYPT_E_TOKEN_TYPE_MISMATCH',
|
155
|
+
610201146 => 'ERIC_CRYPT_E_P12_CREATE',
|
156
|
+
610201147 => 'ERIC_CRYPT_E_VERIFY_CERT_CHAIN',
|
157
|
+
610201148 => 'ERIC_CRYPT_E_P11_ENGINE_LOADED',
|
158
|
+
610201149 => 'ERIC_CRYPT_E_USER_CANCEL',
|
159
|
+
610201200 => 'ERIC_CRYPT_ZERTIFIKAT',
|
160
|
+
610201201 => 'ERIC_CRYPT_SIGNATUR',
|
161
|
+
610201203 => 'ERIC_CRYPT_NICHT_UNTERSTUETZTES_PSE_FORMAT',
|
162
|
+
610201205 => 'ERIC_CRYPT_PIN_BENOETIGT',
|
163
|
+
610201206 => 'ERIC_CRYPT_PIN_STAERKE_NICHT_AUSREICHEND',
|
164
|
+
610201208 => 'ERIC_CRYPT_E_INTERN',
|
165
|
+
610201209 => 'ERIC_CRYPT_ZERTIFIKATSPFAD_KEIN_VERZEICHNIS',
|
166
|
+
610201210 => 'ERIC_CRYPT_ZERTIFIKATSDATEI_EXISTIERT_BEREITS',
|
167
|
+
610201211 => 'ERIC_CRYPT_PIN_ENTHAELT_UNGUELTIGE_ZEICHEN',
|
168
|
+
610201212 => 'ERIC_CRYPT_E_INVALID_PARAM_ABC',
|
169
|
+
610201213 => 'ERIC_CRYPT_CORRUPTED',
|
170
|
+
610201214 => 'ERIC_CRYPT_EIDKARTE_NICHT_UNTERSTUETZT',
|
171
|
+
610201215 => 'ERIC_CRYPT_E_SC_SLOT_EMPTY',
|
172
|
+
610201216 => 'ERIC_CRYPT_E_SC_NO_APPLET',
|
173
|
+
610201217 => 'ERIC_CRYPT_E_SC_SESSION',
|
174
|
+
610201218 => 'ERIC_CRYPT_E_P11_NO_SIG_CERT',
|
175
|
+
610201219 => 'ERIC_CRYPT_E_P11_INIT_FAILED',
|
176
|
+
610201220 => 'ERIC_CRYPT_E_P11_NO_ENC_CERT',
|
177
|
+
610201221 => 'ERIC_CRYPT_E_P12_NO_SIG_CERT',
|
178
|
+
610201222 => 'ERIC_CRYPT_E_P12_NO_ENC_CERT',
|
179
|
+
610201223 => 'ERIC_CRYPT_E_SC_ENC_KEY',
|
180
|
+
610201224 => 'ERIC_CRYPT_E_SC_NO_SIG_CERT',
|
181
|
+
610201225 => 'ERIC_CRYPT_E_SC_NO_ENC_CERT',
|
182
|
+
610201226 => 'ERIC_CRYPT_E_SC_INIT_FAILED',
|
183
|
+
610201227 => 'ERIC_CRYPT_E_SC_SIG_KEY',
|
149
184
|
|
150
|
-
610301001 => '
|
151
|
-
610301005 => '
|
152
|
-
610301006 => '
|
153
|
-
610301007 => '
|
154
|
-
610301010 => '
|
155
|
-
610301014 => '
|
156
|
-
610301031 => '
|
157
|
-
610301104 => '
|
158
|
-
610301105 => '
|
159
|
-
610301106 => '
|
160
|
-
610301107 => '
|
161
|
-
610301108 => '
|
162
|
-
610301109 => '
|
163
|
-
610301110 => '
|
164
|
-
610301111 => '
|
165
|
-
610301114 => '
|
166
|
-
610301115 => '
|
167
|
-
610301150 => '
|
168
|
-
610301151 => '
|
169
|
-
610301152 => '
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
185
|
+
610301001 => 'ERIC_IO_FEHLER',
|
186
|
+
610301005 => 'ERIC_IO_DATEI_INKORREKT',
|
187
|
+
610301006 => 'ERIC_IO_PARSE_FEHLER',
|
188
|
+
610301007 => 'ERIC_IO_NDS_GENERIERUNG_FEHLGESCHLAGEN',
|
189
|
+
610301010 => 'ERIC_IO_MASTERDATENSERVICE_NICHT_VERFUEGBAR',
|
190
|
+
610301014 => 'ERIC_IO_STEUERZEICHEN_IM_NDS',
|
191
|
+
610301031 => 'ERIC_IO_VERSIONSINFORMATIONEN_NICHT_GEFUNDEN',
|
192
|
+
610301104 => 'ERIC_IO_FALSCHES_VERFAHREN',
|
193
|
+
610301105 => 'ERIC_IO_READER_MEHRFACHE_STEUERFAELLE',
|
194
|
+
610301106 => 'ERIC_IO_READER_UNERWARTETE_ELEMENTE',
|
195
|
+
610301107 => 'ERIC_IO_READER_FORMALE_FEHLER',
|
196
|
+
610301108 => 'ERIC_IO_READER_FALSCHES_ENCODING',
|
197
|
+
610301109 => 'ERIC_IO_READER_MEHRFACHE_NUTZDATEN_ELEMENTE',
|
198
|
+
610301110 => 'ERIC_IO_READER_MEHRFACHE_NUTZDATENBLOCK_ELEMENTE',
|
199
|
+
610301111 => 'ERIC_IO_UNBEKANNTE_DATENART',
|
200
|
+
610301114 => 'ERIC_IO_READER_UNTERSACHBEREICH_UNGUELTIG',
|
201
|
+
610301115 => 'ERIC_IO_READER_ZU_VIELE_NUTZDATENBLOCK_ELEMENTE',
|
202
|
+
610301150 => 'ERIC_IO_READER_STEUERZEICHEN_IM_TRANSFERHEADER',
|
203
|
+
610301151 => 'ERIC_IO_READER_STEUERZEICHEN_IM_NUTZDATENHEADER',
|
204
|
+
610301152 => 'ERIC_IO_READER_STEUERZEICHEN_IN_DEN_NUTZDATEN',
|
205
|
+
610301170 => 'ERIC_IO_READER_RABE_FEHLER',
|
206
|
+
610301171 => 'ERIC_IO_READER_KEINE_RABEID',
|
207
|
+
610301172 => 'ERIC_IO_READER_RABEID_UNGUELTIG',
|
208
|
+
610301173 => 'ERIC_IO_READER_RABE_VERIFIKATIONSID_UNGUELTIG',
|
209
|
+
610301174 => 'ERIC_IO_READER_RABE_REFERENZID_UNGUELTIG',
|
210
|
+
610301175 => 'ERIC_IO_READER_RABE_REFERENZID_NICHT_ERLAUBT',
|
211
|
+
610301176 => 'ERIC_IO_READER_RABE_REFERENZIDS_NICHT_EINDEUTIG',
|
212
|
+
610301190 => 'ERIC_IO_READER_ZU_VIELE_ANHAENGE',
|
213
|
+
610301191 => 'ERIC_IO_READER_ANHANG_ZU_GROSS',
|
214
|
+
610301192 => 'ERIC_IO_READER_ANHAENGE_ZU_GROSS',
|
215
|
+
610301200 => 'ERIC_IO_READER_SCHEMA_VALIDIERUNGSFEHLER',
|
216
|
+
610301201 => 'ERIC_IO_READER_UNBEKANNTE_XML_ENTITY',
|
217
|
+
610301252 => 'ERIC_IO_DATENTEILNOTFOUND',
|
218
|
+
610301253 => 'ERIC_IO_DATENTEILENDNOTFOUND',
|
219
|
+
610301300 => 'ERIC_IO_UEBERGABEPARAMETER_FEHLERHAFT',
|
220
|
+
610301400 => 'ERIC_IO_UNGUELTIGE_UTF8_SEQUENZ',
|
221
|
+
610301401 => 'ERIC_IO_UNGUELTIGE_ZEICHEN_IN_PARAMETER',
|
175
222
|
|
176
|
-
610501001 => '
|
177
|
-
610501002 => '
|
178
|
-
610501004 => '
|
179
|
-
610501007 => '
|
180
|
-
610501008 => '
|
181
|
-
610501009 => '
|
182
|
-
610501010 => '
|
183
|
-
610501011 => '
|
184
|
-
610501012 => '
|
223
|
+
610501001 => 'ERIC_PRINT_INTERNER_FEHLER',
|
224
|
+
610501002 => 'ERIC_PRINT_DRUCKVORLAGE_NICHT_GEFUNDEN',
|
225
|
+
610501004 => 'ERIC_PRINT_UNGUELTIGER_DATEI_PFAD',
|
226
|
+
610501007 => 'ERIC_PRINT_INITIALISIERUNG_FEHLERHAFT',
|
227
|
+
610501008 => 'ERIC_PRINT_AUSGABEZIEL_UNBEKANNT',
|
228
|
+
610501009 => 'ERIC_PRINT_ABBRUCH_DRUCKVORBEREITUNG',
|
229
|
+
610501010 => 'ERIC_PRINT_ABBRUCH_GENERIERUNG',
|
230
|
+
610501011 => 'ERIC_PRINT_STEUERFALL_NICHT_UNTERSTUETZT',
|
231
|
+
610501012 => 'ERIC_PRINT_FUSSTEXT_ZU_LANG',
|
232
|
+
610501015 => 'ERIC_PRINT_PDFCALLBACK'
|
185
233
|
}
|
186
234
|
|
187
235
|
CODES.each do |value, name|
|
data/lib/liberic/sdk/types.rb
CHANGED
data/lib/liberic/version.rb
CHANGED
data/lib/liberic.rb
CHANGED
@@ -3,6 +3,7 @@ require 'nokogiri'
|
|
3
3
|
require 'logger'
|
4
4
|
require 'liberic/version'
|
5
5
|
require 'liberic/boot'
|
6
|
+
require 'liberic/certificate'
|
6
7
|
require 'liberic/helpers'
|
7
8
|
require 'liberic/response'
|
8
9
|
require 'liberic/sdk'
|
@@ -10,6 +11,8 @@ require 'liberic/process'
|
|
10
11
|
require 'liberic/config'
|
11
12
|
|
12
13
|
module Liberic
|
14
|
+
SDK::API::initialisiere(nil, nil)
|
15
|
+
|
13
16
|
check_eric_version!
|
14
17
|
|
15
18
|
def config
|
data/liberic.gemspec
CHANGED
@@ -27,10 +27,10 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
|
30
|
-
spec.add_dependency "ffi", "~> 1.
|
31
|
-
spec.add_dependency "nokogiri", "~> 1.
|
30
|
+
spec.add_dependency "ffi", "~> 1.16"
|
31
|
+
spec.add_dependency "nokogiri", "~> 1.16"
|
32
32
|
|
33
|
-
spec.add_development_dependency "bundler", "~>
|
34
|
-
spec.add_development_dependency "rake", "~>
|
35
|
-
spec.add_development_dependency "rspec", "~> 3.
|
33
|
+
spec.add_development_dependency "bundler", "~> 2.5"
|
34
|
+
spec.add_development_dependency "rake", "~> 13.1"
|
35
|
+
spec.add_development_dependency "rspec", "~> 3.13"
|
36
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: liberic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Malte Münchert
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -16,70 +16,70 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.16'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.16'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: nokogiri
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.16'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.16'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2.5'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '2.5'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '13.1'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '13.1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '3.
|
75
|
+
version: '3.13'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '3.
|
82
|
+
version: '3.13'
|
83
83
|
description: Liberic is a ruby wrapper for ERiC, a C library to interact with German
|
84
84
|
Tax Authority's ELSTER service.
|
85
85
|
email:
|
@@ -90,7 +90,9 @@ extra_rdoc_files: []
|
|
90
90
|
files:
|
91
91
|
- ".gitignore"
|
92
92
|
- ".rspec"
|
93
|
+
- ".tool-versions"
|
93
94
|
- ".travis.yml"
|
95
|
+
- CHANGELOG.md
|
94
96
|
- CODE_OF_CONDUCT.md
|
95
97
|
- Gemfile
|
96
98
|
- LICENSE
|
@@ -102,6 +104,7 @@ files:
|
|
102
104
|
- examples/submit_ekst.rb
|
103
105
|
- lib/liberic.rb
|
104
106
|
- lib/liberic/boot.rb
|
107
|
+
- lib/liberic/certificate.rb
|
105
108
|
- lib/liberic/config.rb
|
106
109
|
- lib/liberic/helpers.rb
|
107
110
|
- lib/liberic/helpers/invocation.rb
|
@@ -136,8 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
139
|
- !ruby/object:Gem::Version
|
137
140
|
version: '0'
|
138
141
|
requirements: []
|
139
|
-
|
140
|
-
rubygems_version: 2.4.6
|
142
|
+
rubygems_version: 3.5.6
|
141
143
|
signing_key:
|
142
144
|
specification_version: 4
|
143
145
|
summary: Ruby bindings for ELSTER/ERiC (German Tax Authority Service)
|