diff --git a/jstests/encryptdb/kmip.js b/jstests/encryptdb/kmip.js
index 35d2567..82bb6cc 100644
--- a/jstests/encryptdb/kmip.js
+++ b/jstests/encryptdb/kmip.js
@@ -13,8 +13,7 @@
             // default port is 5696, we're setting it here to test option parsing
             kmipPort: "6666",
             kmipServerCAFile: "jstests/libs/ca.pem",
-            kmipClientCertificateFile: testDir + "libs/client_password_protected.pem",
-            kmipClientCertificatePassword: "qwerty",
+            kmipClientCertificateFile: testDir + "libs/pykmipclient.pem",
         };
 
         var md = MongoRunner.runMongod(Object.merge(params, defaultParams));
@@ -30,6 +29,7 @@
     }
 
     function assertKeyId(md, keyId) {
+        print('assertKeyId ' + keyId)
         // restart with no keyID should work
         md = runEncryptedMongod({
             restart: md,
@@ -53,26 +53,34 @@
     assert(checkProgram(pid));
     // wait for PyKMIP, a KMIP server framework, to start
     assert.soon(function() {
+        jsTest.log(rawMongoProgramOutput())
         return rawMongoProgramOutput().search("KMIP server") !== -1;
     });
 
-    // start mongod with default keyID of "1"
+    // start mongod and generate new key id 
     var md = runEncryptedMongod();
     var testDB = md.getDB("test");
     testDB.test.insert({a: 1});
+    var ss = md.getDB("admin").runCommand({serverStatus:1})
+    var originalKeyId = ss.encryptionAtRest.encryptionKeyId;
     MongoRunner.stopMongod(md);
-    assertKeyId(md, 1);
+    assertKeyId(md, originalKeyId);
 
-    // do a key rotation, keyID is now "2"
+    // do a key rotation
     runEncryptedMongod({
         restart: md,
         kmipRotateMasterKey: "",
     });
-    assertKeyId(md, 2);
+    md = runEncryptedMongod({
+        restart: md,
+    });
+    ss = md.getDB("admin").runCommand({serverStatus:1})
+    MongoRunner.stopMongod(md);
+    assertKeyId(md, ss.encryptionAtRest.encryptionKeyId);
 
-    // do a key rotation and explicitly specify the keyID "1"
-    runEncryptedMongod({restart: md, kmipRotateMasterKey: "", kmipKeyIdentifier: "1"});
-    assertKeyId(md, 1);
+    // do a key rotation back to the originally generated key
+    runEncryptedMongod({restart: md, kmipRotateMasterKey: "", kmipKeyIdentifier: originalKeyId});
+    assertKeyId(md, originalKeyId);
 
     stopMongoProgramByPid(pid);
-})();
\ No newline at end of file
+})();
diff --git a/jstests/encryptdb/kmip_server.py b/jstests/encryptdb/kmip_server.py
index 6d1259f..feb530b 100644
--- a/jstests/encryptdb/kmip_server.py
+++ b/jstests/encryptdb/kmip_server.py
@@ -3,34 +3,34 @@
 
 import logging
 
-from kmip.services.kmip_server import KMIPServer
+from kmip.services.server import KmipServer
 
 def main():
 
+    logging.basicConfig(level=logging.INFO)
     logger = logging.getLogger(__name__)
 
-    server = KMIPServer(
-        host="127.0.0.1",
+    s = KmipServer(
+        hostname="127.0.0.1",
         port=6666,
-        keyfile="jstests/libs/server.pem",
-        certfile="jstests/libs/server.pem",
-        cert_reqs="CERT_REQUIRED",
-        ssl_version="PROTOCOL_TLSv1",
-        ca_certs="jstests/libs/ca.pem",
-        do_handshake_on_connect=True,
-        suppress_ragged_eofs=True)
+        key_path="jstests/libs/server.pem",
+        certificate_path="jstests/libs/server.pem",
+        config_path="src/mongo/db/modules/enterprise/jstests/encryptdb/libs/pykmip.conf",
+        auth_suite="Basic",
+        ca_path="jstests/libs/ca.pem",
+        log_path='/var/log/pykmip/server.log')
 
     logger.info("Starting KMIP server")
-
+    s.start()
+   
     try:
-        server.serve()
+        s.serve()
     except Exception as e:
-        logger.info('Exception received while serving: {0}'.format(e))
+        logger.error('Exception received while serving: {0}'.format(e))
     finally:
-        server.close()
-
+        s.stop()
     logger.info("Stopping KMIP server")
 
 
 if __name__ == '__main__':
