Skip to content

Commit 4ecf6c1

Browse files
committed
experimental: disable most of the test.
1 parent 987cdff commit 4ecf6c1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

swift/ql/test/query-tests/Security/CWE-327/test_commoncrypto.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// --- stubs ---
22

33
struct Data {
4-
func withUnsafeBytes<ResultType>(
4+
/* func withUnsafeBytes<ResultType>(
55
_ body: (UnsafeRawBufferPointer) throws -> ResultType
66
) rethrows -> ResultType { return 0 as! ResultType }
77
mutating func withUnsafeMutableBytes<ResultType>(
88
_ body: (UnsafeMutableRawBufferPointer) throws -> ResultType
9-
) rethrows -> ResultType { return 0 as! ResultType }
9+
) rethrows -> ResultType { return 0 as! ResultType }*/
1010
}
1111

1212
// --- CommonCryptor ---
@@ -123,7 +123,7 @@ func CCCrypt(
123123
func cond() -> Bool { return true }
124124

125125
func test_commoncrypto1(key: Data, iv: Data, dataIn: Data, dataOut: inout Data) {
126-
// semi-realistic test case
126+
/* // semi-realistic test case
127127
var myCryptor: CCCryptorRef?
128128
var dataOutWritten = 0
129129

@@ -175,15 +175,15 @@ func test_commoncrypto1(key: Data, iv: Data, dataIn: Data, dataOut: inout Data)
175175
})
176176
})
177177
})
178-
})
178+
})*/
179179
}
180180

181181
func test_commoncrypto2(
182182
key: UnsafeRawPointer, keyLen: Int,
183183
iv: UnsafeRawPointer,
184184
dataIn: UnsafeRawPointer, dataInLen: Int,
185185
dataOut: UnsafeMutableRawPointer, dataOutAvail: Int) {
186-
var myCryptor: CCCryptorRef?
186+
/* var myCryptor: CCCryptorRef?
187187
var dataOutWritten = 0
188188

189189
// algorithms
@@ -214,4 +214,4 @@ func test_commoncrypto2(
214214
_ = CCCryptorCreateWithMode(CCOperation(kCCAlgorithmAES), CCMode(kCCModeOFB), CCAlgorithm(kCCAlgorithm3DES), CCPadding(0), iv, key, keyLen, nil, 0, 0, CCModeOptions(0), &myCryptor)
215215
_ = CCCryptorCreateWithMode(CCOperation(kCCAlgorithmAES), CCMode(kCCModeRC4), CCAlgorithm(kCCAlgorithm3DES), CCPadding(0), iv, key, keyLen, nil, 0, 0, CCModeOptions(0), &myCryptor)
216216
_ = CCCryptorCreateWithMode(CCOperation(kCCAlgorithmAES), CCMode(kCCModeCFB8), CCAlgorithm(kCCAlgorithm3DES), CCPadding(0), iv, key, keyLen, nil, 0, 0, CCModeOptions(0), &myCryptor)
217-
}
217+
*/}

0 commit comments

Comments
 (0)