Brandon Weeks 5980f9d707 Adapt PublicKeyStoreTest to work with BouncyCastle 1.60
removePublicKey() operates by removing the chosen key and creating a
new PGPPublicKeyRing with the remainder. However, in BC 1.60[1], there
is new validation logic that requires the key in slot 0 to be a master
key.

In the test case, the master key is removed and reinserted, which
throws with the new validation. Fix it by removing the subkey before
attempting to remove the master key, and then adding it back.

[1] 1c3e644933

Change-Id: Iee072294488bfaaa9ff60b5a1a199a01f4c9800d
2018-11-05 10:00:40 +09:00
..