code: func keyAlgoPriority(cert *x509.Certificate) int {
  	switch cert.PublicKeyAlgorithm {
  	case x509.ECDSA:
  		switch cert.PublicKey.(*ecdsa.PublicKey).Curve {
  		case elliptic.P256():
  			return 100
  		case elliptic.P384():
  			return 120
  		case elliptic.P521():
  			return 140
  		default:
  			return 100
  		}
  	case x509.RSA:
  		switch cert.PublicKey.(*rsa.PublicKey).N.BitLen() {
  		case 4096:
  			return 70
  		case 3072:
  			return 50
  		case 2048:
  			return 30
  		// key size <= 1024 are discouraged.
  		default:
  			return 0
  		}
  	// we do not want to bundle a DSA cert.
  	case x509.DSA:
  		return 0
  	default:
  		return 0
  	}
  }
docs: // Compute the priority of different key algorithm based performance and security
  // ECDSA>RSA>DSA>Unknown