Skip to content

Commit e7b760a

Browse files
committed
Revert "rpc: Correctly map Mozilla certificate distrust attributes"
This reverts commit 5a84304, which broke RPC compatibility with the existing servers. Ideally, this should be conditionalized by the negotiated protocol version, though that wouldn't be straightforward as this is a low level function. Signed-off-by: Daiki Ueno <ueno@gnu.org>
1 parent 40dfd50 commit e7b760a

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

p11-kit/rpc-message.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -828,8 +828,6 @@ map_attribute_to_value_type (CK_ATTRIBUTE_TYPE type)
828828
case CKA_IBM_USE_AS_DATA:
829829
case CKA_IBM_PROTKEY_EXTRACTABLE:
830830
case CKA_IBM_PROTKEY_NEVER_EXTRACTABLE:
831-
case CKA_NSS_MOZILLA_CA_POLICY:
832-
case CKA_X_DISTRUSTED:
833831
return P11_RPC_VALUE_BYTE;
834832
case CKA_CLASS:
835833
case CKA_CERTIFICATE_TYPE:
@@ -866,6 +864,10 @@ map_attribute_to_value_type (CK_ATTRIBUTE_TYPE type)
866864
case CKA_START_DATE:
867865
case CKA_END_DATE:
868866
return P11_RPC_VALUE_DATE;
867+
default:
868+
p11_debug ("cannot determine the type of attribute value for %lu; assuming byte array",
869+
type);
870+
/* fallthrough */
869871
case CKA_LABEL:
870872
case CKA_APPLICATION:
871873
case CKA_VALUE:
@@ -889,7 +891,6 @@ map_attribute_to_value_type (CK_ATTRIBUTE_TYPE type)
889891
case CKA_EXPONENT_1:
890892
case CKA_EXPONENT_2:
891893
case CKA_COEFFICIENT:
892-
case CKA_PUBLIC_KEY_INFO:
893894
case CKA_PRIME:
894895
case CKA_SUBPRIME:
895896
case CKA_BASE:
@@ -920,12 +921,6 @@ map_attribute_to_value_type (CK_ATTRIBUTE_TYPE type)
920921
case CKA_IBM_KYBER_MODE:
921922
case CKA_IBM_KYBER_PK:
922923
case CKA_IBM_KYBER_SK:
923-
case CKA_NSS_SERVER_DISTRUST_AFTER: /* timestamp from Unix epoch, encoded in DER */
924-
case CKA_NSS_EMAIL_DISTRUST_AFTER: /* timestamp from Unix epoch, encoded in DER */
925-
return P11_RPC_VALUE_BYTE_ARRAY;
926-
default:
927-
p11_debug ("cannot determine the type of attribute value for %lu; assuming byte array",
928-
type);
929924
return P11_RPC_VALUE_BYTE_ARRAY;
930925
}
931926
}

0 commit comments

Comments
 (0)