Skip to content

Commit bd33281

Browse files
committed
Respect const X509_get_*_name() return value
1 parent 01c3bf0 commit bd33281

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/libp11-int.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,13 @@ typedef struct pkcs11_template_st {
197197
CK_ATTRIBUTE attrs[32];
198198
} PKCS11_TEMPLATE;
199199

200-
typedef int (*pkcs11_i2d_fn) (void *, unsigned char **);
200+
typedef int (*pkcs11_i2d_fn) (const void *, unsigned char **);
201201
extern unsigned int pkcs11_addattr(PKCS11_TEMPLATE *, int, void *, size_t);
202202
#define pkcs11_addattr_var(_tmpl, _type, _var) pkcs11_addattr(_tmpl, _type, &(_var), sizeof(_var))
203203
extern void pkcs11_addattr_bool(PKCS11_TEMPLATE *, int, int);
204204
extern void pkcs11_addattr_s(PKCS11_TEMPLATE *, int, const char *);
205205
extern void pkcs11_addattr_bn(PKCS11_TEMPLATE *, int, const BIGNUM *);
206-
extern void pkcs11_addattr_obj(PKCS11_TEMPLATE *, int, pkcs11_i2d_fn, void *);
206+
extern void pkcs11_addattr_obj(PKCS11_TEMPLATE *, int, pkcs11_i2d_fn, const void *);
207207
extern void pkcs11_zap_attrs(PKCS11_TEMPLATE *);
208208

209209
/* Internal implementation of current features */

src/p11_attr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void pkcs11_addattr_bn(PKCS11_TEMPLATE *tmpl, int type, const BIGNUM *bn)
145145
}
146146
}
147147

148-
void pkcs11_addattr_obj(PKCS11_TEMPLATE *tmpl, int type, pkcs11_i2d_fn enc, void *obj)
148+
void pkcs11_addattr_obj(PKCS11_TEMPLATE *tmpl, int type, pkcs11_i2d_fn enc, const void *obj)
149149
{
150150
unsigned char *buf, *p;
151151
unsigned int i;

0 commit comments

Comments
 (0)