Class: Tem::Session
- Inherits:
-
Object
- Object
- Tem::Session
- Includes:
- Abi, Apdus::Buffers, Apdus::Keys, Apdus::Lifecycle, Apdus::Tag, CA, ECert, SeClosures, Toolkit
- Defined in:
- lib/tem/tem.rb
Constant Summary collapse
- CAPPLET_AID =
[0x19, 0x83, 0x12, 0x29, 0x10, 0xBA, 0xBE]
Instance Attribute Summary collapse
-
#transport ⇒ Object
readonly
Returns the value of attribute transport.
Instance Method Summary collapse
- #disconnect ⇒ Object
-
#initialize(transport) ⇒ Session
constructor
A new instance of Session.
- #tem_secpack_error(response) ⇒ Object
Methods included from Toolkit
#tk_delete_key, #tk_gen_key, #tk_post_key, #tk_read_key
Methods included from SeClosures
#execute, included, #sec_trace, #solve_psfault
Methods included from Tem::SeClosures::MixedMethods
Methods included from ECert
#emit, #endorsement_cert, #manufacturer_cert, #pubek, #set_ecert
Methods included from CA
ca_cert, ca_key, config, #new_ecert, scaffold_ca, scaffold_config
Methods included from Apdus::Tag
#get_tag, #get_tag_data, #get_tag_length, #set_tag
Methods included from Apdus::Lifecycle
Methods included from Apdus::Keys
#devchip_decrypt, #devchip_encrypt, #devchip_encrypt_decrypt, #devchip_generate_key_pair, #devchip_release_key, #devchip_save_key, #stat_keys
Methods included from Apdus::Buffers
#alloc_buffer, #flush_buffers, #get_buffer_length, #guess_buffer_chunk_size, #guess_buffer_chunk_size!, #post_buffer, #read_buffer, #release_buffer, #stat_buffers, #write_buffer
Methods included from Abi
Constructor Details
#initialize(transport) ⇒ Session
Returns a new instance of Session.
17 18 19 20 21 |
# File 'lib/tem/tem.rb', line 17 def initialize(transport) @transport = transport @transport.extend Smartcard::Gp::GpCardMixin @transport.select_application CAPPLET_AID end |
Instance Attribute Details
#transport ⇒ Object (readonly)
Returns the value of attribute transport.
15 16 17 |
# File 'lib/tem/tem.rb', line 15 def transport @transport end |
Instance Method Details
#disconnect ⇒ Object
23 24 25 26 27 |
# File 'lib/tem/tem.rb', line 23 def disconnect return unless @transport @transport.disconnect @transport = nil end |
#tem_secpack_error(response) ⇒ Object
29 30 31 |
# File 'lib/tem/tem.rb', line 29 def tem_secpack_error(response) raise "TEM refused the SECpack" end |