index
int64
0
0
repo_id
stringlengths
9
205
file_path
stringlengths
31
246
content
stringlengths
1
12.2M
__index_level_0__
int64
0
10k
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/CertPolicyId.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1ObjectIdentifier; /** * <pre> * CertPolicyId ::= OBJECT IDENTIFIER * </pre> */ public class CertPolicyId extends Asn1ObjectIdentifier { }
500
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/IetfAttrSyntax.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ExplicitField; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * Ref. RFC3281 * <pre> * * IetfAttrSyntax ::= SEQUENCE { * policyAuthority [0] GeneralNames OPTIONAL, * values SEQUENCE OF CHOICE { * octets OCTET STRING, * oid OBJECT IDENTIFIER, * string UTF8String * } * } * * </pre> */ public class IetfAttrSyntax extends Asn1SequenceType { protected enum IetfAttrSyntaxField implements EnumType { POLICY_AUTHORITY, VALUES; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new ExplicitField(IetfAttrSyntaxField.POLICY_AUTHORITY, GeneralNames.class), new Asn1FieldInfo(IetfAttrSyntaxField.VALUES, IetfAttrSyntaxChoices.class) }; public IetfAttrSyntax() { super(fieldInfos); } public GeneralNames getPolicyAuthority() { return getFieldAs(IetfAttrSyntaxField.POLICY_AUTHORITY, GeneralNames.class); } public void setPolicyAuthority(GeneralNames policyAuthority) { setFieldAs(IetfAttrSyntaxField.POLICY_AUTHORITY, policyAuthority); } public IetfAttrSyntaxChoices getValues() { return getFieldAs(IetfAttrSyntaxField.VALUES, IetfAttrSyntaxChoices.class); } public void setValues(IetfAttrSyntaxChoices values) { setFieldAs(IetfAttrSyntaxField.VALUES, values); } }
501
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DigestInfo.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1OctetString; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * <pre> * DigestInfo::=SEQUENCE{ * digestAlgorithm AlgorithmIdentifier, * digest OCTET STRING * } * </pre> */ public class DigestInfo extends Asn1SequenceType { protected enum DigestInfoField implements EnumType { DIGEST_ALGORITHM, DIGEST; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(DigestInfoField.DIGEST_ALGORITHM, AlgorithmIdentifier.class), new Asn1FieldInfo(DigestInfoField.DIGEST, Asn1OctetString.class) }; public DigestInfo() { super(fieldInfos); } public AlgorithmIdentifier getAlgorithmId() { return getFieldAs(DigestInfoField.DIGEST_ALGORITHM, AlgorithmIdentifier.class); } public void setDigestAlgorithm(AlgorithmIdentifier digestAlgorithm) { setFieldAs(DigestInfoField.DIGEST_ALGORITHM, digestAlgorithm); } public byte[] getDigest() { return getFieldAsOctets(DigestInfoField.DIGEST); } public void setDigest(byte[] digest) { setFieldAsOctets(DigestInfoField.DIGEST, digest); } }
502
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Time.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1Choice; import org.apache.kerby.asn1.type.Asn1GeneralizedTime; import org.apache.kerby.asn1.type.Asn1UtcTime; import java.util.Date; /** * * <pre> * Time ::= CHOICE { * utcTime UTCTime, * generalTime GeneralizedTime * } * </pre> */ public class Time extends Asn1Choice { protected enum TimeField implements EnumType { UTC_TIME, GENERAL_TIME; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(TimeField.UTC_TIME, Asn1UtcTime.class), new Asn1FieldInfo(TimeField.GENERAL_TIME, Asn1GeneralizedTime.class) }; public Time() { super(fieldInfos); } public Date getUtcTime() { return getChoiceValueAs(TimeField.UTC_TIME, Asn1UtcTime.class).getValue(); } public void setUtcTime(Asn1UtcTime utcTime) { setChoiceValue(TimeField.UTC_TIME, utcTime); } public Date generalizedTime() { return getChoiceValueAs(TimeField.GENERAL_TIME, Asn1GeneralizedTime.class).getValue(); } public void setGeneralTime(Asn1GeneralizedTime generalTime) { setChoiceValue(TimeField.GENERAL_TIME, generalTime); } }
503
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Certificate.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1BitString; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * <pre> * Certificate ::= SEQUENCE { * tbsCertificate TBSCertificate, * signatureAlgorithm AlgorithmIdentifier, * signature BIT STRING * } * </pre> */ public class Certificate extends Asn1SequenceType { protected enum CertificateField implements EnumType { TBS_CERTIFICATE, SIGNATURE_ALGORITHM, SIGNATURE; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(CertificateField.TBS_CERTIFICATE, TBSCertificate.class), new Asn1FieldInfo(CertificateField.SIGNATURE_ALGORITHM, AlgorithmIdentifier.class), new Asn1FieldInfo(CertificateField.SIGNATURE, Asn1BitString.class) }; public Certificate() { super(fieldInfos); } public TBSCertificate getTBSCertificate() { return getFieldAs(CertificateField.TBS_CERTIFICATE, TBSCertificate.class); } public void setTbsCertificate(TBSCertificate tbsCertificate) { setFieldAs(CertificateField.TBS_CERTIFICATE, tbsCertificate); } public AlgorithmIdentifier getSignatureAlgorithm() { return getFieldAs(CertificateField.SIGNATURE_ALGORITHM, AlgorithmIdentifier.class); } public void setSignatureAlgorithm(AlgorithmIdentifier signatureAlgorithm) { setFieldAs(CertificateField.SIGNATURE_ALGORITHM, signatureAlgorithm); } public Asn1BitString getSignature() { return getFieldAs(CertificateField.SIGNATURE, Asn1BitString.class); } public void setSignature(Asn1BitString signature) { setFieldAs(CertificateField.SIGNATURE, signature); } }
504
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/RevokedCertificate.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * Ref. RFC 2459 * * <pre> * SEQUENCE { * userCertificate CertificateSerialNumber, * revocationDate Time, * crlEntryExtensions Extensions OPTIONAL * -- if present, shall be v2 * } * </pre> */ public class RevokedCertificate extends Asn1SequenceType { protected enum RevokedCertificateField implements EnumType { USER_CERTIFICATE, REVOCATION_DATA, CRL_ENTRY_EXTENSIONS; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(RevokedCertificateField.USER_CERTIFICATE, CertificateSerialNumber.class), new Asn1FieldInfo(RevokedCertificateField.REVOCATION_DATA, Time.class), new Asn1FieldInfo(RevokedCertificateField.CRL_ENTRY_EXTENSIONS, Extensions.class) }; public RevokedCertificate() { super(fieldInfos); } public CertificateSerialNumber getUserCertificate() { return getFieldAs(RevokedCertificateField.USER_CERTIFICATE, CertificateSerialNumber.class); } public void setUserCertificate(CertificateSerialNumber userCertificate) { setFieldAs(RevokedCertificateField.USER_CERTIFICATE, userCertificate); } public Time getRevocationDate() { return getFieldAs(RevokedCertificateField.REVOCATION_DATA, Time.class); } public void setRevocationData(Time revocationData) { setFieldAs(RevokedCertificateField.REVOCATION_DATA, revocationData); } public Extensions getCrlEntryExtensions() { return getFieldAs(RevokedCertificateField.CRL_ENTRY_EXTENSIONS, Extensions.class); } public void setCrlEntryExtensions(Extensions crlEntryExtensions) { setFieldAs(RevokedCertificateField.CRL_ENTRY_EXTENSIONS, crlEntryExtensions); } }
505
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Extensions.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1SequenceOf; /** * <pre> * Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension * * Extension ::= SEQUENCE { * extnId EXTENSION.&amp;id ({ExtensionSet}), * critical BOOLEAN DEFAULT FALSE, * extnValue OCTET STRING * } * </pre> */ public class Extensions extends Asn1SequenceOf<Extension> { }
506
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/TBSCertificate.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ExplicitField; import org.apache.kerby.asn1.ImplicitField; import org.apache.kerby.asn1.type.Asn1BitString; import org.apache.kerby.asn1.type.Asn1Integer; import org.apache.kerby.asn1.type.Asn1SequenceType; import org.apache.kerby.x500.type.Name; /** * <pre> * TBSCertificate ::= SEQUENCE { * version [ 0 ] Version DEFAULT v1(0), * serialNumber CertificateSerialNumber, * signature AlgorithmIdentifier, * issuer Name, * validity Validity, * subject Name, * subjectPublicKeyInfo SubjectPublicKeyInfo, * issuerUniqueID [ 1 ] IMPLICIT UniqueIdentifier OPTIONAL, * subjectUniqueID [ 2 ] IMPLICIT UniqueIdentifier OPTIONAL, * extensions [ 3 ] Extensions OPTIONAL * } * </pre> */ public class TBSCertificate extends Asn1SequenceType { protected enum TBSCertificateField implements EnumType { VERSION, SERIAL_NUMBER, SIGNATURE, ISSUER, VALIDITY, SUBJECT, SUBJECT_PUBLIC_KEY_INFO, ISSUER_UNIQUE_ID, SUBJECT_UNIQUE_ID, EXTENSIONS; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new ExplicitField(TBSCertificateField.VERSION, Asn1Integer.class), new Asn1FieldInfo(TBSCertificateField.SERIAL_NUMBER, CertificateSerialNumber.class), new Asn1FieldInfo(TBSCertificateField.SIGNATURE, AlgorithmIdentifier.class), new Asn1FieldInfo(TBSCertificateField.ISSUER, Name.class), new Asn1FieldInfo(TBSCertificateField.VALIDITY, AttCertValidityPeriod.class), new Asn1FieldInfo(TBSCertificateField.SUBJECT, Name.class), new Asn1FieldInfo(TBSCertificateField.SUBJECT_PUBLIC_KEY_INFO, SubjectPublicKeyInfo.class), new ImplicitField(TBSCertificateField.ISSUER_UNIQUE_ID, 1, Asn1BitString.class), new ImplicitField(TBSCertificateField.SUBJECT_UNIQUE_ID, 2, Asn1BitString.class), new ExplicitField(TBSCertificateField.EXTENSIONS, 3, Extensions.class) }; public TBSCertificate() { super(fieldInfos); } public int getVersion() { return getFieldAsInteger(TBSCertificateField.VERSION); } public void setVersion(int version) { setFieldAsInt(TBSCertificateField.VERSION, version); } public CertificateSerialNumber getSerialNumber() { return getFieldAs(TBSCertificateField.SERIAL_NUMBER, CertificateSerialNumber.class); } public void setSerialNumber(CertificateSerialNumber certificateSerialNumber) { setFieldAs(TBSCertificateField.SERIAL_NUMBER, certificateSerialNumber); } public AlgorithmIdentifier getSignature() { return getFieldAs(TBSCertificateField.SIGNATURE, AlgorithmIdentifier.class); } public void setSignature(AlgorithmIdentifier signature) { setFieldAs(TBSCertificateField.SIGNATURE, signature); } public Name getIssuer() { return getFieldAs(TBSCertificateField.ISSUER, Name.class); } public void setIssuer(Name attCertIssuer) { setFieldAs(TBSCertificateField.ISSUER, attCertIssuer); } public AttCertValidityPeriod getValidity() { return getFieldAs(TBSCertificateField.VALIDITY, AttCertValidityPeriod.class); } public void setValidity(AttCertValidityPeriod validity) { setFieldAs(TBSCertificateField.VALIDITY, validity); } public Name getSubject() { return getFieldAs(TBSCertificateField.SUBJECT, Name.class); } public void setSubject(Name subject) { setFieldAs(TBSCertificateField.SUBJECT, subject); } public SubjectPublicKeyInfo getSubjectPublicKeyInfo() { return getFieldAs(TBSCertificateField.SUBJECT_PUBLIC_KEY_INFO, SubjectPublicKeyInfo.class); } public void setSubjectPublicKeyInfo(SubjectPublicKeyInfo subjectPublicKeyInfo) { setFieldAs(TBSCertificateField.SUBJECT_PUBLIC_KEY_INFO, subjectPublicKeyInfo); } public byte[] getIssuerUniqueID() { return getFieldAs(TBSCertificateField.ISSUER_UNIQUE_ID, Asn1BitString.class).getValue(); } public void setIssuerUniqueId(byte[] issuerUniqueId) { setFieldAs(TBSCertificateField.ISSUER_UNIQUE_ID, new Asn1BitString(issuerUniqueId)); } public byte[] getSubjectUniqueId() { return getFieldAs(TBSCertificateField.ISSUER_UNIQUE_ID, Asn1BitString.class).getValue(); } public void setSubjectUniqueId(byte[] issuerUniqueId) { setFieldAs(TBSCertificateField.SUBJECT_UNIQUE_ID, new Asn1BitString(issuerUniqueId)); } public Extensions getExtensions() { return getFieldAs(TBSCertificateField.EXTENSIONS, Extensions.class); } public void setExtensions(Extensions extensions) { setFieldAs(TBSCertificateField.EXTENSIONS, extensions); } }
507
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/CertificateList.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1BitString; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * * RFC-2459: * <pre> * CertificateList ::= SEQUENCE { * tbsCertList TBSCertList, * signatureAlgorithm AlgorithmIdentifier, * signatureValue BIT STRING * } * </pre> */ public class CertificateList extends Asn1SequenceType { protected enum CertificateListField implements EnumType { TBS_CERT_LIST, SIGNATURE_ALGORITHMS, SIGNATURE_VALUE; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(CertificateListField.TBS_CERT_LIST, TBSCertList.class), new Asn1FieldInfo(CertificateListField.SIGNATURE_ALGORITHMS, AlgorithmIdentifier.class), new Asn1FieldInfo(CertificateListField.SIGNATURE_VALUE, Asn1BitString.class) }; public CertificateList() { super(fieldInfos); } public TBSCertList getTBSCertList() { return getFieldAs(CertificateListField.TBS_CERT_LIST, TBSCertList.class); } public void setTBSCertList(TBSCertList tbsCertList) { setFieldAs(CertificateListField.TBS_CERT_LIST, tbsCertList); } public AlgorithmIdentifier getSignatureAlgorithm() { return getFieldAs(CertificateListField.SIGNATURE_ALGORITHMS, AlgorithmIdentifier.class); } public void setSignatureAlgorithms(AlgorithmIdentifier signatureAlgorithms) { setFieldAs(CertificateListField.SIGNATURE_ALGORITHMS, signatureAlgorithms); } public Asn1BitString getSignature() { return getFieldAs(CertificateListField.SIGNATURE_VALUE, Asn1BitString.class); } public void setSignatureValue(Asn1BitString signatureValue) { setFieldAs(CertificateListField.SIGNATURE_VALUE, signatureValue); } }
508
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/CertificateSerialNumber.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1Integer; public class CertificateSerialNumber extends Asn1Integer { }
509
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/V2Form.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ExplicitField; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * Produce an object suitable for an ASN1OutputStream. * <pre> * V2Form ::= SEQUENCE { * issuerName GeneralNames OPTIONAL, * baseCertificateID [0] IssuerSerial OPTIONAL, * objectDigestInfo [1] ObjectDigestInfo OPTIONAL * -- issuerName MUST be present in this profile * -- baseCertificateID and objectDigestInfo MUST NOT * -- be present in this profile * } * </pre> */ public class V2Form extends Asn1SequenceType { protected enum V2FormField implements EnumType { ISSUER_NAME, BASE_CERTIFICATE_ID, OBJECT_DIGEST_INFO; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(V2FormField.ISSUER_NAME, GeneralNames.class), new ExplicitField(V2FormField.BASE_CERTIFICATE_ID, 0, IssuerSerial.class), new ExplicitField(V2FormField.OBJECT_DIGEST_INFO, 1, ObjectDigestInfo.class) }; public V2Form() { super(fieldInfos); } public GeneralNames getIssuerName() { return getFieldAs(V2FormField.ISSUER_NAME, GeneralNames.class); } public void setIssuerName(GeneralNames issuerName) { setFieldAs(V2FormField.ISSUER_NAME, issuerName); } public IssuerSerial getBaseCertificateID() { return getFieldAs(V2FormField.BASE_CERTIFICATE_ID, IssuerSerial.class); } public void setBaseCertificateId(IssuerSerial baseCertificateId) { setFieldAs(V2FormField.BASE_CERTIFICATE_ID, baseCertificateId); } public ObjectDigestInfo getObjectDigestInfo() { return getFieldAs(V2FormField.OBJECT_DIGEST_INFO, ObjectDigestInfo.class); } public void setObjectDigestInfo(ObjectDigestInfo objectDigestInfo) { setFieldAs(V2FormField.OBJECT_DIGEST_INFO, objectDigestInfo); } }
510
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/CertificatePolicies.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1SequenceOf; /** * * <pre> * CertificatePolicies ::= SEQUENCE SIZE {1..MAX} OF PolicyInformation * </pre> */ public class CertificatePolicies extends Asn1SequenceOf<PolicyInformation> { }
511
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/CRLNumber.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1Integer; /** * <pre> * CRLNumber::= INTEGER(0..MAX) * </pre> */ public class CRLNumber extends Asn1Integer { }
512
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/IetfAttrSyntaxChoices.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1SequenceOf; public class IetfAttrSyntaxChoices extends Asn1SequenceOf<IetfAttrSyntaxChoice> { }
513
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/IssuerSerial.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1BitString; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * <pre> * IssuerSerial ::= SEQUENCE { * issuer GeneralNames, * serial CertificateSerialNumber, * issuerUID UniqueIdentifier OPTIONAL * } * </pre> */ public class IssuerSerial extends Asn1SequenceType { protected enum IssuerSerialField implements EnumType { ISSUER, SERIAL, ISSUER_UID; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(IssuerSerialField.ISSUER, GeneralNames.class), new Asn1FieldInfo(IssuerSerialField.SERIAL, CertificateSerialNumber.class), new Asn1FieldInfo(IssuerSerialField.ISSUER_UID, Asn1BitString.class) }; public IssuerSerial() { super(fieldInfos); } public GeneralNames getIssuer() { return getFieldAs(IssuerSerialField.ISSUER, GeneralNames.class); } public void setIssuer(GeneralNames issuer) { setFieldAs(IssuerSerialField.ISSUER, issuer); } public CertificateSerialNumber getSerial() { return getFieldAs(IssuerSerialField.SERIAL, CertificateSerialNumber.class); } public void setSerial(CertificateSerialNumber serial) { setFieldAs(IssuerSerialField.SERIAL, serial); } public Asn1BitString getIssuerUID() { return getFieldAs(IssuerSerialField.ISSUER_UID, Asn1BitString.class); } public void setIssuerUID(Asn1BitString issuerUID) { setFieldAs(IssuerSerialField.ISSUER_UID, issuerUID); } }
514
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/SubjectDirectoryAttributes.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; /** * Ref. RFC 3039 * <pre> * SubjectDirectoryAttributes ::= Attributes * Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute * Attribute ::= SEQUENCE { * type AttributeType * values SET OF AttributeValue * } * * AttributeType ::= OBJECT IDENTIFIER * AttributeValue ::= ANY DEFINED BY AttributeType * </pre> * */ public class SubjectDirectoryAttributes extends Attributes { }
515
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/KeyIdentifier.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1OctetString; /** * * <pre> * KeyIdentifier ::= OCTET STRING * </pre> * */ public class KeyIdentifier extends Asn1OctetString { }
516
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/EDIPartyName.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ExplicitField; import org.apache.kerby.asn1.type.Asn1Choice; /** * <pre> * EDIPartyName ::= SEQUENCE { * nameAssigner [0] DirectoryString OPTIONAL, * partyName [1] DirectoryString * } * </pre> */ public class EDIPartyName extends Asn1Choice { protected enum EDIPartyNameField implements EnumType { NAME_ASSIGNER, PARTY_NAME; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{ new ExplicitField(EDIPartyNameField.NAME_ASSIGNER, DirectoryString.class), new ExplicitField(EDIPartyNameField.PARTY_NAME, DirectoryString.class) }; public EDIPartyName() { super(fieldInfos); } public DirectoryString getNameAssigner() { return getChoiceValueAs(EDIPartyNameField.NAME_ASSIGNER, DirectoryString.class); } public void setNameAssigner(DirectoryString nameAssigner) { setChoiceValue(EDIPartyNameField.NAME_ASSIGNER, nameAssigner); } public DirectoryString getPartyName() { return getChoiceValueAs(EDIPartyNameField.PARTY_NAME, DirectoryString.class); } public void setPartyName(DirectoryString partyName) { setChoiceValue(EDIPartyNameField.PARTY_NAME, partyName); } }
517
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttCertValidityPeriod.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1GeneralizedTime; import org.apache.kerby.asn1.type.Asn1SequenceType; import org.apache.kerby.asn1.type.Asn1UtcTime; /** * <pre> * AttCertValidityPeriod ::= SEQUENCE { * notBeforeTime GeneralizedTime, * notAfterTime GeneralizedTime * } * </pre> */ public class AttCertValidityPeriod extends Asn1SequenceType { protected enum AttCertValidityPeriodField implements EnumType { NOT_BEFORE, NOT_AFTER; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(AttCertValidityPeriodField.NOT_BEFORE, Asn1UtcTime.class), new Asn1FieldInfo(AttCertValidityPeriodField.NOT_AFTER, Asn1UtcTime.class) }; public AttCertValidityPeriod() { super(fieldInfos); } public Asn1GeneralizedTime getNotBeforeTime() { return getFieldAs(AttCertValidityPeriodField.NOT_BEFORE, Asn1GeneralizedTime.class); } public void setNotBeforeTime(Asn1GeneralizedTime notBeforeTime) { setFieldAs(AttCertValidityPeriodField.NOT_BEFORE, notBeforeTime); } public Asn1GeneralizedTime getNotAfterTime() { return getFieldAs(AttCertValidityPeriodField.NOT_AFTER, Asn1GeneralizedTime.class); } public void setNotAfterTime(Asn1GeneralizedTime notAfterTime) { setFieldAs(AttCertValidityPeriodField.NOT_AFTER, notAfterTime); } }
518
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/PolicyInformation.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1SequenceType; /* * <pre> * PolicyInformation ::= SEQUENCE { * policyIdentifier CertPolicyId, * policyQualifiers SEQUENCE SIZE (1..MAX) OF * PolicyQualifierInfo OPTIONAL } * </pre> */ public class PolicyInformation extends Asn1SequenceType { protected enum PolicyInformationField implements EnumType { POLICY_IDENTIFIER, POLICY_QUALIFIERS; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(PolicyInformationField.POLICY_IDENTIFIER, CertPolicyId.class), new Asn1FieldInfo(PolicyInformationField.POLICY_QUALIFIERS, PolicyQualifierInfos.class) }; public PolicyInformation() { super(fieldInfos); } public CertPolicyId getPolicyIdentifier() { return getFieldAs(PolicyInformationField.POLICY_IDENTIFIER, CertPolicyId.class); } public void setPolicyIdentifier(CertPolicyId policyIdentifier) { setFieldAs(PolicyInformationField.POLICY_IDENTIFIER, policyIdentifier); } public PolicyQualifierInfos getPolicyQualifiers() { return getFieldAs(PolicyInformationField.POLICY_QUALIFIERS, PolicyQualifierInfos.class); } public void setPolicyQualifiers(PolicyQualifierInfos policyQualifiers) { setFieldAs(PolicyInformationField.POLICY_QUALIFIERS, policyQualifiers); } }
519
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/IssuingDistributionPoint.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ExplicitField; import org.apache.kerby.asn1.type.Asn1Boolean; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * <pre> * IssuingDistributionPoint ::= SEQUENCE { * distributionPoint [0] DistributionPointName OPTIONAL, * onlyContainsUserCerts [1] BOOLEAN DEFAULT FALSE, * onlyContainsCACerts [2] BOOLEAN DEFAULT FALSE, * onlySomeReasons [3] ReasonFlags OPTIONAL, * indirectCRL [4] BOOLEAN DEFAULT FALSE, * onlyContainsAttributeCerts [5] BOOLEAN DEFAULT FALSE * } * </pre> */ public class IssuingDistributionPoint extends Asn1SequenceType { protected enum IDPointField implements EnumType { DISTRIBUTION_POINT, ONLY_CONTAINS_USER_CERTS, ONLY_CONTAINS_CA_CERTS, ONLY_SOME_REASONS, INDIRECT_CRL, ONLY_CONTAINS_ATTRIBUTE_CERTS; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new ExplicitField(IDPointField.DISTRIBUTION_POINT, DistributionPointName.class), new ExplicitField(IDPointField.ONLY_CONTAINS_USER_CERTS, Asn1Boolean.class), new ExplicitField(IDPointField.ONLY_CONTAINS_CA_CERTS, Asn1Boolean.class), new ExplicitField(IDPointField.ONLY_SOME_REASONS, ReasonFlags.class), new ExplicitField(IDPointField.INDIRECT_CRL, Asn1Boolean.class), new ExplicitField(IDPointField.ONLY_CONTAINS_ATTRIBUTE_CERTS, Asn1Boolean.class) }; public IssuingDistributionPoint() { super(fieldInfos); } public DistributionPointName getDistributionPoint() { return getFieldAs(IDPointField.DISTRIBUTION_POINT, DistributionPointName.class); } public void setDistributionPoint(DistributionPointName distributionPoint) { setFieldAs(IDPointField.DISTRIBUTION_POINT, distributionPoint); } public boolean getOnlyContainsUserCerts() { return getFieldAs(IDPointField.ONLY_CONTAINS_USER_CERTS, Asn1Boolean.class).getValue(); } public void setOnlyContainsUserCerts(boolean onlyContainsUserCerts) { setFieldAs(IDPointField.ONLY_CONTAINS_USER_CERTS, new Asn1Boolean(onlyContainsUserCerts)); } public boolean getOnlyContainsCACerts() { return getFieldAs(IDPointField.ONLY_CONTAINS_CA_CERTS, Asn1Boolean.class).getValue(); } public void setOnlyContainsCaCerts(boolean onlyContainsCaCerts) { setFieldAs(IDPointField.ONLY_CONTAINS_CA_CERTS, new Asn1Boolean(onlyContainsCaCerts)); } public ReasonFlags getOnlySomeReasons() { return getFieldAs(IDPointField.ONLY_SOME_REASONS, ReasonFlags.class); } public void setOnlySomeReasons(ReasonFlags onlySomeReasons) { setFieldAs(IDPointField.ONLY_SOME_REASONS, onlySomeReasons); } public boolean getIndirectCRL() { return getFieldAs(IDPointField.INDIRECT_CRL, Asn1Boolean.class).getValue(); } public void setIndirectCrl(boolean indirectCrl) { setFieldAs(IDPointField.INDIRECT_CRL, new Asn1Boolean(indirectCrl)); } public boolean getOnlyContainsAttributeCerts() { return getFieldAs(IDPointField.ONLY_CONTAINS_ATTRIBUTE_CERTS, Asn1Boolean.class).getValue(); } public void setOnlyContainsAttributeCerts(boolean onlyContainsAttributeCerts) { setFieldAs(IDPointField.ONLY_CONTAINS_ATTRIBUTE_CERTS, new Asn1Boolean(onlyContainsAttributeCerts)); } }
520
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/OtherName.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ExplicitField; import org.apache.kerby.asn1.type.Asn1Any; import org.apache.kerby.asn1.type.Asn1ObjectIdentifier; import org.apache.kerby.asn1.type.Asn1SequenceType; import org.apache.kerby.asn1.type.Asn1Type; /** * <pre> * OtherName ::= SEQUENCE { * type-id OBJECT IDENTIFIER, * value [0] EXPLICIT ANY DEFINED BY type-id * } * * </pre> */ public class OtherName extends Asn1SequenceType { protected enum OtherNameField implements EnumType { TYPE_ID, VALUE; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(OtherNameField.TYPE_ID, Asn1ObjectIdentifier.class), new ExplicitField(OtherNameField.VALUE, 0, Asn1Any.class) }; public OtherName() { super(fieldInfos); } public Asn1ObjectIdentifier getTypeId() { return getFieldAs(OtherNameField.TYPE_ID, Asn1ObjectIdentifier.class); } public void setTypeId(Asn1ObjectIdentifier algorithm) { setFieldAs(OtherNameField.TYPE_ID, algorithm); } public <T extends Asn1Type> T getOtherNameValueAs(Class<T> t) { return getFieldAsAny(OtherNameField.VALUE, t); } public void setOtherNameValue(Asn1Type value) { setFieldAsAny(OtherNameField.VALUE, value); } }
521
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/KeyPurposeId.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1ObjectIdentifier; /** * * <pre> * KeyPurposeId ::= OBJECT IDENTIFIER * * id-kp ::= OBJECT IDENTIFIER { iso(1) identified-organization(3) * dod(6) internet(1) security(5) mechanisms(5) pkix(7) 3} * * </pre> */ public class KeyPurposeId extends Asn1ObjectIdentifier { }
522
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DisplayText.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1BmpString; import org.apache.kerby.asn1.type.Asn1Choice; import org.apache.kerby.asn1.type.Asn1IA5String; import org.apache.kerby.asn1.type.Asn1Utf8String; import org.apache.kerby.asn1.type.Asn1VisibleString; /** * <pre> * DisplayText ::= CHOICE { * ia5String IA5String (SIZE (1..200)), * visibleString VisibleString (SIZE (1..200)), * bmpString BMPString (SIZE (1..200)), * utf8String UTF8String (SIZE (1..200)) * } * </pre> */ public class DisplayText extends Asn1Choice { protected enum DisplayTextField implements EnumType { IA5_STRING, VISIBLE_STRING, BMP_STRING, UTF8_STRING; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{ new Asn1FieldInfo(DisplayTextField.IA5_STRING, Asn1IA5String.class), new Asn1FieldInfo(DisplayTextField.VISIBLE_STRING, Asn1VisibleString.class), new Asn1FieldInfo(DisplayTextField.BMP_STRING, Asn1BmpString.class), new Asn1FieldInfo(DisplayTextField.UTF8_STRING, Asn1BmpString.class) }; public DisplayText() { super(fieldInfos); } public Asn1IA5String getIA5String() { return getChoiceValueAs(DisplayTextField.IA5_STRING, Asn1IA5String.class); } public void setIA5String(Asn1IA5String ia5String) { setChoiceValue(DisplayTextField.IA5_STRING, ia5String); } public Asn1VisibleString getVisibleString() { return getChoiceValueAs(DisplayTextField.VISIBLE_STRING, Asn1VisibleString.class); } public void setVisibleString(Asn1VisibleString visibleString) { setChoiceValue(DisplayTextField.VISIBLE_STRING, visibleString); } public Asn1BmpString getBmpString() { return getChoiceValueAs(DisplayTextField.BMP_STRING, Asn1BmpString.class); } public void setBmpString(Asn1BmpString bmpString) { setChoiceValue(DisplayTextField.BMP_STRING, bmpString); } public Asn1Utf8String getUtf8String() { return getChoiceValueAs(DisplayTextField.UTF8_STRING, Asn1Utf8String.class); } public void setUtf8String(Asn1Utf8String utf8String) { setChoiceValue(DisplayTextField.UTF8_STRING, utf8String); } }
523
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/PolicyMapping.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * Ref. RFC3280 * <pre> * PolicyMappings ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE { * issuerDomainPolicy CertPolicyId, * subjectDomainPolicy CertPolicyId } * </pre> * */ public class PolicyMapping extends Asn1SequenceType { protected enum PolicyMappingField implements EnumType { ISSUER_DOMAIN_POLICY, SUBJECT_DOMAIN_POLICY; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(PolicyMappingField.ISSUER_DOMAIN_POLICY, CertPolicyId.class), new Asn1FieldInfo(PolicyMappingField.SUBJECT_DOMAIN_POLICY, CertPolicyId.class) }; public PolicyMapping() { super(fieldInfos); } public CertPolicyId getIssuerDomainPolicy() { return getFieldAs(PolicyMappingField.ISSUER_DOMAIN_POLICY, CertPolicyId.class); } public void setIssuerDomainPolicy(CertPolicyId issuerDomainPolicy) { setFieldAs(PolicyMappingField.ISSUER_DOMAIN_POLICY, issuerDomainPolicy); } public CertPolicyId getSubjectDomainPolicy() { return getFieldAs(PolicyMappingField.SUBJECT_DOMAIN_POLICY, CertPolicyId.class); } public void setSubjectDomainPolicy(CertPolicyId subjectDomainPolicy) { setFieldAs(PolicyMappingField.SUBJECT_DOMAIN_POLICY, subjectDomainPolicy); } }
524
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Targets.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1SequenceOf; /** * Ref. RFC 3281 * * <pre> * Targets ::= SEQUENCE OF Target * * Target ::= CHOICE { * targetName [0] GeneralName, * targetGroup [1] GeneralName, * targetCert [2] TargetCert * } * * TargetCert ::= SEQUENCE { * targetCertificate IssuerSerial, * targetName GeneralName OPTIONAL, * certDigestInfo ObjectDigestInfo OPTIONAL * } * </pre> */ public class Targets extends Asn1SequenceOf<Target> { }
525
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/CRLReason.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1Enumerated; /** * * <pre> * CRLReason ::= ENUMERATED { * unspecified (0), * keyCompromise (1), * cACompromise (2), * affiliationChanged (3), * superseded (4), * cessationOfOperation (5), * certificateHold (6), * removeFromCRL (8), * privilegeWithdrawn (9), * aACompromise (10) * } * </pre> */ enum CRLReasonEnum implements EnumType { UNSPECIFIED, KEY_COMPROMISE, CA_COMPROMISE, AFFILIATION_CHANGED, SUPERSEDED, CESSATION_OF_OPERATION, CERTIFICATE_HOLD, REMOVE_FROM_CRL, PRIVILEGE_WITH_DRAWN, AA_COMPROMISE; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } public class CRLReason extends Asn1Enumerated<CRLReasonEnum> { @Override public EnumType[] getAllEnumValues() { return CRLReasonEnum.values(); } }
526
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/NameConstraints.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ExplicitField; import org.apache.kerby.asn1.type.Asn1SequenceType; /* * NameConstraints ::= SEQUENCE { * permittedSubtrees [0] GeneralSubtrees OPTIONAL, * excludedSubtrees [1] GeneralSubtrees OPTIONAL * } */ public class NameConstraints extends Asn1SequenceType { protected enum NameConstraintsField implements EnumType { PERMITTED_SUBTREES, EXCLUDED_SUBTREES; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new ExplicitField(NameConstraintsField.PERMITTED_SUBTREES, GeneralSubtrees.class), new ExplicitField(NameConstraintsField.EXCLUDED_SUBTREES, GeneralSubtrees.class) }; public NameConstraints() { super(fieldInfos); } public GeneralSubtrees getPermittedSubtrees() { return getFieldAs(NameConstraintsField.PERMITTED_SUBTREES, GeneralSubtrees.class); } public void setPermittedSubtrees(GeneralSubtrees permittedSubtrees) { setFieldAs(NameConstraintsField.PERMITTED_SUBTREES, permittedSubtrees); } public GeneralSubtrees getExcludedSubtrees() { return getFieldAs(NameConstraintsField.EXCLUDED_SUBTREES, GeneralSubtrees.class); } public void setExcludedSubtrees(GeneralSubtrees excludedSubtrees) { setFieldAs(NameConstraintsField.EXCLUDED_SUBTREES, excludedSubtrees); } }
527
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/PolicyQualifierId.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1ObjectIdentifier; /** * <pre> * id-qt OBJECT IDENTIFIER ::= { id-pkix 2 } * id-qt-cps OBJECT IDENTIFIER ::= { id-qt 1 } * id-qt-unotice OBJECT IDENTIFIER ::= { id-qt 2 } * PolicyQualifierId ::= * OBJECT IDENTIFIER (id-qt-cps | id-qt-unotice) * </pre> */ public class PolicyQualifierId extends Asn1ObjectIdentifier { }
528
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Attribute.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1ObjectIdentifier; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * <pre> * Attribute ::= SEQUENCE { * attrType OBJECT IDENTIFIER, * attrValues SET OF AttributeValue * } * * AttributeValue ::= ANY * * </pre> */ public class Attribute extends Asn1SequenceType { protected enum AttributeField implements EnumType { ATTR_TYPE, ATTR_VALUES; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(AttributeField.ATTR_TYPE, Asn1ObjectIdentifier.class), new Asn1FieldInfo(AttributeField.ATTR_VALUES, AttributeValues.class) }; public Attribute() { super(fieldInfos); } public Asn1ObjectIdentifier getAttrType() { return getFieldAs(AttributeField.ATTR_TYPE, Asn1ObjectIdentifier.class); } public void setAttrType(Asn1ObjectIdentifier attrType) { setFieldAs(AttributeField.ATTR_TYPE, attrType); } public AttributeValues getAttrValues() { return getFieldAs(AttributeField.ATTR_VALUES, AttributeValues.class); } public void setAttrValues(AttributeValues attrValues) { setFieldAs(AttributeField.ATTR_VALUES, attrValues); } }
529
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttributeValues.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1Any; import org.apache.kerby.asn1.type.Asn1SetOf; /** * Ref. RFC 5652 * <pre> * Attribute ::= SEQUENCE { * attrType OBJECT IDENTIFIER, * attrValues SET OF AttributeValue * } * * AttributeValue ::= ANY * </pre> */ public class AttributeValues extends Asn1SetOf<Asn1Any> { }
530
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/SubjectKeyIdentifier.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1OctetString; /** * * <pre> * SubjectKeyIdentifier::= OCTET STRING * </pre> */ public class SubjectKeyIdentifier extends Asn1OctetString { }
531
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/PolicyMappings.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1SequenceOf; /** * Ref. RFC3280. * <pre> * PolicyMappings ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE { * issuerDomainPolicy CertPolicyId, * subjectDomainPolicy CertPolicyId } * </pre> */ public class PolicyMappings extends Asn1SequenceOf<PolicyMapping> { }
532
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/NoticeNumbers.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1Integer; import org.apache.kerby.asn1.type.Asn1SequenceOf; /** * <pre> * noticeNumbers ::= SEQUENCE OF INTEGER } * </pre> */ public class NoticeNumbers extends Asn1SequenceOf<Asn1Integer> { }
533
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AlgorithmIdentifier.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1Any; import org.apache.kerby.asn1.type.Asn1ObjectIdentifier; import org.apache.kerby.asn1.type.Asn1SequenceType; import org.apache.kerby.asn1.type.Asn1Type; /** * AlgorithmIdentifier ::= SEQUENCE { * algorithm OBJECT IDENTIFIER, * parameters ANY DEFINED BY algorithm OPTIONAL * } */ public class AlgorithmIdentifier extends Asn1SequenceType { protected enum AlgorithmIdentifierField implements EnumType { ALGORITHM, PARAMETERS; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{ new Asn1FieldInfo(AlgorithmIdentifierField.ALGORITHM, Asn1ObjectIdentifier.class), new Asn1FieldInfo(AlgorithmIdentifierField.PARAMETERS, Asn1Any.class) }; public AlgorithmIdentifier() { super(fieldInfos); } public String getAlgorithm() { return getFieldAsObjId(AlgorithmIdentifierField.ALGORITHM); } public void setAlgorithm(String algorithm) { setFieldAsObjId(AlgorithmIdentifierField.ALGORITHM, algorithm); } public <T extends Asn1Type> T getParametersAs(Class<T> t) { return getFieldAsAny(AlgorithmIdentifierField.PARAMETERS, t); } public void setParameters(Asn1Type parameters) { setFieldAsAny(AlgorithmIdentifierField.PARAMETERS, parameters); } }
534
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/KeyUsage.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1Flags; /** * The KeyUsage object. * <pre> * id-ce-keyUsage OBJECT IDENTIFIER ::= { id-ce 15 } * * KeyUsage ::= BIT STRING { * digitalSignature (0), * nonRepudiation (1), * keyEncipherment (2), * dataEncipherment (3), * keyAgreement (4), * keyCertSign (5), * cRLSign (6), * encipherOnly (7), * decipherOnly (8) } * </pre> */ enum KeyUsageEnum implements EnumType { DIGITAL_SIGNATURE, NON_REPUDIATION, KEY_ENCIPHERMENT, DATA_ENCIPHERMENT, KEY_AGREEMENT, KEY_CERT_SIGN, CRL_SIGN, ENCIPHER_ONLY, DECIPHER_ONLY; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } public class KeyUsage extends Asn1Flags { }
535
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/PolicyQualifierInfos.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1SequenceOf; /* * <pre> * policyQualifiers SEQUENCE SIZE (1..MAX) OF * PolicyQualifierInfo OPTIONAL * </pre> */ public class PolicyQualifierInfos extends Asn1SequenceOf<PolicyQualifierInfo> { }
536
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Target.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ExplicitField; import org.apache.kerby.asn1.type.Asn1Choice; /** * Ref. RFC 3281 * <pre> * Target ::= CHOICE { * targetName [0] GeneralName, * targetGroup [1] GeneralName, * targetCert [2] TargetCert * } * </pre> */ public class Target extends Asn1Choice { protected enum TargetField implements EnumType { TARGET_NAME, TARGET_GROUP, TARGET_CERT; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new ExplicitField(TargetField.TARGET_NAME, GeneralName.class), new ExplicitField(TargetField.TARGET_GROUP, GeneralName.class), new ExplicitField(TargetField.TARGET_CERT, TargetCert.class), }; public Target() { super(fieldInfos); } public GeneralName getTargetName() { return getChoiceValueAs(TargetField.TARGET_NAME, GeneralName.class); } public void setTargetName(GeneralName targetName) { setChoiceValue(TargetField.TARGET_NAME, targetName); } public GeneralName getTargetGroup() { return getChoiceValueAs(TargetField.TARGET_GROUP, GeneralName.class); } public void setTargetGroup(GeneralName targetGroup) { setChoiceValue(TargetField.TARGET_GROUP, targetGroup); } public TargetCert targetCert() { return getChoiceValueAs(TargetField.TARGET_CERT, TargetCert.class); } public void setTargetCert(TargetCert targetCert) { setChoiceValue(TargetField.TARGET_CERT, targetCert); } }
537
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/RoleSyntax.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ExplicitField; import org.apache.kerby.asn1.type.Asn1SequenceType; /** *Ref. RFC3281 * <pre> * RoleSyntax ::= SEQUENCE { * roleAuthority [0] GeneralNames OPTIONAL, * roleName [1] GeneralName * } * </pre> */ public class RoleSyntax extends Asn1SequenceType { protected enum RoleSyntaxField implements EnumType { ROLE_AUTHORITY, ROLE_NAME; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new ExplicitField(RoleSyntaxField.ROLE_AUTHORITY, GeneralNames.class), new ExplicitField(RoleSyntaxField.ROLE_NAME, GeneralName.class) }; public RoleSyntax() { super(fieldInfos); } public GeneralNames getRoleAuthority() { return getFieldAs(RoleSyntaxField.ROLE_AUTHORITY, GeneralNames.class); } public void setRoleAuthority(GeneralNames roleAuthority) { setFieldAs(RoleSyntaxField.ROLE_AUTHORITY, roleAuthority); } public GeneralName getRoleName() { return getFieldAs(RoleSyntaxField.ROLE_NAME, GeneralName.class); } public void setRoleName(GeneralName roleName) { setFieldAs(RoleSyntaxField.ROLE_NAME, roleName); } }
538
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DistributionPointName.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ExplicitField; import org.apache.kerby.asn1.type.Asn1Choice; import org.apache.kerby.x500.type.RelativeDistinguishedName; /** * * <pre> * DistributionPointName ::= CHOICE { * fullName [0] GeneralNames, * nameRelativeToCRLIssuer [1] RDN * } * </pre> */ public class DistributionPointName extends Asn1Choice { protected enum DPNameField implements EnumType { FULL_NAME, NAME_RELATIVE_TO_CRL_ISSUER; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new ExplicitField(DPNameField.FULL_NAME, GeneralNames.class), new ExplicitField(DPNameField.NAME_RELATIVE_TO_CRL_ISSUER, RelativeDistinguishedName.class) }; public DistributionPointName() { super(fieldInfos); } public GeneralNames getFullName() { return getChoiceValueAs(DPNameField.FULL_NAME, GeneralNames.class); } public void setFullName(GeneralNames fullName) { setChoiceValue(DPNameField.FULL_NAME, fullName); } public RelativeDistinguishedName getNameRelativeToCRLIssuer() { return getChoiceValueAs(DPNameField.NAME_RELATIVE_TO_CRL_ISSUER, RelativeDistinguishedName.class); } public void setNameRelativeToCrlIssuer(RelativeDistinguishedName nameRelativeToCrlIssuer) { setChoiceValue(DPNameField.NAME_RELATIVE_TO_CRL_ISSUER, nameRelativeToCrlIssuer); } }
539
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/TargetInformation.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1SequenceOf; /** * Ref. RFC 3281 * * <pre> * TargetInformation ::= SEQUENCE OF Targets * </pre> * */ public class TargetInformation extends Asn1SequenceOf<Target> { }
540
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/RevokedCertificates.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1SequenceOf; /** * Ref. RFC-2459 * <pre> * revokedCertificates SEQUENCE OF SEQUENCE { * userCertificate CertificateSerialNumber, * revocationDate Time, * crlEntryExtensions Extensions OPTIONAL * -- if present, shall be v2 * } * * </pre> */ public class RevokedCertificates extends Asn1SequenceOf<RevokedCertificate> { }
541
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DistributionPoint.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ExplicitField; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * * <pre> * DistributionPoint ::= SEQUENCE { * distributionPoint [0] DistributionPointName OPTIONAL, * reasons [1] ReasonFlags OPTIONAL, * cRLIssuer [2] GeneralNames OPTIONAL * } * </pre> */ public class DistributionPoint extends Asn1SequenceType { protected enum DistributionPointField implements EnumType { DISTRIBUTION_POINT, REASONS, CRL_ISSUER; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new ExplicitField(DistributionPointField.DISTRIBUTION_POINT, DistributionPointName.class), new ExplicitField(DistributionPointField.REASONS, ReasonFlags.class), new ExplicitField(DistributionPointField.CRL_ISSUER, GeneralNames.class) }; public DistributionPoint() { super(fieldInfos); } public DistributionPointName getDistributionPoint() { return getFieldAs(DistributionPointField.DISTRIBUTION_POINT, DistributionPointName.class); } public void setDistributionPoint(DistributionPointName distributionPoint) { setFieldAs(DistributionPointField.DISTRIBUTION_POINT, distributionPoint); } public ReasonFlags getReasons() { return getFieldAs(DistributionPointField.REASONS, ReasonFlags.class); } public void setReasons(ReasonFlags reasons) { setFieldAs(DistributionPointField.REASONS, reasons); } public GeneralNames getCRLIssuer() { return getFieldAs(DistributionPointField.CRL_ISSUER, GeneralNames.class); } public void setCRLIssuer(GeneralNames crlIssuer) { setFieldAs(DistributionPointField.CRL_ISSUER, crlIssuer); } }
542
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/CRLDistPoint.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1SequenceOf; /** * <pre> * CRLDistPoint ::= SEQUENCE SIZE {1..MAX} OF DistributionPoint * </pre> */ public class CRLDistPoint extends Asn1SequenceOf<DistributionPoint> { }
543
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/ExtendedKeyUsage.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1SequenceOf; /** * <pre> * extendedKeyUsage ::= SEQUENCE SIZE (1..MAX) OF KeyPurposeId * </pre> */ public class ExtendedKeyUsage extends Asn1SequenceOf<KeyPurposeId> { }
544
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttributeCertificate.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1BitString; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * <pre> * AttributeCertificate ::= SEQUENCE { * acinfo AttributeCertificateInfo, * signatureAlgorithm AlgorithmIdentifier, * signatureValue BIT STRING * } * </pre> */ public class AttributeCertificate extends Asn1SequenceType { protected enum AttributeCertificateField implements EnumType { ACI_INFO, SIGNATURE_ALGORITHM, SIGNATURE_VALUE; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(AttributeCertificateField.ACI_INFO, AttributeCertificateInfo.class), new Asn1FieldInfo(AttributeCertificateField.SIGNATURE_ALGORITHM, AlgorithmIdentifier.class), new Asn1FieldInfo(AttributeCertificateField.SIGNATURE_VALUE, Asn1BitString.class) }; public AttributeCertificate() { super(fieldInfos); } public AttributeCertificateInfo getAcinfo() { return getFieldAs(AttributeCertificateField.ACI_INFO, AttributeCertificateInfo.class); } public void setAciInfo(AttributeCertificateInfo aciInfo) { setFieldAs(AttributeCertificateField.ACI_INFO, aciInfo); } public AlgorithmIdentifier getSignatureAlgorithm() { return getFieldAs(AttributeCertificateField.SIGNATURE_ALGORITHM, AlgorithmIdentifier.class); } public void setSignatureAlgorithm(AlgorithmIdentifier signatureAlgorithm) { setFieldAs(AttributeCertificateField.SIGNATURE_ALGORITHM, signatureAlgorithm); } public Asn1BitString getSignatureValue() { return getFieldAs(AttributeCertificateField.SIGNATURE_VALUE, Asn1BitString.class); } public void setSignatureValue(Asn1BitString signatureValue) { setFieldAs(AttributeCertificateField.SIGNATURE_VALUE, signatureValue); } }
545
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/GeneralSubtree.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ExplicitField; import org.apache.kerby.asn1.type.Asn1Integer; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * * Ref. RFC 3280. * <pre> * GeneralSubtree ::= SEQUENCE { * base GeneralName, * minimum [0] BaseDistance DEFAULT 0, * maximum [1] BaseDistance OPTIONAL * } * </pre> * */ public class GeneralSubtree extends Asn1SequenceType { protected enum GeneralSubtreeField implements EnumType { BASE, MINIMUM, MAXMUM; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(GeneralSubtreeField.BASE, GeneralName.class), new ExplicitField(GeneralSubtreeField.MINIMUM, 0, Asn1Integer.class), new ExplicitField(GeneralSubtreeField.MAXMUM, 1, Asn1Integer.class) }; public GeneralSubtree() { super(fieldInfos); } public GeneralName getBase() { return getFieldAs(GeneralSubtreeField.BASE, GeneralName.class); } public void setBase(GeneralName base) { setFieldAs(GeneralSubtreeField.BASE, base); } public int getMinimum() { return getFieldAsInteger(GeneralSubtreeField.MINIMUM); } public void setMinimum(int minimum) { setFieldAsInt(GeneralSubtreeField.MINIMUM, minimum); } public int getMaximum() { return getFieldAsInteger(GeneralSubtreeField.MAXMUM); } public void setMaxmum(int maxmum) { setFieldAsInt(GeneralSubtreeField.MAXMUM, maxmum); } }
546
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AccessDescription.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1ObjectIdentifier; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * * <pre> * AccessDescription ::= SEQUENCE { * accessMethod OBJECT IDENTIFIER, * accessLocation GeneralName * } * </pre> */ public class AccessDescription extends Asn1SequenceType { protected enum AccessDescriptionField implements EnumType { ACCESS_METHOD, ACCESS_LOCATION; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(AccessDescriptionField.ACCESS_METHOD, Asn1ObjectIdentifier.class), new Asn1FieldInfo(AccessDescriptionField.ACCESS_LOCATION, GeneralName.class) }; public AccessDescription() { super(fieldInfos); } public Asn1ObjectIdentifier getAccessMethod() { return getFieldAs(AccessDescriptionField.ACCESS_METHOD, Asn1ObjectIdentifier.class); } public void setAccessMethod(Asn1ObjectIdentifier accessMethod) { setFieldAs(AccessDescriptionField.ACCESS_METHOD, accessMethod); } public GeneralName getAccessLocation() { return getFieldAs(AccessDescriptionField.ACCESS_LOCATION, GeneralName.class); } public void setAccessLocation(GeneralName accessLocation) { setFieldAs(AccessDescriptionField.ACCESS_LOCATION, accessLocation); } }
547
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x509/type/SubjectPublicKeyInfo.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1BitString; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * SubjectPublicKeyInfo ::= SEQUENCE { * algorithm AlgorithmIdentifier, * subjectPublicKey BIT STRING * } */ public class SubjectPublicKeyInfo extends Asn1SequenceType { protected enum SubjectPublicKeyInfoField implements EnumType { ALGORITHM, SUBJECT_PUBLIC_KEY; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(SubjectPublicKeyInfoField.ALGORITHM, AlgorithmIdentifier.class), new Asn1FieldInfo(SubjectPublicKeyInfoField.SUBJECT_PUBLIC_KEY, Asn1BitString.class) }; public SubjectPublicKeyInfo() { super(fieldInfos); } public AlgorithmIdentifier getAlgorithm() { return getFieldAs(SubjectPublicKeyInfoField.ALGORITHM, AlgorithmIdentifier.class); } public void setAlgorithm(AlgorithmIdentifier algorithm) { setFieldAs(SubjectPublicKeyInfoField.ALGORITHM, algorithm); } public Asn1BitString getSubjectPubKey() { return getFieldAs(SubjectPublicKeyInfoField.SUBJECT_PUBLIC_KEY, Asn1BitString.class); } public void setSubjectPubKey(byte[] subjectPubKey) { setFieldAs(SubjectPublicKeyInfoField.SUBJECT_PUBLIC_KEY, new Asn1BitString(subjectPubKey)); } }
548
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x500
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x500/type/RelativeDistinguishedName.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x500.type; import org.apache.kerby.asn1.type.Asn1SetOf; /** * RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue */ public class RelativeDistinguishedName extends Asn1SetOf<AttributeTypeAndValue> { }
549
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x500
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x500/type/RDNSequence.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x500.type; import org.apache.kerby.asn1.type.Asn1SequenceOf; /** * RDNSequence ::= SEQUENCE OF RelativeDistinguishedName */ public class RDNSequence extends Asn1SequenceOf<RelativeDistinguishedName> { }
550
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x500
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x500/type/Name.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x500.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1Choice; /** * * <pre> * Name ::= CHOICE { RDNSequence } * </pre> */ public class Name extends Asn1Choice { protected enum NameField implements EnumType { RDN_SEQUENCE; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{ new Asn1FieldInfo(NameField.RDN_SEQUENCE, RDNSequence.class), }; public Name() { super(fieldInfos); } public RDNSequence getName() { return getChoiceValueAs(NameField.RDN_SEQUENCE, RDNSequence.class); } public void setName(RDNSequence name) { setChoiceValue(NameField.RDN_SEQUENCE, name); } }
551
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x500
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/x500/type/AttributeTypeAndValue.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x500.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1Any; import org.apache.kerby.asn1.type.Asn1ObjectIdentifier; import org.apache.kerby.asn1.type.Asn1SequenceType; import org.apache.kerby.asn1.type.Asn1Type; /** * AttributeTypeAndValue ::= SEQUENCE { * type OBJECT IDENTIFIER, * value ANY * } */ public class AttributeTypeAndValue extends Asn1SequenceType { protected enum AttributeTypeAndValueField implements EnumType { TYPE, VALUE; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{ new Asn1FieldInfo(AttributeTypeAndValueField.TYPE, -1, Asn1ObjectIdentifier.class, true), new Asn1FieldInfo(AttributeTypeAndValueField.VALUE, -1, Asn1Any.class, true) }; public AttributeTypeAndValue() { super(fieldInfos); } public Asn1ObjectIdentifier getType() { return getFieldAs(AttributeTypeAndValueField.TYPE, Asn1ObjectIdentifier.class); } public void setType(Asn1ObjectIdentifier type) { setFieldAs(AttributeTypeAndValueField.TYPE, type); } public <T extends Asn1Type> T getAttributeValueAs(Class<T> t) { return getFieldAsAny(AttributeTypeAndValueField.VALUE, t); } public void setAttributeValue(Asn1Type value) { setFieldAsAny(AttributeTypeAndValueField.VALUE, value); } }
552
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/RelativeDistinguishedName.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.type.Asn1SetOf; import org.apache.kerby.x500.type.AttributeTypeAndValue; /** * RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue */ public class RelativeDistinguishedName extends Asn1SetOf<AttributeTypeAndValue> { }
553
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/EncryptedContentInfo.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ImplicitField; import org.apache.kerby.asn1.type.Asn1ObjectIdentifier; import org.apache.kerby.asn1.type.Asn1OctetString; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * EncryptedContentInfo ::= SEQUENCE { * contentType ContentType, * contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier, * encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL } * * ContentType ::= OBJECT IDENTIFIER * * EncryptedContent ::= OCTET STRING */ public class EncryptedContentInfo extends Asn1SequenceType { protected enum ECInfoField implements EnumType { CONTENT_TYPE, CONTENT_ENCRYPTION_ALGORITHM, ENCRYPTED_CONTENT; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(ECInfoField.CONTENT_TYPE, Asn1ObjectIdentifier.class), new Asn1FieldInfo(ECInfoField.CONTENT_ENCRYPTION_ALGORITHM, ContentEncryptionAlgorithmIdentifier.class), new ImplicitField(ECInfoField.ENCRYPTED_CONTENT, 0, Asn1OctetString.class) }; public EncryptedContentInfo() { super(fieldInfos); } public Asn1ObjectIdentifier getContentType() { return getFieldAs(ECInfoField.CONTENT_TYPE, Asn1ObjectIdentifier.class); } public void setContentType(Asn1ObjectIdentifier contentType) { setFieldAs(ECInfoField.CONTENT_TYPE, contentType); } public ContentEncryptionAlgorithmIdentifier getContentEncryptionAlgorithmIdentifier() { return getFieldAs(ECInfoField.CONTENT_ENCRYPTION_ALGORITHM, ContentEncryptionAlgorithmIdentifier.class); } public void setContentEncryptionAlgorithmIdentifier(ContentEncryptionAlgorithmIdentifier contentEncryptionAlgorithmIdentifier) { setFieldAs(ECInfoField.CONTENT_ENCRYPTION_ALGORITHM, contentEncryptionAlgorithmIdentifier); } public Asn1OctetString getEncryptedContent() { return getFieldAs(ECInfoField.ENCRYPTED_CONTENT, Asn1OctetString.class); } public void setEncryptedContent(Asn1OctetString encryptedContent) { setFieldAs(ECInfoField.ENCRYPTED_CONTENT, encryptedContent); } }
554
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/Signature.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.type.Asn1BitString; /** * Signature ::= BIT STRING */ public class Signature extends Asn1BitString { }
555
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/KeyAgreeRecipientInfo.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ExplicitField; import org.apache.kerby.asn1.type.Asn1OctetString; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * KeyAgreeRecipientInfo ::= SEQUENCE { * version CMSVersion, -- always set to 3 * originator [0] EXPLICIT OriginatorIdentifierOrKey, * ukm [1] EXPLICIT UserKeyingMaterial OPTIONAL, * keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier, * recipientEncryptedKeys RecipientEncryptedKeys } * * UserKeyingMaterial ::= OCTET STRING */ public class KeyAgreeRecipientInfo extends Asn1SequenceType { protected enum KARInfoField implements EnumType { VERSION, ORIGINATOR, UKM, KEY_ENCRYPTION_ALGORITHM, RECIPIENT_ENCRYPTED_KEY; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(KARInfoField.VERSION, CmsVersion.class), new ExplicitField(KARInfoField.ORIGINATOR, 0, OriginatorIdentifierOrKey.class), new ExplicitField(KARInfoField.UKM, 1, Asn1OctetString.class), new Asn1FieldInfo(KARInfoField.KEY_ENCRYPTION_ALGORITHM, KeyEncryptionAlgorithmIdentifier.class), new Asn1FieldInfo(KARInfoField.RECIPIENT_ENCRYPTED_KEY, RecipientEncryptedKeys.class) }; public KeyAgreeRecipientInfo() { super(fieldInfos); } public CmsVersion getVersion() { return getFieldAs(KARInfoField.VERSION, CmsVersion.class); } public void setVersion(CmsVersion version) { setFieldAs(KARInfoField.VERSION, version); } public OriginatorIdentifierOrKey getOriginator() { return getFieldAs(KARInfoField.ORIGINATOR, OriginatorIdentifierOrKey.class); } public void setOriginator(OriginatorIdentifierOrKey originator) { setFieldAs(KARInfoField.ORIGINATOR, originator); } public Asn1OctetString getUkm() { return getFieldAs(KARInfoField.UKM, Asn1OctetString.class); } public void setUkm(Asn1OctetString ukm) { setFieldAs(KARInfoField.UKM, ukm); } public KeyEncryptionAlgorithmIdentifier getKeyEncryptionAlgorithmIdentifier() { return getFieldAs(KARInfoField.KEY_ENCRYPTION_ALGORITHM, KeyEncryptionAlgorithmIdentifier.class); } public void setkeyEncryptionAlgorithmIdentifier(KeyEncryptionAlgorithmIdentifier keyEncryptionAlgorithmIdentifier) { setFieldAs(KARInfoField.KEY_ENCRYPTION_ALGORITHM, keyEncryptionAlgorithmIdentifier); } public RecipientEncryptedKeys getRecipientEncryptedKeys() { return getFieldAs(KARInfoField.RECIPIENT_ENCRYPTED_KEY, RecipientEncryptedKeys.class); } public void setRecipientEncryptedKeys(RecipientEncryptedKeys recipientEncryptedKeys) { setFieldAs(KARInfoField.RECIPIENT_ENCRYPTED_KEY, recipientEncryptedKeys); } }
556
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/EncryptedKey.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.type.Asn1OctetString; /** * EncryptedKey ::= OCTET STRING */ public class EncryptedKey extends Asn1OctetString { }
557
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/AttributeCertificateV2.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.x509.type.AttributeCertificate; /** * AttributeCertificateV2 ::= AttributeCertificate */ public class AttributeCertificateV2 extends AttributeCertificate { }
558
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/SignerInfos.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.type.Asn1SetOf; /** * SignerInfos ::= SET OF SignerInfo */ public class SignerInfos extends Asn1SetOf<SignerInfo> { }
559
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/OtherRevocationInfoFormat.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1Any; import org.apache.kerby.asn1.type.Asn1ObjectIdentifier; import org.apache.kerby.asn1.type.Asn1SequenceType; import org.apache.kerby.asn1.type.Asn1Type; /** * OtherRevocationInfoFormat ::= SEQUENCE { * otherRevInfoFormat OBJECT IDENTIFIER, * otherRevInfo ANY DEFINED BY otherRevInfoFormat * } */ public class OtherRevocationInfoFormat extends Asn1SequenceType { protected enum OtherRevocationInfoFormatField implements EnumType { OTHER_REV_INFO_FORMAT, OTHER_REV_INFO; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(OtherRevocationInfoFormatField.OTHER_REV_INFO_FORMAT, Asn1ObjectIdentifier.class), new Asn1FieldInfo(OtherRevocationInfoFormatField.OTHER_REV_INFO, Asn1Any.class) }; public OtherRevocationInfoFormat() { super(fieldInfos); } public Asn1ObjectIdentifier getOtherRevInfoFormat() { return getFieldAs(OtherRevocationInfoFormatField.OTHER_REV_INFO_FORMAT, Asn1ObjectIdentifier.class); } public void setOtherRevInfoFormat(Asn1ObjectIdentifier otherRevInfoFormat) { setFieldAs(OtherRevocationInfoFormatField.OTHER_REV_INFO_FORMAT, otherRevInfoFormat); } public <T extends Asn1Type> T getOtherRevInfoAs(Class<T> t) { return getFieldAsAny(OtherRevocationInfoFormatField.OTHER_REV_INFO, t); } public void setOtherRevInfo(Asn1Type otherRevInfo) { setFieldAsAny(OtherRevocationInfoFormatField.OTHER_REV_INFO, otherRevInfo); } }
560
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/PasswordRecipientInfo.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ExplicitField; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * PasswordRecipientInfo ::= SEQUENCE { * version CMSVersion, -- always set to 0 * keyDerivationAlgorithm [0] KeyDerivationAlgorithmIdentifier OPTIONAL, * keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier, * encryptedKey EncryptedKey } */ public class PasswordRecipientInfo extends Asn1SequenceType { protected enum PwdRInfoField implements EnumType { VERSION, KEY_DERIVATION_ALGORIGHM, KEY_ENCRYPTION_ALGORITHMS, ENCRYPTED_KEY; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(PwdRInfoField.VERSION, CmsVersion.class), new ExplicitField(PwdRInfoField.KEY_DERIVATION_ALGORIGHM, 0, KeyDerivationAlgorithmIdentifier.class), new Asn1FieldInfo(PwdRInfoField.KEY_ENCRYPTION_ALGORITHMS, KeyEncryptionAlgorithmIdentifier.class), new Asn1FieldInfo(PwdRInfoField.ENCRYPTED_KEY, EncryptedKey.class) }; public PasswordRecipientInfo() { super(fieldInfos); } public CmsVersion getVersion() { return getFieldAs(PwdRInfoField.VERSION, CmsVersion.class); } public void setVersion(CmsVersion version) { setFieldAs(PwdRInfoField.VERSION, version); } public KeyDerivationAlgorithmIdentifier getKeyDerivationAlgorithmIdentifier() { return getFieldAs(PwdRInfoField.KEY_DERIVATION_ALGORIGHM, KeyDerivationAlgorithmIdentifier.class); } public void setKeyDerivationAlgorithmIdentifier(KeyDerivationAlgorithmIdentifier keyDerivationAlgorithmIdentifier) { setFieldAs(PwdRInfoField.KEY_DERIVATION_ALGORIGHM, keyDerivationAlgorithmIdentifier); } public KeyEncryptionAlgorithmIdentifier getKeyEncryptionAlgorithmIdentifier() { return getFieldAs(PwdRInfoField.KEY_ENCRYPTION_ALGORITHMS, KeyEncryptionAlgorithmIdentifier.class); } public void setKeyEncryptionAlgorithmIdentifier(KeyEncryptionAlgorithmIdentifier keyEncryptionAlgorithmIdentifier) { setFieldAs(PwdRInfoField.KEY_ENCRYPTION_ALGORITHMS, keyEncryptionAlgorithmIdentifier); } public EncryptedKey getEncryptedKey() { return getFieldAs(PwdRInfoField.ENCRYPTED_KEY, EncryptedKey.class); } public void setEncryptedKey(EncryptedKey encryptedKey) { setFieldAs(PwdRInfoField.ENCRYPTED_KEY, encryptedKey); } }
561
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/CmsVersion.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1Integer; /** * CMSVersion ::= INTEGER * { v0(0), v1(1), v2(2), v3(3), v4(4), v5(5) } */ enum CmsVersionEnum implements EnumType { V0, V1, V2, V3, V4, V5; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } public class CmsVersion extends Asn1Integer { public CmsVersion() { this(CmsVersionEnum.V0); } public CmsVersion(CmsVersionEnum version) { super(version.getValue()); } }
562
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/SignatureAlgorithmIdentifier.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.x509.type.AlgorithmIdentifier; /** * SignatureAlgorithmIdentifier ::= AlgorithmIdentifier */ public class SignatureAlgorithmIdentifier extends AlgorithmIdentifier { }
563
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/Subject.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ImplicitField; import org.apache.kerby.asn1.type.Asn1Choice; import org.apache.kerby.x509.type.GeneralNames; import org.apache.kerby.x509.type.IssuerSerial; /** * subject CHOICE { * baseCertificateID [0] IssuerSerial, * -- associated with a Public Key Certificate * subjectName [1] GeneralNames * -- associated with a name * }, * */ public class Subject extends Asn1Choice { protected enum SubjectField implements EnumType { BASE_CERTIFICATE_ID, SUBJECT_NAME; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{ new ImplicitField(SubjectField.BASE_CERTIFICATE_ID, IssuerSerial.class), new ImplicitField(SubjectField.SUBJECT_NAME, GeneralNames.class) }; public Subject() { super(fieldInfos); } public IssuerSerial getBaseCertificateID() { return getChoiceValueAs(SubjectField.BASE_CERTIFICATE_ID, IssuerSerial.class); } public void setBaseCertificateID(IssuerSerial baseCertificateID) { setChoiceValue(SubjectField.BASE_CERTIFICATE_ID, baseCertificateID); } public GeneralNames getSubjectName() { return getChoiceValueAs(SubjectField.SUBJECT_NAME, GeneralNames.class); } public void setSubjectName(GeneralNames subjectName) { setChoiceValue(SubjectField.SUBJECT_NAME, subjectName); } }
564
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/ContentInfo.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ExplicitField; import org.apache.kerby.asn1.type.Asn1Any; import org.apache.kerby.asn1.type.Asn1ObjectIdentifier; import org.apache.kerby.asn1.type.Asn1SequenceType; import org.apache.kerby.asn1.type.Asn1Type; /** * Ref. RFC 5652 * * <pre> * ContentInfo ::= SEQUENCE { * contentType ContentType, * content [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL * } * * ContentType ::= OBJECT IDENTIFIER * </pre> */ public class ContentInfo extends Asn1SequenceType { protected enum ContentInfoField implements EnumType { CONTENT_TYPE, CONTENT; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{ new Asn1FieldInfo(ContentInfoField.CONTENT_TYPE, Asn1ObjectIdentifier.class), new ExplicitField(ContentInfoField.CONTENT, 0, Asn1Any.class), }; public ContentInfo() { super(fieldInfos); } public String getContentType() { return getFieldAsObjId(ContentInfoField.CONTENT_TYPE); } public void setContentType(String contentType) { setFieldAsObjId(ContentInfoField.CONTENT_TYPE, contentType); } public <T extends Asn1Type> T getContentAs(Class<T> t) { return getFieldAsAny(ContentInfoField.CONTENT, t); } public void setContent(Asn1Type content) { setFieldAsAny(ContentInfoField.CONTENT, content); } }
565
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/KeyDerivationAlgorithmIdentifier.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.x509.type.AlgorithmIdentifier; /** * KeyDerivationAlgorithmIdentifier ::= AlgorithmIdentifier */ public class KeyDerivationAlgorithmIdentifier extends AlgorithmIdentifier { }
566
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/SignedAttributes.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.type.Asn1SetOf; /** * SignedAttributes ::= SET SIZE (1..MAX) OF Attribute */ public class SignedAttributes extends Asn1SetOf<Attribute> { }
567
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/EnvelopedData.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ImplicitField; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * EnvelopedData ::= SEQUENCE { * version CMSVersion, * originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL, * recipientInfos RecipientInfos, * encryptedContentInfo EncryptedContentInfo, * unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL * } * * OriginatorInfo ::= SEQUENCE { * certs [0] IMPLICIT CertificateSet OPTIONAL, * crls [1] IMPLICIT RevocationInfoChoices OPTIONAL * } * * RecipientInfos ::= SET SIZE (1..MAX) OF RecipientInfo * * EncryptedContentInfo ::= SEQUENCE { * contentType ContentType, * contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier, * encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL * } * * EncryptedContent ::= OCTET STRING * * UnprotectedAttributes ::= SET SIZE (1..MAX) OF Attribute */ public class EnvelopedData extends Asn1SequenceType { protected enum EnvelopedDataField implements EnumType { CMS_VERSION, ORIGINATOR_INFO, RECIPIENT_INFOS, ENCRYPTED_CONTENT_INFO, UNPROTECTED_ATTRS; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{ new Asn1FieldInfo(EnvelopedDataField.CMS_VERSION, CmsVersion.class), new ImplicitField(EnvelopedDataField.ORIGINATOR_INFO, 0, OriginatorInfo.class), new Asn1FieldInfo(EnvelopedDataField.RECIPIENT_INFOS, RecipientInfos.class), new Asn1FieldInfo(EnvelopedDataField.ENCRYPTED_CONTENT_INFO, EncryptedContentInfo.class), new ImplicitField(EnvelopedDataField.UNPROTECTED_ATTRS, 1, UnprotectedAttributes.class) }; public EnvelopedData() { super(fieldInfos); } public CmsVersion getCmsVersion() { return getFieldAs(EnvelopedDataField.CMS_VERSION, CmsVersion.class); } public void setCmsVersion(CmsVersion cmsVersion) { setFieldAs(EnvelopedDataField.CMS_VERSION, cmsVersion); } public OriginatorInfo getOriginatorInfo() { return getFieldAs(EnvelopedDataField.ORIGINATOR_INFO, OriginatorInfo.class); } public void setOriginatorInfo(OriginatorInfo originatorInfo) { setFieldAs(EnvelopedDataField.ORIGINATOR_INFO, originatorInfo); } public RecipientInfos getRecipientInfos() { return getFieldAs(EnvelopedDataField.RECIPIENT_INFOS, RecipientInfos.class); } public void setRecipientInfos(RecipientInfos recipientInfos) { setFieldAs(EnvelopedDataField.RECIPIENT_INFOS, recipientInfos); } public EncryptedContentInfo getEncryptedContentInfo() { return getFieldAs(EnvelopedDataField.ENCRYPTED_CONTENT_INFO, EncryptedContentInfo.class); } public void setEncryptedContentInfo(EncryptedContentInfo encryptedContentInfo) { setFieldAs(EnvelopedDataField.ENCRYPTED_CONTENT_INFO, encryptedContentInfo); } public UnprotectedAttributes getUnprotectedAttributes() { return getFieldAs(EnvelopedDataField.UNPROTECTED_ATTRS, UnprotectedAttributes.class); } public void setUnprotectedAttributes(UnprotectedAttributes unprotectedAttributes) { setFieldAs(EnvelopedDataField.UNPROTECTED_ATTRS, unprotectedAttributes); } }
568
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/SignedData.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ImplicitField; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * Ref. RFC 5652 * <pre> * SignedData ::= SEQUENCE { * version CMSVersion, * digestAlgorithms DigestAlgorithmIdentifiers, * encapContentInfo EncapsulatedContentInfo, * certificates [0] IMPLICIT CertificateSet OPTIONAL, * crls [1] IMPLICIT RevocationInfoChoices OPTIONAL, * signerInfos SignerInfos * } * </pre> * */ public class SignedData extends Asn1SequenceType { protected enum SignedDataField implements EnumType { CMS_VERSION, DIGEST_ALGORITHMS, ENCAP_CONTENT_INFO, CERTIFICATES, CRLS, SIGNER_INFOS; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{ new Asn1FieldInfo(SignedDataField.CMS_VERSION, CmsVersion.class), new Asn1FieldInfo(SignedDataField.DIGEST_ALGORITHMS, DigestAlgorithmIdentifiers.class), new Asn1FieldInfo(SignedDataField.ENCAP_CONTENT_INFO, EncapsulatedContentInfo.class), new ImplicitField(SignedDataField.CERTIFICATES, 0, CertificateSet.class), new ImplicitField(SignedDataField.CRLS, 1, RevocationInfoChoices.class), new Asn1FieldInfo(SignedDataField.SIGNER_INFOS, SignerInfos.class) }; public SignedData() { super(fieldInfos); } public int getVersion() { return getFieldAsInteger(SignedDataField.CMS_VERSION); } public void setVersion(int version) { setFieldAsInt(SignedDataField.CMS_VERSION, version); } public DigestAlgorithmIdentifiers getDigestAlgorithms() { return getFieldAs(SignedDataField.DIGEST_ALGORITHMS, DigestAlgorithmIdentifiers.class); } public void setDigestAlgorithms(DigestAlgorithmIdentifiers digestAlgorithms) { setFieldAs(SignedDataField.DIGEST_ALGORITHMS, digestAlgorithms); } public EncapsulatedContentInfo getEncapContentInfo() { return getFieldAs(SignedDataField.ENCAP_CONTENT_INFO, EncapsulatedContentInfo.class); } public void setEncapContentInfo(EncapsulatedContentInfo contentInfo) { setFieldAs(SignedDataField.ENCAP_CONTENT_INFO, contentInfo); } public CertificateSet getCertificates() { return getFieldAs(SignedDataField.CERTIFICATES, CertificateSet.class); } public void setCertificates(CertificateSet certificates) { setFieldAs(SignedDataField.CERTIFICATES, certificates); } public RevocationInfoChoices getCrls() { return getFieldAs(SignedDataField.CRLS, RevocationInfoChoices.class); } public void setCrls(RevocationInfoChoices crls) { setFieldAs(SignedDataField.CRLS, crls); } public SignerInfos getSignerInfos() { return getFieldAs(SignedDataField.SIGNER_INFOS, SignerInfos.class); } public void setSignerInfos(SignerInfos signerInfos) { setFieldAs(SignedDataField.SIGNER_INFOS, signerInfos); } /** * Check whether signed of data, true if the SignerInfos are not null * @return boolean */ public boolean isSigned() { if (getSignerInfos().getElements().size() == 0) { return false; } else { return true; } } }
569
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/OtherRecipientInfo.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1Any; import org.apache.kerby.asn1.type.Asn1BitString; import org.apache.kerby.asn1.type.Asn1ObjectIdentifier; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * OtherRecipientInfo ::= SEQUENCE { * oriType OBJECT IDENTIFIER, * oriValue ANY DEFINED BY oriType } */ public class OtherRecipientInfo extends Asn1SequenceType { protected enum OtherRecipientInfoField implements EnumType { ORI_TYPE, ORI_VALUE; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(OtherRecipientInfoField.ORI_TYPE, Asn1ObjectIdentifier.class), new Asn1FieldInfo(OtherRecipientInfoField.ORI_VALUE, Asn1Any.class) }; public OtherRecipientInfo() { super(fieldInfos); } public Asn1ObjectIdentifier getOriType() { return getFieldAs(OtherRecipientInfoField.ORI_TYPE, Asn1ObjectIdentifier.class); } public void setOriType(Asn1ObjectIdentifier oriType) { setFieldAs(OtherRecipientInfoField.ORI_TYPE, oriType); } public Asn1BitString getPublicKey() { return getFieldAs(OtherRecipientInfoField.ORI_VALUE, Asn1BitString.class); } public void setOriValue(Asn1BitString oriValue) { setFieldAs(OtherRecipientInfoField.ORI_VALUE, oriValue); } }
570
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/SignedContentInfo.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; /** * A ContentInfo that wraps SignedData. */ public class SignedContentInfo extends ContentInfo { public SignedContentInfo() { super(); setAnyFieldValueType(ContentInfoField.CONTENT, SignedData.class); } public SignedData getSignedData() { return getFieldAsAny(ContentInfoField.CONTENT, SignedData.class); } public void setSignedData(SignedData signedData) { setFieldAsAny(ContentInfoField.CONTENT, signedData); } }
571
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/UnsignedAttributes.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.type.Asn1SetOf; /** * UnsignedAttributes ::= SET SIZE (1..MAX) OF Attribute */ public class UnsignedAttributes extends Asn1SetOf<Attribute> { }
572
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/RecipientKeyIdentifier.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1GeneralizedTime; import org.apache.kerby.asn1.type.Asn1SequenceType; import org.apache.kerby.x509.type.SubjectKeyIdentifier; /** * RecipientKeyIdentifier ::= SEQUENCE { * subjectKeyIdentifier SubjectKeyIdentifier, * date GeneralizedTime OPTIONAL, * other OtherKeyAttribute OPTIONAL } */ public class RecipientKeyIdentifier extends Asn1SequenceType { protected enum RecipientKeyIdentifierField implements EnumType { SUBJECT_KEY_IDENTIFIER, DATE, OTHER; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(RecipientKeyIdentifierField.SUBJECT_KEY_IDENTIFIER, SubjectKeyIdentifier.class), new Asn1FieldInfo(RecipientKeyIdentifierField.DATE, Asn1GeneralizedTime.class), new Asn1FieldInfo(RecipientKeyIdentifierField.OTHER, OtherKeyAttribute.class) }; public RecipientKeyIdentifier() { super(fieldInfos); } public SubjectKeyIdentifier getSubjectKeyIdentifier() { return getFieldAs(RecipientKeyIdentifierField.SUBJECT_KEY_IDENTIFIER, SubjectKeyIdentifier.class); } public void setKeyIdentifier(SubjectKeyIdentifier subjectKeyIdentifier) { setFieldAs(RecipientKeyIdentifierField.SUBJECT_KEY_IDENTIFIER, subjectKeyIdentifier); } public Asn1GeneralizedTime getDate() { return getFieldAs(RecipientKeyIdentifierField.DATE, Asn1GeneralizedTime.class); } public void setDate(Asn1GeneralizedTime date) { setFieldAs(RecipientKeyIdentifierField.DATE, date); } public OtherKeyAttribute getOther() { return getFieldAs(RecipientKeyIdentifierField.OTHER, OtherKeyAttribute.class); } public void setOther(OtherKeyAttribute other) { setFieldAs(RecipientKeyIdentifierField.OTHER, other); } }
573
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/ContentEncryptionAlgorithmIdentifier.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.x509.type.AlgorithmIdentifier; /** * ContentEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier */ public class ContentEncryptionAlgorithmIdentifier extends AlgorithmIdentifier { }
574
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/RecipientEncryptedKeys.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.type.Asn1SequenceOf; /** * RecipientEncryptedKeys ::= SEQUENCE OF RecipientEncryptedKey */ public class RecipientEncryptedKeys extends Asn1SequenceOf<RecipientEncryptedKey> { }
575
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/KEKIdentifier.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1GeneralizedTime; import org.apache.kerby.asn1.type.Asn1OctetString; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * KEKIdentifier ::= SEQUENCE { * keyIdentifier OCTET STRING, * date GeneralizedTime OPTIONAL, * other OtherKeyAttribute OPTIONAL } */ public class KEKIdentifier extends Asn1SequenceType { protected enum KEKIdentifierField implements EnumType { KEY_IDENTIFIER, DATE, OTHER; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(KEKIdentifierField.KEY_IDENTIFIER, Asn1OctetString.class), new Asn1FieldInfo(KEKIdentifierField.DATE, Asn1GeneralizedTime.class), new Asn1FieldInfo(KEKIdentifierField.OTHER, OtherKeyAttribute.class) }; public KEKIdentifier() { super(fieldInfos); } public Asn1OctetString getKeyIdentifier() { return getFieldAs(KEKIdentifierField.KEY_IDENTIFIER, Asn1OctetString.class); } public void setKeyIdentifier(Asn1OctetString keyIdentifier) { setFieldAs(KEKIdentifierField.KEY_IDENTIFIER, keyIdentifier); } public Asn1GeneralizedTime getDate() { return getFieldAs(KEKIdentifierField.DATE, Asn1GeneralizedTime.class); } public void setDate(Asn1GeneralizedTime date) { setFieldAs(KEKIdentifierField.DATE, date); } public OtherKeyAttribute getOther() { return getFieldAs(KEKIdentifierField.OTHER, OtherKeyAttribute.class); } public void setOther(OtherKeyAttribute other) { setFieldAs(KEKIdentifierField.OTHER, other); } }
576
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/RevocationInfoChoices.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.type.Asn1SetOf; /** * RevocationInfoChoices ::= SET OF RevocationInfoChoice */ public class RevocationInfoChoices extends Asn1SetOf<RevocationInfoChoice> { }
577
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/KeyAgreeRecipientIdentifier.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ImplicitField; import org.apache.kerby.asn1.type.Asn1Choice; /** * KeyAgreeRecipientIdentifier ::= CHOICE { * issuerAndSerialNumber IssuerAndSerialNumber, * rKeyId [0] IMPLICIT RecipientKeyIdentifier } */ public class KeyAgreeRecipientIdentifier extends Asn1Choice { protected enum KeyAgreeRecipientIdentifierField implements EnumType { ISSUER_AND_SERIAL_NUMBER, R_KEY_ID; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{ new Asn1FieldInfo(KeyAgreeRecipientIdentifierField.ISSUER_AND_SERIAL_NUMBER, IssuerAndSerialNumber.class), new ImplicitField(KeyAgreeRecipientIdentifierField.R_KEY_ID, 0, RecipientKeyIdentifier.class) }; public KeyAgreeRecipientIdentifier() { super(fieldInfos); } public IssuerAndSerialNumber getIssuerAndSerialNumber() { return getChoiceValueAs(KeyAgreeRecipientIdentifierField.ISSUER_AND_SERIAL_NUMBER, IssuerAndSerialNumber.class); } public void setIssuerAndSerialNumber(IssuerAndSerialNumber issuerAndSerialNumber) { setChoiceValue(KeyAgreeRecipientIdentifierField.ISSUER_AND_SERIAL_NUMBER, issuerAndSerialNumber); } public RecipientKeyIdentifier getRecipientKeyIdentifier() { return getChoiceValueAs(KeyAgreeRecipientIdentifierField.R_KEY_ID, RecipientKeyIdentifier.class); } public void setRecipientKeyIdentifier(RecipientKeyIdentifier recipientKeyIdentifier) { setChoiceValue(KeyAgreeRecipientIdentifierField.R_KEY_ID, recipientKeyIdentifier); } }
578
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/OriginatorInfo.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ImplicitField; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * OriginatorInfo ::= SEQUENCE { * certs [0] IMPLICIT CertificateSet OPTIONAL, * crls [1] IMPLICIT RevocationInfoChoices OPTIONAL * } */ public class OriginatorInfo extends Asn1SequenceType { protected enum OriginatorInfoField implements EnumType { CERTS, CRLS; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{ new ImplicitField(OriginatorInfoField.CERTS, CertificateSet.class), new ImplicitField(OriginatorInfoField.CRLS, RevocationInfoChoices.class) }; public OriginatorInfo() { super(fieldInfos); } public CertificateSet getCerts() { return getFieldAs(OriginatorInfoField.CERTS, CertificateSet.class); } public void setCerts(CertificateSet certs) { setFieldAs(OriginatorInfoField.CERTS, certs); } public RevocationInfoChoices getCrls() { return getFieldAs(OriginatorInfoField.CRLS, RevocationInfoChoices.class); } public void setCrls(RevocationInfoChoices crls) { setFieldAs(OriginatorInfoField.CRLS, crls); } }
579
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/DigestAlgorithmIdentifier.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.x509.type.AlgorithmIdentifier; /** * DigestAlgorithmIdentifier ::= AlgorithmIdentifier */ public class DigestAlgorithmIdentifier extends AlgorithmIdentifier { }
580
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/UnprotectedAttributes.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.type.Asn1SetOf; /** * UnprotectedAttributes ::= SET SIZE (1..MAX) OF Attribute */ public class UnprotectedAttributes extends Asn1SetOf<Attribute> { }
581
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/KeyTransRecipientInfo.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * KeyTransRecipientInfo ::= SEQUENCE { * version CMSVersion, -- always set to 0 or 2 * rid RecipientIdentifier, * keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier, * encryptedKey EncryptedKey } */ public class KeyTransRecipientInfo extends Asn1SequenceType { protected enum KTRInfoField implements EnumType { VERSION, RID, KEY_ENCRYPTION_ALGORITHM, ENCRYPTED_KEY; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(KTRInfoField.VERSION, CmsVersion.class), new Asn1FieldInfo(KTRInfoField.RID, RecipientIdentifier.class), new Asn1FieldInfo(KTRInfoField.KEY_ENCRYPTION_ALGORITHM, KeyEncryptionAlgorithmIdentifier.class), new Asn1FieldInfo(KTRInfoField.ENCRYPTED_KEY, EncryptedKey.class) }; public KeyTransRecipientInfo() { super(fieldInfos); } public CmsVersion getVersion() { return getFieldAs(KTRInfoField.VERSION, CmsVersion.class); } public void setVersion(CmsVersion version) { setFieldAs(KTRInfoField.VERSION, version); } public RecipientIdentifier getRid() { return getFieldAs(KTRInfoField.RID, RecipientIdentifier.class); } public void setRid(RecipientIdentifier rid) { setFieldAs(KTRInfoField.RID, rid); } public KeyEncryptionAlgorithmIdentifier getKeyEncryptionAlgorithmIdentifier() { return getFieldAs(KTRInfoField.KEY_ENCRYPTION_ALGORITHM, KeyEncryptionAlgorithmIdentifier.class); } public void setKeyEncryptionAlgorithmIdentifier(KeyEncryptionAlgorithmIdentifier keyEncryptionAlgorithmIdentifier) { setFieldAs(KTRInfoField.KEY_ENCRYPTION_ALGORITHM, keyEncryptionAlgorithmIdentifier); } public EncryptedKey getEncryptedKey() { return getFieldAs(KTRInfoField.ENCRYPTED_KEY, EncryptedKey.class); } public void setEncryptedKey(EncryptedKey encryptedKey) { setFieldAs(KTRInfoField.ENCRYPTED_KEY, encryptedKey); } }
582
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/ExtendedCertificateInfo.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * ExtendedCertificateInfo ::= SEQUENCE { * version CMSVersion, * certificate Certificate, * attributes UnauthAttributes * } */ public class ExtendedCertificateInfo extends Asn1SequenceType { protected enum ExtendedCertificateInfoField implements EnumType { CMS_VERSION, CERTIFICATE, ATTRIBUTES; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(ExtendedCertificateInfoField.CMS_VERSION, CmsVersion.class), new Asn1FieldInfo(ExtendedCertificateInfoField.CERTIFICATE, SignatureAlgorithmIdentifier.class), new Asn1FieldInfo(ExtendedCertificateInfoField.ATTRIBUTES, Signature.class) }; public ExtendedCertificateInfo() { super(fieldInfos); } public CmsVersion getCmsVersion() { return getFieldAs(ExtendedCertificateInfoField.CMS_VERSION, CmsVersion.class); } public void setCmsVersion(CmsVersion version) { setFieldAs(ExtendedCertificateInfoField.CMS_VERSION, version); } public SignatureAlgorithmIdentifier getCertificate() { return getFieldAs(ExtendedCertificateInfoField.CERTIFICATE, SignatureAlgorithmIdentifier.class); } public void setCertificate(SignatureAlgorithmIdentifier signatureAlgorithmIdentifier) { setFieldAs(ExtendedCertificateInfoField.CERTIFICATE, signatureAlgorithmIdentifier); } public Signature getAttributes() { return getFieldAs(ExtendedCertificateInfoField.ATTRIBUTES, Signature.class); } public void setAttributes(Signature signature) { setFieldAs(ExtendedCertificateInfoField.ATTRIBUTES, signature); } }
583
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/DigestAlgorithmIdentifiers.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.type.Asn1SetOf; /** * DigestAlgorithmIdentifiers ::= SET OF DigestAlgorithmIdentifier */ public class DigestAlgorithmIdentifiers extends Asn1SetOf<DigestAlgorithmIdentifier> { }
584
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/IssuerAndSerialNumber.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1Integer; import org.apache.kerby.asn1.type.Asn1SequenceType; import org.apache.kerby.x500.type.Name; /** * Ref. RFC5652 * <pre> * IssuerAndSerialNumber ::= SEQUENCE { * issuer Name, * serialNumber CertificateSerialNumber * } * * CertificateSerialNumber ::= INTEGER -- See RFC 5280 * </pre> */ public class IssuerAndSerialNumber extends Asn1SequenceType { protected enum IssuerAndSerialNumberField implements EnumType { ISSUER, SERIAL_NUMBER; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{ new Asn1FieldInfo(IssuerAndSerialNumberField.ISSUER, Name.class), new Asn1FieldInfo(IssuerAndSerialNumberField.SERIAL_NUMBER, Asn1Integer.class) }; public IssuerAndSerialNumber() { super(fieldInfos); } public Name getIssuer() { return getFieldAs(IssuerAndSerialNumberField.ISSUER, Name.class); } public void setIssuer(Name name) { setFieldAs(IssuerAndSerialNumberField.ISSUER, name); } public Asn1Integer getSerialNumber() { return getFieldAs(IssuerAndSerialNumberField.SERIAL_NUMBER, Asn1Integer.class); } public void setSerialNumber(int serialNumber) { setFieldAsInt(IssuerAndSerialNumberField.SERIAL_NUMBER, serialNumber); } }
585
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/EncapsulatedContentInfo.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ExplicitField; import org.apache.kerby.asn1.type.Asn1ObjectIdentifier; import org.apache.kerby.asn1.type.Asn1OctetString; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * EncapsulatedContentInfo ::= SEQUENCE { * eContentType ContentType, * eContent [0] EXPLICIT OCTET STRING OPTIONAL * } * * ContentType ::= OBJECT IDENTIFIER */ public class EncapsulatedContentInfo extends Asn1SequenceType { protected enum EncapsulatedContentInfoField implements EnumType { CONTENT_TYPE, CONTENT; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{ new Asn1FieldInfo(EncapsulatedContentInfoField.CONTENT_TYPE, Asn1ObjectIdentifier.class), new ExplicitField(EncapsulatedContentInfoField.CONTENT, 0, Asn1OctetString.class) }; public EncapsulatedContentInfo() { super(fieldInfos); } public String getContentType() { return getFieldAsObjId(EncapsulatedContentInfoField.CONTENT_TYPE); } public void setContentType(String contentType) { setFieldAsObjId(EncapsulatedContentInfoField.CONTENT_TYPE, contentType); } public byte[] getContent() { return getFieldAsOctets(EncapsulatedContentInfoField.CONTENT); } public void setContent(byte[] content) { setFieldAsOctets(EncapsulatedContentInfoField.CONTENT, content); } }
586
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/OriginatorPublicKey.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1BitString; import org.apache.kerby.asn1.type.Asn1SequenceType; import org.apache.kerby.x509.type.AlgorithmIdentifier; /** * OriginatorPublicKey ::= SEQUENCE { * algorithm AlgorithmIdentifier, * publicKey BIT STRING } */ public class OriginatorPublicKey extends Asn1SequenceType { protected enum OriginatorPublicKeyField implements EnumType { ALGORITHM, PUBLIC_KEY; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(OriginatorPublicKeyField.ALGORITHM, AlgorithmIdentifier.class), new Asn1FieldInfo(OriginatorPublicKeyField.PUBLIC_KEY, Asn1BitString.class) }; public OriginatorPublicKey() { super(fieldInfos); } public AlgorithmIdentifier getAlgorithm() { return getFieldAs(OriginatorPublicKeyField.ALGORITHM, AlgorithmIdentifier.class); } public void setAlgorithm(AlgorithmIdentifier algorithm) { setFieldAs(OriginatorPublicKeyField.ALGORITHM, algorithm); } public Asn1BitString getPublicKey() { return getFieldAs(OriginatorPublicKeyField.PUBLIC_KEY, Asn1BitString.class); } public void setPublicKey(Asn1BitString publicKey) { setFieldAs(OriginatorPublicKeyField.PUBLIC_KEY, publicKey); } }
587
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/CertificateChoices.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ImplicitField; import org.apache.kerby.asn1.type.Asn1Choice; import org.apache.kerby.x509.type.Certificate; /** * CertificateChoices ::= CHOICE { * certificate Certificate, * extendedCertificate [0] IMPLICIT ExtendedCertificate, -- Obsolete * v1AttrCert [1] IMPLICIT AttributeCertificateV1, -- Obsolete * v2AttrCert [2] IMPLICIT AttributeCertificateV2, * other [3] IMPLICIT OtherCertificateFormat } */ public class CertificateChoices extends Asn1Choice { protected enum CertificateChoicesField implements EnumType { CERTIFICATE, EXTENDED_CERTIFICATE, V1_ATTR_CERT, V2_ATTR_CERT, OTHER; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(CertificateChoicesField.CERTIFICATE, Certificate.class), new ImplicitField(CertificateChoicesField.EXTENDED_CERTIFICATE, 0, ExtendedCertificate.class), new ImplicitField(CertificateChoicesField.V1_ATTR_CERT, 1, AttributeCertificateV1.class), new ImplicitField(CertificateChoicesField.V2_ATTR_CERT, 2, AttributeCertificateV2.class), new ImplicitField(CertificateChoicesField.OTHER, 3, OtherCertificateFormat.class), }; public CertificateChoices() { super(fieldInfos); } public Certificate getCertificate() { return getChoiceValueAs(CertificateChoicesField.CERTIFICATE, Certificate.class); } public void setCertificate(Certificate certificate) { setChoiceValue(CertificateChoicesField.CERTIFICATE, certificate); } public ExtendedCertificate getExtendedCertificate() { return getChoiceValueAs(CertificateChoicesField.EXTENDED_CERTIFICATE, ExtendedCertificate.class); } public void setExtendedCertificate(ExtendedCertificate extendedCertificate) { setChoiceValue(CertificateChoicesField.EXTENDED_CERTIFICATE, extendedCertificate); } public AttributeCertificateV1 getV1AttrCert() { return getChoiceValueAs(CertificateChoicesField.V1_ATTR_CERT, AttributeCertificateV1.class); } public void setV1AttrCert(AttributeCertificateV1 v1AttrCert) { setChoiceValue(CertificateChoicesField.V1_ATTR_CERT, v1AttrCert); } public AttributeCertificateV2 getV2AttrCert() { return getChoiceValueAs(CertificateChoicesField.V2_ATTR_CERT, AttributeCertificateV2.class); } public void setV2AttrCert(AttributeCertificateV2 v2AttrCert) { setChoiceValue(CertificateChoicesField.V2_ATTR_CERT, v2AttrCert); } public OtherCertificateFormat getOther() { return getChoiceValueAs(CertificateChoicesField.OTHER, OtherCertificateFormat.class); } public void setOther(OtherCertificateFormat other) { setChoiceValue(CertificateChoicesField.OTHER, other); } }
588
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/CertificateSet.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.type.Asn1SetOf; /** * CertificateSet ::= SET OF CertificateChoices */ public class CertificateSet extends Asn1SetOf<CertificateChoices> { }
589
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/RecipientInfos.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.type.Asn1SetOf; /** * RecipientInfos ::= SET SIZE (1..MAX) OF RecipientInfo */ public class RecipientInfos extends Asn1SetOf<RecipientInfo> { }
590
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/OriginatorIdentifierOrKey.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ImplicitField; import org.apache.kerby.asn1.type.Asn1Choice; import org.apache.kerby.x509.type.SubjectKeyIdentifier; /** * OriginatorIdentifierOrKey ::= CHOICE { * issuerAndSerialNumber IssuerAndSerialNumber, * subjectKeyIdentifier [0] SubjectKeyIdentifier, * originatorKey [1] OriginatorPublicKey } */ public class OriginatorIdentifierOrKey extends Asn1Choice { protected enum OriginatorIdentifierOrKeyField implements EnumType { ISSUER_AND_SERIAL_NUMBER, SUBJECT_KEY_IDENTIFIER, ORIGINATOR_KEY; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{ new Asn1FieldInfo(OriginatorIdentifierOrKeyField.ISSUER_AND_SERIAL_NUMBER, IssuerAndSerialNumber.class), new ImplicitField(OriginatorIdentifierOrKeyField.SUBJECT_KEY_IDENTIFIER, 0, SubjectKeyIdentifier.class), new ImplicitField(OriginatorIdentifierOrKeyField.ORIGINATOR_KEY, 1, OriginatorPublicKey.class) }; public OriginatorIdentifierOrKey() { super(fieldInfos); } public IssuerAndSerialNumber getIssuerAndSerialNumber() { return getChoiceValueAs(OriginatorIdentifierOrKeyField.ISSUER_AND_SERIAL_NUMBER, IssuerAndSerialNumber.class); } public void setIssuerAndSerialNumber(IssuerAndSerialNumber issuerAndSerialNumber) { setChoiceValue(OriginatorIdentifierOrKeyField.ISSUER_AND_SERIAL_NUMBER, issuerAndSerialNumber); } public SubjectKeyIdentifier getSubjectKeyIdentifier() { return getChoiceValueAs(OriginatorIdentifierOrKeyField.SUBJECT_KEY_IDENTIFIER, SubjectKeyIdentifier.class); } public void setSubjectKeyIdentifier(SubjectKeyIdentifier subjectKeyIdentifier) { setChoiceValue(OriginatorIdentifierOrKeyField.SUBJECT_KEY_IDENTIFIER, subjectKeyIdentifier); } public OriginatorPublicKey getOriginatorPublicKey() { return getChoiceValueAs(OriginatorIdentifierOrKeyField.ORIGINATOR_KEY, OriginatorPublicKey.class); } public void setOriginatorPublicKey(OriginatorPublicKey originatorPublicKey) { setChoiceValue(OriginatorIdentifierOrKeyField.ORIGINATOR_KEY, originatorPublicKey); } }
591
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/ExtendedCertificate.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * ExtendedCertificate ::= SEQUENCE { * extendedCertificateInfo ExtendedCertificateInfo, * signatureAlgorithm SignatureAlgorithmIdentifier, * signature Signature * } */ public class ExtendedCertificate extends Asn1SequenceType { protected enum ExtendedCertificateField implements EnumType { EXTENDED_CERTIFICATE_INFO, SIGNATURE_ALGORITHMS, SIGNATURE; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(ExtendedCertificateField.EXTENDED_CERTIFICATE_INFO, ExtendedCertificateInfo.class), new Asn1FieldInfo(ExtendedCertificateField.SIGNATURE_ALGORITHMS, SignatureAlgorithmIdentifier.class), new Asn1FieldInfo(ExtendedCertificateField.SIGNATURE, Signature.class) }; public ExtendedCertificate() { super(fieldInfos); } public ExtendedCertificateInfo getExtendedCertificateInfo() { return getFieldAs(ExtendedCertificateField.EXTENDED_CERTIFICATE_INFO, ExtendedCertificateInfo.class); } public void setExtendedCertificateInfo(ExtendedCertificateInfo extendedCertificateInfo) { setFieldAs(ExtendedCertificateField.EXTENDED_CERTIFICATE_INFO, extendedCertificateInfo); } public SignatureAlgorithmIdentifier getSignatureAlgorithmIdentifier() { return getFieldAs(ExtendedCertificateField.SIGNATURE_ALGORITHMS, SignatureAlgorithmIdentifier.class); } public void setSignatureAlgorithmIdentifier(SignatureAlgorithmIdentifier signatureAlgorithmIdentifier) { setFieldAs(ExtendedCertificateField.SIGNATURE_ALGORITHMS, signatureAlgorithmIdentifier); } public Signature getSignature() { return getFieldAs(ExtendedCertificateField.SIGNATURE, Signature.class); } public void setSignature(Signature signature) { setFieldAs(ExtendedCertificateField.SIGNATURE, signature); } }
592
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/RecipientInfo.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ImplicitField; import org.apache.kerby.asn1.type.Asn1Choice; /** * RecipientInfo ::= CHOICE { * ktri KeyTransRecipientInfo, * kari [1] KeyAgreeRecipientInfo, * kekri [2] KEKRecipientInfo, * pwri [3] PasswordRecipientInfo, * ori [4] OtherRecipientInfo } */ public class RecipientInfo extends Asn1Choice { protected enum RecipientInfoField implements EnumType { KTRI, KARI, KEKRI, PWRI, ORI; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(RecipientInfoField.KTRI, KeyTransRecipientInfo.class), new ImplicitField(RecipientInfoField.KARI, KeyAgreeRecipientInfo.class), new ImplicitField(RecipientInfoField.KEKRI, KEKRecipientInfo.class), new ImplicitField(RecipientInfoField.PWRI, PasswordRecipientInfo.class), new ImplicitField(RecipientInfoField.ORI, OtherRecipientInfo.class) }; public RecipientInfo() { super(fieldInfos); } public KeyTransRecipientInfo getKtri() { return getChoiceValueAs(RecipientInfoField.KTRI, KeyTransRecipientInfo.class); } public void setKtri(KeyTransRecipientInfo ktri) { setChoiceValue(RecipientInfoField.KTRI, ktri); } public KeyAgreeRecipientInfo getKari() { return getChoiceValueAs(RecipientInfoField.KARI, KeyAgreeRecipientInfo.class); } public void setKari(KeyAgreeRecipientInfo kari) { setChoiceValue(RecipientInfoField.KARI, kari); } public KEKRecipientInfo getKekri() { return getChoiceValueAs(RecipientInfoField.KEKRI, KEKRecipientInfo.class); } public void setKekri(KEKRecipientInfo kekri) { setChoiceValue(RecipientInfoField.KEKRI, kekri); } public PasswordRecipientInfo getPwri() { return getChoiceValueAs(RecipientInfoField.PWRI, PasswordRecipientInfo.class); } public void setPwri(PasswordRecipientInfo pwri) { setChoiceValue(RecipientInfoField.PWRI, pwri); } public OtherRecipientInfo getori() { return getChoiceValueAs(RecipientInfoField.ORI, OtherRecipientInfo.class); } public void setOri(OtherRecipientInfo ori) { setChoiceValue(RecipientInfoField.ORI, ori); } }
593
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/AttributeCertificateInfoV1.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1BitString; import org.apache.kerby.asn1.type.Asn1Integer; import org.apache.kerby.asn1.type.Asn1SequenceType; import org.apache.kerby.x509.type.AlgorithmIdentifier; import org.apache.kerby.x509.type.AttCertIssuer; import org.apache.kerby.x509.type.AttCertValidityPeriod; import org.apache.kerby.x509.type.Attributes; import org.apache.kerby.x509.type.CertificateSerialNumber; import org.apache.kerby.x509.type.Extensions; /** * AttributeCertificateInfoV1 ::= SEQUENCE { * version AttCertVersionV1 DEFAULT v1, * subject Subject, * issuer GeneralNames, * signature AlgorithmIdentifier, * serialNumber CertificateSerialNumber, * attCertValidityPeriod AttCertValidityPeriod, * attributes SEQUENCE OF Attribute, * issuerUniqueID UniqueIdentifier OPTIONAL, * extensions Extensions OPTIONAL * } * * AttCertVersionV1 ::= INTEGER { v1(0) } */ public class AttributeCertificateInfoV1 extends Asn1SequenceType { protected enum AttributeCertificateInfoV1Field implements EnumType { VERSION, SUBJECT, ISSUER, SIGNATURE, SERIAL_NUMBER, ATTR_CERT_VALIDITY_PERIOD, ATTRIBUTES, ISSUER_UNIQUE_ID, EXTENSIONS; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] { new Asn1FieldInfo(AttributeCertificateInfoV1Field.VERSION, Asn1Integer.class), new Asn1FieldInfo(AttributeCertificateInfoV1Field.SUBJECT, Subject.class), new Asn1FieldInfo(AttributeCertificateInfoV1Field.ISSUER, AttCertIssuer.class), new Asn1FieldInfo(AttributeCertificateInfoV1Field.SIGNATURE, AlgorithmIdentifier.class), new Asn1FieldInfo(AttributeCertificateInfoV1Field.SERIAL_NUMBER, CertificateSerialNumber.class), new Asn1FieldInfo(AttributeCertificateInfoV1Field.ATTR_CERT_VALIDITY_PERIOD, AttCertValidityPeriod.class), new Asn1FieldInfo(AttributeCertificateInfoV1Field.ATTRIBUTES, Attributes.class), new Asn1FieldInfo(AttributeCertificateInfoV1Field.ISSUER_UNIQUE_ID, Asn1BitString.class), new Asn1FieldInfo(AttributeCertificateInfoV1Field.EXTENSIONS, Extensions.class) }; public AttributeCertificateInfoV1() { super(fieldInfos); } public int getVersion() { return getFieldAsInteger(AttributeCertificateInfoV1Field.VERSION); } public void setVersion(int version) { setFieldAsInt(AttributeCertificateInfoV1Field.VERSION, version); } public Subject getSubject() { return getFieldAs(AttributeCertificateInfoV1Field.SUBJECT, Subject.class); } public void setSubject(Subject subject) { setFieldAs(AttributeCertificateInfoV1Field.SUBJECT, subject); } public AttCertIssuer getIssuer() { return getFieldAs(AttributeCertificateInfoV1Field.ISSUER, AttCertIssuer.class); } public void setIssuer(AttCertIssuer attCertIssuer) { setFieldAs(AttributeCertificateInfoV1Field.ISSUER, attCertIssuer); } public AlgorithmIdentifier getSignature() { return getFieldAs(AttributeCertificateInfoV1Field.SIGNATURE, AlgorithmIdentifier.class); } public void setSignature(AlgorithmIdentifier signature) { setFieldAs(AttributeCertificateInfoV1Field.SIGNATURE, signature); } public CertificateSerialNumber getSerialNumber() { return getFieldAs(AttributeCertificateInfoV1Field.SERIAL_NUMBER, CertificateSerialNumber.class); } public void setSerialNumber(CertificateSerialNumber certificateSerialNumber) { setFieldAs(AttributeCertificateInfoV1Field.SERIAL_NUMBER, certificateSerialNumber); } public AttCertValidityPeriod getAttrCertValidityPeriod() { return getFieldAs(AttributeCertificateInfoV1Field.ATTR_CERT_VALIDITY_PERIOD, AttCertValidityPeriod.class); } public void setAttrCertValidityPeriod(AttCertValidityPeriod attrCertValidityPeriod) { setFieldAs(AttributeCertificateInfoV1Field.ATTR_CERT_VALIDITY_PERIOD, attrCertValidityPeriod); } public Attributes getAttributes() { return getFieldAs(AttributeCertificateInfoV1Field.ATTRIBUTES, Attributes.class); } public void setAttributes(Attributes attributes) { setFieldAs(AttributeCertificateInfoV1Field.ATTRIBUTES, attributes); } public byte[] getIssuerUniqueID() { return getFieldAs(AttributeCertificateInfoV1Field.ISSUER_UNIQUE_ID, Asn1BitString.class).getValue(); } public void setIssuerUniqueId(byte[] issuerUniqueId) { setFieldAs(AttributeCertificateInfoV1Field.ISSUER_UNIQUE_ID, new Asn1BitString(issuerUniqueId)); } public Extensions getExtensions() { return getFieldAs(AttributeCertificateInfoV1Field.EXTENSIONS, Extensions.class); } public void setExtensions(Extensions extensions) { setFieldAs(AttributeCertificateInfoV1Field.EXTENSIONS, extensions); } }
594
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/Attribute.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.type.Asn1ObjectIdentifier; import org.apache.kerby.asn1.type.Asn1SequenceType; import org.apache.kerby.x509.type.AttributeValues; /** * Ref. RFC 5652 * <pre> * Attribute ::= SEQUENCE { * attrType OBJECT IDENTIFIER, * attrValues SET OF AttributeValue * } * * AttributeValue ::= ANY * </pre> */ public class Attribute extends Asn1SequenceType { protected enum AttributeField implements EnumType { ATTR_TYPE, ATTR_VALUES; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{ new Asn1FieldInfo(AttributeField.ATTR_TYPE, Asn1ObjectIdentifier.class), new Asn1FieldInfo(AttributeField.ATTR_VALUES, AttributeValues.class), }; public Attribute() { super(fieldInfos); } public Asn1ObjectIdentifier getAttrType() { return getFieldAs(AttributeField.ATTR_TYPE, Asn1ObjectIdentifier.class); } public void setAttrType(Asn1ObjectIdentifier attrType) { setFieldAs(AttributeField.ATTR_TYPE, attrType); } public AttributeValues getAttrValues() { return getFieldAs(AttributeField.ATTR_VALUES, AttributeValues.class); } public void setAttrValues(AttributeValues values) { setFieldAs(AttributeField.ATTR_VALUES, values); } }
595
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/EnvelopedContentInfo.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; /** * A ContentInfo that wraps EnvelopedData. */ public class EnvelopedContentInfo extends ContentInfo { public EnvelopedContentInfo() { super(); setAnyFieldValueType(ContentInfoField.CONTENT, EnvelopedData.class); } public EnvelopedData getEnvelopedData() { return getFieldAsAny(ContentInfoField.CONTENT, EnvelopedData.class); } public void setEnvelopedData(EnvelopedData signedData) { setFieldAsAny(ContentInfoField.CONTENT, signedData); } }
596
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/SignatureValue.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.type.Asn1OctetString; /** * SignatureValue ::= OCTET STRING */ public class SignatureValue extends Asn1OctetString { }
597
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/SignerInfo.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.Asn1FieldInfo; import org.apache.kerby.asn1.EnumType; import org.apache.kerby.asn1.ImplicitField; import org.apache.kerby.asn1.type.Asn1SequenceType; /** * Ref. RFC 5652 * * <pre> * * SignerInfo ::= SEQUENCE { * version CMSVersion, * sid SignerIdentifier, * digestAlgorithm DigestAlgorithmIdentifier, * signedAttrs [0] IMPLICIT SignedAttributes OPTIONAL, * signatureAlgorithm SignatureAlgorithmIdentifier, * signature SignatureValue, * unsignedAttrs [1] IMPLICIT UnsignedAttributes OPTIONAL * } * * </pre> */ public class SignerInfo extends Asn1SequenceType { protected enum SignerInfoField implements EnumType { CMS_VERSION, SID, DIGEST_ALGORITHM, SIGNED_ATTRS, SIGNATURE_ALGORITHMS, SIGNATURE, UNSIGNED_ATTRS; @Override public int getValue() { return ordinal(); } @Override public String getName() { return name(); } } static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{ new Asn1FieldInfo(SignerInfoField.CMS_VERSION, CmsVersion.class), new Asn1FieldInfo(SignerInfoField.SID, SignerIdentifier.class), new Asn1FieldInfo(SignerInfoField.DIGEST_ALGORITHM, DigestAlgorithmIdentifier.class), new ImplicitField(SignerInfoField.SIGNED_ATTRS, 0, SignedAttributes.class), new Asn1FieldInfo(SignerInfoField.SIGNATURE_ALGORITHMS, SignatureAlgorithmIdentifier.class), new Asn1FieldInfo(SignerInfoField.SIGNATURE, SignatureValue.class), new ImplicitField(SignerInfoField.UNSIGNED_ATTRS, 1, UnsignedAttributes.class) }; public SignerInfo() { super(fieldInfos); } public int getCmsVersion() { return getFieldAsInteger(SignerInfoField.CMS_VERSION); } public void setCmsVersion(int version) { setFieldAsInt(SignerInfoField.CMS_VERSION, version); } public SignerIdentifier getSignerIdentifier() { return getFieldAs(SignerInfoField.SID, SignerIdentifier.class); } public void setSignerIdentifier(SignerIdentifier signerIdentifier) { setFieldAs(SignerInfoField.SID, signerIdentifier); } public DigestAlgorithmIdentifier getDigestAlgorithmIdentifier() { return getFieldAs(SignerInfoField.DIGEST_ALGORITHM, DigestAlgorithmIdentifier.class); } public void setDigestAlgorithmIdentifier(DigestAlgorithmIdentifier digestAlgorithmIdentifier) { setFieldAs(SignerInfoField.DIGEST_ALGORITHM, digestAlgorithmIdentifier); } public SignedAttributes getSignedAttributes() { return getFieldAs(SignerInfoField.SIGNED_ATTRS, SignedAttributes.class); } public void setSignedAttributes(SignedAttributes signedAttributes) { setFieldAs(SignerInfoField.SIGNED_ATTRS, signedAttributes); } public SignatureAlgorithmIdentifier getSignatureAlgorithmIdentifier() { return getFieldAs(SignerInfoField.SIGNATURE_ALGORITHMS, SignatureAlgorithmIdentifier.class); } public void setSignatureAlgorithmIdentifier(SignatureAlgorithmIdentifier signatureAlgorithmIdentifier) { setFieldAs(SignerInfoField.SIGNATURE_ALGORITHMS, signatureAlgorithmIdentifier); } public SignatureValue getSignatureValue() { return getFieldAs(SignerInfoField.SIGNATURE, SignatureValue.class); } public void setSignatureValue(SignatureValue signatureValue) { setFieldAs(SignerInfoField.SIGNATURE, signatureValue); } public UnsignedAttributes getUnsignedAttributes() { return getFieldAs(SignerInfoField.UNSIGNED_ATTRS, UnsignedAttributes.class); } public void setUnsignedAttributes(UnsignedAttributes unsignedAttributes) { setFieldAs(SignerInfoField.UNSIGNED_ATTRS, unsignedAttributes); } }
598
0
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms
Create_ds/directory-kerby/kerby-pkix/src/main/java/org/apache/kerby/cms/type/CompressedContentInfo.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; /** * A ContentInfo that wraps CompressedData. */ public class CompressedContentInfo extends ContentInfo { public CompressedContentInfo() { super(); setAnyFieldValueType(ContentInfoField.CONTENT, CompressedData.class); } public CompressedData getCompressedData() { return getFieldAsAny(ContentInfoField.CONTENT, CompressedData.class); } public void setCompressedData(CompressedData signedData) { setFieldAsAny(ContentInfoField.CONTENT, signedData); } }
599