1 #define LOG_TAG "castkey-DrmPlugin"
2 
3 #include <utils/Log.h>
4 #include <dlfcn.h>
5 #include <fstream>
6 #include <vector>
7 #include <stdlib.h>
8 
9 #include "Utils.h"
10 #include "DrmPlugin.h"
11 #include "SessionLibrary.h"
12 
13 namespace aidl {
14 namespace android {
15 namespace hardware {
16 namespace drm {
17 namespace castkey {
18 
19 using namespace castkeydrm;
20 
DrmPlugin()21 DrmPlugin::DrmPlugin() {};
~DrmPlugin()22 DrmPlugin::~DrmPlugin() {};
23 
24 constexpr char CAST_CRT_FILE[] = "/mnt/vendor/persist/nest/cast_auth.crt";
25 constexpr char CAST_ICA_FILE[] = "/vendor/etc/cert-chain.crt";
26 constexpr unsigned char kSha1Prefix[] = {0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e,
27                             0x03, 0x02, 0x1a, 0x05, 0x00, 0x04, 0x14};
28 constexpr unsigned char kSha256Prefix[] = {0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60,
29                               0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02,
30                               0x01, 0x05, 0x00, 0x04, 0x20};
31 constexpr int kSHA1Length = 20;
32 constexpr int kSHA256Length = 32;
33 constexpr int DigestInfoPrefixesSize = 2;
34 
35 struct DigestInfoPrefix {
36     const unsigned char* bytes;
37     size_t size;
38     size_t hash_size;
39 };
40 
41 // Array of DigestInfoPrefixes that are currently supported (SHA1 and SHA256).
42 const DigestInfoPrefix kDigestInfoPrefixes[] = {
43     {kSha1Prefix, sizeof(kSha1Prefix), kSHA1Length},
44     {kSha256Prefix, sizeof(kSha256Prefix), kSHA256Length},
45 };
46 
47 // If we find a raw hash, prepend the appropriate DER prefix.
adjustHash(const std::vector<uint8_t> & hash)48 std::vector<uint8_t> adjustHash(const std::vector<uint8_t>& hash) {
49     std::vector<uint8_t> adjusted_hash(hash);
50     for (size_t i = 0; i < DigestInfoPrefixesSize; i++) {
51         const DigestInfoPrefix& prefix = kDigestInfoPrefixes[i];
52         if (hash.size() == prefix.hash_size) {
53             adjusted_hash.insert(adjusted_hash.begin(), prefix.bytes,
54                        &prefix.bytes[prefix.size]);
55             break;
56     }
57   }
58   return adjusted_hash;
59 }
60 
readBinaryFile(const std::string & file_path)61 std::vector<uint8_t> readBinaryFile(const std::string& file_path) {
62     std::ifstream fin(file_path, std::ios::in | std::ios::binary);
63     fin >> std::noskipws;
64     std::vector<uint8_t> buffer((std::istream_iterator<uint8_t>(fin)),
65                                 std::istream_iterator<uint8_t>());
66     return buffer;
67 }
68 
openSession(::aidl::android::hardware::drm::SecurityLevel in_securityLevel,std::vector<uint8_t> * _aidl_return)69 ::ndk::ScopedAStatus DrmPlugin::openSession(
70         ::aidl::android::hardware::drm::SecurityLevel in_securityLevel,
71         std::vector<uint8_t>* _aidl_return) {
72     UNUSED(in_securityLevel);
73     std::vector<uint8_t> sessionId = SessionLibrary::get()->createSession();
74     *_aidl_return = sessionId;
75     return toNdkScopedAStatus(Status::OK);
76 }
77 
closeSession(const std::vector<uint8_t> & in_sessionId)78 ::ndk::ScopedAStatus DrmPlugin::closeSession(const std::vector<uint8_t>& in_sessionId) {
79     if (in_sessionId.size() == 0) {
80         return toNdkScopedAStatus(Status::BAD_VALUE);
81     }
82     SessionLibrary::get()->closeSession(in_sessionId);
83     return toNdkScopedAStatus(Status::OK);
84 }
85 
getPropertyByteArray(const std::string & in_propertyName,std::vector<uint8_t> * _aidl_return)86 ::ndk::ScopedAStatus DrmPlugin::getPropertyByteArray(const std::string& in_propertyName,
87                                                      std::vector<uint8_t>* _aidl_return) {
88     Status status = Status::OK;
89     std::string name(in_propertyName.c_str());
90     std::vector<uint8_t> value;
91     if (name == "castcert") {
92         std::vector<uint8_t> device_cert = readBinaryFile(CAST_CRT_FILE);
93         std::vector<uint8_t> ica = readBinaryFile(CAST_ICA_FILE);
94         value = std::move(device_cert);
95         value.insert(value.end(), ica.begin(), ica.end());
96     } else {
97         status = Status::ERROR_DRM_CANNOT_HANDLE;
98         ALOGE("Unsupported Property: %s", in_propertyName.c_str());
99     }
100     *_aidl_return = value;
101     return toNdkScopedAStatus(status);
102 }
103 
signRSA(const std::vector<uint8_t> & in_sessionId,const std::string & in_algorithm,const std::vector<uint8_t> & in_message,const std::vector<uint8_t> & in_wrappedkey,std::vector<uint8_t> * _aidl_return)104 ::ndk::ScopedAStatus DrmPlugin::signRSA(const std::vector<uint8_t>& in_sessionId,
105                                           const std::string& in_algorithm,
106                                           const std::vector<uint8_t>& in_message,
107                                           const std::vector<uint8_t>& in_wrappedkey,
108                                           std::vector<uint8_t>* _aidl_return) {
109     if (in_sessionId.size() == 0 || in_message.size() == 0) {
110         return toNdkScopedAStatus(Status::BAD_VALUE);
111     }
112     UNUSED(in_algorithm);
113     UNUSED(in_wrappedkey);
114     Status status = Status::ERROR_DRM_CANNOT_HANDLE;
115     std::vector<uint8_t> signature;
116     *_aidl_return = std::vector<uint8_t>();
117     void* cast_auth_handle = ::dlopen("libcast_auth.so", RTLD_LAZY);
118     if (!cast_auth_handle) {
119         ALOGE("Fail to get TA for signing");
120         return toNdkScopedAStatus(status);
121     }
122     typedef bool (*func_type)(const std::vector<uint8_t>&,
123                               std::vector<uint8_t>*);
124     func_type sign_hash_func =
125         reinterpret_cast<func_type>(::dlsym(cast_auth_handle, "SignHash"));
126     if (!sign_hash_func) {
127         ALOGE("Fail to apply signing method");
128         dlclose(cast_auth_handle);
129         return toNdkScopedAStatus(status);
130     }
131     const std::vector<uint8_t> msg = adjustHash(in_message);
132     int res = sign_hash_func(msg, &signature);
133     dlclose(cast_auth_handle);
134     if (res == 0) {
135         *_aidl_return = signature;
136         return toNdkScopedAStatus(Status::OK);
137     }
138     ALOGE("Get empty result from TA");
139     return toNdkScopedAStatus(status);
140 }
141 
decrypt(const std::vector<uint8_t> & in_sessionId,const std::vector<uint8_t> & in_keyId,const std::vector<uint8_t> & in_input,const std::vector<uint8_t> & in_iv,std::vector<uint8_t> * _aidl_return)142 ::ndk::ScopedAStatus DrmPlugin::decrypt(const std::vector<uint8_t>& in_sessionId,
143                              const std::vector<uint8_t>& in_keyId,
144                              const std::vector<uint8_t>& in_input,
145                              const std::vector<uint8_t>& in_iv,
146                              std::vector<uint8_t>* _aidl_return) {
147     UNUSED(in_sessionId);
148     UNUSED(in_keyId);
149     UNUSED(in_input);
150     UNUSED(in_iv);
151     UNUSED(_aidl_return);
152     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
153 }
154 
encrypt(const std::vector<uint8_t> & in_sessionId,const std::vector<uint8_t> & in_keyId,const std::vector<uint8_t> & in_input,const std::vector<uint8_t> & in_iv,std::vector<uint8_t> * _aidl_return)155 ::ndk::ScopedAStatus DrmPlugin::encrypt(const std::vector<uint8_t>& in_sessionId,
156                              const std::vector<uint8_t>& in_keyId,
157                              const std::vector<uint8_t>& in_input,
158                              const std::vector<uint8_t>& in_iv,
159                              std::vector<uint8_t>* _aidl_return) {
160     UNUSED(in_sessionId);
161     UNUSED(in_keyId);
162     UNUSED(in_input);
163     UNUSED(in_iv);
164     UNUSED(_aidl_return);
165     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
166 }
167 
getHdcpLevels(::aidl::android::hardware::drm::HdcpLevels * _aidl_return)168 ::ndk::ScopedAStatus DrmPlugin::getHdcpLevels(
169     ::aidl::android::hardware::drm::HdcpLevels* _aidl_return) {
170     UNUSED(_aidl_return);
171     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
172 }
173 
getKeyRequest(const std::vector<uint8_t> & in_scope,const std::vector<uint8_t> & in_initData,const std::string & in_mimeType,::aidl::android::hardware::drm::KeyType in_keyType,const std::vector<::aidl::android::hardware::drm::KeyValue> & in_optionalParameters,::aidl::android::hardware::drm::KeyRequest * _aidl_return)174 ::ndk::ScopedAStatus DrmPlugin::getKeyRequest(
175     const std::vector<uint8_t>& in_scope,
176     const std::vector<uint8_t>& in_initData,
177     const std::string& in_mimeType,
178     ::aidl::android::hardware::drm::KeyType in_keyType,
179     const std::vector<::aidl::android::hardware::drm::KeyValue>& in_optionalParameters,
180     ::aidl::android::hardware::drm::KeyRequest* _aidl_return) {
181     UNUSED(in_scope);
182     UNUSED(in_initData);
183     UNUSED(in_mimeType);
184     UNUSED(in_keyType);
185     UNUSED(in_optionalParameters);
186     UNUSED(_aidl_return);
187     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
188 }
189 
getLogMessages(std::vector<::aidl::android::hardware::drm::LogMessage> * _aidl_return)190 ::ndk::ScopedAStatus DrmPlugin::getLogMessages(
191     std::vector<::aidl::android::hardware::drm::LogMessage>* _aidl_return) {
192     UNUSED(_aidl_return);
193     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
194 }
195 
getMetrics(std::vector<::aidl::android::hardware::drm::DrmMetricGroup> * _aidl_return)196 ::ndk::ScopedAStatus DrmPlugin::getMetrics(
197     std::vector<::aidl::android::hardware::drm::DrmMetricGroup>* _aidl_return) {
198     UNUSED(_aidl_return);
199     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
200 }
201 
getNumberOfSessions(::aidl::android::hardware::drm::NumberOfSessions * _aidl_return)202 ::ndk::ScopedAStatus DrmPlugin::getNumberOfSessions(
203     ::aidl::android::hardware::drm::NumberOfSessions* _aidl_return) {
204     UNUSED(_aidl_return);
205     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
206 }
207 
getOfflineLicenseKeySetIds(std::vector<::aidl::android::hardware::drm::KeySetId> * _aidl_return)208 ::ndk::ScopedAStatus DrmPlugin::getOfflineLicenseKeySetIds(
209     std::vector<::aidl::android::hardware::drm::KeySetId>* _aidl_return) {
210     UNUSED(_aidl_return);
211     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
212 }
213 
getOfflineLicenseState(const::aidl::android::hardware::drm::KeySetId & in_keySetId,::aidl::android::hardware::drm::OfflineLicenseState * _aidl_return)214 ::ndk::ScopedAStatus DrmPlugin::getOfflineLicenseState(
215     const ::aidl::android::hardware::drm::KeySetId& in_keySetId,
216     ::aidl::android::hardware::drm::OfflineLicenseState* _aidl_return) {
217     UNUSED(in_keySetId);
218     UNUSED(_aidl_return);
219     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
220 }
221 
getPropertyString(const std::string & in_propertyName,std::string * _aidl_return)222 ::ndk::ScopedAStatus DrmPlugin::getPropertyString(const std::string& in_propertyName,
223                                        std::string* _aidl_return) {
224     UNUSED(in_propertyName);
225     UNUSED(_aidl_return);
226     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
227 }
228 
getProvisionRequest(const std::string & in_certificateType,const std::string & in_certificateAuthority,::aidl::android::hardware::drm::ProvisionRequest * _aidl_return)229 ::ndk::ScopedAStatus DrmPlugin::getProvisionRequest(
230     const std::string& in_certificateType,
231     const std::string& in_certificateAuthority,
232     ::aidl::android::hardware::drm::ProvisionRequest* _aidl_return) {
233     UNUSED(in_certificateType);
234     UNUSED(in_certificateAuthority);
235     UNUSED(_aidl_return);
236     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
237 }
238 
getSecureStop(const::aidl::android::hardware::drm::SecureStopId & in_secureStopId,::aidl::android::hardware::drm::SecureStop * _aidl_return)239 ::ndk::ScopedAStatus DrmPlugin::getSecureStop(
240     const ::aidl::android::hardware::drm::SecureStopId& in_secureStopId,
241     ::aidl::android::hardware::drm::SecureStop* _aidl_return) {
242     UNUSED(in_secureStopId);
243     UNUSED(_aidl_return);
244     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
245 }
246 
getSecureStopIds(std::vector<::aidl::android::hardware::drm::SecureStopId> * _aidl_return)247 ::ndk::ScopedAStatus DrmPlugin::getSecureStopIds(
248     std::vector<::aidl::android::hardware::drm::SecureStopId>* _aidl_return) {
249     UNUSED(_aidl_return);
250     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
251 }
252 
getSecureStops(std::vector<::aidl::android::hardware::drm::SecureStop> * _aidl_return)253 ::ndk::ScopedAStatus DrmPlugin::getSecureStops(
254     std::vector<::aidl::android::hardware::drm::SecureStop>* _aidl_return) {
255     UNUSED(_aidl_return);
256     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
257 }
258 
getSecurityLevel(const std::vector<uint8_t> & in_sessionId,::aidl::android::hardware::drm::SecurityLevel * _aidl_return)259 ::ndk::ScopedAStatus DrmPlugin::getSecurityLevel(
260     const std::vector<uint8_t>& in_sessionId,
261     ::aidl::android::hardware::drm::SecurityLevel* _aidl_return) {
262     UNUSED(in_sessionId);
263     UNUSED(_aidl_return);
264     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
265 }
266 
provideKeyResponse(const std::vector<uint8_t> & in_scope,const std::vector<uint8_t> & in_response,::aidl::android::hardware::drm::KeySetId * _aidl_return)267 ::ndk::ScopedAStatus DrmPlugin::provideKeyResponse(
268     const std::vector<uint8_t>& in_scope,
269     const std::vector<uint8_t>& in_response,
270     ::aidl::android::hardware::drm::KeySetId* _aidl_return) {
271     UNUSED(in_scope);
272     UNUSED(in_response);
273     UNUSED(_aidl_return);
274     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
275 }
276 
provideProvisionResponse(const std::vector<uint8_t> & in_response,::aidl::android::hardware::drm::ProvideProvisionResponseResult * _aidl_return)277 ::ndk::ScopedAStatus DrmPlugin::provideProvisionResponse(
278     const std::vector<uint8_t>& in_response,
279     ::aidl::android::hardware::drm::ProvideProvisionResponseResult* _aidl_return) {
280     UNUSED(in_response);
281     UNUSED(_aidl_return);
282     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
283 }
284 
queryKeyStatus(const std::vector<uint8_t> & in_sessionId,std::vector<::aidl::android::hardware::drm::KeyValue> * _aidl_return)285 ::ndk::ScopedAStatus DrmPlugin::queryKeyStatus(
286     const std::vector<uint8_t>& in_sessionId,
287     std::vector<::aidl::android::hardware::drm::KeyValue>* _aidl_return) {
288     UNUSED(in_sessionId);
289     UNUSED(_aidl_return);
290     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
291 }
292 
releaseAllSecureStops()293 ::ndk::ScopedAStatus DrmPlugin::releaseAllSecureStops() {
294     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
295 }
296 
releaseSecureStop(const::aidl::android::hardware::drm::SecureStopId & in_secureStopId)297 ::ndk::ScopedAStatus DrmPlugin::releaseSecureStop(
298     const ::aidl::android::hardware::drm::SecureStopId& in_secureStopId) {
299     UNUSED(in_secureStopId);
300     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
301 }
302 
releaseSecureStops(const::aidl::android::hardware::drm::OpaqueData & in_ssRelease)303 ::ndk::ScopedAStatus DrmPlugin::releaseSecureStops(
304     const ::aidl::android::hardware::drm::OpaqueData& in_ssRelease) {
305     UNUSED(in_ssRelease);
306     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
307 }
308 
removeAllSecureStops()309 ::ndk::ScopedAStatus DrmPlugin::removeAllSecureStops() {
310     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
311 }
312 
removeKeys(const std::vector<uint8_t> & in_sessionId)313 ::ndk::ScopedAStatus DrmPlugin::removeKeys(const std::vector<uint8_t>& in_sessionId) {
314     UNUSED(in_sessionId);
315     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
316 }
317 
removeOfflineLicense(const::aidl::android::hardware::drm::KeySetId & in_keySetId)318 ::ndk::ScopedAStatus DrmPlugin::removeOfflineLicense(
319     const ::aidl::android::hardware::drm::KeySetId& in_keySetId) {
320     UNUSED(in_keySetId);
321     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
322 }
323 
removeSecureStop(const::aidl::android::hardware::drm::SecureStopId & in_secureStopId)324 ::ndk::ScopedAStatus DrmPlugin::removeSecureStop(
325     const ::aidl::android::hardware::drm::SecureStopId& in_secureStopId) {
326     UNUSED(in_secureStopId);
327     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
328 }
329 
requiresSecureDecoder(const std::string & in_mime,::aidl::android::hardware::drm::SecurityLevel in_level,bool * _aidl_return)330 ::ndk::ScopedAStatus DrmPlugin::requiresSecureDecoder(
331     const std::string& in_mime,
332     ::aidl::android::hardware::drm::SecurityLevel in_level,
333     bool* _aidl_return) {
334     UNUSED(in_mime);
335     UNUSED(in_level);
336     UNUSED(_aidl_return);
337     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
338 }
339 
restoreKeys(const std::vector<uint8_t> & in_sessionId,const::aidl::android::hardware::drm::KeySetId & in_keySetId)340 ::ndk::ScopedAStatus DrmPlugin::restoreKeys(
341     const std::vector<uint8_t>& in_sessionId,
342     const ::aidl::android::hardware::drm::KeySetId& in_keySetId) {
343     UNUSED(in_sessionId);
344     UNUSED(in_keySetId);
345     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
346 }
347 
setCipherAlgorithm(const std::vector<uint8_t> & in_sessionId,const std::string & in_algorithm)348 ::ndk::ScopedAStatus DrmPlugin::setCipherAlgorithm(const std::vector<uint8_t>& in_sessionId,
349                                         const std::string& in_algorithm) {
350     UNUSED(in_sessionId);
351     UNUSED(in_algorithm);
352     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
353 }
354 
setListener(const std::shared_ptr<::aidl::android::hardware::drm::IDrmPluginListener> & in_listener)355 ::ndk::ScopedAStatus DrmPlugin::setListener(
356      const std::shared_ptr<::aidl::android::hardware::drm::IDrmPluginListener>&
357          in_listener) {
358     UNUSED(in_listener);
359     return toNdkScopedAStatus(Status::OK);
360 }
361 
setMacAlgorithm(const std::vector<uint8_t> & in_sessionId,const std::string & in_algorithm)362 ::ndk::ScopedAStatus DrmPlugin::setMacAlgorithm(const std::vector<uint8_t>& in_sessionId,
363                                      const std::string& in_algorithm) {
364     UNUSED(in_sessionId);
365     UNUSED(in_algorithm);
366     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
367 }
368 
setPlaybackId(const std::vector<uint8_t> & in_sessionId,const std::string & in_playbackId)369 ::ndk::ScopedAStatus DrmPlugin::setPlaybackId(const std::vector<uint8_t>& in_sessionId,
370                                    const std::string& in_playbackId) {
371     UNUSED(in_sessionId);
372     UNUSED(in_playbackId);
373     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
374 }
375 
setPropertyByteArray(const std::string & in_propertyName,const std::vector<uint8_t> & in_value)376 ::ndk::ScopedAStatus DrmPlugin::setPropertyByteArray(const std::string& in_propertyName,
377                                           const std::vector<uint8_t>& in_value) {
378     UNUSED(in_propertyName);
379     UNUSED(in_value);
380     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
381 }
382 
setPropertyString(const std::string & in_propertyName,const std::string & in_value)383 ::ndk::ScopedAStatus DrmPlugin::setPropertyString(const std::string& in_propertyName,
384                                        const std::string& in_value) {
385     UNUSED(in_propertyName);
386     UNUSED(in_value);
387     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
388 }
389 
sign(const std::vector<uint8_t> & in_sessionId,const std::vector<uint8_t> & in_keyId,const std::vector<uint8_t> & in_message,std::vector<uint8_t> * _aidl_return)390 ::ndk::ScopedAStatus DrmPlugin::sign(const std::vector<uint8_t>& in_sessionId,
391                           const std::vector<uint8_t>& in_keyId,
392                           const std::vector<uint8_t>& in_message,
393                           std::vector<uint8_t>* _aidl_return) {
394     UNUSED(in_sessionId);
395     UNUSED(in_keyId);
396     UNUSED(in_message);
397     UNUSED(_aidl_return);
398     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
399 }
400 
verify(const std::vector<uint8_t> & in_sessionId,const std::vector<uint8_t> & in_keyId,const std::vector<uint8_t> & in_message,const std::vector<uint8_t> & in_signature,bool * _aidl_return)401 ::ndk::ScopedAStatus DrmPlugin::verify(const std::vector<uint8_t>& in_sessionId,
402                             const std::vector<uint8_t>& in_keyId,
403                             const std::vector<uint8_t>& in_message,
404                             const std::vector<uint8_t>& in_signature,
405                             bool* _aidl_return) {
406     UNUSED(in_sessionId);
407     UNUSED(in_keyId);
408     UNUSED(in_message);
409     UNUSED(in_signature);
410     UNUSED(_aidl_return);
411     return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
412 }
413 
414 
415 }  // namespace castkey
416 }  // namespace drm
417 }  // namespace hardware
418 }  // namespace android
419 }  // namespace aidl
420