pkcs11_protect_server 0.3.0 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a5fe3b3e7e2b4371955d63d571b32a889cb5cc4ded9c5f4407c7e248a77e373
4
- data.tar.gz: 152bcff476fe55a9a288eff56341d1013492d2aad40b48283d6629ca06bb2bb2
3
+ metadata.gz: 6fd43fb449a5dea77402583aac55585c11918fff2b61c05a836396c0c57349d1
4
+ data.tar.gz: 02c39243000b40517d52e9ed0440dcdeaddd7e1d61b755d0aec7f5a2fa31243e
5
5
  SHA512:
6
- metadata.gz: 260fdae7245c78b951906b3e586e64cbf038540f15833c376c49f1fa3f895fa51169aa30b63c1e7e2fafa8feb5701a68056362553cb0cec1ddddbf791130b168
7
- data.tar.gz: da7604086b3b6145add4f76290c016bc959a8a18ed4f9dbdbbd82a60d589998271f1654d68f5fba780b3958a4d05cfa5fc37c912f6b4adba19ddae4f2aecb887
6
+ metadata.gz: 22662ee801a1b4eb0f6f6a1a21cda143d53b0cd1b63c68ff5f8d81275a96d2dbe380fae8e1e5911220928032f320a6b6b2fa163be544a36d317a47095770a68a
7
+ data.tar.gz: bd545b633cba8caf2318eb3145758eef9bbbb59ebff0ab1452dbd833e98b369c0b0750e05b097082e575bdd76a782112082c7137526cbf1ec78632048389bc44
@@ -1 +1,2 @@
1
- �����5���"����(V}2T�j��%�5�^W���|ַ=�z�p�if@Dk#7�.��;�*��n�����~��?5o5Ǹ�vB:��F3i��X(Zn��m�&J5Vb�/u�6v�S
1
+ ��.= =f�JX�c�#P=�+7��7����;���릴�?fd1����A.@�"a���0����akySylɴz�=41]�$����czwG 
2
+ ��a+��np+@�"�]m��V�SU��.c)F�ї�~���Vuie��a�.�������i�O�XÃ�D�h����
data.tar.gz.sig CHANGED
Binary file
@@ -4,8 +4,8 @@ Manifest.txt
4
4
  README_PROTECT_SERVER.rdoc
5
5
  Rakefile
6
6
  ext/extconf.rb
7
- ext/generate_constants.rb
8
- ext/generate_structs.rb
7
+ ext/generate_protect_server_constants.rb
8
+ ext/generate_protect_server_structs.rb
9
9
  ext/pk11s.c
10
10
  lib/pkcs11_protect_server.rb
11
11
  lib/pkcs11_protect_server/extensions.rb
data/Rakefile CHANGED
@@ -7,28 +7,37 @@ require 'rake/extensiontask'
7
7
  require 'rbconfig'
8
8
 
9
9
  PROTECT_SERVER_SDK_DIR = ENV['PROTECT_SERVER_SDK_DIR'] || '/opt/ETcpsdk'
10
- RUBY_PKCS11_EXT_DIR = File.expand_path('../ext')
10
+ RUBY_PKCS11_DIR = File.expand_path('..')
11
+ $: << File.join(RUBY_PKCS11_DIR, "lib")
11
12
 
