Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
G
gracedb-client
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
3
Merge Requests
3
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lscsoft
gracedb-client
Commits
bd38513e
Commit
bd38513e
authored
Nov 16, 2020
by
Alexander Pace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
certificate checking fix, and packaging changes.
fixes:
#24
parent
645ebd46
Pipeline
#169421
failed with stages
in 1 minute and 20 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
5 deletions
+25
-5
debian/changelog
debian/changelog
+5
-0
ligo-gracedb.spec
ligo-gracedb.spec
+2
-2
ligo/gracedb/cert.py
ligo/gracedb/cert.py
+17
-2
ligo/gracedb/version.py
ligo/gracedb/version.py
+1
-1
No files found.
debian/changelog
View file @
bd38513e
ligo-gracedb (2.7.2-1) unstable; urgency=low
* Bugfix for certificate check failure with tuple'd credentials
-- Alexander E. Pace <alexander.pace@ligo.org> Mon, 16 Nov 2020 21:03:38 +0000
ligo-gracedb (2.7.1-1) unstable; urgency=low
* Improved exception handling for HTTPErrors
* Fix and deprecation warning for gracedb_legacy CLI tool
...
...
ligo-gracedb.spec
View file @
bd38513e
%define name ligo-gracedb
%define version 2.7.
1
%define unmangled_version 2.7.
1
%define version 2.7.
2
%define unmangled_version 2.7.
2
%define release 1
Summary: Gravity Wave Candidate Event Database
...
...
ligo/gracedb/cert.py
View file @
bd38513e
...
...
@@ -39,7 +39,22 @@ far_future = datetime.timedelta(days=365)
def
load_certificate
(
cert
):
""" Loads in a path to a x509 certificate and returns a
x509.cryptography object """
with
open
(
cert
,
'rb'
)
as
cert_obj
:
# Check certificate type. First check if cert is a tuple, then
# take the first entry, which is assumed to be the cert.
# If it's a string, then take that. Otherwise fail.
if
isinstance
(
cert
,
tuple
):
cert_file
=
cert
[
0
]
elif
isinstance
(
cert
,
str
):
cert_file
=
cert
else
:
raise
RuntimeError
(
'Unknown certificate format. Certificate must '
'be a tuple of format ("/path/to/cert",'
'"/path/to/key") or a string or the path to the '
'combined certificate/key'
)
with
open
(
cert_file
,
'rb'
)
as
cert_obj
:
cert_obj
=
cert_obj
.
read
()
# Try loading with PEM, then try loading with DER, then give up.
...
...
@@ -50,7 +65,7 @@ def load_certificate(cert):
)
except
ValueError
:
try
:
return
x509
.
load_
pem
_x509_certificate
(
return
x509
.
load_
der
_x509_certificate
(
cert_obj
,
default_backend
()
)
except
ValueError
:
...
...
ligo/gracedb/version.py
View file @
bd38513e
__version__
=
'2.7.
1
'
__version__
=
'2.7.
2
'
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