Skip to content

Commit 59ffc30

Browse files
fix: update expiration date of test VCs
1 parent 4eca675 commit 59ffc30

File tree

8 files changed

+48
-49
lines changed

8 files changed

+48
-49
lines changed

extensions/common/crypto/ldp-verifiable-credentials/src/test/resources/jws2020/issuing/0001_vc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"MembershipCredential"
1212
],
1313
"issuer": "did:web:localhost:member0123456789",
14-
"expirationDate": "2024-12-31T23:00:00Z",
14+
"expirationDate": "2099-12-31T23:00:00Z",
1515
"@context": [
1616
"https://www.w3.org/ns/did/v1",
1717
"https://www.w3.org/2018/credentials/v1",

extensions/common/crypto/lib/jws2020-lib/src/test/java/org/eclipse/edc/security/signature/jws2020/IssuerTests.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@
1717
import com.apicatalog.jsonld.loader.SchemeRouter;
1818
import com.apicatalog.ld.DocumentError;
1919
import com.apicatalog.ld.signature.SigningError;
20-
import com.apicatalog.ld.signature.VerificationError;
2120
import com.apicatalog.vc.verifier.Verifier;
2221
import com.fasterxml.jackson.databind.ObjectMapper;
2322
import com.nimbusds.jose.JOSEException;
2423
import com.nimbusds.jose.jwk.Curve;
25-
import com.nimbusds.jose.jwk.JWK;
2624
import com.nimbusds.jose.jwk.KeyUse;
2725
import com.nimbusds.jose.jwk.RSAKey;
2826
import com.nimbusds.jose.jwk.gen.ECKeyGenerator;
@@ -195,7 +193,7 @@ void signEmbeddedVerificationMethod() throws SigningError, DocumentError {
195193
@Test
196194
void signVerificationDidKey() throws SigningError, DocumentError {
197195
var vc = readResourceAsJson("jws2020/issuing/0001_vc.json");
198-
var eckey = (JWK) CryptoConverter.create("""
196+
var eckey = CryptoConverter.create("""
199197
{
200198
"kty": "EC",
201199
"d": "UEUJVbKZC3vR-y65gXx8NZVnE0QD5xe6qOk4eiObj-qVOg5zqt9zc0d6fdu4mUuu",
@@ -257,7 +255,7 @@ void signCompactedPresentation() throws SigningError, DocumentError {
257255
}
258256

259257
@Test
260-
void signAndVerify() throws JOSEException, SigningError, DocumentError, VerificationError {
258+
void signAndVerify() throws JOSEException, SigningError, DocumentError {
261259
var vc = readResourceAsJson("jws2020/issuing/0001_vc.json");
262260

263261
var ecKey = new ECKeyGenerator(Curve.P_256).keyID("test-foo").generate();

extensions/common/crypto/lib/jws2020-lib/src/test/java/org/eclipse/edc/security/signature/jws2020/VerifierTests.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void verifyValidVc() throws VerificationError, DocumentError {
4444

4545
@DisplayName("t0002: forged credentials subject")
4646
@Test
47-
void verify_forgedSubject() throws VerificationError, DocumentError {
47+
void verify_forgedSubject() {
4848
var vc = readResourceAsJson("jws2020/verifying/0002_vc_forged.json");
4949
assertThatThrownBy(() -> verifier.verify(vc)).isInstanceOf(VerificationError.class);
5050
}
@@ -67,7 +67,7 @@ void verify_multipleValidProofs() throws VerificationError, DocumentError {
6767

6868
@DisplayName("t0005: proof set having one forged proof")
6969
@Test
70-
void verify_oneForgedProof() throws VerificationError, DocumentError {
70+
void verify_oneForgedProof() {
7171
var vc = readResourceAsJson("jws2020/verifying/0005_vc_one_forged_proof.json");
7272
assertThatThrownBy(() -> verifier.verify(vc)).isInstanceOf(VerificationError.class);
7373
}
@@ -82,7 +82,7 @@ void verify_oneForgedProof() throws VerificationError, DocumentError {
8282
@Disabled("did:key is not supported")
8383
@DisplayName("t0006: DID key as verification method (not yet supported)")
8484
@Test
85-
void verify_didKeyAsVerificationMethod() throws VerificationError, DocumentError {
85+
void verify_didKeyAsVerificationMethod() {
8686
var vc = readResourceAsJson("jws2020/verifying/0006_vc_did_key.json");
8787
assertThatThrownBy(() -> verifier.verify(vc)).isInstanceOf(UnsupportedOperationException.class)
8888
.hasMessage("Cannot deserialize public key, expected JWK format");
@@ -98,7 +98,7 @@ void verify_validSignedVp() throws VerificationError, DocumentError {
9898

9999
@DisplayName("t0008: forged signed VP")
100100
@Test
101-
void verify_forgedSignedVp() throws VerificationError, DocumentError {
101+
void verify_forgedSignedVp() {
102102
var vc = readResourceAsJson("jws2020/verifying/0007_vp_compacted_forged.json");
103103
assertThatThrownBy(() -> verifier.verify(vc)).isInstanceOf(VerificationError.class);
104104
}

extensions/common/crypto/lib/jws2020-lib/src/test/resources/jws2020/issuing/0001_vc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"MembershipCredential"
1212
],
1313
"issuer": "did:web:localhost:member0123456789",
14-
"expirationDate": "2024-12-31T23:00:00Z",
14+
"expirationDate": "2099-12-31T23:00:00Z",
1515
"@context": [
1616
"https://org.eclipse.edc/linkedCredentialData",
1717
"https://www.w3.org/ns/did/v1",

extensions/common/crypto/lib/jws2020-lib/src/test/resources/jws2020/verifying/0001_vc.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
"MembershipCredential"
1111
],
1212
"issuer": "did:web:localhost:member0123456789",
13-
"expirationDate": "2024-12-31T23:00:00Z",
13+
"expirationDate": "2099-12-31T23:00:00Z",
1414
"proof": {
15+
"verificationMethod": "https://org.eclipse.edc/verification-method",
1516
"type": "JsonWebSignature2020",
16-
"created": "2022-12-31T23:00:00Z",
1717
"proofPurpose": "assertionMethod",
18-
"verificationMethod": "https://org.eclipse.edc/verification-method",
19-
"jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFUzM4NCJ9..5JhJYiqLAMoKtOB7687KFY0FaiFiiCfeWrwG_LUCBIzIBU05Hsvt44aZZrj3QOm9qef25g0Obr8199wtNM_Elh9o25j6n4a99sGMCi38xsDQupCUE6FKwOjxopF49Jex"
18+
"created": "2025-01-07T07:55:59.778743Z",
19+
"jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFUzM4NCJ9..GFhdBOtls3uFe-G8WArw1Kb0juGndUEBx6KSZ43rdU-QZ0_vPQpqA9uyKrzM8lQZSqAtnlvTeRiGIw6I7Fs0JFef9vH31kIEdXbhBvRJ8tQm5cGtspH106AvJA1P60ok"
2020
},
2121
"@context": [
2222
"https://www.w3.org/ns/did/v1",

extensions/common/crypto/lib/jws2020-lib/src/test/resources/jws2020/verifying/0003_vc_embedded.json

+9-8
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,23 @@
1111
"https://org.eclipse.edc/linkedCredentialData#MembershipCredential"
1212
],
1313
"issuer": "did:web:localhost:member0123456789",
14-
"expirationDate": "2024-12-31T23:00:00Z",
14+
"expirationDate": "2099-12-31T23:00:00Z",
1515
"proof": {
16-
"type": "JsonWebSignature2020",
17-
"created": "2022-12-31T23:00:00Z",
16+
"created": "2025-01-07T08:03:46.647007Z",
17+
"jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFUzM4NCJ9..dcNZ7xhRkdd_OgCtNesBtODrGjhUyWlwArYGLKEXTf9bHFCSt8b886nrFx1f_tUfevezWHi7a-6o62Hjy6LcxyXTSi_EVV_QVoi0ms9AIktqkXzdyVggNmRroetkCAHi",
1818
"proofPurpose": "assertionMethod",
19+
"type": "JsonWebSignature2020",
1920
"verificationMethod": {
20-
"type": "JsonWebKey2020",
21+
"controller": "did:key:zQ3shP2mWsZYWgvgM11nenXRTx9L1yiJKmkf9dfX7NaMKb1pX",
22+
"id": "https://org.eclipse.edc/keys/a8a73ff1-f8b4-49fd-b128-120cf95c7bfe",
2123
"publicKeyJwk": {
22-
"kty": "EC",
2324
"crv": "P-384",
25+
"kty": "EC",
2426
"x": "AqMfyYAh2SMf8bMoLbE6mOCbVyz8hukpBqrVheAFP4Anz2_cfzLEKKROD5EaAxSo",
2527
"y": "P4KceKXv31JasLqvBPZWA9t1S2cMiHIQQ8ttAl5cFX3xBuzIPlgTRWPOVaNPWNFl"
2628
},
27-
"id": "https://org.eclipse.edc/keys/99159241-bbf7-4bcd-8851-c31f186d348d"
28-
},
29-
"jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFUzM4NCJ9..fhdTmvoci7jqs-Qvlq74abkn2DWQuLHM_KPVk0tAXAVujjPRhs7BB-5uNakehNhrJm1q6sU_vfUwJ2UxO6SaWTP9twp9cTRWhN1hnY_cV1eMht_BLUv7Ld9cuUIJyqrN"
29+
"type": "JsonWebKey2020"
30+
}
3031
},
3132
"@context": [
3233
"https://www.w3.org/ns/did/v1",

extensions/common/crypto/lib/jws2020-lib/src/test/resources/jws2020/verifying/0004_vc_two_valid_proofs.json

+18-18
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,31 @@
1111
"MembershipCredential"
1212
],
1313
"issuer": "did:web:localhost:member0123456789",
14-
"expirationDate": "2024-12-31T23:00:00Z",
14+
"expirationDate": "2099-12-31T23:00:00Z",
1515
"proof": [
1616
{
17+
"created": "2025-01-07T07:58:57.889159Z",
18+
"jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFUzM4NCJ9..MUNffcmHBrGjhQ_oMU8p-HveHXITPrE4op_HdgVyoHr25Ara51AMYZrhoX6fn6CPzCxcELhw3Spzp0P1b1fpeCKeEREjWXbGSXz4TL0eqSnHNxVW4sS2j02ElLsV1wHO",
19+
"proofPurpose": "assertionMethod",
1720
"type": "JsonWebSignature2020",
18-
"created": "2022-12-31T23:00:00Z",
21+
"verificationMethod": "https://org.eclipse.edc/verification-method"
22+
},
23+
{
24+
"created": "2025-01-07T08:15:28.929673Z",
25+
"jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFUzM4NCJ9..TJCK_b4oJNaq7xAybTObJgKXci2Ax7yYYQXF3duCoFPpNulyrcnlRRdFIcl3yQ-Beq9qdQi00Gw3XObUawoIGoiCqgA12pAxa8dgUB4mOctFpTv1ix_nLERRoSSsc_yu",
1926
"proofPurpose": "assertionMethod",
27+
"type": "JsonWebSignature2020",
2028
"verificationMethod": {
21-
"type": "JsonWebKey2020",
29+
"controller": "did:key:zQ3shP2mWsZYWgvgM11nenXRTx9L1yiJKmkf9dfX7NaMKb1pX",
30+
"id": "https://org.eclipse.edc/keys/3f00670d-8910-45eb-9153-1a00ad0f72f1",
2231
"publicKeyJwk": {
23-
"kty": "OKP",
24-
"use": "sig",
25-
"crv": "Ed25519",
26-
"kid": "5887dc79-c009-407a-8c37-70fcd924a01d",
27-
"x": "xNg3NR6296VQs_knTHXFhk3XDbPq281onF4E7O-B7E8"
32+
"crv": "P-384",
33+
"kty": "EC",
34+
"x": "AqMfyYAh2SMf8bMoLbE6mOCbVyz8hukpBqrVheAFP4Anz2_cfzLEKKROD5EaAxSo",
35+
"y": "P4KceKXv31JasLqvBPZWA9t1S2cMiHIQQ8ttAl5cFX3xBuzIPlgTRWPOVaNPWNFl"
2836
},
29-
"id": "https://org.eclipse.edc/keys/bb5331ac-e114-42c3-8b39-75b3a67ecde1"
30-
},
31-
"jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..h0ArjC72Tfd5C4AgmK8rtLNpsm2OLN8X8QY9omubagVEE1aBaBAKbuxm4VEWYkHSnMXcsH5kESGZ4E1cSLDoDg"
32-
},
33-
{
34-
"type": "JsonWebSignature2020",
35-
"created": "2022-12-31T23:00:00Z",
36-
"proofPurpose": "assertionMethod",
37-
"verificationMethod": "https://org.eclipse.edc/verification-method",
38-
"jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFUzM4NCJ9..ITV0pAeQEyB2621UivBNAPKL7tEGoQ79huZFKV64i3TOxKfOGYCZJfUp0GMWDmyFI-WkSXd0aqxF62CyFt5_AZrhlPFhefwHIOb9WIbUUaa96xN5-_wzfL3qa2MuADCh"
37+
"type": "JsonWebKey2020"
38+
}
3939
}
4040
],
4141
"@context": [

extensions/common/crypto/lib/jws2020-lib/src/test/resources/jws2020/verifying/0007_vp_compacted.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@
1414
"MembershipCredential"
1515
],
1616
"issuer": "did:web:localhost:member0123456789",
17-
"expirationDate": "2024-12-31T23:00:00Z",
17+
"expirationDate": "2099-12-31T23:00:00Z",
1818
"proof": {
19-
"type": "JsonWebSignature2020",
20-
"created": "2022-12-31T23:00:00Z",
19+
"created": "2025-01-07T07:58:57.889159Z",
20+
"jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFUzM4NCJ9..MUNffcmHBrGjhQ_oMU8p-HveHXITPrE4op_HdgVyoHr25Ara51AMYZrhoX6fn6CPzCxcELhw3Spzp0P1b1fpeCKeEREjWXbGSXz4TL0eqSnHNxVW4sS2j02ElLsV1wHO",
2121
"proofPurpose": "assertionMethod",
22-
"verificationMethod": "https://org.eclipse.edc/verification-method",
23-
"jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFUzM4NCJ9..SwEkR4duA97jHy_WSVKIHLJqd8i2IidedmlMpUKyeV0YlPNz0pjPEKM9p7PqBb7oRIKG3-5qCxpzNhbsIEZZMzEMjWE1adckJ9SMiNr_G1wiAh3Op0cZHDgZBevIPElG"
22+
"type": "JsonWebSignature2020",
23+
"verificationMethod": "https://org.eclipse.edc/verification-method"
2424
}
2525
},
2626
"proof": {
27-
"verificationMethod": "https://org.eclipse.edc/verification-method",
28-
"type": "JsonWebSignature2020",
27+
"created": "2025-01-07T07:59:46.273602Z",
28+
"jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFUzM4NCJ9..R37HBNsRTuHj1kL2pr5EF3BajeeZkZe9r8i6bWYdU5MnwWr7PP5j845-czUJdfQOYTXZ-pKI8KraVcz88G2F5uaDD9NgDWvOb25QFjVoSAjo5oB1EIedUfQC3hkQId-j",
2929
"proofPurpose": "assertionMethod",
30-
"created": "2022-12-31T23:00:00Z",
31-
"jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFUzM4NCJ9..vo8x80Jm5h_qubTcDvrF3VXy6RRXcX0OdWQ8XLg_cXP_3-1-xXqT--dLMpQUfaPsOV-Y5Gu27gsukI73yKiBs63ebQ3Llc8gQB_BrZ5Ianfy4IcLh7dviW1KqtJ3e2y-"
30+
"type": "JsonWebSignature2020",
31+
"verificationMethod": "https://org.eclipse.edc/verification-method"
3232
},
3333
"@context": [
3434
"https://www.w3.org/ns/did/v1",

0 commit comments

Comments
 (0)