新蒲京棋牌

TTSDK(TrustTracker SDK,简称TTSDK),由江苏先安有限公司开辟,用于考证和追溯APK(Android Application Package file)署名。

TTSDK分两个版本:TTSDK-Android和TTSDK-PC。TTSDK以Jar包的情势供给,封装了Android体系下PKI相干的功能模块,供给了对Android APK中署名文件的剖析、副署署名的考证,撑持经由过程SVS和OCSP两种方法查询署名证书形态。利用TTSDK能够便利快速的将考证和追溯APK署名的代码集成到已有的平台大概APP中。

TTSDK的利用答应以下:

TTSDK答应比力
版本/特性 TTSDK-Android TTSDK-PC(免费版) TTSDK-PC(商业版)
利用情况 Android PC/服务器 PC/服务器
利用限定 仅可自用,不得出卖、让渡、分发 无(需求来自江苏先安有限公司的书面授权答应)
技术支持 E-mail/电话 E-mail E-mail/电话/现场(需另外付费)

部门示例代码以下:
1)对未安装的APK考证其原生署名

//起首得到未安装APK的全途径
String apkPath ="../../XXX.apk";

//然后挪用TTAPKSignatureVerifier的静态函数考证便可
boolean result = TTAPKSignatureVerifier. verifySignature (apkPath);

2)判定APK(已安装)能否含有副署署名,如有并考证署名

PackageInfo packageInfo = ...;//得到App 的PackageInfo工具
//读取 Apk 中的包罗署名信息的RSA数据
byte[] rsaData = TTCounterSignatureTracker.readRSAFile(packageInfo);
//机关副署署名的 Verifier
TTCounterSignatureVerifier csVerifier = new TTCounterSignatureVerifier(rsaData);
//判定 RSA 数据中能否含有副署署名
Boolean hasCounterSign = csVerifier.hasCounterSignature();
if (hasCounterSign) {
  //校验RSA数据中的副署署名能否准确,这里校验每个副署署名,只要一个副署署名考证失利,
  //则返回考证成果false,局部都经由过程,返回true
  Boolean isCSCorrect = csVerifier.verifyCounterSignature();
  ....
}

3)判定APK(未安装)能否含有副署署名,假如有考证副署署名

//起首得到未安装APK的全途径
String apkPath = "../../XX.APK";//得到App的全途径

//然后机关副署署名考证器
TTCounterSignatureVerifier verifier= new TTCounterSignatureVerifier (apkPath);

//判定能否含有副署署名,假如有则考证副署署名
if(verifier. hasCounterSignature()){
  boolean result = verifier. verifyCounterSignature();
}

4)在线查询数字证书形态

//在线SVS方法考证证书形态
String entityCert = "MII..";//实体证书
//机关SVS方法的证书考证器
TTSVSVerifier svsVerifier =new TTSVSVerifier();
//考证证书
boolean result = svsVerifier.verify(entityCert);
//假如考证成果失利,获得错误代码
if(!result){
	String errorCode = svsVerifier.getErrorCode();
}

TTSDK-Andorid 今朝最新的版本是v1.1.0,下载地址以下:

下载 “TTSDK-Android v1.1.0” ttsdk-android-1.1.0.zip – 已下载3546次 – 2 MB

TTSDK-PC今朝最新的版本是v1.1.0,下载地址以下:

下载 “TTSDK-PC v1.1.0” ttsdk-pc-1.1.0.zip – 已下载1793次 – 2 MB

TTSDK利用了BouncyCastle库, 上面是BouncyCastle答应信息:

LICENSE
Copyright (c) 2000 – 2013 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.