Index: src/pkg/crypto/x509/cert_pool.go |
=================================================================== |
--- a/src/pkg/crypto/x509/cert_pool.go |
+++ b/src/pkg/crypto/x509/cert_pool.go |
@@ -101,3 +101,13 @@ |
return |
} |
+ |
+// Subjects returns a list of the DER-encoded subjects of |
+// all of the certificates in the pool. |
+func (s *CertPool) Subjects() (res [][]byte) { |
+ res = make([][]byte, len(s.certs)) |
+ for i, c := range s.certs { |
+ res[i] = c.RawSubject |
+ } |
+ return |
+} |