Ejemplo n.º 1
0
// Lookup looks up a certificate in the store by public key and
// returns it.
func (c *CertStore) Lookup(key string) *Cert {
	ptr := C.zcertstore_lookup(c.zcertstoreT, C.CString(key))
	if ptr == nil {
		return nil
	}
	return &Cert{
		zcertT: ptr,
	}
}
Ejemplo n.º 2
0
// Lookup looks up a certificate in the store by public key and
// returns it.
func (c *CertStore) Lookup(key string) *Cert {
	cKey := C.CString(key)
	defer C.free(unsafe.Pointer(cKey))

	ptr := C.zcertstore_lookup(c.zcertstoreT, cKey)
	if ptr == nil {
		return nil
	}
	return &Cert{
		zcertT: ptr,
	}
}
Ejemplo n.º 3
0
// Lookup looks up a certificate in the store by public key and
// returns it.
func (c *CertStore) Lookup(key string) *Cert {
	return &Cert{
		zcertT: C.zcertstore_lookup(c.zcertstoreT, C.CString(key)),
	}
}