talos

Форк
0
/
secure_credentials.go 
27 строк · 763.0 Байт
1
// This Source Code Form is subject to the terms of the Mozilla Public
2
// License, v. 2.0. If a copy of the MPL was not distributed with this
3
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
4

5
//go:build !sidero.debug
6

7
package client
8

9
import (
10
	"google.golang.org/grpc/credentials"
11

12
	clientconfig "github.com/siderolabs/talos/pkg/machinery/client/config"
13
)
14

15
// RequireTransportSecurity implements credentials.PerRPCCredentials.
16
func (c BasicAuth) RequireTransportSecurity() bool {
17
	return true
18
}
19

20
func buildCredentials(configContext *clientconfig.Context, endpoints []string) (credentials.TransportCredentials, error) {
21
	tlsConfig, err := buildTLSConfig(configContext)
22
	if err != nil {
23
		return nil, err
24
	}
25

26
	return credentials.NewTLS(tlsConfig), nil
27
}
28

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.