没有合适的资源?快使用搜索试试~ 我知道了~
首页GP规范 GP Systems Scripting Language
资源详情
资源评论
资源推荐

Copyright 2003 GlobalPlatform Inc. All Rights Reserved.
The technology provided or described herein is subject to updates, revisions, and extensions by
GlobalPlatform. Use of this information is governed by the GlobalPlatform license agreement and any
use inconsistent with that agreement is strictly prohibited.
GlobalPlatform Systems
Scripting Language Specification
An ECMAScript Representation
Version 1.1.0
24 September 2003

9/24/2003 GlobalPlatform Systems Scripting Language Specification v1.1.0 ii
Copyright 2003 GlobalPlatform Inc. All Rights Reserved.
The technology provided or described herein is subject to updates, revisions, and extensions by
GlobalPlatform. Use of this information is governed by the GlobalPlatform license agreement and any
use inconsistent with that agreement is strictly prohibited.
Table of Contents
1. INTRODUCTION.......................................................................................................................................1
1.1 SUMMARY.........................................................................................................................................1
1.2 SCOPE .............................................................................................................................................1
1.3 AUDIENCE ........................................................................................................................................2
1.4 NORMATIVE REFERENCES .................................................................................................................2
1.4.1 List of References ...................................................................................................................2
1.4.2 GlobalPlatform Document Navigation.....................................................................................5
1.5 TERMINOLOGY AND DEFINITIONS .......................................................................................................5
1.6 ABBREVIATIONS AND NOTATIONS .....................................................................................................11
1.7 CONVENTIONS ................................................................................................................................12
1.8 REVISIONS HISTORY .......................................................................................................................12
1.8.1 Overview of Changes in Version 1.1.0 over Version 1.0 ......................................................12
2. OVERVIEW.............................................................................................................................................16
2.1 GLOBALPLATFORM INITIATIVE..........................................................................................................16
2.2 GLOBALPLATFORM CARD CUSTOMIZATION REQUIREMENTS ..............................................................17
3. ECMASCRIPT LANGUAGE CHOICE....................................................................................................19
4. GLOBALPLATFORM SCRIPTS OVERVIEW........................................................................................21
4.1 SCRIPT LANGUAGE .........................................................................................................................21
4.2 SCRIPT PROCESSING ......................................................................................................................21
4.2.1 Creating Objects for an Application (excluding Security Domain) ........................................23
4.2.2 Creating Objects for a Security Domain Application (including Card Manager) ...................26
4.2.3 Creating Objects for a Smart Card........................................................................................32
4.3 SCRIPT OBJECT CATEGORIES..........................................................................................................34
4.3.1 Overview of GP Scripting Language Native ECMAScript Objects........................................34
4.4 DESERIALIZING PROFILE XML CONTENT INTO SCRIPTING OBJECTS ..................................................42
4.4.1 Deserializing the XML Documents into the Profile Property .................................................42
4.4.1.1 Deserialization of Elements with Multiple Occurrances .................................................43
4.4.2 Deserializing DataElement and Declaration Elements into the Data Property .....................45
4.4.2.1 Impact of the ReadWrite Attribute on Deserialization ....................................................47
4.4.2.2 Impact of the Encoding Attribute on Deserializiation .....................................................47
4.4.2.3 Impact of the Tag Attribute on Deserializiation ..............................................................47
4.4.2.4 Impact of the Value, External and Optional Attributes on Deserializiation ....................48
4.4.2.5 Executing Successive Scripts and Data Scoping Between Scripts ...............................49
4.4.3 Deserializing Key and KeyDeclaration Elements into the Key Property...............................50
4.4.3.1 Executing Successive Scripts and Key Scoping Between Scripts.................................51
4.4.4 Deserializing Function Elements into Scripting Language Functions...................................51
4.5 CREATING AND USING SECURE CHANNEL OBJECTS..........................................................................52
4.5.1 Creating Secure Channel Objects.........................................................................................52
4.5.2 Opening Secure Channels ....................................................................................................52

