Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
9f25b4aa
Commit
9f25b4aa
authored
5 years ago
by
George Joseph
Committed by
Gerrit Code Review
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge "ast_tls_cert: Allow private key size to be set on command line"
parents
4f1ab640
de6919f3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
contrib/scripts/ast_tls_cert
+6
-2
6 additions, 2 deletions
contrib/scripts/ast_tls_cert
with
6 additions
and
2 deletions
contrib/scripts/ast_tls_cert
+
6
−
2
View file @
9f25b4aa
...
@@ -49,7 +49,7 @@ create_ca () {
...
@@ -49,7 +49,7 @@ create_ca () {
create_cert
()
{
create_cert
()
{
local
base
=
${
OUTPUT_DIR
}
/
${
OUTPUT_BASE
}
local
base
=
${
OUTPUT_DIR
}
/
${
OUTPUT_BASE
}
echo
"Creating certificate
${
base
}
.key"
echo
"Creating certificate
${
base
}
.key"
openssl genrsa
-out
${
base
}
.key
1024
>
/dev/null
openssl genrsa
-out
${
base
}
.key
${
KEYBITS
:-
2048
}
>
/dev/null
if
[
$?
-ne
0
]
;
if
[
$?
-ne
0
]
;
then
then
echo
"Failed"
echo
"Failed"
...
@@ -87,6 +87,7 @@ OPTIONS:
...
@@ -87,6 +87,7 @@ OPTIONS:
-f Config filename (openssl config file format)
-f Config filename (openssl config file format)
-c CA cert filename (creates new CA cert/key as ca.crt/ca.key if not passed)
-c CA cert filename (creates new CA cert/key as ca.crt/ca.key if not passed)
-k CA key filename
-k CA key filename
-b The desired size of the private key in bits. Default is 2048.
-C Common name (cert field)
-C Common name (cert field)
This should be the fully qualified domain name or IP address for
This should be the fully qualified domain name or IP address for
the client or server. Make sure your certs have unique common
the client or server. Make sure your certs have unique common
...
@@ -128,7 +129,7 @@ OUTPUT_BASE=asterisk # Our default cert basename
...
@@ -128,7 +129,7 @@ OUTPUT_BASE=asterisk # Our default cert basename
CERT_MODE
=
server
CERT_MODE
=
server
ORG_NAME
=
${
DEFAULT_ORG
}
ORG_NAME
=
${
DEFAULT_ORG
}
while
getopts
"hf:c:k:o:d:m:C:O:"
OPTION
while
getopts
"hf:c:k:o:d:m:C:O:
b:
"
OPTION
do
do
case
${
OPTION
}
in
case
${
OPTION
}
in
h
)
h
)
...
@@ -144,6 +145,9 @@ do
...
@@ -144,6 +145,9 @@ do
k
)
k
)
CAKEY
=
${
OPTARG
}
CAKEY
=
${
OPTARG
}
;;
;;
b
)
KEYBITS
=
${
OPTARG
}
;;
o
)
o
)
OUTPUT_BASE
=
${
OPTARG
}
OUTPUT_BASE
=
${
OPTARG
}
;;
;;
...
...
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