WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 164939
[Mac] Change uint8_t* to Vector<uint8_t> type in all crypto algorithm implementation
https://bugs.webkit.org/show_bug.cgi?id=164939
Summary
[Mac] Change uint8_t* to Vector<uint8_t> type in all crypto algorithm impleme...
Jiewen Tan
Reported
2016-11-18 11:39:16 PST
Change uint8_t* to Vector<uint8_t> type in all crypto algorithm implementation once WebKitSubtleCrypto is deprecated. This includes: CryptoAlgorithmAES_CBCMac.cpp::static ExceptionOr<Vector<uint8_t>> transformAES_CBC(CCOperation operation, const uint8_t* iv, const Vector<uint8_t>& key, const uint8_t* data, size_t dataLength); CryptoAlgorithmRSA_OAEP.cpp::static ExceptionOr<Vector<uint8_t>> encryptRSA_OAEP(CryptoAlgorithmIdentifier hash, const Vector<uint8_t>& label, const PlatformRSAKey key, size_t keyLength, const uint8_t* data, size_t dataLength); CryptoAlgorithmRSAES_PKCS1_v1_5.cpp::static ExceptionOr<Vector<uint8_t>> encryptRSAES_PKCS1_v1_5(const PlatformRSAKey key, size_t keyLength, const uint8_t* data, size_t dataLength);
Attachments
Patch
(24.43 KB, patch)
2017-08-18 18:43 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Brent Fulgham
Comment 1
2016-11-18 11:57:29 PST
I assume this implies getting rid of the distinct 'dataLength' argument, too?
Jiewen Tan
Comment 2
2016-11-18 11:58:50 PST
(In reply to
comment #1
)
> I assume this implies getting rid of the distinct 'dataLength' argument, too?
Yes.
Jiewen Tan
Comment 3
2016-11-22 13:32:52 PST
Appended: CryptoAlgorithmRSA_OAEP.cpp::static ExceptionOr<Vector<uint8_t>> decryptRSA_OAEP(CryptoAlgorithmIdentifier hash, const Vector<uint8_t>& label, const PlatformRSAKey key, size_t keyLength, const uint8_t* data, size_t dataLength); CryptoAlgorithmRSAES_PKCS1_v1_5.cpp::static ExceptionOr<Vector<uint8_t>> decryptRSAES_PKCS1_v1_5(const PlatformRSAKey key, size_t keyLength, const uint8_t* data, size_t dataLength);
Jiewen Tan
Comment 4
2016-11-29 18:47:11 PST
Appended: CryptoAlgorithmHMACMac.cpp::static Vector<uint8_t> calculateSignature(CCHmacAlgorithm algorithm, const Vector<uint8_t>& key, const uint8_t* data, size_t dataLength) CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp::static ExceptionOr<Vector<uint8_t>> signRSASSA_PKCS1_v1_5(CryptoAlgorithmIdentifier hash, const PlatformRSAKey key, size_t keyLength, const uint8_t* data, size_t dataLength)
Jiewen Tan
Comment 5
2016-11-30 13:22:35 PST
Appended: CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp::static ExceptionOr<bool> verifyRSASSA_PKCS1_v1_5(CryptoAlgorithmIdentifier hash, const PlatformRSAKey key, const uint8_t* signature, size_t signatureLength, const uint8_t* data, size_t dataLength)
Jiewen Tan
Comment 6
2017-01-03 13:01:59 PST
Appended: CryptoAlgorithmAES_KWMac.cpp::static ExceptionOr<Vector<uint8_t>> wrapKeyAES_KW(const Vector<uint8_t>& key, const uint8_t* data, size_t dataLength) CryptoAlgorithmAES_KWMac.cpp::static ExceptionOr<Vector<uint8_t>> unwrapKeyAES_KW(const Vector<uint8_t>& key, const uint8_t* data, size_t dataLength)
Sam Weinig
Comment 7
2017-08-18 18:43:37 PDT
Created
attachment 318570
[details]
Patch
Build Bot
Comment 8
2017-08-18 18:46:44 PDT
Comment hidden (obsolete)
Attachment 318570
[details]
did not pass style-queue: ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:38: encryptRSA_OAEP is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:52: decryptRSA_OAEP is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:38: transformAES_CBC is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_KWMac.cpp:36: wrapKeyAES_KW is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_KWMac.cpp:47: unwrapKeyAES_KW is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:38: signRSASSA_PKCS1_v1_5 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:63: verifyRSASSA_PKCS1_v1_5 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:37: encryptRSAES_PKCS1_v1_5 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:47: decryptRSAES_PKCS1_v1_5 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 9 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 9
2017-08-19 09:41:51 PDT
Comment on
attachment 318570
[details]
Patch Clearing flags on attachment: 318570 Committed
r220953
: <
http://trac.webkit.org/changeset/220953
>
WebKit Commit Bot
Comment 10
2017-08-19 09:41:52 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 11
2017-08-19 09:42:54 PDT
<
rdar://problem/33979696
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug