Loading security/manager/ssl/nsIPK11Token.idl +2 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ interface nsIPK11Token : nsISupports readonly attribute AUTF8String tokenName; [must_use] readonly attribute AUTF8String tokenLabel; [must_use] readonly attribute boolean isInternalKeyToken; /** * Manufacturer ID of the token. */ Loading security/manager/ssl/nsPK11TokenDB.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,14 @@ nsPK11Token::GetTokenLabel(/*out*/ nsACString& tokenLabel) return GetAttributeHelper(mTokenLabel, tokenLabel); } NS_IMETHODIMP nsPK11Token::GetIsInternalKeyToken(/*out*/ bool* _retval) { NS_ENSURE_ARG_POINTER(_retval); *_retval = PK11_IsInternalKeySlot(mSlot.get()); return NS_OK; } NS_IMETHODIMP nsPK11Token::GetTokenManID(/*out*/ nsACString& tokenManufacturerID) { Loading security/manager/ssl/tests/unit/test_pkcs11_slot.js +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ function run_test() { notEqual(testToken, null, "getToken() should succeed"); equal(testToken.tokenLabel, "Test PKCS11 Tokeñ 2 Label", "Spot check: the actual and expected test token labels should be equal"); ok(!testToken.isInternalKeyToken, "This token is not the internal key token"); testSlot = testModule.findSlotByName("Empty PKCS11 Slot"); equal(testSlot.tokenName, null, "Empty slot is empty"); Loading security/manager/ssl/tests/unit/test_pkcs11_token.js +1 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ function run_test() { .getService(Ci.nsIPK11TokenDB); let token = tokenDB.getInternalKeyToken(); notEqual(token, null, "The internal token should be present"); ok(token.isInternalKeyToken, "The internal token should be represented as such"); checkBasicAttributes(token); Loading security/nss.symbols +1 −0 Original line number Diff line number Diff line Loading @@ -399,6 +399,7 @@ PK11_IsFIPS PK11_IsFriendly PK11_IsHW PK11_IsInternal PK11_IsInternalKeySlot PK11_IsLoggedIn PK11_IsPresent PK11_IsReadOnly Loading Loading
security/manager/ssl/nsIPK11Token.idl +2 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ interface nsIPK11Token : nsISupports readonly attribute AUTF8String tokenName; [must_use] readonly attribute AUTF8String tokenLabel; [must_use] readonly attribute boolean isInternalKeyToken; /** * Manufacturer ID of the token. */ Loading
security/manager/ssl/nsPK11TokenDB.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,14 @@ nsPK11Token::GetTokenLabel(/*out*/ nsACString& tokenLabel) return GetAttributeHelper(mTokenLabel, tokenLabel); } NS_IMETHODIMP nsPK11Token::GetIsInternalKeyToken(/*out*/ bool* _retval) { NS_ENSURE_ARG_POINTER(_retval); *_retval = PK11_IsInternalKeySlot(mSlot.get()); return NS_OK; } NS_IMETHODIMP nsPK11Token::GetTokenManID(/*out*/ nsACString& tokenManufacturerID) { Loading
security/manager/ssl/tests/unit/test_pkcs11_slot.js +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ function run_test() { notEqual(testToken, null, "getToken() should succeed"); equal(testToken.tokenLabel, "Test PKCS11 Tokeñ 2 Label", "Spot check: the actual and expected test token labels should be equal"); ok(!testToken.isInternalKeyToken, "This token is not the internal key token"); testSlot = testModule.findSlotByName("Empty PKCS11 Slot"); equal(testSlot.tokenName, null, "Empty slot is empty"); Loading
security/manager/ssl/tests/unit/test_pkcs11_token.js +1 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ function run_test() { .getService(Ci.nsIPK11TokenDB); let token = tokenDB.getInternalKeyToken(); notEqual(token, null, "The internal token should be present"); ok(token.isInternalKeyToken, "The internal token should be represented as such"); checkBasicAttributes(token); Loading
security/nss.symbols +1 −0 Original line number Diff line number Diff line Loading @@ -399,6 +399,7 @@ PK11_IsFIPS PK11_IsFriendly PK11_IsHW PK11_IsInternal PK11_IsInternalKeySlot PK11_IsLoggedIn PK11_IsPresent PK11_IsReadOnly Loading