mirror of
https://github.com/openkmip/pykmip
synced 2025-12-05 23:53:19 +00:00
Fix pykmip client error with server_correlation_value issue
This commit is contained in:
@@ -506,6 +506,13 @@ class MessageExtension(Struct):
|
||||
super(MessageExtension, self).__init__(enums.Tags.MESSAGE_EXTENSION)
|
||||
|
||||
|
||||
# 6.19
|
||||
class ServerCorrelationValue(TextString):
|
||||
def __init__(self, value=None):
|
||||
super(ServerCorrelationValue, self).__init__(
|
||||
value, enums.Tags.SERVER_CORRELATION_VALUE)
|
||||
|
||||
|
||||
# 9.1.3.2.2
|
||||
class KeyCompressionType(Enumeration):
|
||||
|
||||
|
||||
@@ -150,12 +150,14 @@ class ResponseHeader(Struct):
|
||||
protocol_version=None,
|
||||
time_stamp=None,
|
||||
batch_count=None,
|
||||
server_hashed_password=None):
|
||||
server_hashed_password=None,
|
||||
server_correlation_value=None):
|
||||
super(ResponseHeader, self).__init__(tag=Tags.RESPONSE_HEADER)
|
||||
self.protocol_version = protocol_version
|
||||
self.time_stamp = time_stamp
|
||||
self.batch_count = batch_count
|
||||
self.server_hashed_password = server_hashed_password
|
||||
self.server_correlation_value = server_correlation_value
|
||||
|
||||
self.validate()
|
||||
|
||||
@@ -204,6 +206,10 @@ class ResponseHeader(Struct):
|
||||
server_hashed_password.read(tstream, kmip_version=kmip_version)
|
||||
self._server_hashed_password = server_hashed_password
|
||||
|
||||
if self.is_tag_next(enums.Tags.SERVER_CORRELATION_VALUE, tstream):
|
||||
self.server_correlation_value = contents.ServerCorrelationValue()
|
||||
self.server_correlation_value.read(tstream, kmip_version=kmip_version)
|
||||
|
||||
self.batch_count = contents.BatchCount()
|
||||
self.batch_count.read(tstream, kmip_version=kmip_version)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user