69 lines
2.3 KiB
Java
69 lines
2.3 KiB
Java
package org.bouncycastle.asn1.pkcs;
|
|
|
|
import org.bouncycastle.asn1.ASN1EncodableVector;
|
|
import org.bouncycastle.asn1.ASN1Object;
|
|
import org.bouncycastle.asn1.ASN1Primitive;
|
|
import org.bouncycastle.asn1.ASN1Sequence;
|
|
import org.bouncycastle.asn1.DERBitString;
|
|
import org.bouncycastle.asn1.DERSequence;
|
|
import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public class CertificationRequest extends ASN1Object {
|
|
public CertificationRequestInfo reqInfo;
|
|
public AlgorithmIdentifier sigAlgId;
|
|
public DERBitString sigBits;
|
|
|
|
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
|
|
public ASN1Primitive toASN1Primitive() {
|
|
ASN1EncodableVector aSN1EncodableVector = new ASN1EncodableVector();
|
|
aSN1EncodableVector.add(this.reqInfo);
|
|
aSN1EncodableVector.add(this.sigAlgId);
|
|
aSN1EncodableVector.add(this.sigBits);
|
|
return new DERSequence(aSN1EncodableVector);
|
|
}
|
|
|
|
public AlgorithmIdentifier getSignatureAlgorithm() {
|
|
return this.sigAlgId;
|
|
}
|
|
|
|
public DERBitString getSignature() {
|
|
return this.sigBits;
|
|
}
|
|
|
|
public CertificationRequestInfo getCertificationRequestInfo() {
|
|
return this.reqInfo;
|
|
}
|
|
|
|
public static CertificationRequest getInstance(Object obj) {
|
|
if (obj instanceof CertificationRequest) {
|
|
return (CertificationRequest) obj;
|
|
}
|
|
if (obj != null) {
|
|
return new CertificationRequest(ASN1Sequence.getInstance(obj));
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public CertificationRequest(CertificationRequestInfo certificationRequestInfo, AlgorithmIdentifier algorithmIdentifier, DERBitString dERBitString) {
|
|
this.reqInfo = certificationRequestInfo;
|
|
this.sigAlgId = algorithmIdentifier;
|
|
this.sigBits = dERBitString;
|
|
}
|
|
|
|
public CertificationRequest(ASN1Sequence aSN1Sequence) {
|
|
this.reqInfo = null;
|
|
this.sigAlgId = null;
|
|
this.sigBits = null;
|
|
this.reqInfo = CertificationRequestInfo.getInstance(aSN1Sequence.getObjectAt(0));
|
|
this.sigAlgId = AlgorithmIdentifier.getInstance(aSN1Sequence.getObjectAt(1));
|
|
this.sigBits = (DERBitString) aSN1Sequence.getObjectAt(2);
|
|
}
|
|
|
|
public CertificationRequest() {
|
|
this.reqInfo = null;
|
|
this.sigAlgId = null;
|
|
this.sigBits = null;
|
|
}
|
|
}
|