Module Smartcard::Iso::JcopRemoteServingStubs
In: lib/smartcard/iso/jcop_remote_server.rb

Stubs out the methods that can be implemented by the serving logic in a JCOP remote server. Serving logic classes should mix in this module, to avoid having unimplemented methods.

Methods

Public Instance methods

The smartcard‘s ATR.

[Source]

    # File lib/smartcard/iso/jcop_remote_server.rb, line 47
47:   def card_atr
48:     # ATR from the card simulator in JCOP 3.2.7.
49:     [0x3B, 0xF8, 0x13, 0x00, 0x00, 0x81, 0x31, 0xFE, 0x45, 0x4A, 0x43, 0x4F,
50:      0x50, 0x76, 0x32, 0x34, 0x31, 0xB7].pack('C*')
51:   end

Called when a client connection is closed.

This method serves as a notification to the serving logic implementation. Its return value is discarded.

[Source]

    # File lib/smartcard/iso/jcop_remote_server.rb, line 29
29:   def connection_end
30:     nil
31:   end

Called when a client connection accepted.

This method serves as a notification to the serving logic implementation. Its return value is discarded.

[Source]

    # File lib/smartcard/iso/jcop_remote_server.rb, line 21
21:   def connection_start
22:     nil
23:   end

Serving logic handling an APDU exchange.

The |apdu| parameter is the request APDU, formatted as an array of integers between 0 and 255. The method should return the response APDU, formatted in a similar manner.

[Source]

    # File lib/smartcard/iso/jcop_remote_server.rb, line 41
41:   def exchange_apdu(apdu)
42:     # Dumb implementation that always returns OK.
43:     [0x90, 0x00]
44:   end

[Validate]