Rename OpenPGPCapabilities according to styleguide
This commit is contained in:
parent
2591d5dcb3
commit
c6ea5a3c65
|
@ -23,7 +23,7 @@ import java.io.IOException;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class OpenPGPCapabilities {
|
||||
public class OpenPgpCapabilities {
|
||||
private final static int MASK_SM = 1 << 7;
|
||||
private final static int MASK_KEY_IMPORT = 1 << 5;
|
||||
private final static int MASK_ATTRIBUTES_CHANGABLE = 1 << 2;
|
||||
|
@ -42,7 +42,7 @@ public class OpenPGPCapabilities {
|
|||
|
||||
private Map<KeyType, KeyFormat> mKeyFormats;
|
||||
|
||||
public OpenPGPCapabilities(byte[] data) throws IOException {
|
||||
public OpenPgpCapabilities(byte[] data) throws IOException {
|
||||
Iso7816TLV[] tlvs = Iso7816TLV.readList(data, true);
|
||||
mKeyFormats = new HashMap<>();
|
||||
if (tlvs.length == 1 && tlvs[0].mT == 0x6E) {
|
|
@ -65,7 +65,7 @@ public class SecurityTokenHelper {
|
|||
private static final byte[] BLANK_FINGERPRINT = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
private Transport mTransport;
|
||||
private CardCapabilities mCardCapabilities;
|
||||
private OpenPGPCapabilities mOpenPGPCapabilities;
|
||||
private OpenPgpCapabilities mOpenPgpCapabilities;
|
||||
|
||||
private Passphrase mPin;
|
||||
private Passphrase mAdminPin;
|
||||
|
@ -164,8 +164,8 @@ public class SecurityTokenHelper {
|
|||
throw new CardException("Initialization failed!", response.getSW());
|
||||
}
|
||||
|
||||
mOpenPGPCapabilities = new OpenPGPCapabilities(getData(0x00, 0x6E));
|
||||
mCardCapabilities = new CardCapabilities(mOpenPGPCapabilities.getHistoricalBytes());
|
||||
mOpenPgpCapabilities = new OpenPgpCapabilities(getData(0x00, 0x6E));
|
||||
mCardCapabilities = new CardCapabilities(mOpenPgpCapabilities.getHistoricalBytes());
|
||||
|
||||
mPw1ValidatedForSignature = false;
|
||||
mPw1ValidatedForDecrypt = false;
|
||||
|
@ -334,7 +334,7 @@ public class SecurityTokenHelper {
|
|||
|
||||
// Now we're ready to communicate with the token.
|
||||
byte[] bytes = SecurityTokenUtils.createPrivKeyTemplate(crtSecretKey, slot,
|
||||
mOpenPGPCapabilities.getFormatForKeyType(slot));
|
||||
mOpenPgpCapabilities.getFormatForKeyType(slot));
|
||||
|
||||
CommandAPDU apdu = new CommandAPDU(0x00, 0xDB, 0x3F, 0xFF, bytes);
|
||||
ResponseAPDU response = communicate(apdu);
|
||||
|
@ -469,7 +469,7 @@ public class SecurityTokenHelper {
|
|||
throw new CardException("Failed to sign", response.getSW());
|
||||
}
|
||||
|
||||
if (!mOpenPGPCapabilities.isPw1ValidForMultipleSignatures()) {
|
||||
if (!mOpenPgpCapabilities.isPw1ValidForMultipleSignatures()) {
|
||||
mPw1ValidatedForSignature = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue