This repository contains the specification of the did:x509 DID method. It aims to achieve interoperability between existing X.509 solutions and Decentralized Identifiers (DIDs) to support operational models in which a full transition to DIDs is not achievable or desired yet. It is registered as a DID method with the did-wg in the W3C.
See specification.md.
This repository contains a non-production reference implementation written in Python.
First, install the required Python packages:
pip install -r requirements.txt
Then, run the resolver with an example DID and matching certificate chain:
python -m didx509 resolve did:x509:0:sha256:hH32p4SXlD8n_HLrk_mmNzIKArVh0KkbCeh6eAftfGE::subject:CN:Microsoft%20Corporation --chain test-data/ms-code-signing.pem
# Output: { <DID document> }The reference resolver does not check certificate validity periods. Applications may validate them at a context-relevant time.
To convert a certificate chain to the JSON data model defined in the specification, run:
python -m didx509 convert test-data/ms-code-signing.pem
# Output: [ Certificate chain in JSON ]To percent-encode a string for use in policies, run:
python -m didx509 encode "My Org"
# Output: My%20OrgRun tests with:
pytest -v
This project welcomes contributions and suggestions. Please see the Contribution guidelines.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.