Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
domainepublic
alternc
Commits
ab73c9d6
Unverified
Commit
ab73c9d6
authored
Jul 12, 2019
by
Km
Committed by
GitHub
Jul 12, 2019
Browse files
Merge pull request #371 from Koumbit/370-import_cert_fails
Fixes #370: Fix insert query failure during import_cert
parents
845a6b7f
bb6d5c68
Changes
1
Hide whitespace changes
Inline
Side-by-side
bureau/class/m_ssl.php
View file @
ab73c9d6
...
...
@@ -511,11 +511,13 @@ INSTR(CONCAT(sd.sub,IF(sd.sub!='','.',''),sd.domaine),'.')+1))=?
$altnames
=
$this
->
parseAltNames
(
$crtdata
[
"extensions"
][
"subjectAltName"
]);
// Everything is PERFECT and has been thoroughly checked, let's insert those in the DB !
// The sslcsr column is required as it has no default value, giving it an empty value.
$db
->
query
(
"INSERT INTO certificates SET uid=?, status=?, fqdn=?, altnames=?, validstart=FROM_UNIXTIME(?), validend=FROM_UNIXTIME(?), sslkey=?, sslcrt=?, sslchain=?, provider=?;"
,
"INSERT INTO certificates SET uid=?, status=?, fqdn=?, altnames=?, validstart=FROM_UNIXTIME(?), validend=FROM_UNIXTIME(?), sslkey=?, sslcrt=?, sslchain=?, provider=?
, sslcsr = ''
;"
,
array
(
$cuid
,
self
::
STATUS_OK
,
$fqdn
,
$altnames
,
intval
(
$validstart
),
intval
(
$validend
),
$key
,
$crt
,
$chain
,
$provider
)
);
if
(
!
(
$id
=
$db
->
lastid
()))
{
$msg
->
log
(
'ssl'
,
'impoert_cert'
,
'insert query failed ('
.
print_r
(
$db
->
last_error
(),
TRUE
)
.
')'
);
$msg
->
raise
(
"ERROR"
,
"ssl"
,
_
(
"Can't save the Key/Crt/Chain now. Please try later."
));
return
false
;
}
...
...
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