Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cam
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai
cam
Commits
1c063489
Commit
1c063489
authored
Feb 06, 2012
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
print expiration dates in the "list" command
parent
f054c992
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
cam/main.py
cam/main.py
+11
-1
No files found.
cam/main.py
View file @
1c063489
...
...
@@ -87,8 +87,18 @@ def main():
print
c
.
public_key_file
print
c
.
private_key_file
elif
cmd
==
'list'
:
now
=
time
.
time
()
for
cert
in
sorted
(
certs
,
key
=
lambda
x
:
x
.
name
):
print
cert
.
name
,
cert
.
cn
,
cert
.
get_expiration_date
()
expiry
=
cert
.
get_expiration_date
()
state
=
'OK'
expiry_str
=
''
if
not
expiry
:
state
=
'MISSING'
else
:
if
expiry
<
now
:
state
=
'EXPIRED'
expiry_str
=
time
.
strftime
(
'%Y/%m/%d'
,
time
.
gmtime
(
expiry
))
print
cert
.
name
,
cert
.
cn
,
state
,
expiry_str
elif
cmd
==
'fp'
or
cmd
==
'fingerprint'
:
if
len
(
args
)
>
0
:
certs
=
[
find_cert
(
certs
,
x
)
for
x
in
args
]
...
...
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