Home | History | Annotate | Download | only in pm

Lines Matching full:keyset

19 import android.content.pm.KeySet;
39 * Manages system-wide KeySet state.
45 /** Sentinel value returned when a {@code KeySet} is not found. */
53 private final LongSparseArray<KeySet> mKeySets;
66 mKeySets = new LongSparseArray<KeySet>();
73 * Determine if a package is signed by the given KeySet.
76 * keys in the KeySet.
79 * keys in the given KeySet.
83 public boolean packageIsSignedBy(String packageName, KeySet ks) {
90 throw new NullPointerException("Package has no KeySet data");
98 * This informs the system that the given package has defined a KeySet
105 //Log.d(TAG, "Got null argument for a defined keyset, ignoring!");
109 KeySet ks = addKeySetLocked(keys);
121 * was signed by the provided KeySet.
126 //Log.d(TAG, "Got null argument for a signing keyset, ignoring!");
130 // add the signing KeySet
131 KeySet ks = addKeySetLocked(signingKeys);
135 throw new NullPointerException("Got invalid KeySet id");
145 // for each KeySet the package defines which is a subset of
146 // the one above, add the KeySet id to the package's signing KeySets
157 * Fetches the stable identifier associated with the given KeySet. Returns
158 * {@link #KEYSET_NOT_FOUND} if the KeySet... wasn't found.
160 public long getIdByKeySet(KeySet ks) {
166 private long getIdByKeySetLocked(KeySet ks) {
168 KeySet value = mKeySets.valueAt(keySetIndex);
177 * Fetches the KeySet corresponding to the given stable identifier.
180 * identify a {@link KeySet}.
182 public KeySet getKeySetById(long id) {
189 * Fetches the KeySet that a given package refers to by the provided alias.
194 public KeySet getKeySetByAliasAndPackageName(String packageName, String alias) {
201 throw new IllegalArgumentException("Package has no keySet data");
209 * Fetches all the known {@link KeySet KeySets} that signed the given
212 public Set<KeySet> getSigningKeySetsByPackageName(String packageName) {
214 Set<KeySet> signingKeySets = new HashSet<KeySet>();
220 throw new IllegalArgumentException("Package has no keySet data");
230 * Creates a new KeySet corresponding to the given keys.
235 * If the KeySet isn't known to the system, this adds that and creates the
240 private KeySet addKeySetLocked(Set<PublicKey> keys) {
251 // check to see if the resulting keyset is new
257 // create the KeySet object
258 KeySet ks = new KeySet(new Binder());
261 // add the KeySet object to it
287 * Finds the stable identifier for a KeySet based on a set of PublicKey stable IDs.
317 * Gets an unused stable identifier for a KeySet.
346 for (String pkgName : mPackages.keySet()) {
372 for (String pkgName : mPackages.keySet()) {
388 throw new IllegalArgumentException("Package has no keySet data");
469 serializer.startTag(null, "keyset-settings");
478 serializer.endTag(null, "keyset-settings");
500 serializer.startTag(null, "keyset");
507 serializer.endTag(null, "keyset");
560 if (tagName.equals("keyset")) {
562 mKeySets.put(currentKeySetId, new KeySet(new Binder()));