org.globalplatform
Interface SecureChannelx2

All Superinterfaces:
SecureChannel, javacard.framework.Shareable

public interface SecureChannelx2
extends SecureChannel

This interface is an extension of the SecureChannel interface that defines one supplementary method overriding the SecureChannel.processSecurity(javacard.framework.APDU) method.

An Application that wishes to use the SecureChannelx2 interface shall obtain a reference to a SecureChannel instance and try to cast it to the SecureChannelx2 interface. Whether the objects returned by the GPSystem.getSecureChannel() method also implement the SecureChannelx2 interface is implementation dependent, however, this may be expressed as a requirement in specific GlobalPlatform configuration documents.

Since:

Field Summary
 
Fields inherited from interface org.globalplatform.SecureChannel
ANY_AUTHENTICATED, AUTHENTICATED, C_DECRYPTION, C_MAC, NO_SECURITY_LEVEL, R_ENCRYPTION, R_MAC
 
Method Summary
 short processSecurity(byte[] baBuffer, short sInOffset, short sInLength, short sOutOffset)
          Processes security related APDU commands, that is, APDU commands relating to the underlying security protocol.
 
Methods inherited from interface org.globalplatform.SecureChannel
decryptData, encryptData, getSecurityLevel, processSecurity, resetSecurity, unwrap, wrap
 

Method Detail

processSecurity

short processSecurity(byte[] baBuffer,
                      short sInOffset,
                      short sInLength,
                      short sOutOffset)
                      throws javacard.framework.ISOException
Processes security related APDU commands, that is, APDU commands relating to the underlying security protocol.

This method shall be used in the same way as the SecureChannel.processSecurity(javacard.framework.APDU) method, except that the incoming APDU command shall be read from, and any response data shall be written to the baBuffer byte array.

Notes:

Parameters:
baBuffer - byte array containing the incoming APDU command.
sInOffset - offset of the incoming APDU command, i.e. offset of the class byte.
sInLength - length of the incoming APDU command, i.e length of the entire APDU command (header + data field).
sOutOffset - offset within baBuffer where response data (if any) shall be written.
Returns:
the number of bytes to be output (i.e. length of response data).
Throws:
javacard.framework.ISOException - with a reason code reflecting some error detected by the underlying security protocol, or with one of the following reason codes if the APDU command is not recognized and does not relate to the underlying security protocol:
  • '6E00' if the class byte of the command is not recognized by this method.
  • '6D00' if the instruction byte of the command is not recognized by this method.
java.lang.SecurityException - if baBuffer is not accessible in the caller's context e.g. baBuffer is not a global array nor an array belonging to the caller context.
java.lang.NullPointerException - if baBuffer is null.
java.lang.ArrayIndexOutOfBoundsException - if reading the incoming APDU command would cause access of data outside array bounds.


Copyright © 2003-2014 GlobalPlatform, Inc. All rights reserved. The technology provided or described in this specification is subject to updates, revisions, and extensions by GlobalPlatform. Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights or other intellectual property rights of which they may be aware which might be necessarily infringed by the implementation of the specification or other work product set forth in this document, and to provide supporting documentation.
THIS SPECIFICATION OR OTHER WORK PRODUCT IS BEING OFFERED WITHOUT ANY WARRANTY WHATSOEVER, AND IN PARTICULAR, ANY WARRANTY OF NON-INFRINGEMENT IS EXPRESSLY DISCLAIMED. ANY IMPLEMENTATION OF THIS SPECIFICATION OR OTHER WORK PRODUCT SHALL BE MADE ENTIRELY AT THE IMPLEMENTER'S OWN RISK, AND NEITHER THE COMPANY, NOR ANY OF ITS MEMBERS OR SUBMITTERS, SHALL HAVE ANY LIABILITY WHATSOEVER TO ANY IMPLEMENTER OR THIRD PARTY FOR ANY DAMAGES OF ANY NATURE WHATSOEVER DIRECTLY OR INDIRECTLY ARISING FROM THE IMPLEMENTATION OF THIS SPECIFICATION OR OTHER WORK PRODUCT.