aboutsummaryrefslogtreecommitdiffstats
path: root/org_apg
diff options
context:
space:
mode:
authorDominik <dominik@dominikschuermann.de>2012-11-02 10:54:27 +0100
committerDominik <dominik@dominikschuermann.de>2012-11-02 10:54:27 +0100
commit8aac7ea7be1172f1dc0713fa5cf75fc95f082aa3 (patch)
tree635ab27e13f751c2ccbb71330dee856e3d2db024 /org_apg
parentbeb2ad0047fb3ee48a5b9ad9cbaf5704d4a2e458 (diff)
downloadopen-keychain-8aac7ea7be1172f1dc0713fa5cf75fc95f082aa3.tar.gz
open-keychain-8aac7ea7be1172f1dc0713fa5cf75fc95f082aa3.tar.bz2
open-keychain-8aac7ea7be1172f1dc0713fa5cf75fc95f082aa3.zip
removed check again as dsa as subkey of rsa is working again
Diffstat (limited to 'org_apg')
-rw-r--r--org_apg/res/values/strings.xml1
-rw-r--r--org_apg/src/org/thialfihar/android/apg/helper/PGPMain.java8
2 files changed, 1 insertions, 8 deletions
diff --git a/org_apg/res/values/strings.xml b/org_apg/res/values/strings.xml
index b7d9d1cc9..3f1692023 100644
--- a/org_apg/res/values/strings.xml
+++ b/org_apg/res/values/strings.xml
@@ -260,7 +260,6 @@
<string name="error_wrongPassPhrase">wrong passphrase</string>
<string name="error_savingKeys">error saving some key(s)</string>
<string name="error_couldNotExtractPrivateKey">could not extract private key</string>
- <string name="error_couldNotAddDSASubkey">Master key must be DSA to add DSA subkeys</string>
<!-- progress_lowerCase: lowercase, phrases, usually ending in '…' -->
<string name="progress_done">done.</string>
diff --git a/org_apg/src/org/thialfihar/android/apg/helper/PGPMain.java b/org_apg/src/org/thialfihar/android/apg/helper/PGPMain.java
index e93fe0892..902c996b8 100644
--- a/org_apg/src/org/thialfihar/android/apg/helper/PGPMain.java
+++ b/org_apg/src/org/thialfihar/android/apg/helper/PGPMain.java
@@ -22,7 +22,6 @@ import org.spongycastle.bcpg.ArmoredOutputStream;
import org.spongycastle.bcpg.BCPGOutputStream;
import org.spongycastle.bcpg.CompressionAlgorithmTags;
import org.spongycastle.bcpg.HashAlgorithmTags;
-import org.spongycastle.bcpg.PublicKeyAlgorithmTags;
import org.spongycastle.bcpg.SymmetricKeyAlgorithmTags;
import org.spongycastle.bcpg.sig.KeyFlags;
import org.spongycastle.jce.provider.BouncyCastleProvider;
@@ -231,11 +230,6 @@ public class PGPMain {
switch (algorithmChoice) {
case Id.choice.algorithm.dsa: {
- if (masterSecretKey != null
- && masterSecretKey.getPublicKey().getAlgorithm() != PublicKeyAlgorithmTags.DSA) {
- throw new ApgGeneralException(
- context.getString(R.string.error_couldNotAddDSASubkey));
- }
keyGen = KeyPairGenerator.getInstance("DSA", BOUNCY_CASTLE_PROVIDER_NAME);
keyGen.initialize(keySize, new SecureRandom());
algorithm = PGPPublicKey.DSA;
@@ -290,7 +284,7 @@ public class PGPMain {
if (masterSecretKey == null) {
certificationSignerBuilder = new JcaPGPContentSignerBuilder(keyPair.getPublicKey()
.getAlgorithm(), HashAlgorithmTags.SHA1);
-
+
// build keyRing with only this one master key in it!
ringGen = new PGPKeyRingGenerator(PGPSignature.POSITIVE_CERTIFICATION, keyPair, "",
sha1Calc, null, null, certificationSignerBuilder, keyEncryptor);