javacommons/security/src/midpauthenticationmoduleimpl.cpp
changeset 48 e0d6e9bd3ca7
parent 47 f40128debb5d
child 61 bf7ee68962da
--- a/javacommons/security/src/midpauthenticationmoduleimpl.cpp	Wed Jun 23 18:07:10 2010 +0300
+++ b/javacommons/security/src/midpauthenticationmoduleimpl.cpp	Tue Jul 06 14:10:26 2010 +0300
@@ -40,6 +40,7 @@
 #include <openssl/rsa.h>
 #include <openssl/sha.h>
 #include <string.h>
+#include <errno.h>
 
 using namespace java::security;
 using namespace java::storage;
@@ -252,6 +253,13 @@
         jar_hash_value = NULL;
         return hash;
     }
+    else
+    {
+        if (errno == ENOENT)
+        {
+            SecurityUtils::throw_exception(env, "JAR_NOT_FOUND");
+        }
+    }
     return NULL;
 }