Skip to content

Commit 01c3bf0

Browse files
committed
Build fix for opaque ASN1_STRING
Updates #631
1 parent 8e391f4 commit 01c3bf0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/p11_ec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ static int pkcs11_get_point(EC_KEY *ec, PKCS11_OBJECT_private *key, CK_SESSION_H
279279
a = point;
280280
os = d2i_ASN1_OCTET_STRING(NULL, &a, (long)point_len);
281281
if (os) {
282-
a = os->data;
283-
rv = o2i_ECPublicKey(&ec, &a, os->length) == NULL;
282+
a = ASN1_STRING_get0_data(os);
283+
rv = o2i_ECPublicKey(&ec, &a, ASN1_STRING_length(os)) == NULL;
284284
ASN1_STRING_free(os);
285285
}
286286
if (rv) { /* Workaround for broken PKCS#11 modules */

0 commit comments

Comments
 (0)