private X509AttrCertStoreSelector( X509AttrCertStoreSelector o) { this.attributeCert = o.attributeCert; this.attributeCertificateValid = o.attributeCertificateValid; this.holder = o.holder; this.issuer = o.issuer; this.serialNumber = o.serialNumber; this.targetGroups = new HashSet(o.targetGroups); this.targetNames = new HashSet(o.targetNames); }
public X509CrlStoreSelector( X509CrlStoreSelector o) { this.certificateChecking = o.CertificateChecking; this.dateAndTime = o.DateAndTime; this.issuers = o.Issuers; this.maxCrlNumber = o.MaxCrlNumber; this.minCrlNumber = o.MinCrlNumber; this.deltaCrlIndicatorEnabled = o.DeltaCrlIndicatorEnabled; this.completeCrlEnabled = o.CompleteCrlEnabled; this.maxBaseCrlNumber = o.MaxBaseCrlNumber; this.attrCertChecking = o.AttrCertChecking; this.issuingDistributionPointEnabled = o.IssuingDistributionPointEnabled; this.issuingDistributionPoint = o.IssuingDistributionPoint; }
public X509CertStoreSelector( X509CertStoreSelector o) { this.authorityKeyIdentifier = o.AuthorityKeyIdentifier; this.basicConstraints = o.BasicConstraints; this.certificate = o.Certificate; this.certificateValid = o.CertificateValid; this.extendedKeyUsage = o.ExtendedKeyUsage; this.issuer = o.Issuer; this.keyUsage = o.KeyUsage; this.policy = o.Policy; this.privateKeyValid = o.PrivateKeyValid; this.serialNumber = o.SerialNumber; this.subject = o.Subject; this.subjectKeyIdentifier = o.SubjectKeyIdentifier; this.subjectPublicKey = o.SubjectPublicKey; this.subjectPublicKeyAlgID = o.SubjectPublicKeyAlgID; }
/** * Return an appropriate TimeStampResponse. * <p> * If genTime is null a timeNotAvailable error response will be returned. * * @param request the request this response is for. * @param serialNumber serial number for the response token. * @param genTime generation time for the response token. * @param provider provider to use for signature calculation. * @return * @throws NoSuchAlgorithmException * @throws NoSuchProviderException * @throws TSPException * </p> */ public TimeStampResponse Generate( TimeStampRequest request, BigInteger serialNumber, DateTimeObject genTime) { TimeStampResp resp; try { if (genTime == null) throw new TspValidationException("The time source is not available.", PkiFailureInfo.TimeNotAvailable); request.Validate(acceptedAlgorithms, acceptedPolicies, acceptedExtensions); this.status = PkiStatus.Granted; this.AddStatusString("Operation Okay"); PkiStatusInfo pkiStatusInfo = GetPkiStatusInfo(); ContentInfo tstTokenContentInfo; try { TimeStampToken token = tokenGenerator.Generate(request, serialNumber, genTime.Value); byte[] encoded = token.ToCmsSignedData().GetEncoded(); tstTokenContentInfo = ContentInfo.GetInstance(Asn1Object.FromByteArray(encoded)); } catch (IOException e) { throw new TspException("Timestamp token received cannot be converted to ContentInfo", e); } resp = new TimeStampResp(pkiStatusInfo, tstTokenContentInfo); } catch (TspValidationException e) { status = PkiStatus.Rejection; this.SetFailInfoField(e.FailureCode); this.AddStatusString(e.Message); PkiStatusInfo pkiStatusInfo = GetPkiStatusInfo(); resp = new TimeStampResp(pkiStatusInfo, null); } try { return new TimeStampResponse(resp); } catch (IOException e) { throw new TspException("created badly formatted response!", e); } }
/** * Method to support <code>Clone()</code> under J2ME. * <code>super.Clone()</code> does not exist and fields are not copied. * * @param params Parameters to set. If this are * <code>ExtendedPkixParameters</code> they are copied to. */ protected virtual void SetParams( PkixParameters parameters) { Date = parameters.Date; SetCertPathCheckers(parameters.GetCertPathCheckers()); IsAnyPolicyInhibited = parameters.IsAnyPolicyInhibited; IsExplicitPolicyRequired = parameters.IsExplicitPolicyRequired; IsPolicyMappingInhibited = parameters.IsPolicyMappingInhibited; IsRevocationEnabled = parameters.IsRevocationEnabled; SetInitialPolicies(parameters.GetInitialPolicies()); IsPolicyQualifiersRejected = parameters.IsPolicyQualifiersRejected; SetTargetCertConstraints(parameters.GetTargetCertConstraints()); SetTrustAnchors(parameters.GetTrustAnchors()); validityModel = parameters.validityModel; useDeltas = parameters.useDeltas; additionalLocationsEnabled = parameters.additionalLocationsEnabled; selector = parameters.selector == null ? null : (IX509Selector) parameters.selector.Clone(); stores = Platform.CreateArrayList(parameters.stores); additionalStores = Platform.CreateArrayList(parameters.additionalStores); trustedACIssuers = new HashSet(parameters.trustedACIssuers); prohibitedACAttributes = new HashSet(parameters.prohibitedACAttributes); necessaryACAttributes = new HashSet(parameters.necessaryACAttributes); attrCertCheckers = new HashSet(parameters.attrCertCheckers); }