public interface SecureChannelx2 extends SecureChannel
SecureChannel
interface that
defines one supplementary method overloading 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.
ANY_AUTHENTICATED, AUTHENTICATED, C_DECRYPTION, C_MAC, NO_SECURITY_LEVEL, R_ENCRYPTION, R_MAC
Modifier and Type | Method and Description |
---|---|
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.
|
decryptData, encryptData, getSecurityLevel, processSecurity, resetSecurity, unwrap, wrap
short processSecurity(byte[] baBuffer, short sInOffset, short sInLength, short sOutOffset) throws javacard.framework.ISOException
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:
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.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: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-2018 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.