Skip to content

crypt.openssl #

fn new #

fn new(args OpenSSLArgs) !OpenSSL

struct OpenSSL #

struct OpenSSL {
	certpath Path
}

fn (OpenSSL) exists #

fn (mut ossl OpenSSL) exists(args OpenSSLGenerateArgs) !bool

fn (OpenSSL) generate #

fn (mut ossl OpenSSL) generate(args OpenSSLGenerateArgs) !OpenSSLKey

fn (OpenSSL) generate_ca #

fn (mut ossl OpenSSL) generate_ca(args OpenSSLGenerateArgs) !OpenSSLKey

fn (OpenSSL) get #

fn (mut ossl OpenSSL) get(args OpenSSLGenerateArgs) !OpenSSLKey

will get openssl key, from fs if exists, otherwise it will generate

fn (OpenSSL) new #

fn (mut ossl OpenSSL) new(args OpenSSLGenerateArgs) !OpenSSLKey

struct OpenSSLArgs #

@[params]
struct OpenSSLArgs {
	certpath string = '~/.openssl'
}

struct OpenSSLCAGenerateArgs #

@[params]
struct OpenSSLCAGenerateArgs {
	name   string = 'default'
	domain string = 'myregistry.domain.com'
	reset  bool
}

struct OpenSSLGenerateArgs #

@[params]
struct OpenSSLGenerateArgs {
	name   string = 'default'
	domain string = 'myregistry.domain.com'
	reset  bool
}

struct OpenSSLKey #

struct OpenSSLKey {
pub mut:
	name      string
	domain    string
	md5       string
	path_key  Path
	path_cert Path
	path_json Path
}

fn (OpenSSLKey) hexhash #

fn (mut key OpenSSLKey) hexhash() !string

give md5 hash of key (concatenate the key+cert)