| | 703 | case OPS_PTAG_SS_PRIMARY_USER_ID: |
|---|
| | 704 | if (!ops_limited_read (&bool, 1, &subregion, opt)) |
|---|
| | 705 | return 0; |
|---|
| | 706 | C.ss_primary_user_id.primary_user_id = !!bool; |
|---|
| | 707 | break; |
|---|
| | 708 | |
|---|
| | 709 | case OPS_PTAG_SS_REVOCATION_KEY: |
|---|
| | 710 | printf ("Sizeof struct is %d\n", sizeof (ops_ss_revocation_key_t)); |
|---|
| | 711 | |
|---|
| | 712 | /* octet 0 = class. Bit 0x80 must be set */ |
|---|
| | 713 | if (!ops_limited_read (&C.ss_revocation_key.class, 1, &subregion, opt)) |
|---|
| | 714 | return 0; |
|---|
| | 715 | if (!(C.ss_revocation_key.class & 0x80)) |
|---|
| | 716 | { |
|---|
| | 717 | printf |
|---|
| | 718 | ("Warning: OPS_PTAG_SS_REVOCATION_KEY class: Bit 0x80 should be set\n"); |
|---|
| | 719 | return 0; |
|---|
| | 720 | } |
|---|
| | 721 | |
|---|
| | 722 | /* octet 1 = algid */ |
|---|
| | 723 | if (!ops_limited_read (&C.ss_revocation_key.algid, 1, &subregion, opt)) |
|---|
| | 724 | return 0; |
|---|
| | 725 | |
|---|
| | 726 | /* octets 2-21 = fingerprint */ |
|---|
| | 727 | if (!ops_limited_read |
|---|
| | 728 | ((unsigned char *) &C.ss_revocation_key.fingerprint, 20, &subregion, |
|---|
| | 729 | opt)) |
|---|
| | 730 | return 0; |
|---|
| | 731 | break; |
|---|
| | 732 | |
|---|