TrustedTech.MyCA
1.0.326.3
Prefix Reserved
dotnet add package TrustedTech.MyCA --version 1.0.326.3
NuGet\Install-Package TrustedTech.MyCA -Version 1.0.326.3
<PackageReference Include="TrustedTech.MyCA" Version="1.0.326.3" />
<PackageVersion Include="TrustedTech.MyCA" Version="1.0.326.3" />
<PackageReference Include="TrustedTech.MyCA" />
paket add TrustedTech.MyCA --version 1.0.326.3
#r "nuget: TrustedTech.MyCA, 1.0.326.3"
#:package TrustedTech.MyCA@1.0.326.3
#addin nuget:?package=TrustedTech.MyCA&version=1.0.326.3
#tool nuget:?package=TrustedTech.MyCA&version=1.0.326.3
TrustedTech.MyCA
TrustedTech.MyCA is the official .NET client library for MyCA — a multi-platform PKIX implementation used as a simple Certificate Authority (CA). The library exposes the same administration capabilities as the pkiadmin command-line tool: TLS certificate lifecycle operations, audit information, and trusted timestamping (TSA) integration against a MyCA pkid PKI service.
The primary API is the PkiClient class in the MyCA namespace (assembly TrustedTech.MyCA.dll).
Features
- Issue TLS certificates for servers, users, or e-mail addresses, with private keys
- Retrieve certificates and keys from the PKI server in multiple formats: tar.gz, tar.bz2, tar.xz, PKCS#12 (.pfx), PEM
- Revoke, re-grant (after revocation), and delete certificates in the server database
- Read certificate state audit information
- Read TSA log information
Requirements
- .NET 9 (aligned with the MyCA .NET build; use the target frameworks declared on the package if you multi-target.)
- A running MyCA pkid service and appropriate trusted CA certificate (or a CA certificate chain file) on the client machine
- Native MyCA runtime binaries in the configured plugins directory (see configuration below)
Installation
.NET CLI
dotnet add package TrustedTech.MyCA
Package Manager (Visual Studio)
Install-Package TrustedTech.MyCA
Quick start
- Add
using TrustedTech.MyCA;. - Set global client configuration (paths must match your installation):
PkiClient.Config.CAFile = @"c:\ProgramData\MyCA\pki\ca-chain.pem";
PkiClient.Config.PluginsDir = @"c:\Program Files\MyCA\bin";
PkiClient.Config.LogFile = @"c:\Users\YourUser\myca.log"; // optional
- Connect to pkid with TLS client credentials and log in:
var tlsConfig = new TlsClientCfg
{
CertificatePath = @"C:\Users\client.p12",
PrivateKeyPassphrase = "<password-for-client.p12>"
};
var loginInfo = new LoginInfo
{
User = "admin",
Passphrase = "<secret>"
};
using var client = new PkiClient();
// Only if the PKI server is not on the same machine as the client:
client.ConfigureTlsClient(tlsConfig);
client.Connect("pki.server.host", 33334);
client.Login(loginInfo);
You can also register TLS settings once (PkiClient.RegisterTlsClientConfig) and create a connected client in one step with PkiClient.Create and ClientCreateConfig (see the full documentation).
For certificate operations (create, revoke, delete), see the Certificate Management topics in the documentation. For query examples, see the Examples section.
Configuration
PkiClient.Config exposes PkiClientConfig (logging thresholds, connection pooling, timeouts, CA file, plugins directory, optional log file path, and more). See the Configuration chapter in the HTML help for the complete property list and semantics.
Documentation
Comprehensive reference documentation is provided as HTML (multiple languages). The English manual is under the en folder, including:
| Topic | File (under en/) |
|---|---|
| .NET overview | introduction-dotnet.html |
| Getting started | quickstart-dotnet.html |
PkiClient API |
pki-client-dotnet.html |
| Constants, types, functions | constants-dotnet.html, types-dotnet.html, functions-dotnet.html |
| Certificate management | certificates-dotnet.html |
| Reissue / activation | reissue-dotnet.html, activate-dotnet.html |
| Building from source | building-dotnet.html |
| Configuration | configuration-dotnet.html |
| Examples | examples-dotnet.html |
| Product overview (pkid, pkiadmin, other bindings) | introduction.html |
| FAQ | faq.html |
| License | license.html |
Documentation is also provided in PDF format in English and Polish.
Building from source
To build the assembly yourself instead of using this package, you need the .NET 9 SDK, PowerShell 6+ (Windows) or Bash 4+ (Linux), and the MyCA interfaces tree. From interfaces/dotnet, run scripts/build.ps1 (Windows) or scripts/build.sh (Linux). Output includes TrustedTech.MyCA.dll and related files under windows or linux, as described in building-dotnet.html.
License
Copyright © 2026, Mariusz Drozdowski. All rights reserved.
Redistribution and use in binary form, without modification, are permitted provided that the copyright notice, the website https://trusted-tech.co.nz/products/myca, the full condition list, and the disclaimer are reproduced in documentation and/or other materials. Binary redistribution may not be sold or charged for except the physical cost of transferring a copy. See license.html in the documentation package for the complete license text.
Author
Mariusz Drozdowski
This README summarizes the English HTML help (en/) shipped with MyCA. Version numbers in footers of those files may lag the NuGet package version; trust the package version for this assembly build.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.