| 424 | } |
| 425 | |
| 426 | ElectronicKeySegmentFormat GetPathLogicalSegmentElectronicKeyFormat( |
| 427 | const unsigned char *const cip_path) { |
| 428 | /* OPENER_ASSERT(kLogicalSegmentSpecialTypeLogicalFormatElectronicKey == |
| 429 | GetPathLogicalSegmentSpecialTypeLogicalType(cip_path), "Not an electronic key!\n") */ |
| 430 | OPENER_ASSERT( kLogicalSegmentSpecialTypeLogicalFormatElectronicKey == |
| 431 | GetPathLogicalSegmentSpecialTypeLogicalType(cip_path) ) |
| 432 | ElectronicKeySegmentFormat result = kElectronicKeySegmentFormatReserved; |
| 433 | switch( *(cip_path + 1) ) { |
| 434 | case ELECTRONIC_KEY_SEGMENT_KEY_FORMAT_4: result = |
| 435 | kElectronicKeySegmentFormatKeyFormat4; break; |
| 436 | default: result = kElectronicKeySegmentFormatReserved; break; |
| 437 | } |
| 438 | return result; |
| 439 | } |
| 440 | |
| 441 | void GetElectronicKeyFormat4FromMessage( |
| 442 | const CipOctet **const message, |