9/24/2003 GlobalPlatform Systems Scripting Language Specification v1.1.0 iii
Copyright 2003 GlobalPlatform Inc. All Rights Reserved.
The technology provided or described herein is subject to updates, revisions, and extensions by
GlobalPlatform. Use of this information is governed by the GlobalPlatform license agreement and any
use inconsistent with that agreement is strictly prohibited.
4.5.3
Using Secure Channels.........................................................................................................53
5. GLOBAL GP SCRIPTING LANGUAGE CONSTANTS.........................................................................54
6. GLOBALPLATFORM OBJECT ERROR HANDLING...........................................................................55
7. GLOBALPLATFORM SCRIPTING OBJECTS......................................................................................56
7.1 GP SCRIPTING LANGUAGE NATIVE ECMASCRIPT OBJECTS .............................................................56
7.1.1 GPError .................................................................................................................................58
7.1.1.1 Summary........................................................................................................................58
7.1.1.2 Constants .......................................................................................................................58
7.1.1.3 Properties.......................................................................................................................58
7.1.1.3.1 className..................................................................................................................58
7.1.1.3.2 error............................................................................................................................59
7.1.1.3.3 message.....................................................................................................................59
7.1.1.3.4 name ..........................................................................................................................59
7.1.1.3.5 reason ........................................................................................................................59
7.1.1.4 Methods..........................................................................................................................59
7.1.1.4.1 Constructor.................................................................................................................59
7.1.2 Crypto....................................................................................................................................60
7.1.2.1 Summary........................................................................................................................60
7.1.2.2 Constants .......................................................................................................................60
7.1.2.3 Properties.......................................................................................................................61
7.1.2.4 Methods..........................................................................................................................61
7.1.2.4.1 Constructor() ..............................................................................................................61
7.1.2.4.2 decrypt() .....................................................................................................................61
7.1.2.4.3 decryptEncrypt().........................................................................................................62
7.1.2.4.4 deriveKey().................................................................................................................63
7.1.2.4.5 digest() .......................................................................................................................64
7.1.2.4.6 encrypt() .....................................................................................................................64
7.1.2.4.7 generateKey().............................................................................................................65
7.1.2.4.8 generateKeyPair() ......................................................................................................65
7.1.2.4.9 generateRandom() .....................................................................................................66
7.1.2.4.10 sign() ........................................................................................................................66
7.1.2.4.11 unwrap() ...................................................................................................................67
7.1.2.4.12 unwrapWrap()...........................................................................................................68
7.1.2.4.13 verify() ......................................................................................................................69
7.1.2.4.14 wrap() .......................................................................................................................69
7.1.3 GPSystem .............................................................................................................................71
7.1.3.1 Summary........................................................................................................................71
7.1.3.2 Constants .......................................................................................................................71
7.1.3.3 Properties.......................................................................................................................71
7.1.3.4 Methods..........................................................................................................................71
7.1.3.4.1 Constructor.................................................................................................................71
7.1.3.4.2 dateTimeByteString() .................................................................................................71
7.1.3.4.3 getSystemID() ............................................................................................................72

9/24/2003 GlobalPlatform Systems Scripting Language Specification v1.1.0 iv
Copyright 2003 GlobalPlatform Inc. All Rights Reserved.
The technology provided or described herein is subject to updates, revisions, and extensions by
GlobalPlatform. Use of this information is governed by the GlobalPlatform license agreement and any
use inconsistent with that agreement is strictly prohibited.
7.1.3.4.4
getVendorObject()......................................................................................................72
7.1.3.4.5 getVersion()................................................................................................................73
7.1.3.4.6 trace().........................................................................................................................73
7.1.3.4.7 wait()...........................................................................................................................74
7.1.4 Application.............................................................................................................................75
7.1.4.1 Summary........................................................................................................................75
7.1.4.2 Constants .......................................................................................................................75
7.1.4.3 Properties.......................................................................................................................75
7.1.4.3.1 aid...............................................................................................................................75
7.1.4.3.2 card ............................................................................................................................76
7.1.4.3.3 crypto..........................................................................................................................76
7.1.4.3.4 data[] ..........................................................................................................................76
7.1.4.3.5 key[]............................................................................................................................76
7.1.4.3.6 lifecycle.name.............................................................................................................77
7.1.4.3.7 lifecycle.value.............................................................................................................77
7.1.4.3.8 order...........................................................................................................................77
7.1.4.3.9 profile..........................................................................................................................77
7.1.4.3.10 secureChannel .........................................................................................................77
7.1.4.4 Methods..........................................................................................................................78
7.1.4.4.1 Constructor.................................................................................................................78
7.1.4.4.2 openSecureChannel()................................................................................................78
7.1.4.4.3 select()........................................................................................................................78
7.1.4.4.4 sendApdu().................................................................................................................79
7.1.5 GPApplication........................................................................................................................81
7.1.5.1 Summary........................................................................................................................81
7.1.5.2 Constants .......................................................................................................................81
7.1.5.3 Properties.......................................................................................................................82
7.1.5.3.1 aid...............................................................................................................................82
7.1.5.3.2 appSpecificInstallParams...........................................................................................82
7.1.5.3.3 card ............................................................................................................................82
7.1.5.3.4 crypto..........................................................................................................................82
7.1.5.3.5 data[] ..........................................................................................................................82
7.1.5.3.6 key[]............................................................................................................................83
7.1.5.3.7 lifecycle.name.............................................................................................................83
7.1.5.3.8 lifecycle.value.............................................................................................................83
7.1.5.3.9 nonVolatileDataSpaceLimit........................................................................................84
7.1.5.3.10 order.........................................................................................................................84
7.1.5.3.11 privilege....................................................................................................................84
7.1.5.3.12 profile........................................................................................................................84
7.1.5.3.13 securityDomain ........................................................................................................85
7.1.5.3.14 volatileDataSpaceLimit.............................................................................................85
7.1.5.4 Methods..........................................................................................................................85
7.1.5.4.1 Constructor.................................................................................................................85
7.1.5.4.2 getData() ....................................................................................................................85
7.1.5.4.3 getStatus()..................................................................................................................86

