public class GMTlsUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
private static byte[] |
B0 |
private static byte[] |
HMAC_ipad128 |
private static byte[] |
HMAC_ipad64 |
private static byte[] |
HMAC_opad128 |
private static byte[] |
HMAC_opad64 |
(专用程序包) static byte[] |
LABEL_CLIENT_WRITE_KEY |
(专用程序包) static byte[] |
LABEL_EXTENDED_MASTER_SECRET |
(专用程序包) static byte[] |
LABEL_IV_BLOCK |
(专用程序包) static byte[] |
LABEL_KEY_EXPANSION |
(专用程序包) static byte[] |
LABEL_MASTER_SECRET |
(专用程序包) static byte[] |
LABEL_SERVER_WRITE_KEY |
| 构造器和说明 |
|---|
GMTlsUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
(专用程序包) static byte[] |
concat(byte[] b1,
byte[] b2) |
static void |
copyKeyStore(KeyStore srcKeyStore,
char[] srcStorePassword,
KeyStore destKeyStore,
char[] destStorePassword)
Copy source keystore to dest keystore.
|
(专用程序包) static byte[] |
doGMTLS11PRF(byte[] secret,
byte[] labelBytes,
byte[] seed,
int outputLength,
MessageDigest mdPRF,
int mdPRFLen,
int mdPRFBlockSize) |
(专用程序包) static byte[] |
doGMTLS11PRF(byte[] secret,
byte[] labelBytes,
byte[] seed,
int outputLength,
String prfHash,
int prfHashLength,
int prfBlockSize) |
private static void |
expand(MessageDigest digest,
int hmacSize,
byte[] secret,
int secOff,
int secLen,
byte[] label,
byte[] seed,
byte[] output,
byte[] pad1,
byte[] pad2) |
(专用程序包) static byte[] |
genPad(byte b,
int count) |
private static boolean |
isCA(X509Certificate certificate) |
static boolean |
isEncCert(X509Certificate certificate) |
static boolean |
isGMCert(X509Certificate certificate) |
static boolean |
isInvalidECCert(String keyType,
String sigAlgName) |
static boolean |
isInvalidECOrSM2Cert(String keyType,
String sigAlgName) |
static boolean |
isInvalidSM2Cert(String keyType,
String sigAlgName) |
static boolean |
isSignCert(X509Certificate certificate) |
private static final byte[] B0
static final byte[] LABEL_MASTER_SECRET
static final byte[] LABEL_EXTENDED_MASTER_SECRET
static final byte[] LABEL_KEY_EXPANSION
static final byte[] LABEL_CLIENT_WRITE_KEY
static final byte[] LABEL_SERVER_WRITE_KEY
static final byte[] LABEL_IV_BLOCK
private static final byte[] HMAC_ipad64
private static final byte[] HMAC_ipad128
private static final byte[] HMAC_opad64
private static final byte[] HMAC_opad128
static byte[] genPad(byte b,
int count)
static byte[] concat(byte[] b1,
byte[] b2)
static byte[] doGMTLS11PRF(byte[] secret,
byte[] labelBytes,
byte[] seed,
int outputLength,
String prfHash,
int prfHashLength,
int prfBlockSize)
throws NoSuchAlgorithmException,
DigestException
static byte[] doGMTLS11PRF(byte[] secret,
byte[] labelBytes,
byte[] seed,
int outputLength,
MessageDigest mdPRF,
int mdPRFLen,
int mdPRFBlockSize)
throws DigestException
DigestExceptionprivate static void expand(MessageDigest digest, int hmacSize, byte[] secret, int secOff, int secLen, byte[] label, byte[] seed, byte[] output, byte[] pad1, byte[] pad2) throws DigestException
DigestExceptionpublic static void copyKeyStore(KeyStore srcKeyStore, char[] srcStorePassword, KeyStore destKeyStore, char[] destStorePassword) throws KeyStoreException, UnrecoverableKeyException, NoSuchAlgorithmException
srcKeyStore - Source keystoresrcStorePassword - Source keystore passworddestKeyStore - Dest keystoredestStorePassword - Dest keystore passwordKeyStoreExceptionUnrecoverableKeyExceptionNoSuchAlgorithmExceptionpublic static boolean isGMCert(X509Certificate certificate)
public static boolean isSignCert(X509Certificate certificate)
public static boolean isEncCert(X509Certificate certificate)
private static boolean isCA(X509Certificate certificate)
Copyright © 2023. All rights reserved.