def decodeControlValue(self,encodedControlValue):
ppolicyValue,_ = decoder.decode(encodedControlValue,asn1Spec=PasswordPolicyResponseValue())
warning = ppolicyValue.getComponentByName('warning')
if warning is None:
self.timeBeforeExpiration,self.graceAuthNsRemaining = None,None
else:
timeBeforeExpiration = warning.getComponentByName('timeBeforeExpiration')
if timeBeforeExpiration!=None:
self.timeBeforeExpiration = int(timeBeforeExpiration)
else:
self.timeBeforeExpiration = None
graceAuthNsRemaining = warning.getComponentByName('graceAuthNsRemaining')
if graceAuthNsRemaining!=None:
self.graceAuthNsRemaining = int(graceAuthNsRemaining)
else:
self.graceAuthNsRemaining = None
error = ppolicyValue.getComponentByName('error')
if error is None:
self.error = None
else:
self.error = int(error)
评论列表
文章目录