Scott Lawrence wrote:
> On Fri, 2008-06-27 at 07:51 -0400, Damian Krzeminski wrote:
>> Scott Lawrence wrote:
>>> On Thu, 2008-06-26 at 19:29 -0400, Damian Krzeminski wrote:
>>>> see: http://track.sipfoundry.org/browse/XCF-2655
>>>>
>>>> Recent changes in gen-ssl-keys.sh.in make it generate CA cert files that 
>>>> default to organization names, which pretty often include spaces.
>>>>
>>>> Code is sipXconfig.sh that does not work with space is here:
>>>>
>>>>   Certificates=`find $AuthoritiesDir | egrep -i '.(crt|crl)$'`
>>>>   @bin.dir@/ssl-cert/create-ssl-truststore.sh --checksum \
>>>>     $SslDir/.authorities-contents.md5 \
>>>>     --truststore $TrustStore $Certificates
>>>>
>>>>
>>>> Anybody knows shell tricks to make it work?
>>> Put double quotes around the file name.
>>>
>>> There are various times when the authority name is displayed to users,
>>> and when there is a commercial cert authority we can't change the name
>>> they use, so just tolerating this is easier.
>>>
>> Sorry if it was not clear: I know that quoting the file name would solve 
>> the problem. I am asking if anybody knows an elegant way to do that.
>> I was experimenting a bit with 'find -print0' and 'xargs -0', but I did not 
>> find an obvious way to use it here...
> 
> I believe this will work:
> 
>         export Certificates=""
>         find $AuthoritiesDir \( -name \*.crt -o \*.crl \) \
>         while read Certificate
>         do
>            Certificates="$Certificates \"${Certificate}\""
>         done
>         
>         @bin.dir@/ssl-cert/create-ssl-truststore.sh --checksum \
>               $SslDir/.authorities-contents.md5 \
>               --truststore $TrustStore $Certificates
> 

This does not work because create-ssl-truststore.sh has its own set of
problems with spaces in file names...




_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev

Reply via email to