Skip to content

Commit 829e123

Browse files
authored
flatten public interface of client package (#694)
Signed-off-by: Brian DeHamer <[email protected]>
1 parent faca7de commit 829e123

File tree

16 files changed

+148
-152
lines changed

16 files changed

+148
-152
lines changed

.changeset/angry-fireants-smile.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'sigstore': major
3+
---
4+
5+
Replaces the exported `sigstore` object with individual functions/types

packages/cli/src/commands/attest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import color from '@oclif/color';
22
import { Args, Command, Flags } from '@oclif/core';
33
import fs from 'fs/promises';
4-
import { sigstore } from 'sigstore';
4+
import * as sigstore from 'sigstore';
55
import { OAuthIdentityProvider } from '../oauth';
66

77
import type { IdentityProvider } from 'sigstore';

packages/cli/src/commands/verify.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Args, Command, Flags } from '@oclif/core';
22
import fs from 'fs/promises';
3-
import { sigstore } from 'sigstore';
3+
import * as sigstore from 'sigstore';
44

55
export default class Verify extends Command {
66
static override description = 'verify the supplied .sigstore bundle file';
@@ -43,7 +43,7 @@ export default class Verify extends Command {
4343
.readFile(args.bundle)
4444
.then((data) => JSON.parse(data.toString()));
4545

46-
return sigstore.verify(bundle, undefined, options).then(() => {
46+
return sigstore.verify(bundle, options).then(() => {
4747
this.logToStderr('Verification succeeded');
4848
return { verified: true };
4949
});

packages/client/README.md

+33-35
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ and verify any file.
66

77
## Features
88

9-
* Support for signing using an OpenID Connect identity
10-
* Support for publishing signatures to a [Rekor][1] instance
11-
* Support for verifying Sigstore bundles
9+
- Support for signing using an OpenID Connect identity
10+
- Support for publishing signatures to a [Rekor][1] instance
11+
- Support for verifying Sigstore bundles
1212

1313
## Prerequisites
1414

@@ -140,11 +140,11 @@ library. It also lists which `sigstore` versions were shipped with different
140140
## Usage
141141

142142
```javascript
143-
const { sigstore } = require('sigstore')
143+
const { attest, verify } = require('sigstore');
144144
```
145145

146146
```javascript
147-
import { sigstore } from 'sigstore'
147+
import { attest, verify } from 'sigstore';
148148
```
149149

150150
### sign(payload[, options])
@@ -153,47 +153,46 @@ Generates a Sigstore signature for the supplied payload. Returns a
153153
[Sigstore bundle][2] containing the signature and the verification material
154154
necessary to verify the signature.
155155

156-
* `payload` `<Buffer>`: The bytes of the artifact to be signed.
157-
* `options` `<Object>`
158-
* `fulcioURL` `<string>`: The base URL of the Fulcio instance to use for retrieving the signing certificate. Defaults to `'https://fulcio.sigstore.dev'`.
159-
* `rekorURL` `<string>`: The base URL of the Rekor instance to use when adding the signature to the transparency log. Defaults to `'https://rekor.sigstore.dev'`.
160-
* `tsaServerURL` `<string>`: The base URL of the Timestamp Authority instance to use when requesting a signed timestamp. If omitted, no timestamp will be requested.
161-
* `tlogUpload` `<boolean>`: Flag indicating whether or not the signature should be recorded on the Rekor transparency log. Defaults to `true`.
162-
* `identityToken` `<string>`: The OIDC token identifying the signer. If no explicit token is supplied, an attempt will be made to retrieve one from the environment. This config cannot be used with `identityProvider`.
163-
* `identityProvider` `<IdentityProvider>`: Object which implements `getToken: () => Promise<string>`. The supplied provider will be used to retrieve an OIDC token. If no provider is supplied, an attempt will be made to retrieve an OIDC token from the environment. This config cannot be used with `identityToken`.
156+
- `payload` `<Buffer>`: The bytes of the artifact to be signed.
157+
- `options` `<Object>`
158+
- `fulcioURL` `<string>`: The base URL of the Fulcio instance to use for retrieving the signing certificate. Defaults to `'https://fulcio.sigstore.dev'`.
159+
- `rekorURL` `<string>`: The base URL of the Rekor instance to use when adding the signature to the transparency log. Defaults to `'https://rekor.sigstore.dev'`.
160+
- `tsaServerURL` `<string>`: The base URL of the Timestamp Authority instance to use when requesting a signed timestamp. If omitted, no timestamp will be requested.
161+
- `tlogUpload` `<boolean>`: Flag indicating whether or not the signature should be recorded on the Rekor transparency log. Defaults to `true`.
162+
- `identityToken` `<string>`: The OIDC token identifying the signer. If no explicit token is supplied, an attempt will be made to retrieve one from the environment. This config cannot be used with `identityProvider`.
163+
- `identityProvider` `<IdentityProvider>`: Object which implements `getToken: () => Promise<string>`. The supplied provider will be used to retrieve an OIDC token. If no provider is supplied, an attempt will be made to retrieve an OIDC token from the environment. This config cannot be used with `identityToken`.
164164

165165
### attest(payload, payloadType[, options])
166166

167167
Generates a Sigstore signature for the supplied in-toto statement. Returns a
168168
[Sigstore bundle][2] containing the [DSSE][3]-wrapped statement and signature
169169
as well as the verification material necessary to verify the signature.
170170

171-
* `payload` `<Buffer>`: The bytes of the statement to be signed.
172-
* `payloadType` `<string>`: MIME or content type describing the statement to be signed.
173-
* `options` `<Object>`
174-
* `fulcioURL` `<string>`: The base URL of the Fulcio instance to use for retrieving the signing certificate. Defaults to `'https://fulcio.sigstore.dev'`.
175-
* `rekorURL` `<string>`: The base URL of the Rekor instance to use when adding the signature to the transparency log. Defaults to `'https://rekor.sigstore.dev'`.
176-
* `tsaServerURL` `<string>`: The base URL of the Timestamp Authority instance to use when requesting a signed timestamp. If omitted, no timestamp will be requested.
177-
* `tlogUpload` `<boolean>`: Flag indicating whether or not the signed statement should be recorded on the Rekor transparency log. Defaults to `true`.
178-
* `identityToken` `<string>`: The OIDC token identifying the signer. If no explicit token is supplied, an attempt will be made to retrieve one from the environment. This config cannot be used with `identityProvider`.
179-
* `identityProvider` `<IdentityProvider>`: Object which implements `getToken: () => Promise<string>`. The supplied provider will be used to retrieve an OIDC token. If no provider is supplied, an attempt will be made to retrieve an OIDC token from the environment. This config cannot be used with `identityToken`.
180-
171+
- `payload` `<Buffer>`: The bytes of the statement to be signed.
172+
- `payloadType` `<string>`: MIME or content type describing the statement to be signed.
173+
- `options` `<Object>`
174+
- `fulcioURL` `<string>`: The base URL of the Fulcio instance to use for retrieving the signing certificate. Defaults to `'https://fulcio.sigstore.dev'`.
175+
- `rekorURL` `<string>`: The base URL of the Rekor instance to use when adding the signature to the transparency log. Defaults to `'https://rekor.sigstore.dev'`.
176+
- `tsaServerURL` `<string>`: The base URL of the Timestamp Authority instance to use when requesting a signed timestamp. If omitted, no timestamp will be requested.
177+
- `tlogUpload` `<boolean>`: Flag indicating whether or not the signed statement should be recorded on the Rekor transparency log. Defaults to `true`.
178+
- `identityToken` `<string>`: The OIDC token identifying the signer. If no explicit token is supplied, an attempt will be made to retrieve one from the environment. This config cannot be used with `identityProvider`.
179+
- `identityProvider` `<IdentityProvider>`: Object which implements `getToken: () => Promise<string>`. The supplied provider will be used to retrieve an OIDC token. If no provider is supplied, an attempt will be made to retrieve an OIDC token from the environment. This config cannot be used with `identityToken`.
181180

182181
### verify(bundle[, payload][, options])
183182

184183
Verifies the signature in the supplied bundle.
185184

186-
* `bundle` `<Bundle>`: The Sigstore bundle containing the signature to be verified and the verification material necessary to verify the signature.
187-
* `payload` `<Buffer>`: The bytes of the artifact over which the signature was created. Only necessary when the `sign` function was used to generate the signature since the Bundle does not contain any information about the artifact which was signed. Not required when the `attest` function was used to generate the Bundle.
188-
* `options` `<Object>`
189-
* `ctLogThreshold` `<number>`: The number of certificate transparency logs on which the signing certificate must appear. Defaults to `1`.
190-
* `tlogThreshold` `<number>`: The number of transparency logs on which the signature must appear. Defaults to `1`.
191-
* `certificateIssuer` `<string>`: Value that must appear in the signing certificate's issuer extension (OID 1.3.6.1.4.1.57264.1.1). Not verified if no value is supplied.
192-
* `certificateIdentityEmail` `<string>`: Email address which must appear in the signing certificate's Subject Alternative Name (SAN) extension. Must be specified in conjunction with the `certificateIssuer` option. Takes precedence over the `certificateIdentityURI` option. Not verified if no value is supplied.
193-
* `certificateIdentityURI` `<string>`: URI which must appear in the signing certificate's Subject Alternative Name (SAN) extension. Must be specified in conjunction with the `certificateIssuer` option. Ignored if the `certificateIdentityEmail` option is set. Not verified if no value is supplied.
194-
* `certificateOIDs` `<Object>`: A collection of OID/value pairs which must be present in the certificate's extension list. Not verified if no value is supplied.
195-
* `keySelector` `<Function>`: Callback invoked to retrieve the public key (as either `string` or `Buffer`) necessary to verify the bundle signature. Not used when the signature was generated from a Fulcio-issued signing certificate.
196-
* `hint` `<String>`: The hint from the bundle used to identify the the signing key.
185+
- `bundle` `<Bundle>`: The Sigstore bundle containing the signature to be verified and the verification material necessary to verify the signature.
186+
- `payload` `<Buffer>`: The bytes of the artifact over which the signature was created. Only necessary when the `sign` function was used to generate the signature since the Bundle does not contain any information about the artifact which was signed. Not required when the `attest` function was used to generate the Bundle.
187+
- `options` `<Object>`
188+
- `ctLogThreshold` `<number>`: The number of certificate transparency logs on which the signing certificate must appear. Defaults to `1`.
189+
- `tlogThreshold` `<number>`: The number of transparency logs on which the signature must appear. Defaults to `1`.
190+
- `certificateIssuer` `<string>`: Value that must appear in the signing certificate's issuer extension (OID 1.3.6.1.4.1.57264.1.1). Not verified if no value is supplied.
191+
- `certificateIdentityEmail` `<string>`: Email address which must appear in the signing certificate's Subject Alternative Name (SAN) extension. Must be specified in conjunction with the `certificateIssuer` option. Takes precedence over the `certificateIdentityURI` option. Not verified if no value is supplied.
192+
- `certificateIdentityURI` `<string>`: URI which must appear in the signing certificate's Subject Alternative Name (SAN) extension. Must be specified in conjunction with the `certificateIssuer` option. Ignored if the `certificateIdentityEmail` option is set. Not verified if no value is supplied.
193+
- `certificateOIDs` `<Object>`: A collection of OID/value pairs which must be present in the certificate's extension list. Not verified if no value is supplied.
194+
- `keySelector` `<Function>`: Callback invoked to retrieve the public key (as either `string` or `Buffer`) necessary to verify the bundle signature. Not used when the signature was generated from a Fulcio-issued signing certificate.
195+
- `hint` `<String>`: The hint from the bundle used to identify the the signing key.
197196

198197
## Credential Sources
199198

@@ -212,7 +211,6 @@ for more details.
212211
If the `SIGSTORE_ID_TOKEN` environment variable is set, it will use this to authenticate to Fulcio.
213212
It is the callers responsibility to make sure that this token has the correct scopes.
214213

215-
216214
[1]: https://github.com/sigstore/rekor
217215
[2]: https://github.com/sigstore/protobuf-specs/blob/9b722b68a717778ba4f11543afa4ef93205ab502/protos/sigstore_bundle.proto#L63-L84
218216
[3]: https://github.com/secure-systems-lab/dsse

packages/client/src/__tests__/__fixtures__/bundles/v01/dsse.ts

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const validBundleWithSigningCert = {
3838
},
3939
],
4040
},
41+
publicKey: undefined,
4142
tlogEntries: [
4243
{
4344
logIndex: '6751924',
@@ -48,6 +49,7 @@ const validBundleWithSigningCert = {
4849
signedEntryTimestamp:
4950
'MEQCIEzguFRaGzOpMw9JJGUfqSJQ11qlzpcyVCkZfZYPwpLCAiBzdU4LnjtVKYCfyoTImFh3OLFWeOKygtS47Z8fp1GYHg==',
5051
},
52+
inclusionProof: undefined,
5153
canonicalizedBody:
5254
'eyJhcGlWZXJzaW9uIjoiMC4wLjIiLCJraW5kIjoiaW50b3RvIiwic3BlYyI6eyJjb250ZW50Ijp7ImVudmVsb3BlIjp7InBheWxvYWRUeXBlIjoidGV4dC9wbGFpbiIsInNpZ25hdHVyZXMiOlt7InB1YmxpY0tleSI6IkxTMHRMUzFDUlVkSlRpQkRSVkpVU1VaSlEwRlVSUzB0TFMwdENrMUpTVU51ZWtORFFXbFhaMEYzU1VKQlowbFZWa2gzWldoUGRFZHVORXRUUkRGSU9GSkpOVGd4VFdaaWVXVjNkME5uV1VsTGIxcEplbW93UlVGM1RYY0tUbnBGVmsxQ1RVZEJNVlZGUTJoTlRXTXliRzVqTTFKMlkyMVZkVnBIVmpKTlVqUjNTRUZaUkZaUlVVUkZlRlo2WVZka2VtUkhPWGxhVXpGd1ltNVNiQXBqYlRGc1drZHNhR1JIVlhkSWFHTk9UV3BKZUUxVVFUUk5ha2t4VDBSQk1sZG9ZMDVOYWtsNFRWUkJORTFxVFhkUFJFRXlWMnBCUVUxR2EzZEZkMWxJQ2t0dldrbDZhakJEUVZGWlNVdHZXa2w2YWpCRVFWRmpSRkZuUVVWSFp6WklhbmgwTWxWT2FVb3hhM2QzY1RWWVVVbEpkMDFhYmtwbVZsRXpZa1l3TVhVS1drdDBaVTFrWTFZdk0zRm9RMjFYVDJWamIzaFNjWGR5WWxsVWMyaEhaemxPZVZoalFtSjJaVFo2UzNkYVZsUk1aWEZQUTBGVlVYZG5aMFpCVFVFMFJ3cEJNVlZrUkhkRlFpOTNVVVZCZDBsSVowUkJWRUpuVGxaSVUxVkZSRVJCUzBKblozSkNaMFZHUWxGalJFRjZRV1JDWjA1V1NGRTBSVVpuVVZVM1YzQlNDall3YzBOd1oyWjFNRFIzWTNOcWRrTkdlSFF3WmsxcmQwaDNXVVJXVWpCcVFrSm5kMFp2UVZVek9WQndlakZaYTBWYVlqVnhUbXB3UzBaWGFYaHBORmtLV2tRNGQwaDNXVVJXVWpCU1FWRklMMEpDVlhkRk5FVlNXVzVLY0ZsWE5VRmFSMVp2V1ZjeGJHTnBOV3BpTWpCM1RFRlpTMHQzV1VKQ1FVZEVkbnBCUWdwQlVWRmxZVWhTTUdOSVRUWk1lVGx1WVZoU2IyUlhTWFZaTWpsMFRESjRkbG95YkhWTU1qbG9aRmhTYjAxSlIwcENaMjl5UW1kRlJVRmtXalZCWjFGRENrSkljMFZsVVVJelFVaFZRVE5VTUhkaGMySklSVlJLYWtkU05HTnRWMk16UVhGS1MxaHlhbVZRU3pNdmFEUndlV2RET0hBM2J6UkJRVUZIUlZkWVkxSUtPRUZCUVVKQlRVRlNha0pGUVdsQ1VsUnlSMFUxV1RGRmJsbHVhV0ZLUWl0dWMzWTRPVlpoV1hnelVWcHFiMk5GYVc0emNqa3hkMlpyUVVsblRYTnpLd3BtYzNOMU5WTk1VV3R1TjFkRVZFdFlaMjkzTjFONFlraFpVMXBxTTNscmVFRnlWbTUxZWtWM1EyZFpTVXR2V2tsNmFqQkZRWGROUkdGQlFYZGFVVWw0Q2tGUWFsTkhaR1JNU1haNVZVMUhTV3RhSzNVMlNtaEZPWEF4VG1wME0yUkZkSGRaYTAxNFptNUZWakpyTjAxSU1VSldiWGhuT1ZCelNtcHhlV05tYVNzS1pVRkpkMFJoUzI0eVEyUlBlRXR6ZUdObldVNXBORWgyYVVWdVduRjRiV1ZFZVc4eVdVWkpkSHB3U0daSlRWRnRZMUpUYkRreFZXVlBVME00SzFCMVJ3cG5kMDFMQ2kwdExTMHRSVTVFSUVORlVsUkpSa2xEUVZSRkxTMHRMUzBLIiwic2lnIjoiVFVWVlEwbERWV2hCVm1WM1puZExiR3MxWmxaNmNGSkVWVkJvUlhjNVR6aEpNbkI0UXpWdVZHNVFabGxFUW5OUFFXbEZRVEJhUm5Gek9UbFJaMUk1YlVGMFJrMVhkRmR5VDJwdFZVTTBOM3BuWVc5dmJFdEpiMHhJTDA5M1pFMDkifV19LCJoYXNoIjp7ImFsZ29yaXRobSI6InNoYTI1NiIsInZhbHVlIjoiZGNiNDkyNTljODY2MDdjMzQ2MzVkYWJiNDQzMWYwNjVlOWE3YTczNDcwNGNiNzNmMGFhMGY2YWFhMzg5NmEwNCJ9LCJwYXlsb2FkSGFzaCI6eyJhbGdvcml0aG0iOiJzaGEyNTYiLCJ2YWx1ZSI6IjY4ZTY1NmIyNTFlNjdlODM1OGJlZjg0ODNhYjBkNTFjNjYxOWYzZTdhMWE5ZjBlNzU4MzhkNDFmZjM2OGY3MjgifX19fQ==',
5355
},
@@ -64,6 +66,7 @@ const validBundleWithSigningCert = {
6466
},
6567
],
6668
},
69+
messageSignature: undefined,
6770
};
6871