-    main()
\ No newline at end of file
+    main()
diff --git a/jstests/encryptdb/libs/pykmip.conf b/jstests/encryptdb/libs/pykmip.conf
new file mode 100644
index 0000000..9d85629
--- /dev/null
+++ b/jstests/encryptdb/libs/pykmip.conf
@@ -0,0 +1,7 @@
+[server]
+hostname=127.0.0.1
+port=6666
+certificate_path=jstests/libs/server.pem
+key_path=jstests/libs/server.pem
+ca_path=jstests/libs/ca.pem
+auth_suite=Basic
diff --git a/jstests/encryptdb/libs/pykmipclient.pem b/jstests/encryptdb/libs/pykmipclient.pem
new file mode 100644
index 0000000..7531b94
--- /dev/null
+++ b/jstests/encryptdb/libs/pykmipclient.pem
@@ -0,0 +1,50 @@
+-----BEGIN CERTIFICATE-----
+MIIDojCCAoqgAwIBAgICV0UwDQYJKoZIhvcNAQEFBQAwdDEXMBUGA1UEAxMOS2Vy
+bmVsIFRlc3QgQ0ExDzANBgNVBAsTBktlcm5lbDEQMA4GA1UEChMHTW9uZ29EQjEW
+MBQGA1UEBxMNTmV3IFlvcmsgQ2l0eTERMA8GA1UECBMITmV3IFlvcmsxCzAJBgNV
+BAYTAlVTMB4XDTE2MTIxNjE2MjgyOFoXDTM2MTIxNjE2MjgyOFowcjEVMBMGA1UE
+AxMMcHlrbWlwY2xpZW50MQ8wDQYDVQQLEwZLZXJuZWwxEDAOBgNVBAoTB01vbmdv
+REIxFjAUBgNVBAcTDU5ldyBZb3JrIENpdHkxETAPBgNVBAgTCE5ldyBZb3JrMQsw
+CQYDVQQGEwJVUzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAI6NH91v
+1/5TQlboNWwMDtg+VVGkQgfRZntrngMG3LDEq/A+MDe4lroKpMCTrCMashAbMhGu
+Di+O03r2aC0dDDg6Mf+oPoIfOeTpJHF+w8m8NzjICW1eLa9z0rOJMUSMVuNCi4w0
+5eSLO45oOY9QHT3gmLG7XYHc4lGM5Ohg+5iAJ4kN4tRLl9SkmGFxkqLbLMkwJWtb
+IenzZQfls0+ppGkoXuXpFIgyXv5nsYlqXMZeg+nNqkC1GjwHi32mZEbYy7Xx6xtJ
+V8mz4cVwz+6fMdSpT1Cu5E1X1cvL3wj6VlY50hLhzdpohSF3zjDpLTZu3uWr+3Nd
+6FhNHhcO5RAzRkUCAwEAAaNAMD4wCwYDVR0PBAQDAgSQMBMGA1UdJQQMMAoGCCsG
+AQUFBwMCMBoGA1UdEQQTMBGCCWxvY2FsaG9zdIcEfwAAATANBgkq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yNHvxoTa49nqvLuA5SN13yCM/npp5wgJmBFD/+iXL6EqCn1EEb0Mibzh
+uFTdKYPtAoGBAP6MCvUSEc5znJ+5XTFsBCz4r65HZT9ZAtqaUiknK5fJ87zEwaEU
+eAtBNeLCF9Ojjr5vKbQaumw332aisjsv0KfeWnfz4uo1lo9pQx2XYoIzPIRAF3TJ
+norLwFjjZSDsIlHvo6YU+nNx3Hj7TU6DcNZ2lNwq1XPVZ0I3uqK+fE4zAoGBAI9d
+bX2lnWrV03PWZ5zr3WhlYQoR7+Iu7v2TJT4EoaJYwMYIoDaBPevMr0tRmAk9rbqm
+PLKi2WCcAJxzojyFSUcY26efmcnXZ5Ilz/Azb2RdxYkCwgeQaCAyVqC+dyJ8ZPrj
+8wTtQERtek2BdhV9xjmiIPGM17BDK1cON123ybGnAoGBAIV4cRZnzyZtwKaPz6nm
+dZoPHC9KCHDa/4AYgxRJEbaZklBc6xrHXNqp6tNn6o5yqJp6N2fUzAOKmH18ufAG
+9mXPVaioHUepqbSxARw3ENQsgYLnCGWYgqVMiSMSuSg2KRjFiw2+2kRGY9CcFMEi
+crxBmXSIkTwXnfk+t4I2V3+5AoGAa6PkL3CHjs1Y5CJYzTMym81yXJM3HwXKHs26
+KqRjj3c/1fBoCkRjb4XRH6X1lwqeRAPIkv8+YxD+THltmC8i46TAV0y3tRpsAwks
+5NZZjmvxgnt1nyRHadUhwbL/0/69+rnnnw1bMYVZTJQlSuGSUXdvcK0kzIzCH6zm
+2RDC+QUCgYEAl0Se189Q5GffSOCGPIKpEaleQjAQESioanyf3EFik6UCzqKRdx8y
+jEubl7/6LkRg5YXQiXIUNnqO12j+QOUjj9UKJtuVN/QiAN7VIbXYdm0MRBLoYr2c
+buD1OAgrIOLUHp3NIYtq6fc7D99uwnBeKZpQA+gPE1khAN8v6ysl4hw=
+-----END RSA PRIVATE KEY-----
\ No newline at end of file
diff --git a/jstests/encryptdb/libs/requirements.txt b/jstests/encryptdb/libs/requirements.txt
index 778913c..d76f215 100644
--- a/jstests/encryptdb/libs/requirements.txt
+++ b/jstests/encryptdb/libs/requirements.txt
@@ -1,4 +1,4 @@
-pykmip==0.4.0
+pykmip==0.6.0
 pymongo==3.2.2
 PyYAML==3.11
 six
