@@ -37,7 +37,6 @@ namespace WebCore {
3737
3838static ExceptionOr<Vector<uint8_t >> encryptAES_GCM (const Vector<uint8_t >& iv, const Vector<uint8_t >& key, const Vector<uint8_t >& plainText, const Vector<uint8_t >& additionalData, size_t desiredTagLengthInBytes)
3939{
40- // This is a wordaround for rdar://75093377. Force the buffer to be a non null pointer.
4140 Vector<uint8_t > cipherText (plainText.size () + desiredTagLengthInBytes); // Per section 5.2.1.2: http://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
4241 Vector<uint8_t > tag (desiredTagLengthInBytes);
4342 // tagLength is actual an input <rdar://problem/30660074>
@@ -54,7 +53,6 @@ static ExceptionOr<Vector<uint8_t>> encryptAES_GCM(const Vector<uint8_t>& iv, co
5453
5554static ExceptionOr<Vector<uint8_t >> decyptAES_GCM (const Vector<uint8_t >& iv, const Vector<uint8_t >& key, const Vector<uint8_t >& cipherText, const Vector<uint8_t >& additionalData, size_t desiredTagLengthInBytes)
5655{
57- // This is a wordaround for rdar://75093377. Force the buffer to be a non null pointer.
5856 Vector<uint8_t > plainText (cipherText.size ()); // Per section 5.2.1.2: http://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
5957 Vector<uint8_t > tag (desiredTagLengthInBytes);
6058 size_t offset = cipherText.size () - desiredTagLengthInBytes;
@@ -69,7 +67,6 @@ static ExceptionOr<Vector<uint8_t>> decyptAES_GCM(const Vector<uint8_t>& iv, con
6967 if (constantTimeMemcmp (tag.data (), cipherText.data () + offset, desiredTagLengthInBytes))
7068 return Exception { OperationError };
7169
72- // This is a wordaround for rdar://75093377. Force the buffer to be a non null pointer.
7370 plainText.shrink (offset);
7471 return WTFMove (plainText);
7572}
0 commit comments