flato-msp-cert

module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2021 License: Apache-2.0

README

flato-msp-cert

Implementation of certificate operations.

Table of Contents

Mockgen

Install mockgen : go get github.com/golang/mock/mockgen

How to use?

  • source: Specify interface file
  • destination: Generated file name
  • package:The package name of the generated file
  • imports: Dependent package that requires import
  • aux_files: Attach a file when there is more than one file in the interface file
  • build_flags: Parameters passed to the build tool

Eg.mockgen -destination mock/mock_crypto.go -package crypto -source crypto.go

GitCZ

Note: Please use command npm install if you are the first time to use git cz in this repo.

api

parse key
//ParseSMPrivateKey Parse guomi private key, support gmssl private key and cfca private key
// return the gmx509.PrivateKey type.
// first try to resolve to the private key of type gmssl.
// if it fails, try to resolve to the private key of cfca.
func ParseSMPrivateKey(der []byte) (interface{}, error) 
generate cert
//GenCert generate ecert
func GenCert(ca *gmx509.Certificate, privatekey interface{}, publicKey interface{},
	o, cn, gn string, isCA bool) ([]byte, error) 
generate root cert
//NewSelfSignedCert generate self-signature certificate
func NewSelfSignedCert(o, cn, gn string, useGuomi bool) (
	[]byte, interface{}, error) 

Contribute

PRs are welcome!

Small note: If editing the Readme, please conform to the standard-readme specification.

License

This project is currently under Apache 2.0 license. See the LICENSE file for details.

Directories

Path Synopsis
pfx
Package pkcs12 implements some of PKCS#12 (also known as P12 or PFX).
Package pkcs12 implements some of PKCS#12 (also known as P12 or PFX).
rc2
Package rc2 implements the RC2 cipher https://www.ietf.org/rfc/rfc2268.txt http://people.csail.mit.edu/rivest/pubs/KRRR98.pdf This code is licensed under the MIT license.
Package rc2 implements the RC2 cipher https://www.ietf.org/rfc/rfc2268.txt http://people.csail.mit.edu/rivest/pubs/KRRR98.pdf This code is licensed under the MIT license.
x509
Package x509 parses X.509-encoded keys and certificates.
Package x509 parses X.509-encoded keys and certificates.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL