Skip to content

Commit

Permalink
docs(changeset): - X.509 self-signed certificate creation is now done…
Browse files Browse the repository at this point in the history
… via the `agent.x509.createCertificate` API where the `subjectPublicKey` is not supplied or equal to the `authorityKey`

- allow to create more complex X.509 certificates

Signed-off-by: Berend Sliedrecht <[email protected]>
  • Loading branch information
berendsliedrecht committed Feb 18, 2025
1 parent af56231 commit ba08279
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { injectable } from '../../../plugins'
import { asArray, isDid, MessageValidator } from '../../../utils'
import { getKeyDidMappingByKeyType, DidResolverService, getKeyFromVerificationMethod } from '../../dids'
import { X509ModuleConfig } from '../../x509'
import { extractX509CertificatesFromJwt } from '../../x509/utils'
import { extractX509CertificatesFromJwt } from '../../x509/extraction'
import { W3cJsonLdVerifiableCredential } from '../data-integrity'

import { W3cJwtVerifiableCredential } from './W3cJwtVerifiableCredential'
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/modules/x509/X509Certificate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import {
} from '@peculiar/asn1-x509'
import * as x509 from '@peculiar/x509'

x509.KeyUsageFlags

import { Key } from '../../crypto/Key'
import { CredoWebCrypto, CredoWebCryptoKey } from '../../crypto/webcrypto'
import { credoKeyTypeIntoCryptoKeyAlgorithm, spkiAlgorithmIntoCredoKeyType } from '../../crypto/webcrypto/utils'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { AgentContext } from '../../../agent'

import { id_ce_extKeyUsage, id_ce_keyUsage } from '@peculiar/asn1-x509'
import * as x509 from '@peculiar/x509'

import { InMemoryWallet } from '../../../../../../tests/InMemoryWallet'
Expand All @@ -11,7 +12,6 @@ import { X509Error } from '../X509Error'
import { X509Service } from '../X509Service'

import { X509KeyUsage, TypedArrayEncoder, X509ExtendedKeyUsage, Key } from '@credo-ts/core'
import { id_ce_extKeyUsage, id_ce_keyUsage } from '@peculiar/asn1-x509'

/**
*
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/modules/x509/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ export * from './X509Module'
export * from './X509ModuleConfig'
export * from './X509ServiceOptions'
export * from './utils'
export * from './extraction'

0 comments on commit ba08279

Please sign in to comment.