Documentation ¶
Overview ¶
This file is part of go-palletone. go-palletone is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. go-palletone is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with go-palletone. If not, see <http://www.gnu.org/licenses/>.
This file is part of go-palletone. go-palletone is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. go-palletone is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with go-palletone. If not, see <http://www.gnu.org/licenses/>.
This file is part of go-palletone. go-palletone is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. go-palletone is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with go-palletone. If not, see <http://www.gnu.org/licenses/>.
This file is part of go-palletone. go-palletone is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. go-palletone is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with go-palletone. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- Variables
- func CertInfo2Cainfo(certinfo CertINfo) client.CaGenInfo
- func DNSNames() []string
- func EmailAddresses() []string
- func GenCert(certinfo CertINfo) ([]byte, error)
- func IPAddresses() []net.IP
- func RevokeCert(certinfo CertINfo, reason string) ([]byte, error)
- func SaveSM2Key(key *sm2.PrivateKey) error
- func SelfSignCertificate(params *sm2.Certificate, key crypto.Signer, address string) (*sm2.Certificate, error)
- func Subject() pkix.Name
- func WriteCertificate(w io.Writer, crt *sm2.Certificate) ([]byte, error)
- type CAConfig
- type CAGetCertChain
- type CertINfo
- type GmCertInfo
Constants ¶
This section is empty.
Variables ¶
var DefaultCAConfig = CAConfig{}
Functions ¶
func CertInfo2Cainfo ¶
func EmailAddresses ¶
func EmailAddresses() []string
func IPAddresses ¶
func SaveSM2Key ¶
func SaveSM2Key(key *sm2.PrivateKey) error
func SelfSignCertificate ¶
func SelfSignCertificate(params *sm2.Certificate, key crypto.Signer, address string) (*sm2.Certificate, error)
func WriteCertificate ¶
Types ¶
type CAGetCertChain ¶
type CertINfo ¶
type CertINfo struct { //The address as a certificate enrolleid Address string `json:"address"` //User name Name string `json:"name"` Data string `json:"data"` //ECert : certificate of registration ECert bool `json:"ecert"` // Type defines type of this identity (user,client, auditor etc...) Type string `json:"type"` // Affiliation associates identity with particular organization. (gptn.mediator1...) Affiliation string `json:"affiliation"` Key interface{} `json:"key"` }