Dagger
Search

certify

Simplified functions to create a CA, CSR, CRL, and certificates. Also easy viewing, verifying of existing certificates.

Installation

dagger install github.com/marvinmartian/daggerverse/certify@v0.1.1

Entrypoint

Return Type
Certify
Example
dagger -m github.com/marvinmartian/daggerverse/certify@7fe135b9cd4c32d659f669fba7376dddbfb66ba0 call \
func (m *myModule) example() *Certify  {
	return dag.
			Certify()
}
@function
def example() -> dag.Certify:
	return (
		dag.certify()
	)
@func()
example(): Certify {
	return dag
		.certify()
}

Types

Certify 🔗

build() 🔗

Build the base images

Return Type
Container !
Example
dagger -m github.com/marvinmartian/daggerverse/certify@7fe135b9cd4c32d659f669fba7376dddbfb66ba0 call \
 build
func (m *myModule) example() *Container  {
	return dag.
			Certify().
			Build()
}
@function
def example() -> dagger.Container:
	return (
		dag.certify()
		.build()
	)
@func()
example(): Container {
	return dag
		.certify()
		.build()
}

base() 🔗

Build the base images

Return Type
Container !
Example
dagger -m github.com/marvinmartian/daggerverse/certify@7fe135b9cd4c32d659f669fba7376dddbfb66ba0 call \
 base
func (m *myModule) example() *Container  {
	return dag.
			Certify().
			Base()
}
@function
def example() -> dagger.Container:
	return (
		dag.certify()
		.base()
	)
@func()
example(): Container {
	return dag
		.certify()
		.base()
}

ca() 🔗

A utility to bootstrap your own certificate authority and public key infrastructure

Return Type
CertStrap !
Example
dagger -m github.com/marvinmartian/daggerverse/certify@7fe135b9cd4c32d659f669fba7376dddbfb66ba0 call \
 ca
func (m *myModule) example() *CertifyCertStrap  {
	return dag.
			Certify().
			Ca()
}
@function
def example() -> dag.CertifyCertStrap:
	return (
		dag.certify()
		.ca()
	)
@func()
example(): CertifyCertStrap {
	return dag
		.certify()
		.ca()
}

view() 🔗

A utility to examine and validate certificates to help with debugging SSL/TLS issues

Return Type
Certigo !
Example
dagger -m github.com/marvinmartian/daggerverse/certify@7fe135b9cd4c32d659f669fba7376dddbfb66ba0 call \
 view
func (m *myModule) example() *CertifyCertigo  {
	return dag.
			Certify().
			View()
}
@function
def example() -> dag.CertifyCertigo:
	return (
		dag.certify()
		.view()
	)
@func()
example(): CertifyCertigo {
	return dag
		.certify()
		.view()
}

CertStrap 🔗

container() 🔗

Return Type
Container !
Example
dagger -m github.com/marvinmartian/daggerverse/certify@7fe135b9cd4c32d659f669fba7376dddbfb66ba0 call \
 ca \
 container
func (m *myModule) example() *Container  {
	return dag.
			Certify().
			Ca().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.certify()
		.ca()
		.container()
	)
@func()
example(): Container {
	return dag
		.certify()
		.ca()
		.container()
}

init() 🔗

Create Certificate Authority, including certificate, key and extra information file.

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
passphraseSecret -Passphrase to encrypt private key PEM block
bitsString "4096"Size (in bits) of RSA keypair to generate (example: 4096) (default: 4096)
curveString -Elliptic curve name. Must be one of P-521, Ed25519, P-224, P-256, P-384.
expiresString -How long until the certificate expires (example: 1 year 2 days 3 months 4 hours) (default: "18 months")
organizationString "SomeOrg"Sets the Organization (O) field of the certificate
organizationalUnitString -Sets the Organizational Unit (OU) field of the certificate
countryString -Sets the Country (C) field of the certificate
commonNameString "SomeCert"Sets the Common Name (CN) field of the certificate
provinceString -Sets the State/Province (ST) field of the certificate
localityString -Sets the Locality (L) field of the certificate
Example
dagger -m github.com/marvinmartian/daggerverse/certify@7fe135b9cd4c32d659f669fba7376dddbfb66ba0 call \
 ca \
 init
func (m *myModule) example() *Directory  {
	return dag.
			Certify().
			Ca().
			Init()
}
@function
def example() -> dagger.Directory:
	return (
		dag.certify()
		.ca()
		.init()
	)
@func()
example(): Directory {
	return dag
		.certify()
		.ca()
		.init()
}

request() 🔗

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
fileDirDirectory -Directory containing any previously generated CA,csr,crl,etc files
passphraseSecret -Passphrase to encrypt private key PEM block
bitsString "4096"Size (in bits) of RSA keypair to generate (example: 4096) (default: 4096)
curveString -Elliptic curve name. Must be one of P-521, Ed25519, P-224, P-256, P-384.
expiresString -How long until the certificate expires (example: 1 year 2 days 3 months 4 hours) (default: "18 months")
organizationString -Sets the Organization (O) field of the certificate
organizationalUnitString -Sets the Organizational Unit (OU) field of the certificate
countryString -Sets the Country (C) field of the certificate
commonNameString !-Sets the Common Name (CN) field of the certificate
provinceString -Sets the State/Province (ST) field of the certificate
localityString -Sets the Locality (L) field of the certificate
ipString -IP addresses to add as subject alt name (comma separated)
domainString -DNS entries to add as subject alt name (comma separated)
uriString -URI values to add as subject alt name (comma separated)
Example
dagger -m github.com/marvinmartian/daggerverse/certify@7fe135b9cd4c32d659f669fba7376dddbfb66ba0 call \
 ca \
 request --common-name string
func (m *myModule) example(commonName string) *Directory  {
	return dag.
			Certify().
			Ca().
			Request(commonName)
}
@function
def example(common_name: str) -> dagger.Directory:
	return (
		dag.certify()
		.ca()
		.request(common_name)
	)
@func()
example(commonName: string): Directory {
	return dag
		.certify()
		.ca()
		.request(commonName)
}

sign() 🔗

Sign certificate request with CA, and generate certificate for the host.

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
hostNameString !-Host name for certificate
fileDirDirectory -Directory containing any previously generated CA,csr,crl,etc files
passphraseSecret -Passphrase to encrypt private key PEM block
expiresString "2 years"How long until the certificate expires (example: 1 year 2 days 3 months 4 hours) (default: "18 months")
caString !-Name of CA to issue cert with
csrString -Path to certificate request PEM file
certString -Path to certificate output PEM file
intermediateBoolean -Whether generated certificate should be a intermediate
Example
dagger -m github.com/marvinmartian/daggerverse/certify@7fe135b9cd4c32d659f669fba7376dddbfb66ba0 call \
 ca \
 sign --host-name string --ca string
func (m *myModule) example(hostName string, ca string) *Directory  {
	return dag.
			Certify().
			Ca().
			Sign(hostName, ca)
}
@function
def example(host_name: str, ca: str) -> dagger.Directory:
	return (
		dag.certify()
		.ca()
		.sign(host_name, ca)
	)
@func()
example(hostName: string, ca: string): Directory {
	return dag
		.certify()
		.ca()
		.sign(hostName, ca)
}

Certigo 🔗

container() 🔗

Return Type
Container !
Example
dagger -m github.com/marvinmartian/daggerverse/certify@7fe135b9cd4c32d659f669fba7376dddbfb66ba0 call \
 view \
 container
func (m *myModule) example() *Container  {
	return dag.
			Certify().
			View().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.certify()
		.view()
		.container()
	)
@func()
example(): Container {
	return dag
		.certify()
		.view()
		.container()
}

cert() 🔗

Display information about a certificate from a file

Return Type
String !
Arguments
NameTypeDefault ValueDescription
certFile !-Certificate File
passphraseSecret -Password for PKCS12/JCEKS key stores
pemBoolean -Write output as PEM blocks instead of human-readable format.
jsonFormatBoolean -Write output as machine-readable JSON format.
firstBoolean -Only display the first certificate. This flag can be paired with --json or --pem.
Example
dagger -m github.com/marvinmartian/daggerverse/certify@7fe135b9cd4c32d659f669fba7376dddbfb66ba0 call \
 view \
 cert --cert file:path
func (m *myModule) example(ctx context.Context, cert *File) string  {
	return dag.
			Certify().
			View().
			Cert(ctx, cert)
}
@function
async def example(cert: dagger.File) -> str:
	return await (
		dag.certify()
		.view()
		.cert(cert)
	)
@func()
async example(cert: File): Promise<string> {
	return dag
		.certify()
		.view()
		.cert(cert)
}

verify() 🔗

Verify a certificate chain from file

Return Type
String !
Arguments
NameTypeDefault ValueDescription
certFile !-Certificate File
passphraseSecret -Password for PKCS12/JCEKS key stores
nameString !-Server name to verify certificate against
caFile -Path to CA bundle (system default if unspecified).
formatString -Format of given input (PEM, DER, JCEKS, PKCS12; heuristic if missing).
jsonFormatBoolean -Write output as machine-readable JSON format.
Example
dagger -m github.com/marvinmartian/daggerverse/certify@7fe135b9cd4c32d659f669fba7376dddbfb66ba0 call \
 view \
 verify --cert file:path --name string
func (m *myModule) example(ctx context.Context, cert *File, name string) string  {
	return dag.
			Certify().
			View().
			Verify(ctx, cert, name)
}
@function
async def example(cert: dagger.File, name: str) -> str:
	return await (
		dag.certify()
		.view()
		.verify(cert, name)
	)
@func()
async example(cert: File, name: string): Promise<string> {
	return dag
		.certify()
		.view()
		.verify(cert, name)
}

connect() 🔗

Connect to a server and print its certificate(s).

Return Type
String !
Arguments
NameTypeDefault ValueDescription
serverString !-Server address to connect to
portString !"443"Server port to connect to
nameString -Server name to verify certificate against
caFile -Path to CA bundle (system default if unspecified).
certFileFile -Certificate File
keyFile -Private key for client certificate, if not in same file (PEM).
startTlsString -Enable StartTLS protocol ('ldap', 'mysql', 'postgres', 'smtp' or 'ftp').
identityString -With --start-tls, sets the DB user or SMTP EHLO name.
proxyString -Optional URI for HTTP(s) CONNECT proxy to dial connections with.
timeoutString -Timeout for connecting to remote server (can be '5m', '1s', etc).
pemBoolean -Write output as PEM blocks instead of human-readable format.
jsonFormatBoolean -Write output as machine-readable JSON format.
firstBoolean -Only display the first certificate. This flag can be paired with --json or --pem.
verifyBoolean -Verify certificate chain.
expectedNameString -Name expected in the server TLS certificate. Defaults to name from SNI or, if SNI not overridden, the hostname to connect to.
Example
dagger -m github.com/marvinmartian/daggerverse/certify@7fe135b9cd4c32d659f669fba7376dddbfb66ba0 call \
 view \
 connect --server string --port string
func (m *myModule) example(ctx context.Context, server string, port string) string  {
	return dag.
			Certify().
			View().
			Connect(ctx, server, port)
}
@function
async def example(server: str, port: str) -> str:
	return await (
		dag.certify()
		.view()
		.connect(server, port)
	)
@func()
async example(server: string, port: string): Promise<string> {
	return dag
		.certify()
		.view()
		.connect(server, port)
}