<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13810">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ast_tls_cert: Allow private key size to be set on command line<br><br>The default size in release branches will be 1024 but we'll use 2048 in master.<br><br>ASTERISK~28750<br><br>Change-Id: I435cea18bdd58824ed2b55259575c7ec7133842a<br>---<br>M contrib/scripts/ast_tls_cert<br>1 file changed, 6 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/10/13810/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/contrib/scripts/ast_tls_cert b/contrib/scripts/ast_tls_cert</span><br><span>index 116f110..04034f6 100755</span><br><span>--- a/contrib/scripts/ast_tls_cert</span><br><span>+++ b/contrib/scripts/ast_tls_cert</span><br><span>@@ -49,7 +49,7 @@</span><br><span> create_cert () {</span><br><span>  local base=${OUTPUT_DIR}/${OUTPUT_BASE}</span><br><span>      echo "Creating certificate ${base}.key"</span><br><span style="color: hsl(0, 100%, 40%);">-       openssl genrsa -out ${base}.key 1024 > /dev/null</span><br><span style="color: hsl(120, 100%, 40%);">+   openssl genrsa -out ${base}.key ${KEYBITS:-1024} > /dev/null</span><br><span>      if [ $? -ne 0 ];</span><br><span>     then</span><br><span>                 echo "Failed"</span><br><span>@@ -87,6 +87,7 @@</span><br><span>   -f  Config filename (openssl config file format)</span><br><span>   -c  CA cert filename (creates new CA cert/key as ca.crt/ca.key if not passed)</span><br><span>   -k  CA key filename</span><br><span style="color: hsl(120, 100%, 40%);">+  -b  The desired size of the private key in bits. Default is 1024.</span><br><span>   -C  Common name (cert field)</span><br><span>         This should be the fully qualified domain name or IP address for</span><br><span>         the client or server. Make sure your certs have unique common</span><br><span>@@ -128,7 +129,7 @@</span><br><span> CERT_MODE=server</span><br><span> ORG_NAME=${DEFAULT_ORG}</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-while getopts "hf:c:k:o:d:m:C:O:" OPTION</span><br><span style="color: hsl(120, 100%, 40%);">+while getopts "hf:c:k:o:d:m:C:O:b:" OPTION</span><br><span> do</span><br><span>     case ${OPTION} in</span><br><span>            h)</span><br><span>@@ -144,6 +145,9 @@</span><br><span>             k)</span><br><span>                   CAKEY=${OPTARG}</span><br><span>                      ;;</span><br><span style="color: hsl(120, 100%, 40%);">+            b)</span><br><span style="color: hsl(120, 100%, 40%);">+                    KEYBITS=${OPTARG}</span><br><span style="color: hsl(120, 100%, 40%);">+                     ;;</span><br><span>           o)</span><br><span>                   OUTPUT_BASE=${OPTARG}</span><br><span>                        ;;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13810">change 13810</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/13810"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: I435cea18bdd58824ed2b55259575c7ec7133842a </div>
<div style="display:none"> Gerrit-Change-Number: 13810 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>