Uploaded image for project: 'Libmongocrypt'
  1. Libmongocrypt
  2. MONGOCRYPT-21

libmongocrypt creates data keys in the future

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.0.0-beta5
    • Affects Version/s: None
    • Component/s: None
    • None

      Creating a data key document with mongocrypt_ctx_datakey_init returns a bson document where 'creationDate' and 'updateDate' are both set to the year 21043. Here's the raw bytes returned from libmongocrypt decoded with python:

      >>> import bson
      >>> bson.BSON(b'X\x01\x00\x00\x05_id\x00\x10\x00\x00\x00\x04\xddq\xb1h\xfb?O\t\x8e\x87\xb4\x12+\x8d\x84\xd7\x04keyAltNames\x00 \x00\x00\x00\x020\x00\x07\x00\x00\x00second\x00\x021\x00\x06\x00\x00\x00first\x00\x00\x05keyMaterial\x00\xa0\x00\x00\x00\x00<p\xfek\xf5\x81aEq}F|\xf4\xbd\rg\xe1\xf0\xe8\xc9\x92\xbb\xa4\xd0\xaa`T\xc2||zR\x84\x92\thS\xc6w\xcbM\xdd\x9f\xf8\x84\xb8\x83I\x8a\xd4\x165\xb5\xf0\xdc\x1cOP\xf1\x95}\x98\xb0?\xe5\xc3~V\x9f9\x14\xcc\xf3\x90\xbbYe\xe6\xf8\xc3\xd1\xb4\xb4\xc7\xb2)[\xd5EJT\x02\x04\xe8\n\xe2k\x8f\x19\x84\xd0Q\x9c\xf5p7\xa1\x9e\xbf\xf7h]\xa3\x02_\xf7\x91\x15\xde\xf8\x97\xb7q\x0e\xae=\xdc\x8a\xc2\xc6\xce2\x1cI\x0f\x86-\x88\xfdG*\xc1[%\x91\xf0\xd0\xf0\x90\x19I\xebI\xd6\x9c\ts)\xcd\x0f\tcreationDate\x00\xc8@\x07Mn#\x02\x00\tupdateDate\x00\xc8@\x07Mn#\x02\x00\x10status\x00\x00\x00\x00\x00\x03masterKey\x00\x19\x00\x00\x00\x02provider\x00\x06\x00\x00\x00local\x00\x00\x00').decode()
      {u'status': 0, u'_id': UUID('dd71b168-fb3f-4f09-8e87-b4122b8d84d7'), u'masterKey': {u'provider': u'local'}, u'keyAltNames': [u'second', u'first'], u'updateDate': datetime.datetime(21043, 8, 30, 13, 31, 57), u'keyMaterial': Binary('<p\xfek\xf5\x81aEq}F|\xf4\xbd\rg\xe1\xf0\xe8\xc9\x92\xbb\xa4\xd0\xaa`T\xc2||zR\x84\x92\thS\xc6w\xcbM\xdd\x9f\xf8\x84\xb8\x83I\x8a\xd4\x165\xb5\xf0\xdc\x1cOP\xf1\x95}\x98\xb0?\xe5\xc3~V\x9f9\x14\xcc\xf3\x90\xbbYe\xe6\xf8\xc3\xd1\xb4\xb4\xc7\xb2)[\xd5EJT\x02\x04\xe8\n\xe2k\x8f\x19\x84\xd0Q\x9c\xf5p7\xa1\x9e\xbf\xf7h]\xa3\x02_\xf7\x91\x15\xde\xf8\x97\xb7q\x0e\xae=\xdc\x8a\xc2\xc6\xce2\x1cI\x0f\x86-\x88\xfdG*\xc1[%\x91\xf0\xd0\xf0\x90\x19I\xebI\xd6\x9c\ts)\xcd\x0f', 0), u'creationDate': datetime.datetime(21043, 8, 30, 13, 31, 57)}
      

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: