Ejemplo n.º 1
0
// SavePublic saves the public key to a file
func (c *Cert) SavePublic(filename string) error {
	rc := C.zcert_save_public(c.zcertT, C.CString(filename))
	if rc == C.int(-1) {
		return fmt.Errorf("SavePublic error")
	}
	return nil
}
Ejemplo n.º 2
0
// SavePublic saves the public key to a file
func (c *Cert) SavePublic(filename string) error {
	cFilename := C.CString(filename)
	defer C.free(unsafe.Pointer(cFilename))

	rc := C.zcert_save_public(c.zcertT, cFilename)
	if rc == C.int(-1) {
		return fmt.Errorf("SavePublic error")
	}
	return nil
}