9/24/2003 GlobalPlatform Systems Scripting Language Specification v1.1.0 v
Copyright 2003 GlobalPlatform Inc. All Rights Reserved.
The technology provided or described herein is subject to updates, revisions, and extensions by
GlobalPlatform. Use of this information is governed by the GlobalPlatform license agreement and any
use inconsistent with that agreement is strictly prohibited.
7.1.5.4.4
putKey()......................................................................................................................86
7.1.5.4.5 select()........................................................................................................................88
7.1.5.4.6 sendApdu().................................................................................................................89
7.1.5.4.7 setStatus()..................................................................................................................90
7.1.5.4.8 storeData() .................................................................................................................91
7.1.6 GPSecurityDomain................................................................................................................92
7.1.6.1 Summary........................................................................................................................92
7.1.6.2 Constants .......................................................................................................................93
7.1.6.3 Properties.......................................................................................................................93
7.1.6.3.1 aid...............................................................................................................................93
7.1.6.3.2 appSpecificInstallParams...........................................................................................93
7.1.6.3.3 card ............................................................................................................................93
7.1.6.3.4 crypto..........................................................................................................................93
7.1.6.3.5 data[] ..........................................................................................................................93
7.1.6.3.6 key[]............................................................................................................................94
7.1.6.3.7 lifecycle.name.............................................................................................................94
7.1.6.3.8 lifecycle.value.............................................................................................................94
7.1.6.3.9 nonVolatileDataSpaceLimit........................................................................................95
7.1.6.3.10 order.........................................................................................................................95
7.1.6.3.11 privilege....................................................................................................................95
7.1.6.3.12 profile........................................................................................................................95
7.1.6.3.13 secureChannel .........................................................................................................96
7.1.6.3.14 securityDomain ........................................................................................................96
7.1.6.3.15 volatileDataSpaceLimit.............................................................................................96
7.1.6.4 Methods..........................................................................................................................96
7.1.6.4.1 Constructor.................................................................................................................96
7.1.6.4.2 deleteAID() .................................................................................................................96
7.1.6.4.3 getData() ....................................................................................................................97
7.1.6.4.4 getStatus()..................................................................................................................97
7.1.6.4.5 installForExtradition() .................................................................................................98
7.1.6.4.6 installForInstall().........................................................................................................99
7.1.6.4.7 installForInstallAndSelectable()..................................................................................99
7.1.6.4.8 installForLoad() ........................................................................................................100
7.1.6.4.9 installForPersonalization()........................................................................................101
7.1.6.4.10 load() ......................................................................................................................101
7.1.6.4.11 loadByName() ........................................................................................................102
7.1.6.4.12 loadWithProfile().....................................................................................................103
7.1.6.4.13 openSecureChannel()............................................................................................104
7.1.6.4.14 putKey()..................................................................................................................105
7.1.6.4.15 select()....................................................................................................................106
7.1.6.4.16 sendApdu().............................................................................................................107
7.1.6.4.17 setStatus()..............................................................................................................108
7.1.6.4.18 storeData() .............................................................................................................108
7.1.7 SecureChannel....................................................................................................................110
7.1.7.1 Summary......................................................................................................................110
剩余218页未读,继续阅读














安全验证
文档复制为VIP权益,开通VIP直接复制

评论1