drop extra wrapping of p11_init

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16466 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-01-04 06:41:58 +00:00
parent de88a56ec8
commit 03838a117c

View File

@@ -168,7 +168,8 @@ p11_rsa_private_decrypt(int flen, const unsigned char *from, unsigned char *to,
}
ret = P11FUNC(p11rsa->p, Decrypt,
(P11SESSION(p11rsa->slot), (CK_BYTE *)from, flen, to, &ck_sigsize));
(P11SESSION(p11rsa->slot), (CK_BYTE *)from,
flen, to, &ck_sigsize));
if (ret != CKR_OK)
return -1;
@@ -565,13 +566,14 @@ out:
static int
p11_init_module(const char *fn, hx509_lock lock, struct p11_module **module)
p11_init(hx509_certs certs, void **data, int flags,
const char *residue, hx509_lock lock)
{
CK_C_GetFunctionList getFuncs;
struct p11_module *p;
int ret;
*module = NULL;
*data = NULL;
p = calloc(1, sizeof(*p));
if (p == NULL)
@@ -579,7 +581,7 @@ p11_init_module(const char *fn, hx509_lock lock, struct p11_module **module)
p->selected_slot = 0;
p->dl_handle = dlopen(fn, RTLD_NOW);
p->dl_handle = dlopen(residue, RTLD_NOW);
if (p->dl_handle == NULL) {
ret = EINVAL; /* XXX */
goto out;
@@ -640,7 +642,7 @@ p11_init_module(const char *fn, hx509_lock lock, struct p11_module **module)
}
p->refcount += 1;
*module = p;
*data = p;
return 0;
out:
@@ -650,21 +652,6 @@ p11_init_module(const char *fn, hx509_lock lock, struct p11_module **module)
return ret;
}
static int
p11_init(hx509_certs certs, void **data, int flags,
const char *residue, hx509_lock lock)
{
struct p11_module *p;
int ret;
ret = p11_init_module(residue, lock, &p);
if (ret)
return ret;
*data = p;
return 0;
}
static void
p11_release_module(struct p11_module *p)
{