Commit 1931bc1 1 parent 256187a commit 1931bc1 Copy full SHA for 1931bc1
File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -6332,9 +6332,14 @@ static int read_object(CK_SESSION_HANDLE session)
6332
6332
6333
6333
value = getEC_POINT (session , obj , & len );
6334
6334
/* PKCS#11-compliant modules should return ASN1_OCTET_STRING */
6335
- /* TODO DEE Should be returned encoded in BIT STRING, Need to accept both */
6335
+ /* DEE Should be returned encoded in BIT STRING, Need to accept both */
6336
6336
a = value ;
6337
6337
os = d2i_ASN1_OCTET_STRING (NULL , & a , (long )len );
6338
+ if (!os ) {
6339
+ os = d2i_ASN1_BIT_STRING (NULL , & a , (long )& len );
6340
+ len = (len + 7 ) / 8 ;
6341
+ }
6342
+
6338
6343
#if OPENSSL_VERSION_NUMBER < 0x30000000L
6339
6344
group = EC_KEY_get0_group (EVP_PKEY_get0_EC_KEY (pkey ));
6340
6345
#else
@@ -6439,7 +6444,7 @@ static int read_object(CK_SESSION_HANDLE session)
6439
6444
6440
6445
value = getEC_POINT (session , obj , & len );
6441
6446
/* PKCS#11-compliant modules should return ASN1_OCTET_STRING */
6442
- /* TODO DEE should be in BIT STRING accept both */
6447
+ /* DEE should be in BIT STRING accept both */
6443
6448
a = value ;
6444
6449
os = d2i_ASN1_OCTET_STRING (NULL , & a , (long )len );
6445
6450
if (!os ) {
You can’t perform that action at this time.
0 commit comments