Change SHA256 to SHA512 signature algorithm 17/215217/2 accepted/tizen/unified/20191008.001324 submit/tizen/20181007.003115 submit/tizen/20191007.061435
authorTomasz Swierczek <t.swierczek@samsung.com>
Wed, 2 Oct 2019 13:53:19 +0000 (15:53 +0200)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Fri, 4 Oct 2019 08:46:01 +0000 (08:46 +0000)
Change-Id: I819800f8d57d2126d93f86db14d4d77e1dbdf1aa

tools/signing-template.sh
tools/validate-widget.sh

index d407f31..1a313ba 100755 (executable)
@@ -23,8 +23,8 @@ while [[ $1 == -* ]]; do
 done
 
 case "$method" in
-       rsa) method="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256";;
-       ecdsa) method="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256";;
+       rsa) method="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512";;
+       ecdsa) method="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512";;
        *) echo invalid signature method $method; usage; exit 1;;
 esac
 
@@ -43,7 +43,7 @@ do
 tempi=`echo $i | sed -e 's,%20,\ ,g'`
 cat << EOL
   <Reference URI="$tempi">
-   <DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
+   <DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha512" />
    <DigestValue></DigestValue>
   </Reference>
 EOL
@@ -54,7 +54,7 @@ cat << EOL
    <Transforms>
     <Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>
    </Transforms>
-   <DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
+   <DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha512" />
    <DigestValue></DigestValue>
   </Reference>
  </SignedInfo>
index 5f618d2..db46ad2 100755 (executable)
@@ -59,10 +59,10 @@ do
        # http://www.w3.org/TR/widgets-digsig/#signature-algorithms
        SIGMETHOD=$(xmlstarlet sel -N sig=http://www.w3.org/2000/09/xmldsig#  -t -m "//sig:SignatureMethod/@Algorithm" -v . $i)
        case "$SIGMETHOD" in
-               (http://www.w3.org/2001/04/xmldsig-more#rsa-sha256)
+               (http://www.w3.org/2001/04/xmldsig-more#rsa-sha512)
                        echo Signature method RSA
                        ;;
-               (http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256)
+               (http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512)
                        echo Signature method ECDSA
                        ;;
                (*) echo Unknown Signature Method && continue;;