class FilePrivateKeyStore implements PrivateKeyStore {

    @Override
    public ServerPrivateKey getPrivateKey(String service, String serverHostName,
            String serverRegion, String algorithm) {

        // validate our service and algorithm values

        if (!ZMS_SERVICE.equalsIgnoreCase(service) && !ZTS_SERVICE.equalsIgnoreCase(service)) {
            LOG.error("FilePrivateKeyStore: unknown service: {}", service);
            return null;
        }

        if (!ALGO_RSA.equalsIgnoreCase(algorithm) && !ALGO_EC.equalsIgnoreCase(algorithm)) {
            LOG.error("FilePrivateKeyStore: unknown algorithm: {}", algorithm);
            return null;
        }

        String privKeyName;
        String privKeyId;
        if (ALGO_RSA.equalsIgnoreCase(algorithm)) {
            privKeyName = System.getProperty(ATHENZ_PROP_PRIVATE_RSA_KEY);
            privKeyId = System.getProperty(ATHENZ_PROP_PRIVATE_RSA_KEY_ID, "0");
        } else {
            privKeyName = System.getProperty(ATHENZ_PROP_PRIVATE_EC_KEY);
            privKeyId = System.getProperty(ATHENZ_PROP_PRIVATE_EC_KEY_ID, "0");
        }

        if (LOG.isDebugEnabled()) {
            LOG.debug("FilePrivateKeyStore: private key file: {}, id: {}", privKeyName, privKeyId);
        }

        if (privKeyName == null) {
            return null;
        }

        // check to see if this is running in dev mode and thus it's
        // a resource in our jar file

        File privKeyFile = new File(privKeyName);
        PrivateKey pkey = Crypto.loadPrivateKey(privKeyFile);

        ServerPrivateKey privateKey = null;
        if (pkey != null) {
            privateKey = new ServerPrivateKey(pkey, privKeyId);
        }
        return privateKey;
    }

    public  FilePrivateKeyStore();

}