Lines Matching full:nil
23 // The configuration config must be non-nil and must have
31 // The config cannot be nil: users must set either ServerName or
47 if err != nil {
56 // The configuration config must be non-nil and must have
67 // The configuration config must be non-nil and must have
70 if config == nil || len(config.Certificates) == 0 {
71 return nil, errors.New("tls.Listen: no certificates in configuration")
74 if err != nil {
75 return nil, err
77 return NewListener(l, config), nil
91 // DialWithDialer interprets a nil configuration as equivalent to the zero
116 if err != nil {
117 return nil, err
126 if config == nil {
150 if err != nil {
152 return nil, err
155 return conn, nil
161 // Dial interprets a nil configuration as equivalent to
172 if err != nil {
176 if err != nil {
190 if certDERBlock == nil {
205 if keyDERBlock == nil {
215 if err != nil {
222 if err != nil {
248 return cert, nil
255 if key, err := x509.ParsePKCS1PrivateKey(der); err == nil {
256 return key, nil
258 if key, err := x509.ParsePKCS8PrivateKey(der); err == nil {
261 return key, nil
263 return nil, errors.New("crypto/tls: found unknown private key type in PKCS#8 wrapping")
266 if key, err := x509.ParseECPrivateKey(der); err == nil {
267 return key, nil
270 return nil, errors.New("crypto/tls: failed to parse private key")