Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/java/org/bouncycastle/asn1/mozilla/PublicKeyAndChallenge.java')
-rw-r--r--core/src/main/java/org/bouncycastle/asn1/mozilla/PublicKeyAndChallenge.java63
1 files changed, 0 insertions, 63 deletions
diff --git a/core/src/main/java/org/bouncycastle/asn1/mozilla/PublicKeyAndChallenge.java b/core/src/main/java/org/bouncycastle/asn1/mozilla/PublicKeyAndChallenge.java
deleted file mode 100644
index b4e44bf5..00000000
--- a/core/src/main/java/org/bouncycastle/asn1/mozilla/PublicKeyAndChallenge.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.bouncycastle.asn1.mozilla;
-
-import org.bouncycastle.asn1.ASN1Object;
-import org.bouncycastle.asn1.ASN1Primitive;
-import org.bouncycastle.asn1.ASN1Sequence;
-import org.bouncycastle.asn1.DERIA5String;
-import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo;
-
-/**
- * This is designed to parse
- * the PublicKeyAndChallenge created by the KEYGEN tag included by
- * Mozilla based browsers.
- * <pre>
- * PublicKeyAndChallenge ::= SEQUENCE {
- * spki SubjectPublicKeyInfo,
- * challenge IA5STRING
- * }
- *
- * </pre>
- */
-public class PublicKeyAndChallenge
- extends ASN1Object
-{
- private ASN1Sequence pkacSeq;
- private SubjectPublicKeyInfo spki;
- private DERIA5String challenge;
-
- public static PublicKeyAndChallenge getInstance(Object obj)
- {
- if (obj instanceof PublicKeyAndChallenge)
- {
- return (PublicKeyAndChallenge)obj;
- }
- else if (obj != null)
- {
- return new PublicKeyAndChallenge(ASN1Sequence.getInstance(obj));
- }
-
- return null;
- }
-
- private PublicKeyAndChallenge(ASN1Sequence seq)
- {
- pkacSeq = seq;
- spki = SubjectPublicKeyInfo.getInstance(seq.getObjectAt(0));
- challenge = DERIA5String.getInstance(seq.getObjectAt(1));
- }
-
- public ASN1Primitive toASN1Primitive()
- {
- return pkacSeq;
- }
-
- public SubjectPublicKeyInfo getSubjectPublicKeyInfo()
- {
- return spki;
- }
-
- public DERIA5String getChallenge()
- {
- return challenge;
- }
-}