]> xenbits.xensource.com Git - libvirt.git/commitdiff
tools: rename S_ORG to C_ORG in virt-pki-validate
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 11 Dec 2018 14:58:43 +0000 (14:58 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 11 Dec 2018 14:58:43 +0000 (14:58 +0000)
Rename a variable to make it clear that it holds the client organization
rather than the server organization.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
tools/virt-pki-validate.in

index c3fadbba641d02d2ab9254bdb32fc4a8c19dc4a2..2f7404bd9417d8ce49d98fb0d69d38b804a7fbb9 100755 (executable)
@@ -201,12 +201,12 @@ then
         echo Client certificate $LIBVIRT/clientcert.pem should be world readable
         echo "as root do: chown root:root $LIBVIRT/clientcert.pem ; chmod 644 $LIBVIRT/clientcert.pem"
     else
-        S_ORG=`"$CERTOOL" -i --infile "$LIBVIRT/clientcert.pem" | grep Subject: | sed 's+.*O=\([^,]*\).*+\1+'`
-        if [ "$ORG" != "$S_ORG" ]
+        C_ORG=`"$CERTOOL" -i --infile "$LIBVIRT/clientcert.pem" | grep Subject: | sed 's+.*O=\([^,]*\).*+\1+'`
+        if [ "$ORG" != "$C_ORG" ]
         then
             echo The CA certificate and the client certificate do not match
             echo CA organization: $ORG
-            echo Client organization: $S_ORG
+            echo Client organization: $C_ORG
         fi
         CLIENT=`"$CERTOOL" -i --infile "$LIBVIRT/clientcert.pem" | grep Subject: | sed 's+.*CN=\(.[^,]*\).*+\1+'`
         echo Found client certificate $LIBVIRT/clientcert.pem for $CLIENT