12
- GENERATED_FILES = [
13
- 'ext/pk11s_struct_impl.inc',
14
- 'ext/pk11s_struct_def.inc',
15
- 'ext/pk11s_const_def.inc',
16
- 'ext/pk11s_struct.doc',
13
+ SHARED_FILES = [
17
14
  'ext/pk11_struct_macros.h',
18
15
  'ext/pk11_const_macros.h',
19
16
  'ext/pk11_version.h',
17
+ 'ext/generate_structs.rb',
18
+ 'ext/generate_constants.rb',
19
+ ]
20
+ GENERATED_FILES = [
21
+ "ext/std_structs.rb"
20
22
  ]
21
23
 
24
+ CLEAN.include SHARED_FILES
22
25
  CLEAN.include GENERATED_FILES
23
26
  CLEAN.include 'lib/pkcs11_protect_server_ext.so'
24
27
  CLEAN.include 'tmp'
25
28
 
26
29
  def pkcs11_version
27
- file = File.join(RUBY_PKCS11_EXT_DIR, 'pk11_version.h')
30
+ file = File.join(RUBY_PKCS11_DIR, 'ext/pk11_version.h')
28
31
  version_re = /VERSION += +([\"\'])([\d][\d\w\.]+)\1/
29
32
  File.read_utf(file)[version_re, 2]
30
33
  end
31
34
 
35
+ # Ensure pkg is rebuilt
36
+ task :remove_pkg do
37
+ rm_rf 'pkg'
38
+ end
39
+ task :gem => [:remove_pkg]
40
+
32
41
  hoe = Hoe.spec 'pkcs11_protect_server' do
33
42
  developer('Lars Kanis', 'kanis@comcard.de')
34
43
  extra_deps << ['pkcs11', "= #{pkcs11_version}"]
@@ -44,7 +53,7 @@ hoe = Hoe.spec 'pkcs11_protect_server' do
44
53
  self.extra_rdoc_files << self.readme_file << 'ext/pk11s.c'
45
54
  spec_extras[:extensions] = 'ext/extconf.rb'
46
55
  spec_extras[:files] = File.read_utf("Manifest.txt").split(/\r?\n\r?/)
47
- spec_extras[:files] += GENERATED_FILES
56
+ spec_extras[:files] += SHARED_FILES + GENERATED_FILES
48
57
  spec_extras[:required_ruby_version] = '>= 2.2.0'
49
58
  end
50
59
 
@@ -56,27 +65,20 @@ Rake::ExtensionTask.new('pkcs11_protect_server_ext', hoe.spec) do |ext|
56
65
  ext.config_options << "--with-protect-server-sdk-dir=#{PROTECT_SERVER_SDK_DIR.inspect}"
57
66
  end
58
67
 
59
- def copy_from_base_task(filename)
60
- file File.join('ext', filename) => File.join(RUBY_PKCS11_EXT_DIR, filename) do |t|
68
+ # Add shared file from base pkcs11 gem
69
+ SHARED_FILES.each do |filename|
70
+ file filename => File.join(RUBY_PKCS11_DIR, filename) do |t|
61
71
  cp t.prerequisites.first, t.name, verbose: true
62
72
  end
73
+ file 'ext/extconf.rb' => filename
63
74
  end
64
75
 
65
- copy_from_base_task 'pk11_struct_macros.h'
66
- copy_from_base_task 'pk11_const_macros.h'
67
- copy_from_base_task 'pk11_version.h'
68
-
69
- file 'ext/extconf.rb' => ['ext/pk11s_struct_def.inc', 'ext/pk11s_const_def.inc', 'ext/pk11_struct_macros.h', 'ext/pk11_const_macros.h', 'ext/pk11_version.h']
70
- file 'ext/pk11s_struct_def.inc' => 'ext/generate_structs.rb' do
71
- sh "#{RbConfig::CONFIG['ruby_install_name']} -I../lib ext/generate_structs.rb --def ext/pk11s_struct_def.inc --impl ext/pk11s_struct_impl.inc --doc ext/pk11s_struct.doc #{File.join(PROTECT_SERVER_SDK_DIR, 'include/ctvdef.h').inspect}"
72
- end
73
- file 'ext/pk11s_struct_impl.inc' => 'ext/pk11s_struct_def.inc'
74
- file 'ext/pk11s_struct.doc' => 'ext/pk11s_struct_def.inc'
76
+ file "ext/std_structs.rb" do |t|
77
+ require "pkcs11"
78
+ std_structs = PKCS11.constants.select{|c| PKCS11.const_get(c).respond_to?(:ancestors) && !(PKCS11.const_get(c).ancestors & [PKCS11::CStruct, PKCS11::CK_ATTRIBUTE]).empty? }
75
79
 
76
- file 'ext/pk11s_const_def.inc' => 'ext/generate_constants.rb' do
77
- sh "#{RbConfig::CONFIG['ruby_install_name']} -I../lib ext/generate_constants.rb --const ext/pk11s_const_def.inc #{File.join(PROTECT_SERVER_SDK_DIR, 'include/ctvdef.h').inspect}"
80
+ File.write t.name, "PKCS11_STD_STRUCTS = #{std_structs.inspect}"
78
81
  end
79
- file 'ext/pk11s.c' => ['ext/pk11s_struct_def.inc', 'ext/pk11s_struct_impl.inc', 'ext/pk11s_const_def.inc']
80
82
 
81
83
  task doc_files: 'ext/pk11s_struct.doc'
82
84
 
@@ -4,11 +4,16 @@ require "rubygems"
4
4
  inc, lib = dir_config('protect-server-sdk', '/opt/ETcpsdk/include', '/opt/ETcpsdk/lib')
5
5
  puts "using ProtectServer-SDK include:#{inc} lib:#{lib}"
6
6
 
7
- # inc, lib = dir_config('ruby-pkcs11')
8
- # inc ||= Gem.required_location('pkcs11', '../ext')
9
- # puts "using ruby-pkcs11 include:#{inc} lib:#{lib}"
10
- # raise "path to ruby-pkcs11/ext could not be found (use --with-ruby-pkcs11-include=my_path)" unless inc
11
- # $INCFLAGS << " -I"+inc
7
+ require_relative "generate_protect_server_constants"
8
+ require_relative "generate_protect_server_structs"
9
+
10
+ args = ["--const", "pk11s_const_def.inc", File.join(inc, 'ctvdef.h')]
11
+ puts "running const parser with: #{args.join(" ")}"
12
+ PKCS11::ProtectServer::ConstantParser.run(args)
13
+
14
+ args = ["--def", "pk11s_struct_def.inc", "--impl", "pk11s_struct_impl.inc", "--doc", "pk11s_struct.doc", File.join(inc, 'ctvdef.h')]
15
+ puts "running struct parser with: #{args.join(" ")}"
16
+ PKCS11::ProtectServer::StructParser.run(args)
12
17
 
13
18
  find_header('pk11_struct_macros.h')
14
19
  find_header('pk11_const_macros.h')
@@ -2,20 +2,39 @@
2
2
  # Quick and dirty parser for PKCS#11 constants and
3
3
  # generator for Ruby wrapper classes.
4
4
 
5
- require File.expand_path(File.join(File.dirname(__FILE__), '../../ext/generate_constants'))
5
+ require 'optparse'
6
6
 
7
7
  module PKCS11
8
- module ProtectServer
9
- class ConstantParser < PKCS11::ConstantParser
8
+ class ConstantParser
9
+
10
+ attr_accessor :options
11
+
12
+ def self.run(argv)
13
+ s = self.new
14
+ options = Struct.new(:verbose, :const, :files).new
15
+ OptionParser.new do |opts|
16
+ opts.banner = "Usage: #{$0} [options] <header-file.h>*"
17
+
18
+ opts.on("-v", "--[no-]verbose", "Run verbosely", &options.method(:verbose=))
19
+ opts.on("--const FILE", "Write const implementations to this file", &options.method(:const=))
20
+ opts.on_tail("-h", "--help", "Show this message") do
21
+ puts opts
22
+ exit
23
+ end
24
+ end.parse!(argv)
25
+ options.files = argv
26
+ s.options = options
27
+ s.start!
28
+ end
29
+
30
+ ConstTemplate = Struct.new :regexp, :def
10
31
  ConstGroups = [
11
- ConstTemplate.new(/#define\s+(CKM_[A-Z_0-9]+)\s+(.+)/, 'PKCS11_DEFINE_MECHANISM'),
12
- ConstTemplate.new(/#define\s+(CKA_[A-Z_0-9]+)\s+(.+)/, 'PKCS11_DEFINE_ATTRIBUTE'),
13
- ConstTemplate.new(/#define\s+(CKO_[A-Z_0-9]+)\s+(.+)/, 'PKCS11_DEFINE_OBJECT_CLASS'),
14
- ConstTemplate.new(/#define\s+(CKR_[A-Z_0-9]+)\s+(.+)/, 'PKCS11_DEFINE_RETURN_VALUE'),
32
+ ConstTemplate.new(/#define\s+(CKM_[A-Z_0-9]+)\s+(\w+)/, 'PKCS11_DEFINE_MECHANISM'),
33
+ ConstTemplate.new(/#define\s+(CKA_[A-Z_0-9]+)\s+(\w+)/, 'PKCS11_DEFINE_ATTRIBUTE'),
34
+ ConstTemplate.new(/#define\s+(CKO_[A-Z_0-9]+)\s+(\w+)/, 'PKCS11_DEFINE_OBJECT_CLASS'),
35
+ ConstTemplate.new(/#define\s+(CKR_[A-Z_0-9]+)\s+(\w+)/, 'PKCS11_DEFINE_RETURN_VALUE'),
15
36
  ]
16
37
 
17
- IgnoreConstants = %w[CKR_CERTIFICATE_NOT_YET_ACTIVE CKR_CERTIFICATE_EXPIRED]
18
-
19
38
  def start!
20
39
  File.open(options.const, "w") do |fd_const|
21
40
  options.files.each do |file_h|
@@ -23,8 +42,7 @@ class ConstantParser < PKCS11::ConstantParser
23
42
  ConstGroups.each do |const_group|
24
43
  c_src.scan(const_group.regexp) do
25
44
  const_name, const_value = $1, $2
26
- next if IgnoreConstants.include?(const_name)
27
-
45
+
28
46
  fd_const.puts "#{const_group.def}(#{const_name}); /* #{const_value} */"
29
47
  end
30
48
  end
@@ -33,9 +51,7 @@ class ConstantParser < PKCS11::ConstantParser
33
51
  end
34
52
  end
35
53
  end
36
- end
37
-
38
54
 
39
55
  if $0==__FILE__
40
- PKCS11::ProtectServer::ConstantParser.run(ARGV)
56
+ PKCS11::ConstantParser.run(ARGV)
41
57
  end
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env ruby
2
+ # Quick and dirty parser for PKCS#11 constants and
3
+ # generator for Ruby wrapper classes.
4
+
5
+ require_relative "generate_constants"
6
+
7
+ module PKCS11
8
+ module ProtectServer
9
+ class ConstantParser < PKCS11::ConstantParser
10
+ ConstGroups = [
11
+ ConstTemplate.new(/#define\s+(CKM_[A-Z_0-9]+)\s+(.+)/, 'PKCS11_DEFINE_MECHANISM'),
12
+ ConstTemplate.new(/#define\s+(CKA_[A-Z_0-9]+)\s+(.+)/, 'PKCS11_DEFINE_ATTRIBUTE'),
13
+ ConstTemplate.new(/#define\s+(CKO_[A-Z_0-9]+)\s+(.+)/, 'PKCS11_DEFINE_OBJECT_CLASS'),
14
+ ConstTemplate.new(/#define\s+(CKR_[A-Z_0-9]+)\s+(.+)/, 'PKCS11_DEFINE_RETURN_VALUE'),
15
+ ]
16
+
17
+ IgnoreConstants = %w[CKR_CERTIFICATE_NOT_YET_ACTIVE CKR_CERTIFICATE_EXPIRED]
18
+
19
+ def start!
20
+ File.open(options.const, "w") do |fd_const|
21
+ options.files.each do |file_h|
22
+ c_src = IO.read(file_h)
23
+ ConstGroups.each do |const_group|
24
+ c_src.scan(const_group.regexp) do
25
+ const_name, const_value = $1, $2
26
+ next if IgnoreConstants.include?(const_name)
27
+
28
+ fd_const.puts "#{const_group.def}(#{const_name}); /* #{const_value} */"
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+
38
+
39
+ if $0==__FILE__
40
+ PKCS11::ProtectServer::ConstantParser.run(ARGV)
41
+ end
@@ -0,0 +1,74 @@
1
+ #!/usr/bin/env ruby
2
+ # Quick and dirty parser for PKCS#11 structs and
3
+ # generator for Ruby wrapper classes.
4
+
5
+ require_relative "generate_structs"
6
+ require_relative "std_structs"
7
+
8
+ module PKCS11
9
+ module ProtectServer
10
+ class StructParser < PKCS11::StructParser
11
+
12
+ SIZE_CONSTANTS = {
13
+ 'CK_MANUFACTURER_SIZE' => 32,
14
+ 'CK_SERIAL_NUMBER_SIZE' => 16,
15
+ 'CK_TIME_SIZE' => 16,
16
+ 'CK_LIB_DESC_SIZE' => 32,
17
+ 'CK_SLOT_DESCRIPTION_SIZE' => 64,
18
+ 'CK_SLOT_MANUFACTURER_SIZE' => 32,
19
+ 'CK_MAX_PIN_LEN' => 32,
20
+ 'CK_TOKEN_LABEL_SIZE' => 32,
21
+ 'CK_TOKEN_MANUFACTURER_SIZE' => 32,
22
+ 'CK_TOKEN_MODEL_SIZE' => 16,
23
+ 'CK_TOKEN_SERIAL_NUMBER_SIZE' => 16,
24
+ 'CK_TOKEN_TIME_SIZE' => 16,
25
+ 'CK_MAX_PBE_IV_SIZE' => 8,
26
+ 'CK_MAX_PAD_SIZE' => 16,
27
+ }
28
+
29
+ ULONG_TYPES = %w[CK_COUNT CK_SIZE CK_TIMESTAMP_FORMAT]
30
+ ULONG_PTR_TYPES = %w[CK_COUNT_PTR]
31
+
32
+ def struct_module
33
+ 'PKCS11::ProtectServer'
34
+ end
35
+
36
+ def array_attribute_names; %w[attributes mechanism certAttr hCert]; end
37
+
38
+ def parse_files(files)
39
+ structs = []
40
+ files.each do |file_h|
41
+ c_src = IO.read(file_h)
42
+ c_src.scan(/struct\s+([A-Z_0-9]+)\s*\{(.*?)\}/m) do |struct|
43
+ struct_text = $2
44
+ struct = PKCS11::StructParser::CStruct.new( $1, [] )
45
+
46
+ struct_text.scan(/^\s+([A-Z_0-9]+)([\*\s]+)([\w_]+)\s*(\[\s*(\w+)\s*\])?/) do |elem|
47
+ type, name = $1, $3
48
+ qual = SIZE_CONSTANTS[$5] || $5
49
+ ptr = $2.include?('*')
50
+ type = "CK_ULONG" if ULONG_TYPES.include?(type)
51
+ type = "CK_ULONG_PTR" if ULONG_PTR_TYPES.include?(type)
52
+ struct.attrs << Attribute.new(ptr ? type+"_PTR" : type, name, qual)
53
+ end
54
+ structs << struct
55
+ end
56
+ end
57
+ return structs
58
+ end
59
+
60
+ def start!
61
+ @structs = parse_files(options.files)
62
+ @structs_by_name = @structs.inject({}){|sum, v| sum[v.name]=v; sum }
63
+ @std_structs_by_name = PKCS11_STD_STRUCTS.inject({}){|sum, v| sum[v.to_s]=true; sum }
64
+
65
+ write_files
66
+ end
67
+ end
68
+ end
69
+ end
70
+
71
+
72
+ if $0==__FILE__
73
+ PKCS11::ProtectServer::StructParser.run(ARGV)
74
+ end
@@ -2,39 +2,56 @@
2
2
  # Quick and dirty parser for PKCS#11 structs and
3
3
  # generator for Ruby wrapper classes.
4
4
 
5
- require 'rubygems'
6
- require 'pkcs11'
7
- require File.expand_path(File.join(File.dirname(__FILE__), '../../ext/generate_structs'))
5
+ require 'optparse'
8
6
 
9
7
  module PKCS11
10
- module ProtectServer
11
- class StructParser < PKCS11::StructParser
12
-
13
- SIZE_CONSTANTS = {
14
- 'CK_MANUFACTURER_SIZE' => 32,
15
- 'CK_SERIAL_NUMBER_SIZE' => 16,
16
- 'CK_TIME_SIZE' => 16,
17
- 'CK_LIB_DESC_SIZE' => 32,
18
- 'CK_SLOT_DESCRIPTION_SIZE' => 64,
19
- 'CK_SLOT_MANUFACTURER_SIZE' => 32,
20
- 'CK_MAX_PIN_LEN' => 32,
21
- 'CK_TOKEN_LABEL_SIZE' => 32,
22
- 'CK_TOKEN_MANUFACTURER_SIZE' => 32,
23
- 'CK_TOKEN_MODEL_SIZE' => 16,
24
- 'CK_TOKEN_SERIAL_NUMBER_SIZE' => 16,
25
- 'CK_TOKEN_TIME_SIZE' => 16,
26
- 'CK_MAX_PBE_IV_SIZE' => 8,
27
- 'CK_MAX_PAD_SIZE' => 16,
28
- }
29
-
30
- ULONG_TYPES = %w[CK_COUNT CK_SIZE CK_TIMESTAMP_FORMAT]
31
- ULONG_PTR_TYPES = %w[CK_COUNT_PTR]
8
+ class StructParser
9
+
10
+ attr_accessor :options
11
+ attr_accessor :structs
12
+ attr_accessor :structs_by_name
13
+ attr_accessor :std_structs_by_name
14
+
15
+ def self.run(argv)
16
+ s = self.new
17
+ options = Struct.new(:verbose, :def, :impl, :doc, :files).new
18
+ OptionParser.new do |opts|
19
+ opts.banner = "Usage: #{$0} [options] <header-file.h>*"
20
+
21
+ opts.on("-v", "--[no-]verbose", "Run verbosely", &options.method(:verbose=))
22
+ opts.on("--def FILE", "Write struct definitions to this file", &options.method(:def=))
23
+ opts.on("--impl FILE", "Write struct implementations to this file", &options.method(:impl=))
24
+ opts.on("--doc FILE", "Write documentation to this file", &options.method(:doc=))
25
+ opts.on_tail("-h", "--help", "Show this message") do
26
+ puts opts
27
+ exit
28
+ end
29
+ end.parse!(argv)
30
+ options.files = argv
31
+ s.options = options
32
+ s.start!
33
+ end
34
+
35
+ CStruct = Struct.new(:name, :attrs)
36
+ Attribute = Struct.new(:type, :name, :qual, :mark)
37
+ IgnoreStructs = %w[CK_ATTRIBUTE CK_MECHANISM]
38
+ OnlyAllocatorStructs = %w[CK_MECHANISM_INFO CK_C_INITIALIZE_ARGS CK_INFO CK_SLOT_INFO CK_TOKEN_INFO CK_SESSION_INFO]
32
39
 
33
40
  def struct_module
34
- 'PKCS11::ProtectServer'
41
+ 'PKCS11'
35
42
  end
36
43
 
37
- def array_attribute_names; %w[attributes mechanism certAttr hCert]; end
44
+ class CStruct
45
+ def attr_by_sign(key)
46
+ attrs.find{|a| a.type+" "+a.name==key }
47
+ end
48
+ end
49
+
50
+ class Attribute
51
+ def type_noptr
52
+ type.gsub(/_PTR$/,'')
53
+ end
54
+ end
38
55
 
39
56
  def parse_files(files)
40
57
  structs = []
@@ -42,15 +59,10 @@ class StructParser < PKCS11::StructParser
42
59
  c_src = IO.read(file_h)
43
60
  c_src.scan(/struct\s+([A-Z_0-9]+)\s*\{(.*?)\}/m) do |struct|
44
61
  struct_text = $2
45
- struct = PKCS11::StructParser::CStruct.new( $1, [] )
46
-
47
- struct_text.scan(/^\s+([A-Z_0-9]+)([\*\s]+)([\w_]+)\s*(\[\s*(\w+)\s*\])?/) do |elem|
48
- type, name = $1, $3
49
- qual = SIZE_CONSTANTS[$5] || $5
50
- ptr = $2.include?('*')
51
- type = "CK_ULONG" if ULONG_TYPES.include?(type)
52
- type = "CK_ULONG_PTR" if ULONG_PTR_TYPES.include?(type)
53
- struct.attrs << Attribute.new(ptr ? type+"_PTR" : type, name, qual)
62
+ struct = CStruct.new( $1, [] )
63
+
64
+ struct_text.scan(/^\s+([A-Z_0-9]+)\s+([\w_]+)\s*(\[\s*(\d+)\s*\])?/) do |elem|
65
+ struct.attrs << Attribute.new($1, $2, $4)
54
66
  end
55
67
  structs << struct
56
68
  end
@@ -61,15 +73,145 @@ class StructParser < PKCS11::StructParser
61
73
  def start!
62
74
  @structs = parse_files(options.files)
63
75
  @structs_by_name = @structs.inject({}){|sum, v| sum[v.name]=v; sum }
64
- @std_structs_by_name = PKCS11.constants.select{|c| PKCS11.const_get(c).respond_to?(:ancestors) && !(PKCS11.const_get(c).ancestors & [PKCS11::CStruct, PKCS11::CK_ATTRIBUTE]).empty? }.inject({}){|sum, v| sum[v.to_s]=true; sum }
76
+ @std_structs_by_name = @structs_by_name.dup
65
77
 
66
78
  write_files
67
79
  end
80
+
81
+ def array_attribute_names; ['pParams']; end
82
+
83
+ def write_files
84
+ File.open(options.def, "w") do |fd_def|
85
+ File.open(options.impl, "w") do |fd_impl|
86
+ File.open(options.doc, "w") do |fd_doc|
87
+ structs.each do |struct|
88
+ next if IgnoreStructs.include?(struct.name)
89
+
90
+ if OnlyAllocatorStructs.include?(struct.name)
91
+ fd_impl.puts "PKCS11_IMPLEMENT_ALLOCATOR(#{struct.name});"
92
+ else
93
+ fd_impl.puts "PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(#{struct.name});"
94
+ end
95
+ fd_def.puts "PKCS11_DEFINE_STRUCT(#{struct.name});"
96
+ fd_doc.puts"class #{struct_module}::#{struct.name} < #{struct_module}::CStruct"
97
+ fd_doc.puts"# Size of corresponding C struct in bytes\nSIZEOF_STRUCT=Integer"
98
+ fd_doc.puts"# @return [String] Binary copy of the C struct\ndef to_s; end"
99
+ fd_doc.puts"# @return [Array<String>] Attributes of this struct\ndef members; end"
100
+
101
+ # find attributes belonging together for array of struct
102
+ struct.attrs.select{|attr| structs_by_name[attr.type_noptr] || std_structs_by_name[attr.type_noptr] }.each do |attr|
103
+ if array_attribute_names.include?(attr.name) && (len_attr = struct.attr_by_sign("CK_ULONG ulCount") || struct.attr_by_sign("CK_ULONG count") || struct.attr_by_sign("CK_ULONG #{attr.name}Count"))
104
+ std_struct = "PKCS11_" if std_structs_by_name[attr.type_noptr]
105
+ fd_impl.puts "PKCS11_IMPLEMENT_#{std_struct}STRUCT_PTR_ARRAY_ACCESSOR(#{struct.name}, #{attr.type_noptr}, #{attr.name}, #{len_attr.name});"
106
+ fd_def.puts "PKCS11_DEFINE_MEMBER(#{struct.name}, #{attr.name});"
107
+ fd_doc.puts"# @return [Array<PKCS11::#{attr.type_noptr}>] accessor for #{attr.name} and #{len_attr.name}\nattr_accessor :#{attr.name}"
108
+ len_attr.mark = true
109
+ attr.mark = true
110
+ end
111
+ end
112
+ # find string attributes belonging together
113
+ struct.attrs.select{|attr| ['CK_BYTE_PTR', 'CK_VOID_PTR', 'CK_UTF8CHAR_PTR', 'CK_CHAR_PTR'].include?(attr.type) }.each do |attr|
114
+ enco = case attr.type
115
+ when 'CK_UTF8CHAR_PTR' then 'utf8'
116
+ when 'CK_CHAR_PTR' then 'usascii'
117
+ when 'CK_BYTE_PTR', 'CK_VOID_PTR' then 'ascii8bit'
118
+ else raise "unexpected type #{attr.type.inspect}"
119
+ end
120
+ if len_attr=struct.attr_by_sign("CK_ULONG #{attr.name.gsub(/^p([A-Z])/){ "ul"+$1 }}Len")
121
+ fd_impl.puts "PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(#{struct.name}, #{attr.name}, #{len_attr.name}, #{enco});"
122
+ fd_def.puts "PKCS11_DEFINE_MEMBER(#{struct.name}, #{attr.name});"
123
+ fd_doc.puts"# @return [#{enco.upcase}-String, nil] accessor for #{attr.name} and #{len_attr.name}\nattr_accessor :#{attr.name}"
124
+ len_attr.mark = true
125
+ elsif attr.name=='pData' && (len_attr = struct.attr_by_sign("CK_ULONG length") || struct.attr_by_sign("CK_ULONG ulLen"))
126
+ fd_impl.puts "PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(#{struct.name}, #{attr.name}, #{len_attr.name}, #{enco});"
127
+ fd_def.puts "PKCS11_DEFINE_MEMBER(#{struct.name}, #{attr.name});"
128
+ fd_doc.puts"# @return [#{enco.upcase}-String, nil] accessor for #{attr.name} and #{len_attr.name}\nattr_accessor :#{attr.name}"
129
+ len_attr.mark = true
130
+ else
131
+ fd_impl.puts "PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(#{struct.name}, #{attr.name}, #{enco});"
132
+ fd_def.puts "PKCS11_DEFINE_MEMBER(#{struct.name}, #{attr.name});"
133
+ fd_doc.puts"# @return [#{enco.upcase}-String, nil] accessor for #{attr.name}\nattr_accessor :#{attr.name}"
134
+ end
135
+ attr.mark = true
136
+ end
137
+
138
+ # standalone attributes
139
+ struct.attrs.reject{|a| a.mark }.each do |attr|
140
+ if attr.qual
141
+ # Attributes with qualifier
142
+ enco = case attr.type
143
+ when 'CK_BYTE' then 'ascii8bit'
144
+ when 'CK_UTF8CHAR' then 'utf8'
145
+ when 'CK_CHAR' then 'usascii'
146
+ end
147
+ case attr.type
148
+ when 'CK_BYTE', 'CK_UTF8CHAR', 'CK_CHAR'
149
+ fd_impl.puts "PKCS11_IMPLEMENT_STRING_ACCESSOR(#{struct.name}, #{attr.name}, #{enco});"
150
+ fd_def.puts "PKCS11_DEFINE_MEMBER(#{struct.name}, #{attr.name});"
151
+ fd_doc.puts"# @return [#{enco.upcase}-String] accessor for #{attr.name} (max #{attr.qual} bytes)\nattr_accessor :#{attr.name}"
152
+ else
153
+ fd_impl.puts "/* unimplemented attr #{attr.type} #{attr.name} #{attr.qual} */"
154
+ fd_def.puts "/* unimplemented attr #{attr.type} #{attr.name} #{attr.qual} */"
155
+ end
156
+ else
157
+ case attr.type
158
+ when 'CK_BYTE'
159
+ fd_impl.puts "PKCS11_IMPLEMENT_BYTE_ACCESSOR(#{struct.name}, #{attr.name});"
160
+ fd_def.puts "PKCS11_DEFINE_MEMBER(#{struct.name}, #{attr.name});"
161
+ fd_doc.puts"# @return [Integer] accessor for #{attr.name} (CK_BYTE)\nattr_accessor :#{attr.name}"
162
+ when 'CK_ULONG', 'CK_FLAGS', 'CK_SLOT_ID', 'CK_STATE', /CK_[A-Z_0-9]+_TYPE/
163
+ fd_impl.puts "PKCS11_IMPLEMENT_ULONG_ACCESSOR(#{struct.name}, #{attr.name});"
164
+ fd_def.puts "PKCS11_DEFINE_MEMBER(#{struct.name}, #{attr.name});"
165
+ fd_doc.puts"# @return [Integer] accessor for #{attr.name} (CK_ULONG)\nattr_accessor :#{attr.name}"
166
+ when 'CK_OBJECT_HANDLE'
167
+ fd_impl.puts "PKCS11_IMPLEMENT_HANDLE_ACCESSOR(#{struct.name}, #{attr.name});"
168
+ fd_def.puts "PKCS11_DEFINE_MEMBER(#{struct.name}, #{attr.name});"
169
+ fd_doc.puts"# @return [Integer, PKCS11::Object] Object handle (CK_ULONG)\nattr_accessor :#{attr.name}"
170
+ when 'CK_BBOOL'
171
+ fd_impl.puts "PKCS11_IMPLEMENT_BOOL_ACCESSOR(#{struct.name}, #{attr.name});"
172
+ fd_def.puts "PKCS11_DEFINE_MEMBER(#{struct.name}, #{attr.name});"
173
+ fd_doc.puts"# @return [Boolean] Bool value\nattr_accessor :#{attr.name}"
174
+ when 'CK_ULONG_PTR'
175
+ fd_impl.puts "PKCS11_IMPLEMENT_ULONG_PTR_ACCESSOR(#{struct.name}, #{attr.name});"
176
+ fd_def.puts "PKCS11_DEFINE_MEMBER(#{struct.name}, #{attr.name});"
177
+ fd_doc.puts"# @return [Integer, nil] accessor for #{attr.name} (CK_ULONG_PTR)\nattr_accessor :#{attr.name}"
178
+ else
179
+ # Struct attributes
180
+ if structs_by_name[attr.type]
181
+ fd_impl.puts "PKCS11_IMPLEMENT_STRUCT_ACCESSOR(#{struct.name}, #{attr.type}, #{attr.name});"
182
+ fd_def.puts "PKCS11_DEFINE_MEMBER(#{struct.name}, #{attr.name});"
183
+ fd_doc.puts"# @return [#{struct_module}::#{attr.type}] inline struct\nattr_accessor :#{attr.name}"
184
+ elsif structs_by_name[attr.type_noptr]
185
+ fd_impl.puts "PKCS11_IMPLEMENT_STRUCT_PTR_ACCESSOR(#{struct.name}, #{attr.type_noptr}, #{attr.name});"
186
+ fd_def.puts "PKCS11_DEFINE_MEMBER(#{struct.name}, #{attr.name});"
187
+ fd_doc.puts"# @return [#{struct_module}::#{attr.type_noptr}, nil] pointer to struct\nattr_accessor :#{attr.name}"
188
+ elsif std_structs_by_name[attr.type]
189
+ fd_impl.puts "PKCS11_IMPLEMENT_PKCS11_STRUCT_ACCESSOR(#{struct.name}, #{attr.type}, #{attr.name});"
190
+ fd_def.puts "PKCS11_DEFINE_MEMBER(#{struct.name}, #{attr.name});"
191
+ fd_doc.puts"# @return [PKCS11::#{attr.type}] inline struct (see pkcs11.gem)\nattr_accessor :#{attr.name}"
192
+ elsif std_structs_by_name[attr.type_noptr]
193
+ fd_impl.puts "PKCS11_IMPLEMENT_PKCS11_STRUCT_PTR_ACCESSOR(#{struct.name}, #{attr.type_noptr}, #{attr.name});"
194
+ fd_def.puts "PKCS11_DEFINE_MEMBER(#{struct.name}, #{attr.name});"
195
+ fd_doc.puts"# @return [PKCS11::#{attr.type_noptr}, nil] pointer to struct (see pkcs11.gem)\nattr_accessor :#{attr.name}"
196
+ else
197
+ fd_impl.puts "/* unimplemented attr #{attr.type} #{attr.name} #{attr.qual} */"
198
+ fd_def.puts "/* unimplemented attr #{attr.type} #{attr.name} #{attr.qual} */"
199
+ end
200
+ end
201
+ end
202
+ end
203
+
204
+ fd_impl.puts
205
+ fd_def.puts
206
+ fd_doc.puts "end"
207
+ end
208
+ end
209
+ end
210
+ end
211
+ end
68
212
  end
69
213
  end
70
- end
71
-
72
214
 
73
215
  if $0==__FILE__
74
- PKCS11::ProtectServer::StructParser.run(ARGV)
216
+ PKCS11::StructParser.run(ARGV)
75
217
  end
@@ -1,6 +1,6 @@
1
1
  #ifndef RUBY_PK11_VERSION_H
2
2
  #define RUBY_PK11_VERSION_H
3
3
 
4
- static const char *VERSION = "0.3.0";
4
+ static const char *VERSION = "0.3.2";
5
5
 
6
6
  #endif
@@ -0,0 +1 @@
1
+ PKCS11_STD_STRUCTS = [:CK_MECHANISM, :CK_VERSION, :CK_INFO, :CK_SLOT_INFO, :CK_TOKEN_INFO, :CK_SESSION_INFO, :CK_DATE, :CK_MECHANISM_INFO, :CK_C_INITIALIZE_ARGS, :CK_RSA_PKCS_OAEP_PARAMS, :CK_RSA_PKCS_PSS_PARAMS, :CK_ECDH1_DERIVE_PARAMS, :CK_ECMQV_DERIVE_PARAMS, :CK_X9_42_DH1_DERIVE_PARAMS, :CK_X9_42_DH2_DERIVE_PARAMS, :CK_X9_42_MQV_DERIVE_PARAMS, :CK_KEA_DERIVE_PARAMS, :CK_RC2_CBC_PARAMS, :CK_RC2_MAC_GENERAL_PARAMS, :CK_RC5_PARAMS, :CK_RC5_CBC_PARAMS, :CK_RC5_MAC_GENERAL_PARAMS, :CK_DES_CBC_ENCRYPT_DATA_PARAMS, :CK_AES_CBC_ENCRYPT_DATA_PARAMS, :CK_SKIPJACK_PRIVATE_WRAP_PARAMS, :CStruct, :CK_ATTRIBUTE, :CK_SKIPJACK_RELAYX_PARAMS, :CK_PBE_PARAMS, :CK_KEY_WRAP_SET_OAEP_PARAMS, :CK_SSL3_RANDOM_DATA, :CK_SSL3_MASTER_KEY_DERIVE_PARAMS, :CK_SSL3_KEY_MAT_OUT, :CK_SSL3_KEY_MAT_PARAMS, :CK_WTLS_RANDOM_DATA, :CK_WTLS_MASTER_KEY_DERIVE_PARAMS, :CK_WTLS_PRF_PARAMS, :CK_WTLS_KEY_MAT_OUT, :CK_WTLS_KEY_MAT_PARAMS, :CK_CMS_SIG_PARAMS, :CK_KEY_DERIVATION_STRING_DATA, :CK_PKCS5_PBKD2_PARAMS, :CK_OTP_PARAM, :CK_OTP_PARAMS, :CK_OTP_SIGNATURE_INFO, :CK_KIP_PARAMS, :CK_AES_CTR_PARAMS, :CK_GCM_PARAMS, :CK_CCM_PARAMS, :CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, :CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, :CK_DSA_PARAMETER_GEN_PARAM, :CK_ECDH_AES_KEY_WRAP_PARAMS, :CK_RSA_AES_KEY_WRAP_PARAMS, :CK_TLS12_MASTER_KEY_DERIVE_PARAMS, :CK_TLS12_KEY_MAT_PARAMS, :CK_TLS_KDF_PARAMS, :CK_TLS_MAC_PARAMS, :CK_GOSTR3410_DERIVE_PARAMS, :CK_GOSTR3410_KEY_WRAP_PARAMS]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pkcs11_protect_server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lars Kanis
@@ -29,7 +29,7 @@ cert_chain:
29
29
  D5uWyL3krcnTOgVS0jv7qSuxDjlvpHqvN1BNaw64Gf5TpqRDNM5r+hXhD8U339Ot
30
30
  lrxBVhTTtOOm6AE6oziYmw==
31
31
  -----END CERTIFICATE-----
32
- date: 2019-12-05 00:00:00.000000000 Z
32
+ date: 2020-01-12 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: pkcs11
@@ -37,14 +37,14 @@ dependencies:
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.3.0
40
+ version: 0.3.2
41
41
  type: :runtime
42
42
  prerelease: false
43
43
  version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.3.0
47
+ version: 0.3.2
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: yard
50
50
  requirement: !ruby/object:Gem::Requirement
@@ -126,15 +126,14 @@ files:
126
126
  - Rakefile
127
127
  - ext/extconf.rb
128
128
  - ext/generate_constants.rb
129
+ - ext/generate_protect_server_constants.rb
130
+ - ext/generate_protect_server_structs.rb
129
131
  - ext/generate_structs.rb
130
132
  - ext/pk11_const_macros.h
131
133
  - ext/pk11_struct_macros.h
132
134
  - ext/pk11_version.h
133
135
  - ext/pk11s.c
134
- - ext/pk11s_const_def.inc
135
- - ext/pk11s_struct.doc
136
- - ext/pk11s_struct_def.inc
137
- - ext/pk11s_struct_impl.inc
136
+ - ext/std_structs.rb
138
137
  - lib/pkcs11_protect_server.rb
139
138
  - lib/pkcs11_protect_server/extensions.rb
140
139
  - test/helper.rb
metadata.gz.sig CHANGED
@@ -1,3 +1 @@
1
- .� V��,j��������rx�WYs��c �$���YnD21P��Fr�Lch��&�1�ڕ�|'zP� ;Ԉp3���yP���6 ������+��q�)r=�I�J0��~e�q�ZL�5ї*�o�%�xҏ�
2
- zJ������_s���H�O_D�)���&]`U=�*�j*�UX�� z���/�h�A�m��>o��P���:����mw�-*=Ӹ1��a�b�[i��D��<!��<MĶ�
3
- �Ezm����9�'`
1
+ *�0Tw�
4
2
  � Ц�����g$��$��H��/X.�!� ij{`z
@@ -1,182 +0,0 @@
1
- PKCS11_DEFINE_MECHANISM(CKM_DSA_SHA1_PKCS); /* (CKM_VENDOR_DEFINED + CKM_DSA_SHA1 + 0x1) */
2
- PKCS11_DEFINE_MECHANISM(CKM_RIPEMD256_RSA_PKCS); /* (CKM_VENDOR_DEFINED + CKM_RIPEMD160_RSA_PKCS + 0x1) */
3
- PKCS11_DEFINE_MECHANISM(CKM_DES_MDC_2_PAD1); /* (CKM_VENDOR_DEFINED + 0x200 + 0x0) */
4
- PKCS11_DEFINE_MECHANISM(CKM_MD4); /* (CKM_VENDOR_DEFINED + 0x200 + 0x1) */
5
- PKCS11_DEFINE_MECHANISM(CKM_SHA); /* (CKM_VENDOR_DEFINED + 0x200 + 0x2) */
6
- PKCS11_DEFINE_MECHANISM(CKM_RIPEMD); /* (CKM_VENDOR_DEFINED + 0x200 + 0x3) */
7
- PKCS11_DEFINE_MECHANISM(CKM_ARDFP); /* (CKM_VENDOR_DEFINED + 0x200 + 0x4) */
8
- PKCS11_DEFINE_MECHANISM(CKM_NVB); /* (CKM_VENDOR_DEFINED + 0x200 + 0x5) */
9
- PKCS11_DEFINE_MECHANISM(CKM_DES_ECB_PAD); /* (CKM_VENDOR_DEFINED + CKM_DES_ECB) */
10
- PKCS11_DEFINE_MECHANISM(CKM_CAST_ECB_PAD); /* (CKM_VENDOR_DEFINED + CKM_CAST_ECB) */
11
- PKCS11_DEFINE_MECHANISM(CKM_CAST3_ECB_PAD); /* (CKM_VENDOR_DEFINED + CKM_CAST3_ECB) */
12
- PKCS11_DEFINE_MECHANISM(CKM_CAST5_ECB_PAD); /* (CKM_VENDOR_DEFINED + CKM_CAST5_ECB) */
13
- PKCS11_DEFINE_MECHANISM(CKM_CAST128_ECB_PAD); /* CKM_CAST5_ECB_PAD */
14
- PKCS11_DEFINE_MECHANISM(CKM_DES3_ECB_PAD); /* (CKM_VENDOR_DEFINED + CKM_DES3_ECB) */
15
- PKCS11_DEFINE_MECHANISM(CKM_IDEA_ECB_PAD); /* (CKM_VENDOR_DEFINED + CKM_IDEA_ECB) */
16
- PKCS11_DEFINE_MECHANISM(CKM_RC2_ECB_PAD); /* (CKM_VENDOR_DEFINED + CKM_RC2_ECB) */
17
- PKCS11_DEFINE_MECHANISM(CKM_CDMF_ECB_PAD); /* (CKM_VENDOR_DEFINED + CKM_CDMF_ECB) */
18
- PKCS11_DEFINE_MECHANISM(CKM_RC5_ECB_PAD); /* (CKM_VENDOR_DEFINED + CKM_RC5_ECB) */
19
- PKCS11_DEFINE_MECHANISM(CKM_DES_DERIVE_ECB); /* (CKM_VENDOR_DEFINED + 0x500) */
20
- PKCS11_DEFINE_MECHANISM(CKM_DES_DERIVE_CBC); /* (CKM_VENDOR_DEFINED + 0x501) */
21
- PKCS11_DEFINE_MECHANISM(CKM_DES3_DERIVE_ECB); /* (CKM_VENDOR_DEFINED + 0x502) */
22
- PKCS11_DEFINE_MECHANISM(CKM_DES3_DERIVE_CBC); /* (CKM_VENDOR_DEFINED + 0x503) */
23
- PKCS11_DEFINE_MECHANISM(CKM_DES3_RETAIL_CFB_MAC); /* (CKM_VENDOR_DEFINED + 0x510) */
24
- PKCS11_DEFINE_MECHANISM(CKM_SHA1_RSA_PKCS_TIMESTAMP); /* (CKM_VENDOR_DEFINED + 0x600) */
25
- PKCS11_DEFINE_MECHANISM(CKM_DES_BCF); /* (CKM_VENDOR_DEFINED + 910) */
26
- PKCS11_DEFINE_MECHANISM(CKM_DES3_BCF); /* (CKM_VENDOR_DEFINED + 911) */
27
- PKCS11_DEFINE_MECHANISM(CKM_DES3_X919_MAC); /* (CKM_VENDOR_DEFINED + CKM_DES3_MAC) */
28
- PKCS11_DEFINE_MECHANISM(CKM_DES3_X919_MAC_GENERAL); /* (CKM_VENDOR_DEFINED + CKM_DES3_MAC_GENERAL) */
29
- PKCS11_DEFINE_MECHANISM(CKM_ENCODE_PKCS_7); /* (CKM_VENDOR_DEFINED + 0x934) */
30
- PKCS11_DEFINE_MECHANISM(CKM_DECODE_PKCS_7); /* (CKM_VENDOR_DEFINED + 0x935) */
31
- PKCS11_DEFINE_MECHANISM(CKM_RSA_PKCS_7); /* (CKM_VENDOR_DEFINED + 0x930) */
32
- PKCS11_DEFINE_MECHANISM(CKM_RSA_PKCS_7_ENC); /* (CKM_VENDOR_DEFINED + 0x931) */
33
- PKCS11_DEFINE_MECHANISM(CKM_RSA_PKCS_7_SIGN); /* (CKM_VENDOR_DEFINED + 0x932) */
34
- PKCS11_DEFINE_MECHANISM(CKM_RSA_PKCS_7_SIGN_ENC); /* (CKM_VENDOR_DEFINED + 0x933) */
35
- PKCS11_DEFINE_MECHANISM(CKM_DES_OFB64); /* (CKM_VENDOR_DEFINED + 0x940) */
36
- PKCS11_DEFINE_MECHANISM(CKM_DES3_OFB64); /* (CKM_VENDOR_DEFINED + 0x941) */
37
- PKCS11_DEFINE_MECHANISM(CKM_XOR_BASE_AND_KEY); /* (CKM_VENDOR_DEFINED + 0x364) */
38
- PKCS11_DEFINE_MECHANISM(CKM_ENCODE_ATTRIBUTES); /* (CKM_VENDOR_DEFINED + 0x950) */
39
- PKCS11_DEFINE_MECHANISM(CKM_ENCODE_X_509); /* (CKM_VENDOR_DEFINED + 0x951) */
40
- PKCS11_DEFINE_MECHANISM(CKM_ENCODE_PKCS_10); /* (CKM_VENDOR_DEFINED + 0x952) */
41
- PKCS11_DEFINE_MECHANISM(CKM_DECODE_X_509); /* (CKM_VENDOR_DEFINED + 0x953) */
42
- PKCS11_DEFINE_MECHANISM(CKM_ENCODE_PUBLIC_KEY); /* (CKM_VENDOR_DEFINED + 0x954) */
43
- PKCS11_DEFINE_MECHANISM(CKM_ENCODE_X_509_LOCAL_CERT); /* (CKM_VENDOR_DEFINED + 0x955) */
44
- PKCS11_DEFINE_MECHANISM(CKM_WRAPKEY_DES3_ECB); /* (CKM_VENDOR_DEFINED + 0x961) */
45
- PKCS11_DEFINE_MECHANISM(CKM_WRAPKEY_DES3_CBC); /* (CKM_VENDOR_DEFINED + 0x962) */
46
- PKCS11_DEFINE_MECHANISM(CKM_DES3_DDD_CBC); /* (CKM_VENDOR_DEFINED + 0x964) */
47
- PKCS11_DEFINE_MECHANISM(CKM_VERIFY_CERTIFICATE); /* (CKM_VENDOR_DEFINED + 0x980) */
48
- PKCS11_DEFINE_MECHANISM(CKM_KEY_TRANSLATION); /* (CK_VENDOR_DEFINED + 0x1B) */
49
- PKCS11_DEFINE_MECHANISM(CKM_OS_UPGRADE); /* (CKM_VENDOR_DEFINED + 0x990) */
50
- PKCS11_DEFINE_MECHANISM(CKM_FM_DOWNLOAD); /* (CKM_VENDOR_DEFINED + 0x991) */
51
- PKCS11_DEFINE_MECHANISM(CKM_PP_LOAD_SECRET); /* (CKM_VENDOR_DEFINED + 0x9a0) */
52
- PKCS11_DEFINE_MECHANISM(CKM_VISA_CVV); /* (CKM_VENDOR_DEFINED + 0x9b0) */
53
- PKCS11_DEFINE_MECHANISM(CKM_ZKA_MDC_2_KEY_DERIVATION); /* (CKM_VENDOR_DEFINED + 0x9c0) */
54
- PKCS11_DEFINE_MECHANISM(CKM_SEED_KEY_GEN); /* (CKM_VENDOR_DEFINED + 0x9d0) */
55
- PKCS11_DEFINE_MECHANISM(CKM_SEED_ECB); /* (CKM_VENDOR_DEFINED + 0x9d1) */
56
- PKCS11_DEFINE_MECHANISM(CKM_SEED_CBC); /* (CKM_VENDOR_DEFINED + 0x9d2) */
57
- PKCS11_DEFINE_MECHANISM(CKM_SEED_MAC); /* (CKM_VENDOR_DEFINED + 0x9d3) */
58
- PKCS11_DEFINE_MECHANISM(CKM_SEED_MAC_GENERAL); /* (CKM_VENDOR_DEFINED + 0x9d4) */
59
- PKCS11_DEFINE_MECHANISM(CKM_SEED_ECB_PAD); /* (CKM_VENDOR_DEFINED + 0x9d5) */
60
- PKCS11_DEFINE_MECHANISM(CKM_SEED_CBC_PAD); /* (CKM_VENDOR_DEFINED + 0x9d6) */
61
- PKCS11_DEFINE_MECHANISM(CKM_REPLICATE_TOKEN_RSA_AES); /* (CKM_VENDOR_DEFINED + 0x9e0) */
62
- PKCS11_DEFINE_MECHANISM(CKM_SECRET_SHARE_WITH_ATTRIBUTES); /* (CKM_VENDOR_DEFINED + 0x9f0) */
63
- PKCS11_DEFINE_MECHANISM(CKM_SECRET_RECOVER_WITH_ATTRIBUTES); /* (CKM_VENDOR_DEFINED + 0x9f1) */
64
- PKCS11_DEFINE_MECHANISM(CKM_PKCS12_PBE_EXPORT); /* (CKM_VENDOR_DEFINED + 0x9f2) */
65
- PKCS11_DEFINE_MECHANISM(CKM_PKCS12_PBE_IMPORT); /* (CKM_VENDOR_DEFINED + 0x9f3) */
66
- PKCS11_DEFINE_MECHANISM(CKM_ECIES); /* (CKM_VENDOR_DEFINED + 0xA00) */
67
- PKCS11_DEFINE_ATTRIBUTE(CKA_USAGE_COUNT); /* (CKA_VENDOR_DEFINED + 0x0101) */
68
- PKCS11_DEFINE_ATTRIBUTE(CKA_TIME_STAMP); /* (CKA_VENDOR_DEFINED + 0x0102) */
69
- PKCS11_DEFINE_ATTRIBUTE(CKA_CHECK_VALUE); /* (CKA_VENDOR_DEFINED + 0x0103) */
70
- PKCS11_DEFINE_ATTRIBUTE(CKA_MECHANISM_LIST); /* (CKA_VENDOR_DEFINED + 0x0104) */
71
- PKCS11_DEFINE_ATTRIBUTE(CKA_SIGN_LOCAL_CERT); /* (CKA_VENDOR_DEFINED + 0x0127) */
72
- PKCS11_DEFINE_ATTRIBUTE(CKA_EXPORT); /* (CKA_VENDOR_DEFINED + 0x0128) */
73
- PKCS11_DEFINE_ATTRIBUTE(CKA_EXPORTABLE); /* (CKA_VENDOR_DEFINED + 0x0129) */
74
- PKCS11_DEFINE_ATTRIBUTE(CKA_DELETABLE); /* (CKA_VENDOR_DEFINED + 0x012A) */
75
- PKCS11_DEFINE_ATTRIBUTE(CKA_IMPORT); /* (CKA_VENDOR_DEFINED + 0x012B) */
76
- PKCS11_DEFINE_ATTRIBUTE(CKA_KEY_SIZE); /* (CKA_VENDOR_DEFINED + 0x012C) */
77
- PKCS11_DEFINE_ATTRIBUTE(CKA_ISSUER_STR); /* (CKA_VENDOR_DEFINED + 0x0130) */
78
- PKCS11_DEFINE_ATTRIBUTE(CKA_SUBJECT_STR); /* (CKA_VENDOR_DEFINED + 0x0131) */
79
- PKCS11_DEFINE_ATTRIBUTE(CKA_SERIAL_NUMBER_INT); /* (CKA_VENDOR_DEFINED + 0x0132) */
80
- PKCS11_DEFINE_ATTRIBUTE(CKA_RECORD_COUNT); /* (CKA_VENDOR_DEFINED + 0x0136) */
81
- PKCS11_DEFINE_ATTRIBUTE(CKA_RECORD_NUMBER); /* (CKA_VENDOR_DEFINED + 0x0137) */
82
- PKCS11_DEFINE_ATTRIBUTE(CKA_PURGE); /* (CKA_VENDOR_DEFINED + 0x0139) */
83
- PKCS11_DEFINE_ATTRIBUTE(CKA_EVENT_LOG_FULL); /* (CKA_VENDOR_DEFINED + 0x013A) */
84
- PKCS11_DEFINE_ATTRIBUTE(CKA_SECURITY_MODE); /* (CKA_VENDOR_DEFINED + 0x0140) */
85
- PKCS11_DEFINE_ATTRIBUTE(CKA_TRANSPORT_MODE); /* (CKA_VENDOR_DEFINED + 0x0141) */
86
- PKCS11_DEFINE_ATTRIBUTE(CKA_BATCH); /* (CKA_VENDOR_DEFINED + 0x0142) */
87
- PKCS11_DEFINE_ATTRIBUTE(CKA_HW_STATUS); /* (CKA_VENDOR_DEFINED + 0x0143) */
88
- PKCS11_DEFINE_ATTRIBUTE(CKA_FREE_MEM); /* (CKA_VENDOR_DEFINED + 0x0144) */
89
- PKCS11_DEFINE_ATTRIBUTE(CKA_TAMPER_CMD); /* (CKA_VENDOR_DEFINED + 0x0145) */
90
- PKCS11_DEFINE_ATTRIBUTE(CKA_DATE_OF_MANUFACTURE); /* (CKA_VENDOR_DEFINED + 0x0146) */
91
- PKCS11_DEFINE_ATTRIBUTE(CKA_HALT_CMD); /* (CKA_VENDOR_DEFINED + 0x0147) */
92
- PKCS11_DEFINE_ATTRIBUTE(CKA_APPLICATION_COUNT); /* (CKA_VENDOR_DEFINED + 0x0148) */
93
- PKCS11_DEFINE_ATTRIBUTE(CKA_FW_VERSION); /* (CKA_VENDOR_DEFINED + 0x0149) */
94
- PKCS11_DEFINE_ATTRIBUTE(CKA_RESCAN_PERIPHERALS_CMD); /* (CKA_VENDOR_DEFINED + 0x014A) */
95
- PKCS11_DEFINE_ATTRIBUTE(CKA_RTC_AAC_ENABLED); /* (CKA_VENDOR_DEFINED + 0x014B) */
96
- PKCS11_DEFINE_ATTRIBUTE(CKA_RTC_AAC_GUARD_SECONDS); /* (CKA_VENDOR_DEFINED + 0x014C) */
97
- PKCS11_DEFINE_ATTRIBUTE(CKA_RTC_AAC_GUARD_COUNT); /* (CKA_VENDOR_DEFINED + 0x014D) */
98
- PKCS11_DEFINE_ATTRIBUTE(CKA_RTC_AAC_GUARD_DURATION); /* (CKA_VENDOR_DEFINED + 0x014E) */
99
- PKCS11_DEFINE_ATTRIBUTE(CKA_HW_EXT_INFO_STR); /* (CKA_VENDOR_DEFINED + 0x014F) */
100
- PKCS11_DEFINE_ATTRIBUTE(CKA_SLOT_ID); /* (CKA_VENDOR_DEFINED + 0x0151) */
101
- PKCS11_DEFINE_ATTRIBUTE(CKA_MAX_SESSIONS); /* (CKA_VENDOR_DEFINED + 0x0155) */
102
- PKCS11_DEFINE_ATTRIBUTE(CKA_MIN_PIN_LEN); /* (CKA_VENDOR_DEFINED + 0x0156) */
103
- PKCS11_DEFINE_ATTRIBUTE(CKA_MAX_PIN_FAIL); /* (CKA_VENDOR_DEFINED + 0x0158) */
104
- PKCS11_DEFINE_ATTRIBUTE(CKA_FLAGS); /* (CKA_VENDOR_DEFINED + 0x0159) */
105
- PKCS11_DEFINE_ATTRIBUTE(CKA_PINPAD_DESC); /* (CKA_VENDOR_DEFINED + 0x015A) */
106
- PKCS11_DEFINE_ATTRIBUTE(CKA_VERIFY_OS); /* (CKA_VENDOR_DEFINED + 0x0170) */
107
- PKCS11_DEFINE_ATTRIBUTE(CKA_VERSION); /* (CKA_VENDOR_DEFINED + 0x0181) */
108
- PKCS11_DEFINE_ATTRIBUTE(CKA_MANUFACTURER); /* (CKA_VENDOR_DEFINED + 0x0182) */
109
- PKCS11_DEFINE_ATTRIBUTE(CKA_BUILD_DATE); /* (CKA_VENDOR_DEFINED + 0x0183) */
110
- PKCS11_DEFINE_ATTRIBUTE(CKA_FINGERPRINT); /* (CKA_VENDOR_DEFINED + 0x0184) */
111
- PKCS11_DEFINE_ATTRIBUTE(CKA_ROM_SPACE); /* (CKA_VENDOR_DEFINED + 0x0185) */
112
- PKCS11_DEFINE_ATTRIBUTE(CKA_RAM_SPACE); /* (CKA_VENDOR_DEFINED + 0x0186) */
113
- PKCS11_DEFINE_ATTRIBUTE(CKA_FM_STATUS); /* (CKA_VENDOR_DEFINED + 0x0187) */
114
- PKCS11_DEFINE_ATTRIBUTE(CKA_DELETE_FM); /* (CKA_VENDOR_DEFINED + 0x0188) */
115
- PKCS11_DEFINE_ATTRIBUTE(CKA_FM_STARTUP_STATUS); /* (CKA_VENDOR_DEFINED + 0x0189) */
116
- PKCS11_DEFINE_ATTRIBUTE(CKA_CERTIFICATE_START_TIME); /* (CKA_VENDOR_DEFINED + 0x0190) */
117
- PKCS11_DEFINE_ATTRIBUTE(CKA_CERTIFICATE_END_TIME); /* (CKA_VENDOR_DEFINED + 0x0191) */
118
- PKCS11_DEFINE_ATTRIBUTE(CKA_PKI_ATTRIBUTE_BER_ENCODED); /* (CKA_VENDOR_DEFINED + 0x0230) */
119
- PKCS11_DEFINE_ATTRIBUTE(CKA_HIFACE_MASTER); /* (CKA_VENDOR_DEFINED + 0x250) */
120
- PKCS11_DEFINE_ATTRIBUTE(CKA_SEED); /* (CKA_VENDOR_DEFINED + 0x260) */
121
- PKCS11_DEFINE_ATTRIBUTE(CKA_COUNTER); /* (CKA_VENDOR_DEFINED + 0x261) */
122
- PKCS11_DEFINE_ATTRIBUTE(CKA_H_VALUE); /* (CKA_VENDOR_DEFINED + 0x262) */
123
- PKCS11_DEFINE_ATTRIBUTE(CKA_INTERNAL_1); /* (CKA_VENDOR_DEFINED + 0x270) */
124
- PKCS11_DEFINE_ATTRIBUTE(CKA_ENUM_ATTRIBUTE); /* ((CK_ATTRIBUTE_TYPE)0xFFFF) */
125
- PKCS11_DEFINE_OBJECT_CLASS(CKO_CERTIFICATE_REQUEST); /* (CKO_VENDOR_DEFINED + 0x0201) */
126
- PKCS11_DEFINE_OBJECT_CLASS(CKO_CRL); /* (CKO_VENDOR_DEFINED + 0x0202) */
127
- PKCS11_DEFINE_OBJECT_CLASS(CKO_ADAPTER); /* (CKO_VENDOR_DEFINED + 0x020A) */
128
- PKCS11_DEFINE_OBJECT_CLASS(CKO_SLOT); /* (CKO_VENDOR_DEFINED + 0x020B) */
129
- PKCS11_DEFINE_OBJECT_CLASS(CKO_FM); /* (CKO_VENDOR_DEFINED + 0x020C) */
130
- PKCS11_DEFINE_RETURN_VALUE(CKR_ERACOM_ERROR); /* (CKR_VENDOR_DEFINED+0x100) */
131
- PKCS11_DEFINE_RETURN_VALUE(CKR_TIME_STAMP); /* (CKR_ERACOM_ERROR+0x01) */
132
- PKCS11_DEFINE_RETURN_VALUE(CKR_ACCESS_DENIED); /* (CKR_ERACOM_ERROR+0x02) */
133
- PKCS11_DEFINE_RETURN_VALUE(CKR_CRYPTOKI_UNUSABLE); /* (CKR_ERACOM_ERROR+0x03) */
134
- PKCS11_DEFINE_RETURN_VALUE(CKR_ENCODE_ERROR); /* (CKR_ERACOM_ERROR+0x04) */
135
- PKCS11_DEFINE_RETURN_VALUE(CKR_V_CONFIG); /* (CKR_ERACOM_ERROR+0x05) */
136
- PKCS11_DEFINE_RETURN_VALUE(CKR_SO_NOT_LOGGED_IN); /* (CKR_ERACOM_ERROR+0x06) */
137
- PKCS11_DEFINE_RETURN_VALUE(CKR_CERT_NOT_VALIDATED); /* (CKR_ERACOM_ERROR+0x07) */
138
- PKCS11_DEFINE_RETURN_VALUE(CKR_PIN_ALREADY_INITIALIZED); /* (CKR_ERACOM_ERROR+0x08) */
139
- PKCS11_DEFINE_RETURN_VALUE(CKR_REMOTE_SERVER_ERROR); /* (CKR_ERACOM_ERROR+0x0a) */
140
- PKCS11_DEFINE_RETURN_VALUE(CKR_CSA_HW_ERROR); /* (CKR_ERACOM_ERROR+0x0b) */
141
- PKCS11_DEFINE_RETURN_VALUE(CKR_NO_CHALLENGE); /* (CKR_ERACOM_ERROR+0x10) */
142
- PKCS11_DEFINE_RETURN_VALUE(CKR_RESPONSE_INVALID); /* (CKR_ERACOM_ERROR+0x11) */
143
- PKCS11_DEFINE_RETURN_VALUE(CKR_EVENT_LOG_NOT_FULL); /* (CKR_ERACOM_ERROR+0x13) */
144
- PKCS11_DEFINE_RETURN_VALUE(CKR_OBJECT_READ_ONLY); /* (CKR_ERACOM_ERROR+0x14) */
145
- PKCS11_DEFINE_RETURN_VALUE(CKR_TOKEN_READ_ONLY); /* (CKR_ERACOM_ERROR+0x15) */
146
- PKCS11_DEFINE_RETURN_VALUE(CKR_TOKEN_NOT_INITIALIZED); /* (CKR_ERACOM_ERROR+0x16) */
147
- PKCS11_DEFINE_RETURN_VALUE(CKR_NOT_ADMIN_TOKEN); /* (CKR_ERACOM_ERROR+0x17) */
148
- PKCS11_DEFINE_RETURN_VALUE(CKR_AUTHENTICATION_REQUIRED); /* (CKR_ERACOM_ERROR + 0x30) */
149
- PKCS11_DEFINE_RETURN_VALUE(CKR_OPERATION_NOT_PERMITTED); /* (CKR_ERACOM_ERROR + 0x31) */
150
- PKCS11_DEFINE_RETURN_VALUE(CKR_PKCS12_DECODE); /* (CKR_ERACOM_ERROR + 0x32) */
151
- PKCS11_DEFINE_RETURN_VALUE(CKR_PKCS12_UNSUPPORTED_SAFEBAG_TYPE); /* (CKR_ERACOM_ERROR + 0x33) */
152
- PKCS11_DEFINE_RETURN_VALUE(CKR_PKCS12_UNSUPPORTED_PRIVACY_MODE); /* (CKR_ERACOM_ERROR + 0x34) */
153
- PKCS11_DEFINE_RETURN_VALUE(CKR_PKCS12_UNSUPPORTED_INTEGRITY_MODE); /* (CKR_ERACOM_ERROR + 0x35) */
154
- PKCS11_DEFINE_RETURN_VALUE(CKR_ET_NOT_ODD_PARITY); /* (CKR_ERACOM_ERROR + 0x40) */
155
- PKCS11_DEFINE_RETURN_VALUE(CKR_HOST_ERROR); /* (CKR_VENDOR_DEFINED+0x1000) */
156
- PKCS11_DEFINE_RETURN_VALUE(CKR_BAD_REQUEST); /* (CKR_HOST_ERROR + 1) */
157
- PKCS11_DEFINE_RETURN_VALUE(CKR_BAD_ATTRIBUTE_PACKING); /* (CKR_HOST_ERROR + 2) */
158
- PKCS11_DEFINE_RETURN_VALUE(CKR_BAD_ATTRIBUTE_COUNT); /* (CKR_HOST_ERROR + 3) */
159
- PKCS11_DEFINE_RETURN_VALUE(CKR_BAD_PARAM_PACKING); /* (CKR_HOST_ERROR + 4) */
160
- PKCS11_DEFINE_RETURN_VALUE(CKR_EXTERN_DCP_ERROR); /* (CKR_HOST_ERROR + 0x386) */
161
- PKCS11_DEFINE_RETURN_VALUE(CKR_HIMK_NOT_FOUND); /* (CKR_HOST_ERROR + 0x400) */
162
- PKCS11_DEFINE_RETURN_VALUE(CKR_MSG_ERROR); /* (CKR_VENDOR_DEFINED+0x300) */
163
- PKCS11_DEFINE_RETURN_VALUE(CKR_CANNOT_DERIVE_KEYS); /* (CKR_MSG_ERROR + 0x81) */
164
- PKCS11_DEFINE_RETURN_VALUE(CKR_BAD_REQ_SIGNATURE); /* (CKR_MSG_ERROR + 0x82) */
165
- PKCS11_DEFINE_RETURN_VALUE(CKR_BAD_REPLY_SIGNATURE); /* (CKR_MSG_ERROR + 0x83) */
166
- PKCS11_DEFINE_RETURN_VALUE(CKR_SMS_ERROR); /* (CKR_MSG_ERROR + 0x84) */
167
- PKCS11_DEFINE_RETURN_VALUE(CKR_BAD_PROTECTION); /* (CKR_MSG_ERROR + 0x85) */
168
- PKCS11_DEFINE_RETURN_VALUE(CKR_DEVICE_RESET); /* (CKR_MSG_ERROR + 0x86) */
169
- PKCS11_DEFINE_RETURN_VALUE(CKR_NO_SESSION_KEYS); /* (CKR_MSG_ERROR + 0x87) */
170
- PKCS11_DEFINE_RETURN_VALUE(CKR_BAD_REPLY); /* (CKR_MSG_ERROR + 0x88) */
171
- PKCS11_DEFINE_RETURN_VALUE(CKR_KEY_ROLLOVER); /* (CKR_MSG_ERROR + 0x89) */
172
- PKCS11_DEFINE_RETURN_VALUE(CKR_NEED_IV_UPDATE); /* (CKR_MSG_ERROR+0x10) */
173
- PKCS11_DEFINE_RETURN_VALUE(CKR_DUPLICATE_IV_FOUND); /* (CKR_MSG_ERROR+0x11) */
174
- PKCS11_DEFINE_RETURN_VALUE(CKR_WLD_ERROR); /* (CKR_VENDOR_DEFINED + 0x2000) */
175
- PKCS11_DEFINE_RETURN_VALUE(CKR_WLD_CONFIG_NOT_FOUND); /* (CKR_WLD_ERROR) + 0x01 */
176
- PKCS11_DEFINE_RETURN_VALUE(CKR_WLD_CONFIG_ITEM_READ_FAILED); /* (CKR_WLD_ERROR) + 0x02 */
177
- PKCS11_DEFINE_RETURN_VALUE(CKR_WLD_CONFIG_NO_TOKEN_LABEL); /* (CKR_WLD_ERROR) + 0x03 */
178
- PKCS11_DEFINE_RETURN_VALUE(CKR_WLD_CONFIG_TOKEN_LABEL_LEN); /* (CKR_WLD_ERROR) + 0x04 */
179
- PKCS11_DEFINE_RETURN_VALUE(CKR_WLD_CONFIG_TOKEN_SERIAL_NUM_LEN); /* (CKR_WLD_ERROR) + 0x05 */
180
- PKCS11_DEFINE_RETURN_VALUE(CKR_WLD_CONFIG_SLOT_DESCRIPTION_LEN); /* (CKR_WLD_ERROR) + 0x06 */
181
- PKCS11_DEFINE_RETURN_VALUE(CKR_WLD_CONFIG_ITEM_FORMAT_INVALID); /* (CKR_WLD_ERROR) + 0x07 */
182
- PKCS11_DEFINE_RETURN_VALUE(CKR_WLD_LOGIN_CACHE_INCONSISTENT); /* (CKR_WLD_ERROR) + 0x10 */
@@ -1,206 +0,0 @@
1
- class PKCS11::ProtectServer::CK_DES_CBC_PARAMS < PKCS11::ProtectServer::CStruct
2
- # Size of corresponding C struct in bytes
3
- SIZEOF_STRUCT=Integer
4
- # @return [String] Binary copy of the C struct
5
- def to_s; end
6
- # @return [Array<String>] Attributes of this struct
7
- def members; end
8
- # @return [ASCII8BIT-String] accessor for iv (max 8 bytes)
9
- attr_accessor :iv
10
- # @return [ASCII8BIT-String] accessor for data (max 8 bytes)
11
- attr_accessor :data
12
- end
13
- class PKCS11::ProtectServer::CK_DES2_CBC_PARAMS < PKCS11::ProtectServer::CStruct
14
- # Size of corresponding C struct in bytes
15
- SIZEOF_STRUCT=Integer
16
- # @return [String] Binary copy of the C struct
17
- def to_s; end
18
- # @return [Array<String>] Attributes of this struct
19
- def members; end
20
- # @return [ASCII8BIT-String] accessor for iv (max 8 bytes)
21
- attr_accessor :iv
22
- # @return [ASCII8BIT-String] accessor for data (max 16 bytes)
23
- attr_accessor :data
24
- end
25
- class PKCS11::ProtectServer::CK_DES3_CBC_PARAMS < PKCS11::ProtectServer::CStruct
26
- # Size of corresponding C struct in bytes
27
- SIZEOF_STRUCT=Integer
28
- # @return [String] Binary copy of the C struct
29
- def to_s; end
30
- # @return [Array<String>] Attributes of this struct
31
- def members; end
32
- # @return [ASCII8BIT-String] accessor for iv (max 8 bytes)
33
- attr_accessor :iv
34
- # @return [ASCII8BIT-String] accessor for data (max 24 bytes)
35
- attr_accessor :data
36
- end
37
- class PKCS11::ProtectServer::CK_TIMESTAMP_PARAMS < PKCS11::ProtectServer::CStruct
38
- # Size of corresponding C struct in bytes
39
- SIZEOF_STRUCT=Integer
40
- # @return [String] Binary copy of the C struct
41
- def to_s; end
42
- # @return [Array<String>] Attributes of this struct
43
- def members; end
44
- # @return [Boolean] Bool value
45
- attr_accessor :useMilliseconds
46
- # @return [Integer] accessor for timestampFormat (CK_ULONG)
47
- attr_accessor :timestampFormat
48
- end
49
- class PKCS11::ProtectServer::CK_ATTRIBUTES < PKCS11::ProtectServer::CStruct
50
- # Size of corresponding C struct in bytes
51
- SIZEOF_STRUCT=Integer
52
- # @return [String] Binary copy of the C struct
53
- def to_s; end
54
- # @return [Array<String>] Attributes of this struct
55
- def members; end
56
- # @return [Array<PKCS11::CK_ATTRIBUTE>] accessor for attributes and count
57
- attr_accessor :attributes
58
- end
59
- class PKCS11::ProtectServer::CK_MECH_AND_OBJECT < PKCS11::ProtectServer::CStruct
60
- # Size of corresponding C struct in bytes
61
- SIZEOF_STRUCT=Integer
62
- # @return [String] Binary copy of the C struct
63
- def to_s; end
64
- # @return [Array<String>] Attributes of this struct
65
- def members; end
66
- # @return [PKCS11::CK_MECHANISM] inline struct (see pkcs11.gem)
67
- attr_accessor :mechanism
68
- # @return [Integer, PKCS11::Object] Object handle (CK_ULONG)
69
- attr_accessor :obj
70
- end
71
- class PKCS11::ProtectServer::CK_MECH_TYPE_AND_OBJECT < PKCS11::ProtectServer::CStruct
72
- # Size of corresponding C struct in bytes
73
- SIZEOF_STRUCT=Integer
74
- # @return [String] Binary copy of the C struct
75
- def to_s; end
76
- # @return [Array<String>] Attributes of this struct
77
- def members; end
78
- # @return [Integer] accessor for mechanism (CK_ULONG)
79
- attr_accessor :mechanism
80
- # @return [Integer, PKCS11::Object] Object handle (CK_ULONG)
81
- attr_accessor :obj
82
- end
83
- class PKCS11::ProtectServer::CK_MECH_AND_OBJECTS < PKCS11::ProtectServer::CStruct
84
- # Size of corresponding C struct in bytes
85
- SIZEOF_STRUCT=Integer
86
- # @return [String] Binary copy of the C struct
87
- def to_s; end
88
- # @return [Array<String>] Attributes of this struct
89
- def members; end
90
- # @return [Array<PKCS11::CK_MECH_AND_OBJECT>] accessor for mechanism and count
91
- attr_accessor :mechanism
92
- end
93
- class PKCS11::ProtectServer::CK_PKCS_7_PARAMS < PKCS11::ProtectServer::CStruct
94
- # Size of corresponding C struct in bytes
95
- SIZEOF_STRUCT=Integer
96
- # @return [String] Binary copy of the C struct
97
- def to_s; end
98
- # @return [Array<String>] Attributes of this struct
99
- def members; end
100
- # @return [Integer] accessor for flags (CK_ULONG)
101
- attr_accessor :flags
102
- # @return [Integer] accessor for length (CK_ULONG)
103
- attr_accessor :length
104
- # @return [PKCS11::ProtectServer::CK_MECH_AND_OBJECTS] inline struct
105
- attr_accessor :signature
106
- # @return [PKCS11::ProtectServer::CK_MECH_AND_OBJECTS] inline struct
107
- attr_accessor :encryption
108
- # @return [PKCS11::ProtectServer::CK_ATTRIBUTES] inline struct
109
- attr_accessor :extensions
110
- end
111
- class PKCS11::ProtectServer::CK_PP_LOAD_SECRET_PARAMS < PKCS11::ProtectServer::CStruct
112
- # Size of corresponding C struct in bytes
113
- SIZEOF_STRUCT=Integer
114
- # @return [String] Binary copy of the C struct
115
- def to_s; end
116
- # @return [Array<String>] Attributes of this struct
117
- def members; end
118
- # @return [USASCII-String, nil] accessor for prompt
119
- attr_accessor :prompt
120
- # @return [Boolean] Bool value
121
- attr_accessor :bMaskInput
122
- # @return [Integer] accessor for cConvert (CK_ULONG)
123
- attr_accessor :cConvert
124
- end
125
- class PKCS11::ProtectServer::CK_REPLICATE_TOKEN_PARAMS < PKCS11::ProtectServer::CStruct
126
- # Size of corresponding C struct in bytes
127
- SIZEOF_STRUCT=Integer
128
- # @return [String] Binary copy of the C struct
129
- def to_s; end
130
- # @return [Array<String>] Attributes of this struct
131
- def members; end
132
- # @return [USASCII-String] accessor for peerId (max 16 bytes)
133
- attr_accessor :peerId
134
- end
135
- class PKCS11::ProtectServer::CK_SECRET_SHARE_PARAMS < PKCS11::ProtectServer::CStruct
136
- # Size of corresponding C struct in bytes
137
- SIZEOF_STRUCT=Integer
138
- # @return [String] Binary copy of the C struct
139
- def to_s; end
140
- # @return [Array<String>] Attributes of this struct
141
- def members; end
142
- # @return [Integer] accessor for n (CK_ULONG)
143
- attr_accessor :n
144
- # @return [Integer] accessor for m (CK_ULONG)
145
- attr_accessor :m
146
- end
147
- class PKCS11::ProtectServer::CK_PKCS12_PBE_EXPORT_PARAMS < PKCS11::ProtectServer::CStruct
148
- # Size of corresponding C struct in bytes
149
- SIZEOF_STRUCT=Integer
150
- # @return [String] Binary copy of the C struct
151
- def to_s; end
152
- # @return [Array<String>] Attributes of this struct
153
- def members; end
154
- # @return [USASCII-String, nil] accessor for passwordAuthSafe and passwordAuthSafeLen
155
- attr_accessor :passwordAuthSafe
156
- # @return [USASCII-String, nil] accessor for passwordHMAC and passwordHMACLen
157
- attr_accessor :passwordHMAC
158
- # @return [Integer, PKCS11::Object] Object handle (CK_ULONG)
159
- attr_accessor :keyCert
160
- # @return [Integer] accessor for safeBagKgMech (CK_ULONG)
161
- attr_accessor :safeBagKgMech
162
- # @return [Integer] accessor for safeContentKgMech (CK_ULONG)
163
- attr_accessor :safeContentKgMech
164
- # @return [Integer] accessor for hmacKgMech (CK_ULONG)
165
- attr_accessor :hmacKgMech
166
- end
167
- class PKCS11::ProtectServer::CK_PKCS12_PBE_IMPORT_PARAMS < PKCS11::ProtectServer::CStruct
168
- # Size of corresponding C struct in bytes
169
- SIZEOF_STRUCT=Integer
170
- # @return [String] Binary copy of the C struct
171
- def to_s; end
172
- # @return [Array<String>] Attributes of this struct
173
- def members; end
174
- # @return [Array<PKCS11::CK_ATTRIBUTE>] accessor for certAttr and certAttrCount
175
- attr_accessor :certAttr
176
- # @return [USASCII-String, nil] accessor for passwordAuthSafe and passwordAuthSafeLen
177
- attr_accessor :passwordAuthSafe
178
- # @return [USASCII-String, nil] accessor for passwordHMAC and passwordHMACLen
179
- attr_accessor :passwordHMAC
180
- # @return [Integer, nil] accessor for hCertCount (CK_ULONG_PTR)
181
- attr_accessor :hCertCount
182
- end
183
- class PKCS11::ProtectServer::CK_ECIES_PARAMS < PKCS11::ProtectServer::CStruct
184
- # Size of corresponding C struct in bytes
185
- SIZEOF_STRUCT=Integer
186
- # @return [String] Binary copy of the C struct
187
- def to_s; end
188
- # @return [Array<String>] Attributes of this struct
189
- def members; end
190
- # @return [ASCII8BIT-String, nil] accessor for pSharedData1
191
- attr_accessor :pSharedData1
192
- # @return [ASCII8BIT-String, nil] accessor for pSharedData2
193
- attr_accessor :pSharedData2
194
- # @return [Integer] accessor for kdf (CK_ULONG)
195
- attr_accessor :kdf
196
- # @return [Integer] accessor for ulSharedDataLen1 (CK_ULONG)
197
- attr_accessor :ulSharedDataLen1
198
- # @return [Integer] accessor for ulEncKeyLenInBits (CK_ULONG)
199
- attr_accessor :ulEncKeyLenInBits
200
- # @return [Integer] accessor for ulMacKeyLenInBits (CK_ULONG)
201
- attr_accessor :ulMacKeyLenInBits
202
- # @return [Integer] accessor for ulMacLenInBits (CK_ULONG)
203
- attr_accessor :ulMacLenInBits
204
- # @return [Integer] accessor for ulSharedDataLen2 (CK_ULONG)
205
- attr_accessor :ulSharedDataLen2
206
- end
@@ -1,79 +0,0 @@
1
- PKCS11_DEFINE_STRUCT(CK_DES_CBC_PARAMS);
2
- PKCS11_DEFINE_MEMBER(CK_DES_CBC_PARAMS, iv);
3
- PKCS11_DEFINE_MEMBER(CK_DES_CBC_PARAMS, data);
4
-
5
- PKCS11_DEFINE_STRUCT(CK_DES2_CBC_PARAMS);
6
- PKCS11_DEFINE_MEMBER(CK_DES2_CBC_PARAMS, iv);
7
- PKCS11_DEFINE_MEMBER(CK_DES2_CBC_PARAMS, data);
8
-
9
- PKCS11_DEFINE_STRUCT(CK_DES3_CBC_PARAMS);
10
- PKCS11_DEFINE_MEMBER(CK_DES3_CBC_PARAMS, iv);
11
- PKCS11_DEFINE_MEMBER(CK_DES3_CBC_PARAMS, data);
12
-
13
- PKCS11_DEFINE_STRUCT(CK_TIMESTAMP_PARAMS);
14
- PKCS11_DEFINE_MEMBER(CK_TIMESTAMP_PARAMS, useMilliseconds);
15
- PKCS11_DEFINE_MEMBER(CK_TIMESTAMP_PARAMS, timestampFormat);
16
-
17
- PKCS11_DEFINE_STRUCT(CK_ATTRIBUTES);
18
- PKCS11_DEFINE_MEMBER(CK_ATTRIBUTES, attributes);
19
-
20
- PKCS11_DEFINE_STRUCT(CK_MECH_AND_OBJECT);
21
- PKCS11_DEFINE_MEMBER(CK_MECH_AND_OBJECT, mechanism);
22
- PKCS11_DEFINE_MEMBER(CK_MECH_AND_OBJECT, obj);
23
-
24
- PKCS11_DEFINE_STRUCT(CK_MECH_TYPE_AND_OBJECT);
25
- PKCS11_DEFINE_MEMBER(CK_MECH_TYPE_AND_OBJECT, mechanism);
26
- PKCS11_DEFINE_MEMBER(CK_MECH_TYPE_AND_OBJECT, obj);
27
-
28
- PKCS11_DEFINE_STRUCT(CK_MECH_AND_OBJECTS);
29
- PKCS11_DEFINE_MEMBER(CK_MECH_AND_OBJECTS, mechanism);
30
-
31
- PKCS11_DEFINE_STRUCT(CK_PKCS_7_PARAMS);
32
- PKCS11_DEFINE_MEMBER(CK_PKCS_7_PARAMS, flags);
33
- PKCS11_DEFINE_MEMBER(CK_PKCS_7_PARAMS, length);
34
- PKCS11_DEFINE_MEMBER(CK_PKCS_7_PARAMS, signature);
35
- PKCS11_DEFINE_MEMBER(CK_PKCS_7_PARAMS, encryption);
36
- PKCS11_DEFINE_MEMBER(CK_PKCS_7_PARAMS, extensions);
37
-
38
- PKCS11_DEFINE_STRUCT(CK_PP_LOAD_SECRET_PARAMS);
39
- PKCS11_DEFINE_MEMBER(CK_PP_LOAD_SECRET_PARAMS, prompt);
40
- PKCS11_DEFINE_MEMBER(CK_PP_LOAD_SECRET_PARAMS, bMaskInput);
41
- PKCS11_DEFINE_MEMBER(CK_PP_LOAD_SECRET_PARAMS, cConvert);
42
- /* unimplemented attr CK_CHAR cTimeout */
43
- /* unimplemented attr CK_CHAR reserved */
44
-
45
- PKCS11_DEFINE_STRUCT(CK_REPLICATE_TOKEN_PARAMS);
46
- PKCS11_DEFINE_MEMBER(CK_REPLICATE_TOKEN_PARAMS, peerId);
47
-
48
- PKCS11_DEFINE_STRUCT(CK_SECRET_SHARE_PARAMS);
49
- PKCS11_DEFINE_MEMBER(CK_SECRET_SHARE_PARAMS, n);
50
- PKCS11_DEFINE_MEMBER(CK_SECRET_SHARE_PARAMS, m);
51
-
52
- PKCS11_DEFINE_STRUCT(CK_PKCS12_PBE_EXPORT_PARAMS);
53
- PKCS11_DEFINE_MEMBER(CK_PKCS12_PBE_EXPORT_PARAMS, passwordAuthSafe);
54
- PKCS11_DEFINE_MEMBER(CK_PKCS12_PBE_EXPORT_PARAMS, passwordHMAC);
55
- PKCS11_DEFINE_MEMBER(CK_PKCS12_PBE_EXPORT_PARAMS, keyCert);
56
- PKCS11_DEFINE_MEMBER(CK_PKCS12_PBE_EXPORT_PARAMS, safeBagKgMech);
57
- PKCS11_DEFINE_MEMBER(CK_PKCS12_PBE_EXPORT_PARAMS, safeContentKgMech);
58
- PKCS11_DEFINE_MEMBER(CK_PKCS12_PBE_EXPORT_PARAMS, hmacKgMech);
59
-
60
- PKCS11_DEFINE_STRUCT(CK_PKCS12_PBE_IMPORT_PARAMS);
61
- PKCS11_DEFINE_MEMBER(CK_PKCS12_PBE_IMPORT_PARAMS, certAttr);
62
- PKCS11_DEFINE_MEMBER(CK_PKCS12_PBE_IMPORT_PARAMS, passwordAuthSafe);
63
- PKCS11_DEFINE_MEMBER(CK_PKCS12_PBE_IMPORT_PARAMS, passwordHMAC);
64
- /* unimplemented attr CK_OBJECT_HANDLE_PTR hCert */
65
- PKCS11_DEFINE_MEMBER(CK_PKCS12_PBE_IMPORT_PARAMS, hCertCount);
66
-
67
- PKCS11_DEFINE_STRUCT(CK_ECIES_PARAMS);
68
- PKCS11_DEFINE_MEMBER(CK_ECIES_PARAMS, pSharedData1);
69
- PKCS11_DEFINE_MEMBER(CK_ECIES_PARAMS, pSharedData2);
70
- /* unimplemented attr CK_EC_DH_PRIMITIVE dhPrimitive */
71
- PKCS11_DEFINE_MEMBER(CK_ECIES_PARAMS, kdf);
72
- PKCS11_DEFINE_MEMBER(CK_ECIES_PARAMS, ulSharedDataLen1);
73
- /* unimplemented attr CK_EC_ENC_SCHEME encScheme */
74
- PKCS11_DEFINE_MEMBER(CK_ECIES_PARAMS, ulEncKeyLenInBits);
75
- /* unimplemented attr CK_EC_MAC_SCHEME macScheme */
76
- PKCS11_DEFINE_MEMBER(CK_ECIES_PARAMS, ulMacKeyLenInBits);
77
- PKCS11_DEFINE_MEMBER(CK_ECIES_PARAMS, ulMacLenInBits);
78
- PKCS11_DEFINE_MEMBER(CK_ECIES_PARAMS, ulSharedDataLen2);
79
-
@@ -1,79 +0,0 @@
1
- PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_DES_CBC_PARAMS);
2
- PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_DES_CBC_PARAMS, iv, ascii8bit);
3
- PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_DES_CBC_PARAMS, data, ascii8bit);
4
-
5
- PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_DES2_CBC_PARAMS);
6
- PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_DES2_CBC_PARAMS, iv, ascii8bit);
7
- PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_DES2_CBC_PARAMS, data, ascii8bit);
8
-
9
- PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_DES3_CBC_PARAMS);
10
- PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_DES3_CBC_PARAMS, iv, ascii8bit);
11
- PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_DES3_CBC_PARAMS, data, ascii8bit);
12
-
13
- PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_TIMESTAMP_PARAMS);
14
- PKCS11_IMPLEMENT_BOOL_ACCESSOR(CK_TIMESTAMP_PARAMS, useMilliseconds);
15
- PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_TIMESTAMP_PARAMS, timestampFormat);
16
-
17
- PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_ATTRIBUTES);
18
- PKCS11_IMPLEMENT_PKCS11_STRUCT_PTR_ARRAY_ACCESSOR(CK_ATTRIBUTES, CK_ATTRIBUTE, attributes, count);
19
-
20
- PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_MECH_AND_OBJECT);
21
- PKCS11_IMPLEMENT_PKCS11_STRUCT_ACCESSOR(CK_MECH_AND_OBJECT, CK_MECHANISM, mechanism);
22
- PKCS11_IMPLEMENT_HANDLE_ACCESSOR(CK_MECH_AND_OBJECT, obj);
23
-
24
- PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_MECH_TYPE_AND_OBJECT);
25
- PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_MECH_TYPE_AND_OBJECT, mechanism);
26
- PKCS11_IMPLEMENT_HANDLE_ACCESSOR(CK_MECH_TYPE_AND_OBJECT, obj);
27
-
28
- PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_MECH_AND_OBJECTS);
29
- PKCS11_IMPLEMENT_STRUCT_PTR_ARRAY_ACCESSOR(CK_MECH_AND_OBJECTS, CK_MECH_AND_OBJECT, mechanism, count);
30
-
31
- PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_PKCS_7_PARAMS);
32
- PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_PKCS_7_PARAMS, flags);
33
- PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_PKCS_7_PARAMS, length);
34
- PKCS11_IMPLEMENT_STRUCT_ACCESSOR(CK_PKCS_7_PARAMS, CK_MECH_AND_OBJECTS, signature);
35
- PKCS11_IMPLEMENT_STRUCT_ACCESSOR(CK_PKCS_7_PARAMS, CK_MECH_AND_OBJECTS, encryption);
36
- PKCS11_IMPLEMENT_STRUCT_ACCESSOR(CK_PKCS_7_PARAMS, CK_ATTRIBUTES, extensions);
37
-
38
- PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_PP_LOAD_SECRET_PARAMS);
39
- PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_PP_LOAD_SECRET_PARAMS, prompt, usascii);
40
- PKCS11_IMPLEMENT_BOOL_ACCESSOR(CK_PP_LOAD_SECRET_PARAMS, bMaskInput);
41
- PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_PP_LOAD_SECRET_PARAMS, cConvert);
42
- /* unimplemented attr CK_CHAR cTimeout */
43
- /* unimplemented attr CK_CHAR reserved */
44
-
45
- PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_REPLICATE_TOKEN_PARAMS);
46
- PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_REPLICATE_TOKEN_PARAMS, peerId, usascii);
47
-
48
- PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_SECRET_SHARE_PARAMS);
49
- PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_SECRET_SHARE_PARAMS, n);
50
- PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_SECRET_SHARE_PARAMS, m);
51
-
52
- PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_PKCS12_PBE_EXPORT_PARAMS);
53
- PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_PKCS12_PBE_EXPORT_PARAMS, passwordAuthSafe, passwordAuthSafeLen, usascii);
54
- PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_PKCS12_PBE_EXPORT_PARAMS, passwordHMAC, passwordHMACLen, usascii);
55
- PKCS11_IMPLEMENT_HANDLE_ACCESSOR(CK_PKCS12_PBE_EXPORT_PARAMS, keyCert);
56
- PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_PKCS12_PBE_EXPORT_PARAMS, safeBagKgMech);
57
- PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_PKCS12_PBE_EXPORT_PARAMS, safeContentKgMech);
58
- PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_PKCS12_PBE_EXPORT_PARAMS, hmacKgMech);
59
-
60
- PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_PKCS12_PBE_IMPORT_PARAMS);
61
- PKCS11_IMPLEMENT_PKCS11_STRUCT_PTR_ARRAY_ACCESSOR(CK_PKCS12_PBE_IMPORT_PARAMS, CK_ATTRIBUTE, certAttr, certAttrCount);
62
- PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_PKCS12_PBE_IMPORT_PARAMS, passwordAuthSafe, passwordAuthSafeLen, usascii);
63
- PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_PKCS12_PBE_IMPORT_PARAMS, passwordHMAC, passwordHMACLen, usascii);
64
- /* unimplemented attr CK_OBJECT_HANDLE_PTR hCert */
65
- PKCS11_IMPLEMENT_ULONG_PTR_ACCESSOR(CK_PKCS12_PBE_IMPORT_PARAMS, hCertCount);
66
-
67
- PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_ECIES_PARAMS);
68
- PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_ECIES_PARAMS, pSharedData1, ascii8bit);
69
- PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_ECIES_PARAMS, pSharedData2, ascii8bit);
70
- /* unimplemented attr CK_EC_DH_PRIMITIVE dhPrimitive */
71
- PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_ECIES_PARAMS, kdf);
72
- PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_ECIES_PARAMS, ulSharedDataLen1);
73
- /* unimplemented attr CK_EC_ENC_SCHEME encScheme */
74
- PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_ECIES_PARAMS, ulEncKeyLenInBits);
75
- /* unimplemented attr CK_EC_MAC_SCHEME macScheme */
76
- PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_ECIES_PARAMS, ulMacKeyLenInBits);
77
- PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_ECIES_PARAMS, ulMacLenInBits);
78
- PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_ECIES_PARAMS, ulSharedDataLen2);
79
-