Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: ppapi/api/private/pp_content_decryptor.idl

Issue 2514123004: Fix range checking for PP_CdmKeyStatus (Closed)
Patch Set: more _MAX values Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ppapi/c/private/pp_content_decryptor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 5
6 /** 6 /**
7 * The <code>PP_DecryptTrackingInfo</code> struct contains necessary information 7 * The <code>PP_DecryptTrackingInfo</code> struct contains necessary information
8 * that can be used to associate the decrypted block with a decrypt request 8 * that can be used to associate the decrypted block with a decrypt request
9 * and/or an input block. 9 * and/or an input block.
10 */ 10 */
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 */ 395 */
396 uint32_t request_id; 396 uint32_t request_id;
397 }; 397 };
398 398
399 /** 399 /**
400 * <code>PP_DecryptorStreamType</code> contains stream type constants. 400 * <code>PP_DecryptorStreamType</code> contains stream type constants.
401 */ 401 */
402 [assert_size(4)] 402 [assert_size(4)]
403 enum PP_DecryptorStreamType { 403 enum PP_DecryptorStreamType {
404 PP_DECRYPTORSTREAMTYPE_AUDIO = 0, 404 PP_DECRYPTORSTREAMTYPE_AUDIO = 0,
405 PP_DECRYPTORSTREAMTYPE_VIDEO = 1 405 PP_DECRYPTORSTREAMTYPE_VIDEO = 1,
406 PP_DECRYPTORSTREAMTYPE_MAX = PP_DECRYPTORSTREAMTYPE_VIDEO
406 }; 407 };
407 408
408 /** 409 /**
409 * <code>PP_SessionType</code> contains session type constants. 410 * <code>PP_SessionType</code> contains session type constants.
410 */ 411 */
411 [assert_size(4)] 412 [assert_size(4)]
412 enum PP_SessionType { 413 enum PP_SessionType {
413 PP_SESSIONTYPE_TEMPORARY = 0, 414 PP_SESSIONTYPE_TEMPORARY = 0,
414 PP_SESSIONTYPE_PERSISTENT_LICENSE = 1, 415 PP_SESSIONTYPE_PERSISTENT_LICENSE = 1,
415 PP_SESSIONTYPE_PERSISTENT_RELEASE = 2 416 PP_SESSIONTYPE_PERSISTENT_RELEASE = 2,
417 PP_SESSIONTYPE_MAX = PP_SESSIONTYPE_PERSISTENT_RELEASE
416 }; 418 };
417 419
418 /** 420 /**
419 * <code>PP_InitDataType</code> contains Initialization Data Type constants. 421 * <code>PP_InitDataType</code> contains Initialization Data Type constants.
420 */ 422 */
421 [assert_size(4)] 423 [assert_size(4)]
422 enum PP_InitDataType { 424 enum PP_InitDataType {
423 PP_INITDATATYPE_CENC = 0, 425 PP_INITDATATYPE_CENC = 0,
424 PP_INITDATATYPE_KEYIDS = 1, 426 PP_INITDATATYPE_KEYIDS = 1,
425 PP_INITDATATYPE_WEBM = 2 427 PP_INITDATATYPE_WEBM = 2,
428 PP_INITDATATYPE_MAX = PP_INITDATATYPE_WEBM
426 }; 429 };
427 430
428 /** 431 /**
429 * <code>PP_CdmExceptionCode</code> contains exception code constants. 432 * <code>PP_CdmExceptionCode</code> contains exception code constants.
430 */ 433 */
431 [assert_size(4)] 434 [assert_size(4)]
432 enum PP_CdmExceptionCode { 435 enum PP_CdmExceptionCode {
433 PP_CDMEXCEPTIONCODE_NOTSUPPORTEDERROR = 1, 436 PP_CDMEXCEPTIONCODE_NOTSUPPORTEDERROR = 1,
434 PP_CDMEXCEPTIONCODE_INVALIDSTATEERROR = 2, 437 PP_CDMEXCEPTIONCODE_INVALIDSTATEERROR = 2,
435 PP_CDMEXCEPTIONCODE_INVALIDACCESSERROR = 3, 438 PP_CDMEXCEPTIONCODE_INVALIDACCESSERROR = 3,
436 PP_CDMEXCEPTIONCODE_QUOTAEXCEEDEDERROR = 4, 439 PP_CDMEXCEPTIONCODE_QUOTAEXCEEDEDERROR = 4,
437 PP_CDMEXCEPTIONCODE_UNKNOWNERROR = 5, 440 PP_CDMEXCEPTIONCODE_UNKNOWNERROR = 5,
438 PP_CDMEXCEPTIONCODE_CLIENTERROR = 6, 441 PP_CDMEXCEPTIONCODE_CLIENTERROR = 6,
439 PP_CDMEXCEPTIONCODE_OUTPUTERROR = 7 442 PP_CDMEXCEPTIONCODE_OUTPUTERROR = 7,
443 PP_CDMEXCEPTIONCODE_MAX = PP_CDMEXCEPTIONCODE_OUTPUTERROR
440 }; 444 };
441 445
442 /** 446 /**
443 * <code>PP_CdmMessageType</code> contains message type constants. 447 * <code>PP_CdmMessageType</code> contains message type constants.
444 */ 448 */
445 [assert_size(4)] 449 [assert_size(4)]
446 enum PP_CdmMessageType { 450 enum PP_CdmMessageType {
447 PP_CDMMESSAGETYPE_LICENSE_REQUEST = 0, 451 PP_CDMMESSAGETYPE_LICENSE_REQUEST = 0,
448 PP_CDMMESSAGETYPE_LICENSE_RENEWAL = 1, 452 PP_CDMMESSAGETYPE_LICENSE_RENEWAL = 1,
449 PP_CDMMESSAGETYPE_LICENSE_RELEASE = 2 453 PP_CDMMESSAGETYPE_LICENSE_RELEASE = 2,
454 PP_CDMMESSAGETYPE_MAX = PP_CDMMESSAGETYPE_LICENSE_RELEASE
450 }; 455 };
451 456
452 /** 457 /**
453 * <code>PP_CdmKeyStatus</code> contains key status constants. 458 * <code>PP_CdmKeyStatus</code> contains key status constants.
454 */ 459 */
455 [assert_size(4)] 460 [assert_size(4)]
456 enum PP_CdmKeyStatus { 461 enum PP_CdmKeyStatus {
457 PP_CDMKEYSTATUS_USABLE = 0, 462 PP_CDMKEYSTATUS_USABLE = 0,
458 PP_CDMKEYSTATUS_INVALID = 1, 463 PP_CDMKEYSTATUS_INVALID = 1,
459 PP_CDMKEYSTATUS_EXPIRED = 2, 464 PP_CDMKEYSTATUS_EXPIRED = 2,
460 PP_CDMKEYSTATUS_OUTPUTRESTRICTED = 3, 465 PP_CDMKEYSTATUS_OUTPUTRESTRICTED = 3,
461 PP_CDMKEYSTATUS_OUTPUTDOWNSCALED = 4, 466 PP_CDMKEYSTATUS_OUTPUTDOWNSCALED = 4,
462 PP_CDMKEYSTATUS_STATUSPENDING = 5, 467 PP_CDMKEYSTATUS_STATUSPENDING = 5,
463 PP_CDMKEYSTATUS_RELEASED = 6 468 PP_CDMKEYSTATUS_RELEASED = 6,
469 PP_CDMKEYSTATUS_MAX = PP_CDMKEYSTATUS_RELEASED
464 }; 470 };
465 471
466 /** 472 /**
467 * The <code>PP_KeyInformation</code> struct contains information about a 473 * The <code>PP_KeyInformation</code> struct contains information about a
468 * key used for decryption. 474 * key used for decryption.
469 */ 475 */
470 [assert_size(524)] 476 [assert_size(524)]
471 struct PP_KeyInformation { 477 struct PP_KeyInformation {
472 /** 478 /**
473 * Key ID. 479 * Key ID.
474 */ 480 */
475 uint8_t[512] key_id; 481 uint8_t[512] key_id;
476 uint32_t key_id_size; 482 uint32_t key_id_size;
477 483
478 /** 484 /**
479 * Status of this key. 485 * Status of this key.
480 */ 486 */
481 PP_CdmKeyStatus key_status; 487 PP_CdmKeyStatus key_status;
482 488
483 /** 489 /**
484 * Optional error code for keys that are not usable. 490 * Optional error code for keys that are not usable.
485 */ 491 */
486 uint32_t system_code; 492 uint32_t system_code;
487 }; 493 };
OLDNEW
« no previous file with comments | « no previous file | ppapi/c/private/pp_content_decryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698