code: func ParseCertificate(cert *x509.Certificate) *Certificate {
  	c := &Certificate{
  		RawPEM:             string(helpers.EncodeCertificatePEM(cert)),
  		SignatureAlgorithm: helpers.SignatureString(cert.SignatureAlgorithm),
  		NotBefore:          cert.NotBefore,
  		NotAfter:           cert.NotAfter,
  		Subject:            ParseName(cert.Subject),
  		Issuer:             ParseName(cert.Issuer),
  		SANs:               cert.DNSNames,
  		AKI:                formatKeyID(cert.AuthorityKeyId),
  		SKI:                formatKeyID(cert.SubjectKeyId),
  		SerialNumber:       cert.SerialNumber.String(),
  	}
  	for _, ip := range cert.IPAddresses {
  		c.SANs = append(c.SANs, ip.String())
  	}
  	return c
  }
docs: // ParseCertificate parses an x509 certificate.