Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for checkKeySize (0.26 sec)

  1. src/crypto/tls/handshake_client.go

    // to verify the signatures of during a TLS handshake.
    const defaultMaxRSAKeySize = 8192
    
    var tlsmaxrsasize = godebug.New("tlsmaxrsasize")
    
    func checkKeySize(n int) (max int, ok bool) {
    	if v := tlsmaxrsasize.Value(); v != "" {
    		if max, err := strconv.Atoi(v); err == nil {
    			if (n <= max) != (n <= defaultMaxRSAKeySize) {
    				tlsmaxrsasize.IncNonDefault()
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 38.6K bytes
    - Viewed (0)
  2. src/crypto/tls/handshake_server.go

    			return errors.New("tls: failed to parse client certificate: " + err.Error())
    		}
    		if certs[i].PublicKeyAlgorithm == x509.RSA {
    			n := certs[i].PublicKey.(*rsa.PublicKey).N.BitLen()
    			if max, ok := checkKeySize(n); !ok {
    				c.sendAlert(alertBadCertificate)
    				return fmt.Errorf("tls: client sent certificate containing RSA key larger than %d bits", max)
    			}
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:30:50 UTC 2024
    - 27.6K bytes
    - Viewed (0)
Back to top