Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
3f9f0679
Commit
3f9f0679
authored
Dec 22, 2015
by
Daniel Low
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gofmt
parent
ea566fff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
pkg/services/sqlstore/sqlstore.go
+3
-3
pkg/services/sqlstore/tls_mysql.go
+2
-2
No files found.
pkg/services/sqlstore/sqlstore.go
View file @
3f9f0679
...
...
@@ -14,16 +14,16 @@ import (
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"github.com/grafana/grafana/pkg/setting"
"github.com/go-sql-driver/mysql"
_
"github.com/go-sql-driver/mysql"
"github.com/go-xorm/xorm"
_
"github.com/lib/pq"
_
"github.com/mattn/go-sqlite3"
"github.com/go-sql-driver/mysql"
)
type
MySQLConfig
struct
{
SslMode
string
CaCertPath
string
SslMode
string
CaCertPath
string
ClientKeyPath
string
ClientCertPath
string
ServerCertName
string
...
...
pkg/services/sqlstore/tls_mysql.go
View file @
3f9f0679
...
...
@@ -17,7 +17,7 @@ func makeCert(tlsPoolName string, config MySQLConfig) (*tls.Config, error) {
return
nil
,
err
}
clientCert
:=
make
([]
tls
.
Certificate
,
0
,
1
)
if
(
config
.
ClientCertPath
!=
""
&&
config
.
ClientKeyPath
!=
""
)
{
if
config
.
ClientCertPath
!=
""
&&
config
.
ClientKeyPath
!=
""
{
certs
,
err
:=
tls
.
LoadX509KeyPair
(
config
.
ClientCertPath
,
config
.
ClientKeyPath
)
if
err
!=
nil
{
...
...
@@ -34,7 +34,7 @@ func makeCert(tlsPoolName string, config MySQLConfig) (*tls.Config, error) {
tlsConfig
.
InsecureSkipVerify
=
true
}
// Return more meaningful error before it is too late
if
config
.
ServerCertName
==
""
&&
!
tlsConfig
.
InsecureSkipVerify
{
if
config
.
ServerCertName
==
""
&&
!
tlsConfig
.
InsecureSkipVerify
{
return
nil
,
fmt
.
Errorf
(
"server_cert_name is missing. Consider using ssl_mode = skip-verify."
)
}
return
tlsConfig
,
nil
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment