Documentation ¶
Overview ¶
- Copyright 2018 Venafi, Inc. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
VCert is a Go library, SDK, and command line utility designed to simplify key generation and enrollment of machine identities (also known as SSL/TLS certificates and keys) that comply with enterprise security policy by using the Venafi Platform or Venafi Cloud.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFormatedBuildTimeStamp ¶
func GetFormatedBuildTimeStamp() string
func GetFormattedVersionString ¶
func GetFormattedVersionString() string
GetFormattedVersionString gets a friendly printable string to represent the version
func NewClient ¶
NewClient returns a connector for either Trust Protection Platform (TPP) or Venafi Cloud based on provided configuration. Config should have Credentials compatible with the selected ConnectorType. Returned connector is a concurrency-safe interface to TPP or Venafi Cloud that can be reused without restriction. Connector can also be of type "fake" for local tests, which doesn't connect to any backend and all certificates enroll locally. The returned connector will be authenticated by default, but it's possible to pass a bool argument to indicate if it's desired to get the connector authenticated already or not.
Types ¶
type Config ¶
type Config struct { // ConnectorType specify what do you want to use. May be "Cloud", "TPP" or "Fake" for development. ConnectorType endpoint.ConnectorType // BaseUrl should be specified for Venafi Platform. Optional for Cloud implementations that do not use https://venafi.cloud/. BaseUrl string // Zone is name of a policy zone in Venafi Platform or Cloud. For TPP, if necessary, escape backslash symbols. For example, "test\\zone" or `test\zone`. Zone string // Credentials should contain either User and Password for TPP connections or an APIKey for Cloud. Credentials *endpoint.Authentication // ConnectionTrust may contain a trusted CA or certificate of server if you use self-signed certificate. ConnectionTrust string // *x509.CertPool LogVerbose bool // http.Client to use durring construction Client *http.Client }
Config is a basic structure for high level initiating connector to Trust Platform (TPP)/Venafi Cloud
func LoadConfigFromFile ¶
LoadConfigFromFile is deprecated. In the future will be rewrited.
func (*Config) NewClient ¶
NewClient returns a connector for either Trust Protection Platform (TPP) or Venafi Cloud based on provided configuration. Config should have Credentials compatible with the selected ConnectorType. Returned connector is a concurrency-safe interface to TPP or Venafi Cloud that can be reused without restriction. Connector can also be of type "fake" for local tests, which doesn't connect to any backend and all certificates enroll locally. The returned connector will be authenticated by default, but it's possible to pass a bool argument to indicate if it's desired to get the connector authenticated already or not.
func (*Config) NewListener ¶
NewListener returns a net.Listener that listens on the first port specified in domains list (like "example.com:8443") or on default (443) port on all interfaces and returns *tls.Conn connections with certificates enrolled via Venafi for the provided domain.
It enables one-line HTTPS servers:
log.Fatal(http.Serve(vcert.NewListener("example.com"), handler))
The returned listener uses a *tls.Config that enables HTTP/2, and should only be used with servers that support HTTP/2.
The returned Listener also enables TCP keep-alives on the accepted connections. The returned *tls.Conn are returned before their TLS handshake has completed.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
examples
|
|
pkg
|
|
util
This file contains functions that were copied from x509.pem_decrypt.go in order to keep supporting X509EncryptPEMBlock and x509DecryptPEMBlock the use of this is not recommended, this is just to continue supporting old applications.
|
This file contains functions that were copied from x509.pem_decrypt.go in order to keep supporting X509EncryptPEMBlock and x509DecryptPEMBlock the use of this is not recommended, this is just to continue supporting old applications. |