Fixing NPE if no key alias
diff --git a/plugins/core/src/main/java/org/apache/cxf/fediz/core/util/CertsUtils.java b/plugins/core/src/main/java/org/apache/cxf/fediz/core/util/CertsUtils.java
index a1e2848..24d6be1 100644
--- a/plugins/core/src/main/java/org/apache/cxf/fediz/core/util/CertsUtils.java
+++ b/plugins/core/src/main/java/org/apache/cxf/fediz/core/util/CertsUtils.java
@@ -110,6 +110,10 @@
             keyAlias = crypto.getDefaultX509Identifier();
         }
         
+        if (keyAlias == null) {
+            throw new RuntimeException("No keystore alias was specified to sign the metadata");
+        }
+        
         CryptoType cryptoType = new CryptoType(CryptoType.TYPE.ALIAS);
         cryptoType.setAlias(keyAlias);
         X509Certificate[] issuerCerts = crypto.getX509Certificates(cryptoType);