org.testifyproject.bouncycastle.asn1.test.GetInstanceTest Maven / Gradle / Ivy
The newest version!
package org.testifyproject.bouncycastle.asn1.test;
import java.lang.reflect.Method;
import java.math.BigInteger;
import java.util.Date;
import java.util.Vector;
import junit.framework.TestCase;
import org.testifyproject.bouncycastle.asn1.ASN1EncodableVector;
import org.testifyproject.bouncycastle.asn1.ASN1Enumerated;
import org.testifyproject.bouncycastle.asn1.ASN1GeneralizedTime;
import org.testifyproject.bouncycastle.asn1.ASN1Integer;
import org.testifyproject.bouncycastle.asn1.ASN1Object;
import org.testifyproject.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.testifyproject.bouncycastle.asn1.ASN1TaggedObject;
import org.testifyproject.bouncycastle.asn1.ASN1UTCTime;
import org.testifyproject.bouncycastle.asn1.DERBMPString;
import org.testifyproject.bouncycastle.asn1.DERBitString;
import org.testifyproject.bouncycastle.asn1.DERGeneralString;
import org.testifyproject.bouncycastle.asn1.DERIA5String;
import org.testifyproject.bouncycastle.asn1.DERNull;
import org.testifyproject.bouncycastle.asn1.DERNumericString;
import org.testifyproject.bouncycastle.asn1.DEROctetString;
import org.testifyproject.bouncycastle.asn1.DERPrintableString;
import org.testifyproject.bouncycastle.asn1.DERSequence;
import org.testifyproject.bouncycastle.asn1.DERSet;
import org.testifyproject.bouncycastle.asn1.DERT61String;
import org.testifyproject.bouncycastle.asn1.DERTaggedObject;
import org.testifyproject.bouncycastle.asn1.DERUTF8String;
import org.testifyproject.bouncycastle.asn1.DERUniversalString;
import org.testifyproject.bouncycastle.asn1.DERVisibleString;
import org.testifyproject.bouncycastle.asn1.cmp.CAKeyUpdAnnContent;
import org.testifyproject.bouncycastle.asn1.cmp.CMPCertificate;
import org.testifyproject.bouncycastle.asn1.cmp.CRLAnnContent;
import org.testifyproject.bouncycastle.asn1.cmp.CertConfirmContent;
import org.testifyproject.bouncycastle.asn1.cmp.CertOrEncCert;
import org.testifyproject.bouncycastle.asn1.cmp.CertRepMessage;
import org.testifyproject.bouncycastle.asn1.cmp.CertResponse;
import org.testifyproject.bouncycastle.asn1.cmp.CertifiedKeyPair;
import org.testifyproject.bouncycastle.asn1.cmp.Challenge;
import org.testifyproject.bouncycastle.asn1.cmp.ErrorMsgContent;
import org.testifyproject.bouncycastle.asn1.cmp.GenMsgContent;
import org.testifyproject.bouncycastle.asn1.cmp.GenRepContent;
import org.testifyproject.bouncycastle.asn1.cmp.InfoTypeAndValue;
import org.testifyproject.bouncycastle.asn1.cmp.KeyRecRepContent;
import org.testifyproject.bouncycastle.asn1.cmp.OOBCertHash;
import org.testifyproject.bouncycastle.asn1.cmp.PBMParameter;
import org.testifyproject.bouncycastle.asn1.cmp.PKIBody;
import org.testifyproject.bouncycastle.asn1.cmp.PKIConfirmContent;
import org.testifyproject.bouncycastle.asn1.cmp.PKIFailureInfo;
import org.testifyproject.bouncycastle.asn1.cmp.PKIFreeText;
import org.testifyproject.bouncycastle.asn1.cmp.PKIHeader;
import org.testifyproject.bouncycastle.asn1.cmp.PKIMessage;
import org.testifyproject.bouncycastle.asn1.cmp.PKIMessages;
import org.testifyproject.bouncycastle.asn1.cmp.PKIStatus;
import org.testifyproject.bouncycastle.asn1.cmp.PKIStatusInfo;
import org.testifyproject.bouncycastle.asn1.cmp.POPODecKeyChallContent;
import org.testifyproject.bouncycastle.asn1.cmp.POPODecKeyRespContent;
import org.testifyproject.bouncycastle.asn1.cmp.PollRepContent;
import org.testifyproject.bouncycastle.asn1.cmp.PollReqContent;
import org.testifyproject.bouncycastle.asn1.cmp.ProtectedPart;
import org.testifyproject.bouncycastle.asn1.cmp.RevAnnContent;
import org.testifyproject.bouncycastle.asn1.cmp.RevDetails;
import org.testifyproject.bouncycastle.asn1.cmp.RevRepContent;
import org.testifyproject.bouncycastle.asn1.cmp.RevReqContent;
import org.testifyproject.bouncycastle.asn1.cms.Attribute;
import org.testifyproject.bouncycastle.asn1.cms.Attributes;
import org.testifyproject.bouncycastle.asn1.cms.AuthEnvelopedData;
import org.testifyproject.bouncycastle.asn1.cms.AuthenticatedData;
import org.testifyproject.bouncycastle.asn1.cms.CompressedData;
import org.testifyproject.bouncycastle.asn1.cms.ContentInfo;
import org.testifyproject.bouncycastle.asn1.cms.EncryptedContentInfo;
import org.testifyproject.bouncycastle.asn1.cms.EncryptedData;
import org.testifyproject.bouncycastle.asn1.cms.EnvelopedData;
import org.testifyproject.bouncycastle.asn1.cms.Evidence;
import org.testifyproject.bouncycastle.asn1.cms.IssuerAndSerialNumber;
import org.testifyproject.bouncycastle.asn1.cms.KEKIdentifier;
import org.testifyproject.bouncycastle.asn1.cms.KEKRecipientInfo;
import org.testifyproject.bouncycastle.asn1.cms.KeyAgreeRecipientIdentifier;
import org.testifyproject.bouncycastle.asn1.cms.KeyAgreeRecipientInfo;
import org.testifyproject.bouncycastle.asn1.cms.KeyTransRecipientInfo;
import org.testifyproject.bouncycastle.asn1.cms.MetaData;
import org.testifyproject.bouncycastle.asn1.cms.OriginatorIdentifierOrKey;
import org.testifyproject.bouncycastle.asn1.cms.OriginatorInfo;
import org.testifyproject.bouncycastle.asn1.cms.OriginatorPublicKey;
import org.testifyproject.bouncycastle.asn1.cms.OtherKeyAttribute;
import org.testifyproject.bouncycastle.asn1.cms.OtherRecipientInfo;
import org.testifyproject.bouncycastle.asn1.cms.PasswordRecipientInfo;
import org.testifyproject.bouncycastle.asn1.cms.RecipientEncryptedKey;
import org.testifyproject.bouncycastle.asn1.cms.RecipientIdentifier;
import org.testifyproject.bouncycastle.asn1.cms.RecipientInfo;
import org.testifyproject.bouncycastle.asn1.cms.RecipientKeyIdentifier;
import org.testifyproject.bouncycastle.asn1.cms.SignerIdentifier;
import org.testifyproject.bouncycastle.asn1.cms.SignerInfo;
import org.testifyproject.bouncycastle.asn1.cms.TimeStampAndCRL;
import org.testifyproject.bouncycastle.asn1.cms.TimeStampTokenEvidence;
import org.testifyproject.bouncycastle.asn1.cms.TimeStampedData;
import org.testifyproject.bouncycastle.asn1.cms.ecc.MQVuserKeyingMaterial;
import org.testifyproject.bouncycastle.asn1.crmf.AttributeTypeAndValue;
import org.testifyproject.bouncycastle.asn1.crmf.CertId;
import org.testifyproject.bouncycastle.asn1.crmf.CertReqMessages;
import org.testifyproject.bouncycastle.asn1.crmf.CertReqMsg;
import org.testifyproject.bouncycastle.asn1.crmf.CertRequest;
import org.testifyproject.bouncycastle.asn1.crmf.CertTemplate;
import org.testifyproject.bouncycastle.asn1.crmf.Controls;
import org.testifyproject.bouncycastle.asn1.crmf.EncKeyWithID;
import org.testifyproject.bouncycastle.asn1.crmf.EncryptedKey;
import org.testifyproject.bouncycastle.asn1.crmf.EncryptedValue;
import org.testifyproject.bouncycastle.asn1.crmf.OptionalValidity;
import org.testifyproject.bouncycastle.asn1.crmf.PKIArchiveOptions;
import org.testifyproject.bouncycastle.asn1.crmf.PKIPublicationInfo;
import org.testifyproject.bouncycastle.asn1.crmf.PKMACValue;
import org.testifyproject.bouncycastle.asn1.crmf.POPOPrivKey;
import org.testifyproject.bouncycastle.asn1.crmf.POPOSigningKey;
import org.testifyproject.bouncycastle.asn1.crmf.POPOSigningKeyInput;
import org.testifyproject.bouncycastle.asn1.crmf.ProofOfPossession;
import org.testifyproject.bouncycastle.asn1.crmf.SinglePubInfo;
import org.testifyproject.bouncycastle.asn1.cryptopro.ECGOST3410ParamSetParameters;
import org.testifyproject.bouncycastle.asn1.cryptopro.GOST28147Parameters;
import org.testifyproject.bouncycastle.asn1.cryptopro.GOST3410ParamSetParameters;
import org.testifyproject.bouncycastle.asn1.cryptopro.GOST3410PublicKeyAlgParameters;
import org.testifyproject.bouncycastle.asn1.eac.CVCertificate;
import org.testifyproject.bouncycastle.asn1.eac.CVCertificateRequest;
import org.testifyproject.bouncycastle.asn1.eac.CertificateBody;
import org.testifyproject.bouncycastle.asn1.eac.PublicKeyDataObject;
import org.testifyproject.bouncycastle.asn1.eac.RSAPublicKey;
import org.testifyproject.bouncycastle.asn1.eac.UnsignedInteger;
import org.testifyproject.bouncycastle.asn1.esf.CommitmentTypeIndication;
import org.testifyproject.bouncycastle.asn1.esf.CommitmentTypeQualifier;
import org.testifyproject.bouncycastle.asn1.esf.CompleteRevocationRefs;
import org.testifyproject.bouncycastle.asn1.esf.CrlIdentifier;
import org.testifyproject.bouncycastle.asn1.esf.CrlListID;
import org.testifyproject.bouncycastle.asn1.esf.CrlOcspRef;
import org.testifyproject.bouncycastle.asn1.esf.CrlValidatedID;
import org.testifyproject.bouncycastle.asn1.esf.OcspIdentifier;
import org.testifyproject.bouncycastle.asn1.esf.OcspListID;
import org.testifyproject.bouncycastle.asn1.esf.OcspResponsesID;
import org.testifyproject.bouncycastle.asn1.esf.OtherHash;
import org.testifyproject.bouncycastle.asn1.esf.OtherHashAlgAndValue;
import org.testifyproject.bouncycastle.asn1.esf.OtherRevRefs;
import org.testifyproject.bouncycastle.asn1.esf.OtherRevVals;
import org.testifyproject.bouncycastle.asn1.esf.RevocationValues;
import org.testifyproject.bouncycastle.asn1.esf.SPUserNotice;
import org.testifyproject.bouncycastle.asn1.esf.SPuri;
import org.testifyproject.bouncycastle.asn1.esf.SigPolicyQualifierInfo;
import org.testifyproject.bouncycastle.asn1.esf.SigPolicyQualifiers;
import org.testifyproject.bouncycastle.asn1.esf.SignaturePolicyId;
import org.testifyproject.bouncycastle.asn1.esf.SignaturePolicyIdentifier;
import org.testifyproject.bouncycastle.asn1.esf.SignerAttribute;
import org.testifyproject.bouncycastle.asn1.esf.SignerLocation;
import org.testifyproject.bouncycastle.asn1.ess.ContentHints;
import org.testifyproject.bouncycastle.asn1.ess.ContentIdentifier;
import org.testifyproject.bouncycastle.asn1.ess.ESSCertID;
import org.testifyproject.bouncycastle.asn1.ess.ESSCertIDv2;
import org.testifyproject.bouncycastle.asn1.ess.OtherCertID;
import org.testifyproject.bouncycastle.asn1.ess.OtherSigningCertificate;
import org.testifyproject.bouncycastle.asn1.ess.SigningCertificate;
import org.testifyproject.bouncycastle.asn1.ess.SigningCertificateV2;
import org.testifyproject.bouncycastle.asn1.icao.CscaMasterList;
import org.testifyproject.bouncycastle.asn1.icao.DataGroupHash;
import org.testifyproject.bouncycastle.asn1.icao.LDSSecurityObject;
import org.testifyproject.bouncycastle.asn1.icao.LDSVersionInfo;
import org.testifyproject.bouncycastle.asn1.isismtt.ocsp.CertHash;
import org.testifyproject.bouncycastle.asn1.isismtt.ocsp.RequestedCertificate;
import org.testifyproject.bouncycastle.asn1.isismtt.x509.AdditionalInformationSyntax;
import org.testifyproject.bouncycastle.asn1.isismtt.x509.AdmissionSyntax;
import org.testifyproject.bouncycastle.asn1.isismtt.x509.Admissions;
import org.testifyproject.bouncycastle.asn1.isismtt.x509.DeclarationOfMajority;
import org.testifyproject.bouncycastle.asn1.isismtt.x509.MonetaryLimit;
import org.testifyproject.bouncycastle.asn1.isismtt.x509.NamingAuthority;
import org.testifyproject.bouncycastle.asn1.isismtt.x509.ProcurationSyntax;
import org.testifyproject.bouncycastle.asn1.isismtt.x509.ProfessionInfo;
import org.testifyproject.bouncycastle.asn1.isismtt.x509.Restriction;
import org.testifyproject.bouncycastle.asn1.misc.CAST5CBCParameters;
import org.testifyproject.bouncycastle.asn1.misc.IDEACBCPar;
import org.testifyproject.bouncycastle.asn1.mozilla.PublicKeyAndChallenge;
import org.testifyproject.bouncycastle.asn1.ocsp.BasicOCSPResponse;
import org.testifyproject.bouncycastle.asn1.ocsp.CertID;
import org.testifyproject.bouncycastle.asn1.ocsp.CertStatus;
import org.testifyproject.bouncycastle.asn1.ocsp.CrlID;
import org.testifyproject.bouncycastle.asn1.ocsp.OCSPRequest;
import org.testifyproject.bouncycastle.asn1.ocsp.OCSPResponse;
import org.testifyproject.bouncycastle.asn1.ocsp.OCSPResponseStatus;
import org.testifyproject.bouncycastle.asn1.ocsp.Request;
import org.testifyproject.bouncycastle.asn1.ocsp.ResponderID;
import org.testifyproject.bouncycastle.asn1.ocsp.ResponseBytes;
import org.testifyproject.bouncycastle.asn1.ocsp.ResponseData;
import org.testifyproject.bouncycastle.asn1.ocsp.RevokedInfo;
import org.testifyproject.bouncycastle.asn1.ocsp.Signature;
import org.testifyproject.bouncycastle.asn1.ocsp.SingleResponse;
import org.testifyproject.bouncycastle.asn1.ocsp.TBSRequest;
import org.testifyproject.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
import org.testifyproject.bouncycastle.asn1.pkcs.AuthenticatedSafe;
import org.testifyproject.bouncycastle.asn1.pkcs.CertificationRequest;
import org.testifyproject.bouncycastle.asn1.pkcs.CertificationRequestInfo;
import org.testifyproject.bouncycastle.asn1.pkcs.DHParameter;
import org.testifyproject.bouncycastle.asn1.pkcs.EncryptedPrivateKeyInfo;
import org.testifyproject.bouncycastle.asn1.pkcs.MacData;
import org.testifyproject.bouncycastle.asn1.pkcs.PBEParameter;
import org.testifyproject.bouncycastle.asn1.pkcs.PBES2Parameters;
import org.testifyproject.bouncycastle.asn1.pkcs.PBKDF2Params;
import org.testifyproject.bouncycastle.asn1.pkcs.PKCS12PBEParams;
import org.testifyproject.bouncycastle.asn1.pkcs.Pfx;
import org.testifyproject.bouncycastle.asn1.pkcs.PrivateKeyInfo;
import org.testifyproject.bouncycastle.asn1.pkcs.RC2CBCParameter;
import org.testifyproject.bouncycastle.asn1.pkcs.RSAESOAEPparams;
import org.testifyproject.bouncycastle.asn1.pkcs.RSAPrivateKey;
import org.testifyproject.bouncycastle.asn1.pkcs.RSASSAPSSparams;
import org.testifyproject.bouncycastle.asn1.pkcs.SafeBag;
import org.testifyproject.bouncycastle.asn1.pkcs.SignedData;
import org.testifyproject.bouncycastle.asn1.sec.ECPrivateKey;
import org.testifyproject.bouncycastle.asn1.smime.SMIMECapabilities;
import org.testifyproject.bouncycastle.asn1.smime.SMIMECapability;
import org.testifyproject.bouncycastle.asn1.tsp.Accuracy;
import org.testifyproject.bouncycastle.asn1.tsp.MessageImprint;
import org.testifyproject.bouncycastle.asn1.tsp.TSTInfo;
import org.testifyproject.bouncycastle.asn1.tsp.TimeStampReq;
import org.testifyproject.bouncycastle.asn1.tsp.TimeStampResp;
import org.testifyproject.bouncycastle.asn1.x500.DirectoryString;
import org.testifyproject.bouncycastle.asn1.x500.RDN;
import org.testifyproject.bouncycastle.asn1.x500.X500Name;
import org.testifyproject.bouncycastle.asn1.x509.AccessDescription;
import org.testifyproject.bouncycastle.asn1.x509.AlgorithmIdentifier;
import org.testifyproject.bouncycastle.asn1.x509.AttCertIssuer;
import org.testifyproject.bouncycastle.asn1.x509.AttCertValidityPeriod;
import org.testifyproject.bouncycastle.asn1.x509.AttributeCertificate;
import org.testifyproject.bouncycastle.asn1.x509.AttributeCertificateInfo;
import org.testifyproject.bouncycastle.asn1.x509.AuthorityInformationAccess;
import org.testifyproject.bouncycastle.asn1.x509.AuthorityKeyIdentifier;
import org.testifyproject.bouncycastle.asn1.x509.BasicConstraints;
import org.testifyproject.bouncycastle.asn1.x509.CRLDistPoint;
import org.testifyproject.bouncycastle.asn1.x509.CRLNumber;
import org.testifyproject.bouncycastle.asn1.x509.CRLReason;
import org.testifyproject.bouncycastle.asn1.x509.Certificate;
import org.testifyproject.bouncycastle.asn1.x509.CertificateList;
import org.testifyproject.bouncycastle.asn1.x509.CertificatePair;
import org.testifyproject.bouncycastle.asn1.x509.CertificatePolicies;
import org.testifyproject.bouncycastle.asn1.x509.DSAParameter;
import org.testifyproject.bouncycastle.asn1.x509.DigestInfo;
import org.testifyproject.bouncycastle.asn1.x509.DisplayText;
import org.testifyproject.bouncycastle.asn1.x509.DistributionPoint;
import org.testifyproject.bouncycastle.asn1.x509.DistributionPointName;
import org.testifyproject.bouncycastle.asn1.x509.ExtendedKeyUsage;
import org.testifyproject.bouncycastle.asn1.x509.Extensions;
import org.testifyproject.bouncycastle.asn1.x509.GeneralName;
import org.testifyproject.bouncycastle.asn1.x509.GeneralNames;
import org.testifyproject.bouncycastle.asn1.x509.GeneralSubtree;
import org.testifyproject.bouncycastle.asn1.x509.Holder;
import org.testifyproject.bouncycastle.asn1.x509.IetfAttrSyntax;
import org.testifyproject.bouncycastle.asn1.x509.IssuerSerial;
import org.testifyproject.bouncycastle.asn1.x509.IssuingDistributionPoint;
import org.testifyproject.bouncycastle.asn1.x509.NameConstraints;
import org.testifyproject.bouncycastle.asn1.x509.NoticeReference;
import org.testifyproject.bouncycastle.asn1.x509.ObjectDigestInfo;
import org.testifyproject.bouncycastle.asn1.x509.PolicyInformation;
import org.testifyproject.bouncycastle.asn1.x509.PolicyMappings;
import org.testifyproject.bouncycastle.asn1.x509.PolicyQualifierInfo;
import org.testifyproject.bouncycastle.asn1.x509.PrivateKeyUsagePeriod;
import org.testifyproject.bouncycastle.asn1.x509.RSAPublicKeyStructure;
import org.testifyproject.bouncycastle.asn1.x509.RoleSyntax;
import org.testifyproject.bouncycastle.asn1.x509.SubjectDirectoryAttributes;
import org.testifyproject.bouncycastle.asn1.x509.SubjectKeyIdentifier;
import org.testifyproject.bouncycastle.asn1.x509.SubjectPublicKeyInfo;
import org.testifyproject.bouncycastle.asn1.x509.TBSCertList;
import org.testifyproject.bouncycastle.asn1.x509.TBSCertificate;
import org.testifyproject.bouncycastle.asn1.x509.TBSCertificateStructure;
import org.testifyproject.bouncycastle.asn1.x509.Target;
import org.testifyproject.bouncycastle.asn1.x509.TargetInformation;
import org.testifyproject.bouncycastle.asn1.x509.Targets;
import org.testifyproject.bouncycastle.asn1.x509.Time;
import org.testifyproject.bouncycastle.asn1.x509.UserNotice;
import org.testifyproject.bouncycastle.asn1.x509.V2Form;
import org.testifyproject.bouncycastle.asn1.x509.X509CertificateStructure;
import org.testifyproject.bouncycastle.asn1.x509.X509Extensions;
import org.testifyproject.bouncycastle.asn1.x509.X509Name;
import org.testifyproject.bouncycastle.asn1.x509.qualified.BiometricData;
import org.testifyproject.bouncycastle.asn1.x509.qualified.Iso4217CurrencyCode;
import org.testifyproject.bouncycastle.asn1.x509.qualified.MonetaryValue;
import org.testifyproject.bouncycastle.asn1.x509.qualified.QCStatement;
import org.testifyproject.bouncycastle.asn1.x509.qualified.SemanticsInformation;
import org.testifyproject.bouncycastle.asn1.x509.qualified.TypeOfBiometricData;
import org.testifyproject.bouncycastle.asn1.x509.sigi.NameOrPseudonym;
import org.testifyproject.bouncycastle.asn1.x509.sigi.PersonalData;
import org.testifyproject.bouncycastle.asn1.x9.DHDomainParameters;
import org.testifyproject.bouncycastle.asn1.x9.DHPublicKey;
import org.testifyproject.bouncycastle.asn1.x9.DHValidationParms;
import org.testifyproject.bouncycastle.asn1.x9.X962Parameters;
import org.testifyproject.bouncycastle.asn1.x9.X9ECParameters;
import org.testifyproject.bouncycastle.util.Integers;
import org.testifyproject.bouncycastle.util.encoders.Base64;
public class GetInstanceTest
extends TestCase
{
public static byte[] attrCert = Base64.decode(
"MIIHQDCCBqkCAQEwgZChgY2kgYowgYcxHDAaBgkqhkiG9w0BCQEWDW1sb3JjaEB2"
+ "dC5lZHUxHjAcBgNVBAMTFU1hcmt1cyBMb3JjaCAobWxvcmNoKTEbMBkGA1UECxMS"
+ "VmlyZ2luaWEgVGVjaCBVc2VyMRAwDgYDVQQLEwdDbGFzcyAyMQswCQYDVQQKEwJ2"
+ "dDELMAkGA1UEBhMCVVMwgYmkgYYwgYMxGzAZBgkqhkiG9w0BCQEWDHNzaGFoQHZ0"
+ "LmVkdTEbMBkGA1UEAxMSU3VtaXQgU2hhaCAoc3NoYWgpMRswGQYDVQQLExJWaXJn"
+ "aW5pYSBUZWNoIFVzZXIxEDAOBgNVBAsTB0NsYXNzIDExCzAJBgNVBAoTAnZ0MQsw"
+ "CQYDVQQGEwJVUzANBgkqhkiG9w0BAQQFAAIBBTAiGA8yMDAzMDcxODE2MDgwMloY"
+ "DzIwMDMwNzI1MTYwODAyWjCCBU0wggVJBgorBgEEAbRoCAEBMYIFORaCBTU8UnVs"
+ "ZSBSdWxlSWQ9IkZpbGUtUHJpdmlsZWdlLVJ1bGUiIEVmZmVjdD0iUGVybWl0Ij4K"
+ "IDxUYXJnZXQ+CiAgPFN1YmplY3RzPgogICA8U3ViamVjdD4KICAgIDxTdWJqZWN0"
+ "TWF0Y2ggTWF0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ARGS = new Object[] { null };
private void doFullGetInstanceTest(Class clazz, ASN1Object o1)
throws Exception
{
Method m;
try
{
m = clazz.getMethod("getInstance", Object.class);
}
catch (NoSuchMethodException e)
{
fail("no getInstance method found");
return;
}
ASN1Object o2 = (ASN1Object)m.invoke(clazz, NULL_ARGS);
if (o2 != null)
{
fail(clazz.getName() + " null failed");
}
o2 = (ASN1Object)m.invoke(clazz, o1);
if (!o1.equals(o2) || !clazz.isInstance(o2))
{
fail(clazz.getName() + " equality failed");
}
o2 = (ASN1Object)m.invoke(clazz, o1.getEncoded());
if (!o1.equals(o2) || !clazz.isInstance(o2))
{
fail(clazz.getName() + " encoded equality failed");
}
o2 = (ASN1Object)m.invoke(clazz, o1.toASN1Primitive());
if (!o1.equals(o2) || !clazz.isInstance(o2))
{
fail(clazz.getName() + " sequence equality failed");
}
try
{
m = clazz.getMethod("getInstance", ASN1TaggedObject.class, Boolean.TYPE);
}
catch (NoSuchMethodException e)
{
return;
}
ASN1TaggedObject t = new DERTaggedObject(true, 0, o1);
o2 = (ASN1Object)m.invoke(clazz, t, true);
if (!o1.equals(o2) || !clazz.isInstance(o2))
{
fail(clazz.getName() + " tag equality failed");
}
t = new DERTaggedObject(true, 0, o1.toASN1Primitive());
o2 = (ASN1Object)m.invoke(clazz, t, true);
if (!o1.equals(o2) || !clazz.isInstance(o2))
{
fail(clazz.getName() + " tag equality failed");
}
t = ASN1TaggedObject.getInstance(t.getEncoded());
o2 = (ASN1Object)m.invoke(clazz, t, true);
if (!o1.equals(o2) || !clazz.isInstance(o2))
{
fail(clazz.getName() + " tag equality failed");
}
t = new DERTaggedObject(false, 0, o1);
o2 = (ASN1Object)m.invoke(clazz, t, false);
if (!o1.equals(o2) || !clazz.isInstance(o2))
{
fail(clazz.getName() + " tag equality failed");
}
t = new DERTaggedObject(false, 0, o1.toASN1Primitive());
o2 = (ASN1Object)m.invoke(clazz, t, false);
if (!o1.equals(o2) || !clazz.isInstance(o2))
{
fail(clazz.getName() + " tag equality failed");
}
t = ASN1TaggedObject.getInstance(t.getEncoded());
o2 = (ASN1Object)m.invoke(clazz, t, false);
if (!o1.equals(o2) || !clazz.isInstance(o2))
{
fail(clazz.getName() + " tag equality failed");
}
}
public void testGetInstance()
throws Exception
{
doFullGetInstanceTest(DERPrintableString.class, new DERPrintableString("hello world"));
doFullGetInstanceTest(DERBMPString.class, new DERBMPString("hello world"));
doFullGetInstanceTest(DERUTF8String.class, new DERUTF8String("hello world"));
doFullGetInstanceTest(DERUniversalString.class, new DERUniversalString(new byte[20]));
doFullGetInstanceTest(DERIA5String.class, new DERIA5String("hello world"));
doFullGetInstanceTest(DERGeneralString.class, new DERGeneralString("hello world"));
doFullGetInstanceTest(DERNumericString.class, new DERNumericString("hello world"));
doFullGetInstanceTest(DERNumericString.class, new DERNumericString("99999", true));
doFullGetInstanceTest(DERT61String.class, new DERT61String("hello world"));
doFullGetInstanceTest(DERVisibleString.class, new DERVisibleString("hello world"));
doFullGetInstanceTest(ASN1Integer.class, new ASN1Integer(1));
doFullGetInstanceTest(ASN1GeneralizedTime.class, new ASN1GeneralizedTime(new Date()));
doFullGetInstanceTest(ASN1UTCTime.class, new ASN1UTCTime(new Date()));
doFullGetInstanceTest(ASN1Enumerated.class, new ASN1Enumerated(1));
CMPCertificate cmpCert = new CMPCertificate(Certificate.getInstance(cert1));
CertificateList crl = CertificateList.getInstance(v2CertList);
AttributeCertificate attributeCert = AttributeCertificate.getInstance(attrCert);
doFullGetInstanceTest(CAKeyUpdAnnContent.class, new CAKeyUpdAnnContent(cmpCert, cmpCert, cmpCert));
CertConfirmContent.getInstance(null);
CertifiedKeyPair.getInstance(null);
CertOrEncCert.getInstance(null);
CertRepMessage.getInstance(null);
doFullGetInstanceTest(CertResponse.class, new CertResponse(new ASN1Integer(1), new PKIStatusInfo(PKIStatus.granted)));
doFullGetInstanceTest(org.testifyproject.bouncycastle.asn1.cmp.CertStatus.class, new org.testifyproject.bouncycastle.asn1.cmp.CertStatus(new byte[10], BigInteger.valueOf(1), new PKIStatusInfo(PKIStatus.granted)));
doFullGetInstanceTest(Challenge.class, new Challenge(new AlgorithmIdentifier(OIWObjectIdentifiers.idSHA1, DERNull.INSTANCE), new byte[10], new byte[10]));
doFullGetInstanceTest(CMPCertificate.class, cmpCert);
doFullGetInstanceTest(CRLAnnContent.class, new CRLAnnContent(crl));
doFullGetInstanceTest(ErrorMsgContent.class, new ErrorMsgContent(new PKIStatusInfo(PKIStatus.granted), new ASN1Integer(1), new PKIFreeText("fred")));
GenMsgContent.getInstance(null);
GenRepContent.getInstance(null);
InfoTypeAndValue.getInstance(null);
KeyRecRepContent.getInstance(null);
OOBCertHash.getInstance(null);
PBMParameter.getInstance(null);
PKIBody.getInstance(null);
PKIConfirmContent.getInstance(null);
PKIFreeText.getInstance(null);
doFullGetInstanceTest(PKIFreeText.class, new PKIFreeText("hello world"));
doFullGetInstanceTest(PKIFreeText.class, new PKIFreeText(new String[]{"hello", "world"}));
doFullGetInstanceTest(PKIFreeText.class, new PKIFreeText(new DERUTF8String[]{new DERUTF8String("hello"), new DERUTF8String("world")}));
PKIHeader.getInstance(null);
PKIMessage.getInstance(null);
PKIMessages.getInstance(null);
doFullGetInstanceTest(PKIStatusInfo.class, new PKIStatusInfo(PKIStatus.rejection, new PKIFreeText("hello world"), new PKIFailureInfo(PKIFailureInfo.badAlg)));
doFullGetInstanceTest(PKIStatusInfo.class, new PKIStatusInfo(PKIStatus.granted, new PKIFreeText("hello world")));
PKIStatus.getInstance(null);
PollRepContent.getInstance(null);
PollReqContent.getInstance(null);
POPODecKeyChallContent.getInstance(null);
POPODecKeyRespContent.getInstance(null);
ProtectedPart.getInstance(null);
RevAnnContent.getInstance(null);
RevDetails.getInstance(null);
RevRepContent.getInstance(null);
RevReqContent.getInstance(null);
Attribute.getInstance(null);
Attributes.getInstance(null);
AuthenticatedData.getInstance(null);
AuthenticatedData.getInstance(null);
AuthEnvelopedData.getInstance(null);
AuthEnvelopedData.getInstance(null);
CompressedData.getInstance(null);
CompressedData.getInstance(null);
ContentInfo.getInstance(null);
EncryptedContentInfo.getInstance(null);
EncryptedData.getInstance(null);
EnvelopedData.getInstance(null);
EnvelopedData.getInstance(null);
Evidence.getInstance(null);
IssuerAndSerialNumber.getInstance(null);
KEKIdentifier.getInstance(null);
KEKIdentifier.getInstance(null);
KEKRecipientInfo.getInstance(null);
KEKRecipientInfo.getInstance(null);
KeyAgreeRecipientIdentifier.getInstance(null);
KeyAgreeRecipientIdentifier.getInstance(null);
KeyAgreeRecipientInfo.getInstance(null);
KeyAgreeRecipientInfo.getInstance(null);
KeyTransRecipientInfo.getInstance(null);
MetaData.getInstance(null);
OriginatorIdentifierOrKey.getInstance(null);
OriginatorIdentifierOrKey.getInstance(null);
OriginatorInfo.getInstance(null);
OriginatorInfo.getInstance(null);
OriginatorPublicKey.getInstance(null);
OriginatorPublicKey.getInstance(null);
OtherKeyAttribute.getInstance(null);
OtherRecipientInfo.getInstance(null);
OtherRecipientInfo.getInstance(null);
PasswordRecipientInfo.getInstance(null);
PasswordRecipientInfo.getInstance(null);
RecipientEncryptedKey.getInstance(null);
RecipientIdentifier.getInstance(null);
RecipientInfo.getInstance(null);
RecipientKeyIdentifier.getInstance(null);
RecipientKeyIdentifier.getInstance(null);
SignedData.getInstance(null);
SignerIdentifier.getInstance(null);
SignerInfo.getInstance(null);
Time.getInstance(null);
Time.getInstance(null);
TimeStampAndCRL.getInstance(null);
TimeStampedData.getInstance(null);
TimeStampTokenEvidence.getInstance(null);
AttributeTypeAndValue.getInstance(null);
doFullGetInstanceTest(CertId.class, new CertId(new GeneralName(new X500Name("CN=Test")), BigInteger.valueOf(1)));
CertReqMessages.getInstance(null);
CertReqMsg.getInstance(null);
CertRequest.getInstance(null);
CertTemplate.getInstance(null);
Controls.getInstance(null);
EncKeyWithID.getInstance(null);
EncryptedKey.getInstance(null);
EncryptedValue.getInstance(null);
OptionalValidity.getInstance(null);
PKIArchiveOptions.getInstance(null);
PKIPublicationInfo.getInstance(null);
PKMACValue.getInstance(null);
PKMACValue.getInstance(null);
POPOPrivKey.getInstance(null);
POPOSigningKeyInput.getInstance(null);
POPOSigningKey.getInstance(null);
POPOSigningKey.getInstance(null);
ProofOfPossession.getInstance(null);
SinglePubInfo.getInstance(null);
ECGOST3410ParamSetParameters.getInstance(null);
ECGOST3410ParamSetParameters.getInstance(null);
GOST28147Parameters.getInstance(null);
GOST28147Parameters.getInstance(null);
GOST3410ParamSetParameters.getInstance(null);
GOST3410ParamSetParameters.getInstance(null);
GOST3410PublicKeyAlgParameters.getInstance(null);
GOST3410PublicKeyAlgParameters.getInstance(null);
CertificateBody.getInstance(null);
CVCertificate.getInstance(null);
CVCertificateRequest.getInstance(null);
PublicKeyDataObject.getInstance(null);
UnsignedInteger.getInstance(null);
CommitmentTypeIndication.getInstance(null);
CommitmentTypeQualifier.getInstance(null);
OcspIdentifier ocspIdentifier = new OcspIdentifier(new ResponderID(new X500Name("CN=Test")), new ASN1GeneralizedTime(new Date()));
CrlListID crlListID = new CrlListID(new CrlValidatedID[]{new CrlValidatedID(new OtherHash(new byte[20]))});
OcspListID ocspListID = new OcspListID(new OcspResponsesID[] { new OcspResponsesID(ocspIdentifier) });
OtherRevRefs otherRevRefs = new OtherRevRefs(new ASN1ObjectIdentifier("1.2.1"), new DERSequence());
OtherRevVals otherRevVals = new OtherRevVals(new ASN1ObjectIdentifier("1.2.1"), new DERSequence());
CrlOcspRef crlOcspRef = new CrlOcspRef(crlListID, ocspListID, otherRevRefs);
doFullGetInstanceTest(CompleteRevocationRefs.class, new CompleteRevocationRefs(new CrlOcspRef[]{crlOcspRef, crlOcspRef}));
doFullGetInstanceTest(CrlIdentifier.class, new CrlIdentifier(new X500Name("CN=Test"), new ASN1UTCTime(new Date()), BigInteger.valueOf(1)));
doFullGetInstanceTest(CrlListID.class, crlListID);
doFullGetInstanceTest(CrlOcspRef.class, crlOcspRef);
doFullGetInstanceTest(CrlValidatedID.class, new CrlValidatedID(new OtherHash(new byte[20])));
doFullGetInstanceTest(OcspIdentifier.class, ocspIdentifier);
doFullGetInstanceTest(OcspListID.class, ocspListID);
doFullGetInstanceTest(OcspResponsesID.class, new OcspResponsesID(ocspIdentifier));
OtherHashAlgAndValue otherHashAlgAndValue = new OtherHashAlgAndValue(new AlgorithmIdentifier(OIWObjectIdentifiers.idSHA1, DERNull.INSTANCE), new DEROctetString(new byte[10]));
doFullGetInstanceTest(OtherHashAlgAndValue.class, otherHashAlgAndValue);
OtherHash.getInstance(null);
doFullGetInstanceTest(OtherRevRefs.class, otherRevRefs);
doFullGetInstanceTest(OtherRevVals.class, otherRevVals);
doFullGetInstanceTest(RevocationValues.class, new RevocationValues(new CertificateList[]{crl}, null, otherRevVals));
SignaturePolicyId signaturePolicyId = new SignaturePolicyId(new ASN1ObjectIdentifier("1.2.1"), otherHashAlgAndValue);
doFullGetInstanceTest(SignaturePolicyIdentifier.class, new SignaturePolicyIdentifier());
doFullGetInstanceTest(SignaturePolicyIdentifier.class, new SignaturePolicyIdentifier(signaturePolicyId));
doFullGetInstanceTest(SignaturePolicyId.class, signaturePolicyId);
doFullGetInstanceTest(SignerAttribute.class, new SignerAttribute(new org.testifyproject.bouncycastle.asn1.x509.Attribute[]{new org.testifyproject.bouncycastle.asn1.x509.Attribute(new ASN1ObjectIdentifier("1.2.1"), new DERSet())}));
doFullGetInstanceTest(SignerAttribute.class, new SignerAttribute(attributeCert));
ASN1EncodableVector postalAddr = new ASN1EncodableVector();
postalAddr.add(new DERUTF8String("line 1"));
postalAddr.add(new DERUTF8String("line 2"));
doFullGetInstanceTest(SignerLocation.class, new SignerLocation(new DERUTF8String("AU"), new DERUTF8String("Melbourne"), new DERSequence(postalAddr)));
doFullGetInstanceTest(SigPolicyQualifierInfo.class, new SigPolicyQualifierInfo(new ASN1ObjectIdentifier("1.2.1"), new DERSequence()));
SigPolicyQualifiers.getInstance(null);
SPuri.getInstance(null);
Vector v = new Vector();
v.add(Integers.valueOf(1));
v.add(BigInteger.valueOf(2));
NoticeReference noticeReference = new NoticeReference("BC", v);
doFullGetInstanceTest(SPUserNotice.class, new SPUserNotice(noticeReference, new DisplayText("hello world")));
ContentHints.getInstance(null);
ContentIdentifier.getInstance(null);
ESSCertID.getInstance(null);
ESSCertIDv2.getInstance(null);
OtherCertID.getInstance(null);
OtherSigningCertificate.getInstance(null);
SigningCertificate.getInstance(null);
SigningCertificateV2.getInstance(null);
CscaMasterList.getInstance(null);
DataGroupHash.getInstance(null);
LDSSecurityObject.getInstance(null);
LDSVersionInfo.getInstance(null);
CAST5CBCParameters.getInstance(null);
IDEACBCPar.getInstance(null);
PublicKeyAndChallenge.getInstance(null);
BasicOCSPResponse.getInstance(null);
BasicOCSPResponse.getInstance(null);
doFullGetInstanceTest(CertID.class, new CertID(new AlgorithmIdentifier(OIWObjectIdentifiers.idSHA1, DERNull.INSTANCE), new DEROctetString(new byte[1]), new DEROctetString(new byte[1]), new ASN1Integer(1)));
CertStatus.getInstance(null);
CertStatus.getInstance(null);
CrlID.getInstance(null);
OCSPRequest.getInstance(null);
OCSPRequest.getInstance(null);
OCSPResponse.getInstance(null);
OCSPResponse.getInstance(null);
OCSPResponseStatus.getInstance(null);
Request.getInstance(null);
Request.getInstance(null);
ResponderID.getInstance(null);
ResponderID.getInstance(null);
ResponseBytes.getInstance(null);
ResponseBytes.getInstance(null);
ResponseData.getInstance(null);
ResponseData.getInstance(null);
RevokedInfo.getInstance(null);
RevokedInfo.getInstance(null);
Signature.getInstance(null);
Signature.getInstance(null);
SingleResponse.getInstance(null);
SingleResponse.getInstance(null);
TBSRequest.getInstance(null);
TBSRequest.getInstance(null);
Attribute.getInstance(null);
AuthenticatedSafe.getInstance(null);
CertificationRequestInfo.getInstance(null);
CertificationRequest.getInstance(null);
ContentInfo.getInstance(null);
DHParameter.getInstance(null);
EncryptedData.getInstance(null);
EncryptedPrivateKeyInfo.getInstance(null);
AlgorithmIdentifier.getInstance(null);
IssuerAndSerialNumber.getInstance(null);
MacData.getInstance(null);
PBEParameter.getInstance(null);
PBES2Parameters.getInstance(null);
PBKDF2Params.getInstance(null);
Pfx.getInstance(null);
PKCS12PBEParams.getInstance(null);
PrivateKeyInfo.getInstance(null);
PrivateKeyInfo.getInstance(null);
RC2CBCParameter.getInstance(null);
RSAESOAEPparams.getInstance(null);
RSAPrivateKey.getInstance(null);
RSAPrivateKey.getInstance(null);
RSAPublicKey.getInstance(null);
RSAPublicKey.getInstance(null);
RSASSAPSSparams.getInstance(null);
SafeBag.getInstance(null);
SignedData.getInstance(null);
SignerInfo.getInstance(null);
ECPrivateKey.getInstance(null);
SMIMECapabilities.getInstance(null);
SMIMECapability.getInstance(null);
Accuracy.getInstance(null);
MessageImprint.getInstance(null);
TimeStampReq.getInstance(null);
TimeStampResp.getInstance(null);
TSTInfo.getInstance(null);
AttributeTypeAndValue.getInstance(null);
DirectoryString.getInstance(null);
DirectoryString.getInstance(null);
RDN.getInstance(null);
X500Name.getInstance(null);
X500Name.getInstance(null);
AccessDescription.getInstance(null);
AlgorithmIdentifier.getInstance(null);
AlgorithmIdentifier.getInstance(null);
AttCertIssuer.getInstance(null);
AttCertIssuer.getInstance(null);
AttCertValidityPeriod.getInstance(null);
AttributeCertificateInfo.getInstance(null);
AttributeCertificateInfo.getInstance(null);
AttributeCertificate.getInstance(null);
Attribute.getInstance(null);
AuthorityInformationAccess.getInstance(null);
AuthorityKeyIdentifier.getInstance(null);
AuthorityKeyIdentifier.getInstance(null);
BasicConstraints.getInstance(null);
BasicConstraints.getInstance(null);
Certificate.getInstance(null);
Certificate.getInstance(null);
CertificateList.getInstance(null);
CertificateList.getInstance(null);
CertificatePair.getInstance(null);
CertificatePolicies.getInstance(null);
CertificatePolicies.getInstance(null);
CRLDistPoint.getInstance(null);
CRLDistPoint.getInstance(null);
CRLNumber.getInstance(null);
CRLReason.getInstance(null);
DigestInfo.getInstance(null);
DigestInfo.getInstance(null);
DisplayText.getInstance(null);
DisplayText.getInstance(null);
DistributionPoint.getInstance(null);
DistributionPoint.getInstance(null);
DistributionPointName.getInstance(null);
DistributionPointName.getInstance(null);
DSAParameter.getInstance(null);
DSAParameter.getInstance(null);
ExtendedKeyUsage.getInstance(null);
ExtendedKeyUsage.getInstance(null);
Extensions.getInstance(null);
Extensions.getInstance(null);
GeneralName.getInstance(null);
GeneralName.getInstance(null);
GeneralNames.getInstance(null);
GeneralNames.getInstance(null);
GeneralSubtree generalSubtree = new GeneralSubtree(new GeneralName(new X500Name("CN=Test")));
ASN1ObjectIdentifier algOid = new ASN1ObjectIdentifier("1.2.1");
ObjectDigestInfo objectDigestInfo = new ObjectDigestInfo(ObjectDigestInfo.otherObjectDigest, algOid, new AlgorithmIdentifier(algOid), new byte[20]);
doFullGetInstanceTest(GeneralSubtree.class, generalSubtree);
doFullGetInstanceTest(Holder.class, new Holder(objectDigestInfo));
IetfAttrSyntax.getInstance(null);
IssuerSerial.getInstance(null);
IssuerSerial.getInstance(null);
IssuingDistributionPoint.getInstance(null);
IssuingDistributionPoint.getInstance(null);
DERBitString.getInstance(null);
v.clear();
v.add(generalSubtree);
doFullGetInstanceTest(NameConstraints.class, new NameConstraints(null, null));
doFullGetInstanceTest(NoticeReference.class, noticeReference);
doFullGetInstanceTest(ObjectDigestInfo.class, objectDigestInfo);
PolicyInformation.getInstance(null);
PolicyMappings.getInstance(null);
PolicyQualifierInfo.getInstance(null);
PrivateKeyUsagePeriod.getInstance(null);
doFullGetInstanceTest(RoleSyntax.class, new RoleSyntax(new GeneralNames(new GeneralName(new X500Name("CN=Test"))), new GeneralName(GeneralName.uniformResourceIdentifier, "http://bc")));
RSAPublicKeyStructure.getInstance(null);
RSAPublicKeyStructure.getInstance(null);
SubjectDirectoryAttributes.getInstance(null);
SubjectKeyIdentifier.getInstance(null);
SubjectKeyIdentifier.getInstance(null);
SubjectPublicKeyInfo.getInstance(null);
SubjectPublicKeyInfo.getInstance(null);
TargetInformation.getInstance(null);
Target.getInstance(null);
Targets.getInstance(null);
TBSCertificate.getInstance(null);
TBSCertificate.getInstance(null);
TBSCertificateStructure.getInstance(null);
TBSCertificateStructure.getInstance(null);
TBSCertList.CRLEntry.getInstance(null);
TBSCertList.getInstance(null);
TBSCertList.getInstance(null);
Time.getInstance(null);
Time.getInstance(null);
doFullGetInstanceTest(UserNotice.class, new UserNotice(noticeReference, "hello world"));
V2Form.getInstance(null);
V2Form.getInstance(null);
X509CertificateStructure.getInstance(null);
X509CertificateStructure.getInstance(null);
X509Extensions.getInstance(null);
X509Extensions.getInstance(null);
X509Name.getInstance(null);
X509Name.getInstance(null);
DHDomainParameters.getInstance(null);
DHDomainParameters.getInstance(null);
DHPublicKey.getInstance(null);
DHPublicKey.getInstance(null);
DHValidationParms.getInstance(null);
DHValidationParms.getInstance(null);
X962Parameters.getInstance(null);
X962Parameters.getInstance(null);
X9ECParameters.getInstance(null);
MQVuserKeyingMaterial.getInstance(null);
MQVuserKeyingMaterial.getInstance(null);
CertHash.getInstance(null);
RequestedCertificate.getInstance(null);
RequestedCertificate.getInstance(null);
AdditionalInformationSyntax.getInstance(null);
Admissions.getInstance(null);
AdmissionSyntax.getInstance(null);
DeclarationOfMajority.getInstance(null);
MonetaryLimit.getInstance(null);
NamingAuthority.getInstance(null);
NamingAuthority.getInstance(null);
ProcurationSyntax.getInstance(null);
ProfessionInfo.getInstance(null);
Restriction.getInstance(null);
BiometricData.getInstance(null);
Iso4217CurrencyCode.getInstance(null);
MonetaryValue.getInstance(null);
QCStatement.getInstance(null);
SemanticsInformation.getInstance(null);
TypeOfBiometricData.getInstance(null);
NameOrPseudonym.getInstance(null);
PersonalData.getInstance(null);
}
public String getName()
{
return "GetInstanceNullTest";
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy