#! /bin/sh # # Generate agent.pem # # Copyright (C) 2007 Nokia Corporation # # Author: Pekka Pessi # Based on Mikko Haataja's perl script # # -------------------------------------------------------------------- # # This file is part of the Sofia-SIP package # # Copyright (C) 2005 Nokia Corporation. # # Contact: Pekka Pessi # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version 2.1 of # the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301 USA # # -------------------------------------------------------------------- CN='C=FI, L=Helsinki, O=sofia-sip, CN=tport test' ALTNAME=DNS:tport-test.sofia-sip.org #ALTNAME=URI:sips:tport-test.sofia-sip.org DAYS=730 umask 077 T=${TMPDIR:-/tmp}/sofia-sip-certs-${USER}-$$-`date +%N` CA=${T}/CA mkdir $T || exit 1 mkdir $T/CA || exit 1 cat > $CA/cakey.pem < $CA/cacert.pem < $T/a.cnf <