Check-in [c27bb81788]
Overview
Comment:ChromeOS: Fixed issue with including signed data in the reply
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c27bb81788ccbcd0304cde28403b7d8106f8f626
User & Date: rkeene on 2016-02-26 18:20:59
Original Comment: Fixed issue with including signed data in the reply
Other Links: manifest | tags
Context
2016-02-26
18:21
ChromeOS: Updated to only enable debugging symbols in a debugging build check-in: 8668b85846 user: rkeene tags: trunk
18:20
ChromeOS: Fixed issue with including signed data in the reply check-in: c27bb81788 user: rkeene tags: trunk
16:35
ChromeOS: Updated to pass original message back correctly check-in: 3783f79015 user: rkeene tags: trunk
Changes

Modified build/chrome/cackey-chrome-init.cc from [cd9d30207a] to [02273309f5].

37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
37
38
39
40
41
42
43

44
45
46
47
48
49
50







-







			const char *smartcardManagerAppId = NULL;
			unsigned char buffer[8192];
			struct cackey_certificate *certificates, incomingCertificateCACKey;
			pp::VarDictionary *reply;
			pp::VarArray certificatesPPArray;
			pp::VarArrayBuffer *certificateContents, *incomingCertificateContents, *incomingData, *outgoingData;
			pp::Var command;
			const pp::Var *outgoingDataAsVar = NULL;
			int numCertificates, i;
			unsigned long outgoingDataLength;

			/*
			 * Extract the command
			 */
			command = message->Get("command");
126
127
128
129
130
131
132

133

134
135
136
137
138
139
140
141
142
143
144
145
125
126
127
128
129
130
131
132

133
134
135



136
137
138
139
140
141
142







+
-
+


-
-
-







						case CACKEY_CHROME_OK:
							outgoingData = new pp::VarArrayBuffer(outgoingDataLength);

							memcpy(outgoingData->Map(), buffer, outgoingDataLength);

							outgoingData->Unmap();

							reply->Set("status", "success");
							outgoingDataAsVar = new pp::Var(outgoingData->pp_var());
							reply->Set("signedData", *outgoingData);

							delete outgoingData;

							reply->Set("status", "success");
							reply->Set("signedData", outgoingDataAsVar);

							break;
						case CACKEY_CHROME_ERROR:
							reply->Set("status", "error");
							reply->Set("error", "Unable to sign data");
							break;
						case CACKEY_CHROME_NEEDLOGIN:
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
177
178
179
180
181
182
183




184
185
186
187
188
189
190







-
-
-
-








			delete reply;

			delete message;

			delete messagePlain;

			if (outgoingDataAsVar) {
				delete outgoingDataAsVar;
			}

			return;
		}

		virtual void HandleMessage(const pp::Var& messagePlain) {
			pp::VarDictionary *message;
			pp::Var *messagePlainCopy;
			pp::Var target;