Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
autoca
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
ai
autoca
Commits
4da834f5
Commit
4da834f5
authored
11 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
decent user-facing documentation for the "autoca" tool
parent
a265c45e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
autoca/ca_tool.py
+55
-18
55 additions, 18 deletions
autoca/ca_tool.py
with
55 additions
and
18 deletions
autoca/ca_tool.py
+
55
−
18
View file @
4da834f5
...
...
@@ -19,28 +19,65 @@ def writeout(output, data):
def
main
():
parser
=
optparse
.
OptionParser
()
parser
.
add_option
(
'
--url
'
,
dest
=
'
url
'
,
parser
=
optparse
.
OptionParser
(
usage
=
'''
%prog [<OPTIONS>] <COMMAND>
Known commands:
init
Initialize a new local CA. You must provide the --ca-path
and --ca-subject options.
get-ca
Outputs the CA certificate in PEM format.
get-crl
Outputs the CA Certificate Revocation List. It is possible
to request a specific output format by passing the desired
format as second argument (
"
pem
"
or
"
der
"
).
sign
Create a new certificate request and sign it. If the --server
option is not specified, a client certificate will be
generated by default.
The tool can operate either with a local CA or a remote one. Use the
--ca-path option in the former case, or specify the server location
with --url in the latter. Accessing a remote CA might require
authentication: use the --secret option for puny shared-secret HTTP
auth (the default). Other authentication methods may be available on
your system.
X509 subjects, where applicable, must be specified as key=value pairs
separated by slashes (
'
/
'
), for example:
CN=example.com/OU=Web/O=Example
'''
)
g
=
parser
.
add_option_group
(
'
Connection options
'
)
g
.
add_option
(
'
--url
'
,
dest
=
'
url
'
,
help
=
'
autoca API endpoint
'
)
parser
.
add_option
(
'
--ca-path
'
,
dest
=
'
ca_path
'
,
g
.
add_option
(
'
--ca-path
'
,
dest
=
'
ca_path
'
,
help
=
'
local CA directory
'
)
parser
.
add_option
(
'
--output
'
,
dest
=
'
output
'
,
metavar
=
'
FILE
'
,
g
=
parser
.
add_option_group
(
'
Output options
'
)
g
.
add_option
(
'
--output
'
,
dest
=
'
output
'
,
metavar
=
'
FILE
'
,
help
=
'
write output to this file
'
)
parser
.
add_option
(
'
--outkey
'
,
dest
=
'
outkey
'
,
metavar
=
'
FILE
'
,
g
.
add_option
(
'
--outkey
'
,
dest
=
'
outkey
'
,
metavar
=
'
FILE
'
,
help
=
'
write private key to this file (only
'
'
useful with the
"
sign
"
command)
'
)
parser
.
add_option
(
'
--server
'
,
dest
=
'
server
'
,
action
=
'
store_true
'
,
g
=
parser
.
add_option_group
(
'
Options for the
"
init
"
command
'
)
g
.
add_option
(
'
--ca-subject
'
,
dest
=
'
ca_subject
'
,
help
=
'
CA X.509 subject (only on initialization)
'
)
g
.
add_option
(
'
--ca-bits
'
,
dest
=
'
ca_bits
'
,
type
=
'
int
'
,
default
=
1024
,
help
=
'
CA key size (only on initialization)
'
)
g
=
parser
.
add_option_group
(
'
Options for the
"
sign
"
command
'
)
g
.
add_option
(
'
--server
'
,
dest
=
'
server
'
,
action
=
'
store_true
'
,
help
=
'
create a server certificate (for
"
sign
"
)
'
)
parser
.
add_option
(
'
--subject
'
,
dest
=
'
subject
'
,
g
.
add_option
(
'
--subject
'
,
dest
=
'
subject
'
,
help
=
'
specify the X.509 subject as a set of
'
'
comma-separated ATTR=VALUE assignments
'
)
parser
.
add_option
(
'
--ca-subject
'
,
dest
=
'
ca_subject
'
,
help
=
'
CA X.509 subject (only on initialization)
'
)
parser
.
add_option
(
'
--ca-bits
'
,
dest
=
'
ca_bits
'
,
type
=
'
int
'
,
default
=
1024
,
help
=
'
CA key size (only on initialization)
'
)
parser
.
add_option
(
'
--secret
'
,
dest
=
'
secret
'
,
g
.
add_option
(
'
--secret
'
,
dest
=
'
secret
'
,
help
=
'
shared secret for authentication
'
)
parser
.
add_option
(
'
--days
'
,
dest
=
'
days
'
,
type
=
'
int
'
,
default
=
7
,
g
.
add_option
(
'
--days
'
,
dest
=
'
days
'
,
type
=
'
int
'
,
default
=
7
,
help
=
'
certificate validity
'
)
opts
,
args
=
parser
.
parse_args
()
if
len
(
args
)
<
1
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment