code: func hashPriority(cert *x509.Certificate) int {
  	switch cert.SignatureAlgorithm {
  	case x509.ECDSAWithSHA1, x509.DSAWithSHA1, x509.SHA1WithRSA:
  		return 10
  	case x509.ECDSAWithSHA256, x509.ECDSAWithSHA384, x509.ECDSAWithSHA512,
  		x509.DSAWithSHA256, x509.SHA256WithRSA, x509.SHA384WithRSA,
  		x509.SHA512WithRSA:
  		return 100
  	default:
  		return 0
  	}
  }
docs: // Compute the priority of different hash algorithm based on security
  // SHA2 > SHA1 >> MD = Others = Unknown