@@ -668,7 +668,13 @@ t.test('publish existing package with provenance in gha', async t => {
668
668
const fulcioURL = 'https://mock.fulcio'
669
669
const leafCertificate = `-----BEGIN CERTIFICATE-----\nabc\n-----END CERTIFICATE-----\n`
670
670
const rootCertificate = `-----BEGIN CERTIFICATE-----\nxyz\n-----END CERTIFICATE-----\n`
671
- const certificate = [ leafCertificate , rootCertificate ] . join ( )
671
+ const certificateResponse = {
672
+ signedCertificateEmbeddedSct : {
673
+ chain : {
674
+ certificates : [ leafCertificate , rootCertificate ] ,
675
+ } ,
676
+ } ,
677
+ }
672
678
673
679
// Data for mocking Rekor upload
674
680
const rekorURL = 'https://mock.rekor'
@@ -749,14 +755,18 @@ t.test('publish existing package with provenance in gha', async t => {
749
755
} ) . reply ( 200 , { value : idToken } )
750
756
751
757
const fulcioSrv = MockRegistry . tnock ( t , fulcioURL )
752
- fulcioSrv . matchHeader ( 'Accept' , 'application/pem-certificate-chain' )
753
- . matchHeader ( 'Content-Type' , 'application/json' )
754
- . matchHeader ( 'Authorization' , `Bearer ${ idToken } ` )
755
- . post ( '/api/v1/signingCert' , {
756
- publicKey : { content : / .+ / i } ,
757
- signedEmailAddress : / .+ / i,
758
+ fulcioSrv . matchHeader ( 'Content-Type' , 'application/json' )
759
+ . post ( '/api/v2/signingCert' , {
760
+ credentials : { oidcIdentityToken : idToken } ,
761
+ publicKeyRequest : {
762
+ publicKey : {
763
+ algorithm : 'ECDSA' ,
764
+ content : / .+ / i,
765
+ } ,
766
+ proofOfPossession : / .+ / i,
767
+ } ,
758
768
} )
759
- . reply ( 200 , certificate )
769
+ . reply ( 200 , certificateResponse )
760
770
761
771
const rekorSrv = MockRegistry . tnock ( t , rekorURL )
762
772
rekorSrv
0 commit comments