Lines Matching refs:alias

97         public String requestPrivateKey(String alias) {
98 checkArgs(alias);
100 final String keystoreAlias = Credentials.USER_PRIVATE_KEY + alias;
116 @Override public byte[] getCertificate(String alias) {
117 checkArgs(alias);
118 return mKeyStore.get(Credentials.USER_CERTIFICATE + alias);
121 private void checkArgs(String alias) {
122 if (alias == null) {
131 if (!hasGrantInternal(mDatabaseHelper.getReadableDatabase(), callingUid, alias)) {
153 String alias) {
155 if (!mKeyStore.importKey(Credentials.USER_PRIVATE_KEY + alias, privateKey, -1,
157 Log.e(TAG, "Failed to import private key " + alias);
160 if (!mKeyStore.put(Credentials.USER_CERTIFICATE + alias, userCertificate, -1,
163 if (!mKeyStore.delKey(Credentials.USER_PRIVATE_KEY + alias)) {
185 for (String alias : mTrustedCertificateStore.aliases()) {
186 if (TrustedCertificateStore.isUser(alias)) {
187 if (!deleteCertificateEntry(alias)) {
197 @Override public boolean deleteCaCertificate(String alias) {
203 ok = deleteCertificateEntry(alias);
209 private boolean deleteCertificateEntry(String alias) {
211 mTrustedCertificateStore.deleteCertificateEntry(alias);
214 Log.w(TAG, "Problem removing CA certificate " + alias, e);
217 Log.w(TAG, "Problem removing CA certificate " + alias, e);
249 @Override public boolean hasGrant(int uid, String alias) {
251 return hasGrantInternal(mDatabaseHelper.getReadableDatabase(), uid, alias);
254 @Override public void setGrant(int uid, String alias, boolean value) {
256 setGrantInternal(mDatabaseHelper.getWritableDatabase(), uid, alias, value);
263 for (String alias : aliasSet) {
265 parcelableString.string = alias;
288 public boolean containsCaAlias(String alias) {
289 return mTrustedCertificateStore.containsAlias(alias);
293 public byte[] getEncodedCaCertificate(String alias, boolean includeDeletedSystem) {
296 .getCertificate(alias, includeDeletedSystem);
298 Log.w(TAG, "Could not find CA certificate " + alias);
304 Log.w(TAG, "Error while encoding CA certificate " + alias);
322 String alias = mTrustedCertificateStore.getCertificateAlias(chain.get(i),
324 if (alias != null) {
325 aliases.add(alias);
337 private boolean hasGrantInternal(final SQLiteDatabase db, final int uid, final String alias) { in hasGrantInternal() argument
339 new String[]{String.valueOf(uid), alias}); in hasGrantInternal()
344 final int uid, final String alias, final boolean value) { in setGrantInternal() argument
346 if (!hasGrantInternal(db, uid, alias)) { in setGrantInternal()
348 values.put(GRANTS_ALIAS, alias); in setGrantInternal()
354 new String[]{String.valueOf(uid), alias}); in setGrantInternal()