File tree Expand file tree Collapse file tree 8 files changed +60
-57
lines changed
src/main/java/com/siemens/pki
cmpracomponent/configuration Expand file tree Collapse file tree 8 files changed +60
-57
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ default String getType() {
6969 ;
7070 }
7171
72- /**
72+ /**
7373 * Generate nonce
7474 * @param transactionId current CMP transactionId, used to map related calls to getFreshRatNonce and processRatVerification
7575 * @param len the required length of the requested nonce, maybe <code>null</code>
Original file line number Diff line number Diff line change 2525import org .bouncycastle .asn1 .ASN1ObjectIdentifier ;
2626import org .bouncycastle .asn1 .pkcs .PKCSObjectIdentifiers ;
2727import org .bouncycastle .asn1 .x509 .X509ObjectIdentifiers ;
28+
2829/**
29- * OIDs from from https://datatracker.ietf.org/doc/draft-ietf-lamps-attestation-freshness/ and
30+ * OIDs from from https://datatracker.ietf.org/doc/draft-ietf-lamps-attestation-freshness/ and
3031 * https://datatracker.ietf.org/doc/draft-ietf-lamps-csr-attestation/
3132 */
3233public interface AttestationObjectIdentifiers {
@@ -42,6 +43,7 @@ public interface AttestationObjectIdentifiers {
4243 * TODO update to current state of the draft
4344 */
4445 String TBD1 = "99" ;
46+
4547 String TBD2 = "100" ;
4648 String TBD3 = "101" ;
4749
@@ -52,5 +54,6 @@ public interface AttestationObjectIdentifiers {
5254 * from https://datatracker.ietf.org/doc/draft-ietf-lamps-csr-attestation/
5355 */
5456 ASN1ObjectIdentifier id_aa_evidence = PKCSObjectIdentifiers .id_aa .branch ("59" );
57+
5558 ASN1ObjectIdentifier id_aa_ar = PKCSObjectIdentifiers .id_aa .branch (TBD3 );
5659}
Original file line number Diff line number Diff line change 2727import org .bouncycastle .asn1 .DERSequence ;
2828
2929/**
30- {@code
31- AttestationResult ::= SEQUENCE {
32- type ATTESTATION-RESULT.&id({AttestationResultSet}),
33- stmt ATTESTATION-RESULT.&Type({AttestationResultSet}{@type}),
34- }
35- }
30+ * {@code
31+ * AttestationResult ::= SEQUENCE {
32+ * type ATTESTATION-RESULT.&id({AttestationResultSet}),
33+ * stmt ATTESTATION-RESULT.&Type({AttestationResultSet}{@type}),
34+ * }
35+ * }
3636 */
3737public class AttestationResult extends ASN1Object {
3838 public static AttestationResult getInstance (Object o ) {
Original file line number Diff line number Diff line change 2525import org .bouncycastle .asn1 .x509 .Certificate ;
2626
2727/**
28- {@code
29- AttestationResultBundle ::= SEQUENCE {
30- results SEQUENCE SIZE (1..MAX) OF AttestationResult,
31- certs SEQUENCE SIZE (1..MAX) OF CertificateChoices OPTIONAL,
32- -- CertificateChoices MUST only contain certificate or other,
33- -- see Section 10.2.2 of [RFC5652]
34- }
35- }
36- *
28+ * {@code
29+ * AttestationResultBundle ::= SEQUENCE {
30+ * results SEQUENCE SIZE (1..MAX) OF AttestationResult,
31+ * certs SEQUENCE SIZE (1..MAX) OF CertificateChoices OPTIONAL,
32+ * -- CertificateChoices MUST only contain certificate or other,
33+ * -- see Section 10.2.2 of [RFC5652]
34+ * }
35+ * }
36+ *
3737 */
3838public class AttestationResultBundle extends ASN1Object {
3939
Original file line number Diff line number Diff line change 2525import org .bouncycastle .asn1 .x509 .Certificate ;
2626
2727/**
28- *
29- {@code
30- EvidenceBundle ::= SEQUENCE {
31- evidences SEQUENCE SIZE (1..MAX) OF EvidenceStatement,
32- certs SEQUENCE SIZE (1..MAX) OF LimitedCertChoices OPTIONAL
33- }
34- }
28+ *
29+ * {@code
30+ * EvidenceBundle ::= SEQUENCE {
31+ * evidences SEQUENCE SIZE (1..MAX) OF EvidenceStatement,
32+ * certs SEQUENCE SIZE (1..MAX) OF LimitedCertChoices OPTIONAL
33+ * }
34+ * }
3535 */
3636public class EvidenceBundle extends ASN1Object {
3737
Original file line number Diff line number Diff line change 2929import org .bouncycastle .asn1 .DERSequence ;
3030
3131/**
32- {@code
33- EvidenceStatement ::= SEQUENCE {
34- type EVIDENCE-STATEMENT.&id({EvidenceStatementSet}),
35- stmt EVIDENCE-STATEMENT.&Type({EvidenceStatementSet}{@type}),
36- hint IA5String OPTIONAL
37- }
38- }
32+ * {@code
33+ * EvidenceStatement ::= SEQUENCE {
34+ * type EVIDENCE-STATEMENT.&id({EvidenceStatementSet}),
35+ * stmt EVIDENCE-STATEMENT.&Type({EvidenceStatementSet}{@type}),
36+ * hint IA5String OPTIONAL
37+ * }
38+ * }
3939 */
4040public class EvidenceStatement extends ASN1Object {
4141 public static EvidenceStatement getInstance (Object o ) {
Original file line number Diff line number Diff line change 3333/**
3434 * from https://datatracker.ietf.org/doc/draft-ietf-lamps-attestation-freshness/
3535 *
36- {@code
37- NonceRequestValue ::= SEQUENCE SIZE (1..MAX) OF NonceRequest
38- NonceRequest ::= SEQUENCE {
39- len INTEGER OPTIONAL,
40- -- indicates the required length of the requested nonce
41- type EVIDENCE-STATEMENT.&id({EvidenceStatementSet}) OPTIONAL,
42- -- indicates which Evidence type to request a nonce for
43- hint UTF8String OPTIONAL
44- -- indicates which Verifier to request a nonce from
45- }
46- }
36+ * {@code
37+ * NonceRequestValue ::= SEQUENCE SIZE (1..MAX) OF NonceRequest
38+ * NonceRequest ::= SEQUENCE {
39+ * len INTEGER OPTIONAL,
40+ * -- indicates the required length of the requested nonce
41+ * type EVIDENCE-STATEMENT.&id({EvidenceStatementSet}) OPTIONAL,
42+ * -- indicates which Evidence type to request a nonce for
43+ * hint UTF8String OPTIONAL
44+ * -- indicates which Verifier to request a nonce from
45+ * }
46+ * }
4747 */
4848public class NonceRequestValue extends ASN1Object {
4949
Original file line number Diff line number Diff line change 3434/**
3535 * from https://datatracker.ietf.org/doc/draft-ietf-lamps-attestation-freshness/
3636 *
37- {@code
38- NonceResponseValue ::= SEQUENCE SIZE (1..MAX) OF NonceResponse
39- NonceResponse ::= SEQUENCE {
40- nonce OCTET STRING,
41- -- contains the nonce of length len
42- -- provided by the Verifier indicated with hint
43- expiry INTEGER OPTIONAL,
44- -- indicates how long in seconds the Verifier considers
45- -- the nonce valid
46- type EVIDENCE-STATEMENT.&id({EvidenceStatementSet}) OPTIONAL,
47- -- indicates which Evidence type to request a nonce for
48- hint UTF8String OPTIONAL
49- -- indicates which Verifier to request a nonce from
50- }
51- }
37+ * {@code
38+ * NonceResponseValue ::= SEQUENCE SIZE (1..MAX) OF NonceResponse
39+ * NonceResponse ::= SEQUENCE {
40+ * nonce OCTET STRING,
41+ * -- contains the nonce of length len
42+ * -- provided by the Verifier indicated with hint
43+ * expiry INTEGER OPTIONAL,
44+ * -- indicates how long in seconds the Verifier considers
45+ * -- the nonce valid
46+ * type EVIDENCE-STATEMENT.&id({EvidenceStatementSet}) OPTIONAL,
47+ * -- indicates which Evidence type to request a nonce for
48+ * hint UTF8String OPTIONAL
49+ * -- indicates which Verifier to request a nonce from
50+ * }
51+ * }
5252 */
5353public class NonceResponseValue extends ASN1Object {
5454
You can’t perform that action at this time.
0 commit comments