6972
// Valid DSSE bundle signed with a public key

packages/client/src/__tests__/index.test.ts

+39-43
Original file line numberDiff line numberDiff line change
@@ -13,47 +13,43 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
import { IdentityProvider, sigstore } from '..';
17-
18-
describe('sigstore', () => {
19-
// This test is a bit of a hack to ensure that the types are exported
20-
it('exports sigstore types', async () => {
21-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
22-
const bundle: sigstore.Bundle = {} as any;
23-
expect(bundle).toBeDefined();
24-
25-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
26-
const envelope: sigstore.Envelope = {} as any;
27-
expect(envelope).toBeDefined();
28-
29-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
30-
const signOptions: sigstore.SignOptions = {} as any;
31-
expect(signOptions).toBeDefined();
32-
33-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
34-
const verifyOptions: sigstore.VerifyOptions = {} as any;
35-
expect(verifyOptions).toBeDefined();
36-
37-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
38-
const identityProvider: IdentityProvider = {} as any;
39-
expect(identityProvider).toBeDefined();
40-
41-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
42-
const bundleVerifier: sigstore.BundleVerifier = {} as any;
43-
expect(bundleVerifier).toBeDefined();
44-
});
45-
46-
it('exports sigstore core functions', async () => {
47-
expect(sigstore.attest).toBeInstanceOf(Function);
48-
expect(sigstore.sign).toBeInstanceOf(Function);
49-
expect(sigstore.verify).toBeInstanceOf(Function);
50-
expect(sigstore.createVerifier).toBeInstanceOf(Function);
51-
});
52-
53-
it('exports errors', () => {
54-
expect(sigstore.InternalError).toBeInstanceOf(Object);
55-
expect(sigstore.PolicyError).toBeInstanceOf(Object);
56-
expect(sigstore.VerificationError).toBeInstanceOf(Object);
57-
expect(sigstore.ValidationError).toBeInstanceOf(Object);
58-
});
16+
import { fromPartial } from '@total-typescript/shoehorn';
17+
import * as sigstore from '..';
18+
19+
// This test is a bit of a hack to ensure that the types are exported
20+
it('exports sigstore types', async () => {
21+
const bundle: sigstore.Bundle = fromPartial({});
22+
expect(bundle).toBeDefined();
23+
24+
const signOptions: sigstore.SignOptions = fromPartial({});
25+
expect(signOptions).toBeDefined();
26+
27+
const verifyOptions: sigstore.VerifyOptions = fromPartial({});
28+
expect(verifyOptions).toBeDefined();
29+
30+
const identityProvider: sigstore.IdentityProvider = fromPartial({});
31+
expect(identityProvider).toBeDefined();
32+
33+
const bundleVerifier: sigstore.BundleVerifier = fromPartial({});
34+
expect(bundleVerifier).toBeDefined();
35+
});
36+
37+
it('exports sigstore core functions', async () => {
38+
expect(sigstore.attest).toBeInstanceOf(Function);
39+
expect(sigstore.sign).toBeInstanceOf(Function);
40+
expect(sigstore.verify).toBeInstanceOf(Function);
41+
expect(sigstore.createVerifier).toBeInstanceOf(Function);
42+
});
43+
44+
it('exports errors', () => {
45+
expect(sigstore.InternalError).toBeInstanceOf(Object);
46+
expect(sigstore.PolicyError).toBeInstanceOf(Object);
47+
expect(sigstore.VerificationError).toBeInstanceOf(Object);
48+
expect(sigstore.ValidationError).toBeInstanceOf(Object);
49+
expect(sigstore.TUFError).toBeInstanceOf(Object);
50+
});
51+
52+
it('exports constants', () => {
53+
expect(sigstore.DEFAULT_FULCIO_URL).toBeDefined();
54+
expect(sigstore.DEFAULT_REKOR_URL).toBeDefined();
5955
});

packages/client/src/__tests__/sigstore.test.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,10 @@ describe('#verify', () => {
136136
};
137137

138138
describe('when everything in the bundle is valid', () => {
139-
const bundle = bundles.signature.valid.withSigningCert;
140-
const artifact = bundles.signature.artifact;
139+
const bundle = bundles.dsse.valid.withSigningCert;
141140

142141
it('does not throw an error', async () => {
143-
await expect(verify(bundle, artifact, tufOptions)).resolves.toBe(
144-
undefined
145-
);
142+
await expect(verify(bundle, tufOptions)).resolves.toBe(undefined);
146143
});
147144
});
148145

packages/client/src/ca/verify/signer.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ export function verifySignerIdentity(
3838
);
3939

4040
if (!signerVerified) {
41-
throw new PolicyError('Certificate issued to untrusted signer');
41+
throw new PolicyError({
42+
code: 'UNTRUSTED_SIGNER_ERROR',
43+
message: 'Certificate issued to untrusted signer',
44+
});
4245
}
4346
}
4447

packages/client/src/config.ts

+4-12
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ import * as sigstore from './types/sigstore';
3131
import type { FetchOptions, Retry } from './types/fetch';
3232
import type { KeySelector } from './verify';
3333

34-
export type TUFOptions = {
35-
tufMirrorURL?: string;
36-
tufRootPath?: string;
37-
tufCachePath?: string;
38-
} & FetchOptions;
39-
4034
export type SignOptions = {
4135
fulcioURL?: string;
4236
identityProvider?: IdentityProvider;
@@ -54,12 +48,10 @@ export type VerifyOptions = {
5448
certificateIdentityURI?: string;
5549
certificateOIDs?: Record<string, string>;
5650
keySelector?: KeySelector;
57-
rekorURL?: string;
58-
} & TUFOptions;
59-
60-
export type CreateVerifierOptions = {
61-
keySelector?: KeySelector;
62-
} & TUFOptions;
51+
tufMirrorURL?: string;
52+
tufRootPath?: string;
53+
tufCachePath?: string;
54+
} & FetchOptions;
6355

6456
export const DEFAULT_FULCIO_URL = 'https://fulcio.sigstore.dev';
6557
export const DEFAULT_REKOR_URL = 'https://rekor.sigstore.dev';

0 commit comments

Comments
 (0)