{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4628","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4628/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4628/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4628/events","html_url":"https://github.com/orientechnologies/orientdb/issues/4628","id":96476460,"number":4628,"title":"Keystore Fails to be Loaded at the Path Listed in orientdb-server-config.xml","user":{"login":"compensator","id":12867067,"avatar_url":"https://avatars.githubusercontent.com/u/12867067?v=3","gravatar_id":"","url":"https://api.github.com/users/compensator","html_url":"https://github.com/compensator","followers_url":"https://api.github.com/users/compensator/followers","following_url":"https://api.github.com/users/compensator/following{/other_user}","gists_url":"https://api.github.com/users/compensator/gists{/gist_id}","starred_url":"https://api.github.com/users/compensator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/compensator/subscriptions","organizations_url":"https://api.github.com/users/compensator/orgs","repos_url":"https://api.github.com/users/compensator/repos","events_url":"https://api.github.com/users/compensator/events{/privacy}","received_events_url":"https://api.github.com/users/compensator/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-22T05:14:34Z","updated_at":"2015-07-22T21:59:09Z","closed_at":null,"body":"When a Keystore is created and referenced in the orient-server-config.xml file in 2.1-rc5, it fails to be loaded.  I downloaded the source code and debugged this issue.  The problem occurs in OSystemVariableResolver:\r\n\r\n```java\r\npublic static String resolveVariable(final String variable) {\r\n    if( variable == null )\r\n      return null;\r\n    String resolved = System.getProperty(variable);\r\n    if (resolved == null)\r\n      // TRY TO FIND THE VARIABLE BETWEEN SYSTEM'S ENVIRONMENT PROPERTIES\r\n      resolved = System.getenv(variable);\r\n    return resolved;\r\n}\r\n```\r\nSystem.getProperty(variable) with variable = \"ORIENTDB_HOME\" returns \"%ORIENTDB_HOME%\" on the Windows OS.  In the chain of calls at startup, this returns to the SSLSocketFactory and which attempts to load the keystore from:\r\n\r\n\"%ORIENTDB_HOME%\\config\\certs\\orientdb.ks\"\r\n\r\nas set in the orientdb-server-config.xml, which clearly doesn't exist.  The condition should be changed to:\r\n```java\r\nif (resolved != null)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments/123879339","html_url":"https://github.com/orientechnologies/orientdb/issues/4628#issuecomment-123879339","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4628","id":123879339,"user":{"login":"lvca","id":312606,"avatar_url":"https://avatars.githubusercontent.com/u/312606?v=3","gravatar_id":"","url":"https://api.github.com/users/lvca","html_url":"https://github.com/lvca","followers_url":"https://api.github.com/users/lvca/followers","following_url":"https://api.github.com/users/lvca/following{/other_user}","gists_url":"https://api.github.com/users/lvca/gists{/gist_id}","starred_url":"https://api.github.com/users/lvca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvca/subscriptions","organizations_url":"https://api.github.com/users/lvca/orgs","repos_url":"https://api.github.com/users/lvca/repos","events_url":"https://api.github.com/users/lvca/events{/privacy}","received_events_url":"https://api.github.com/users/lvca/received_events","type":"User","site_admin":false},"created_at":"2015-07-22T21:59:09Z","updated_at":"2015-07-22T21:59:09Z","body":"@compensator Could you elaborate better the problem?"}}