hx509: Make various functions used by Samba public.

* hx509_cert_public_encrypt
* hx509_parse_private_key
* hx509_private_key_assign_rsa
* hx509_private_key_free
* hx509_private_key_private_decrypt
* hx509_private_key_init
* hx509_private_key2SPKI
* hx509_request_get_name
* hx509_request_get_SubjectPublicKeyInfo
* hx509_request_free
* hx509_request_init
* hx509_request_set_name
* hx509_request_set_SubjectPublicKeyInfo

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
This commit is contained in:
Jelmer Vernooij
2011-02-21 18:50:50 +01:00
committed by Love Hornquist Astrand
parent 6ee82593ec
commit 36ade8b509
11 changed files with 68 additions and 68 deletions

View File

@@ -46,7 +46,7 @@ struct hx509_request_data {
*/
int
_hx509_request_init(hx509_context context, hx509_request *req)
hx509_request_init(hx509_context context, hx509_request *req)
{
*req = calloc(1, sizeof(**req));
if (*req == NULL)
@@ -56,7 +56,7 @@ _hx509_request_init(hx509_context context, hx509_request *req)
}
void
_hx509_request_free(hx509_request *req)
hx509_request_free(hx509_request *req)
{
if ((*req)->name)
hx509_name_free(&(*req)->name);
@@ -69,7 +69,7 @@ _hx509_request_free(hx509_request *req)
}
int
_hx509_request_set_name(hx509_context context,
hx509_request_set_name(hx509_context context,
hx509_request req,
hx509_name name)
{
@@ -84,7 +84,7 @@ _hx509_request_set_name(hx509_context context,
}
int
_hx509_request_get_name(hx509_context context,
hx509_request_get_name(hx509_context context,
hx509_request req,
hx509_name *name)
{
@@ -96,7 +96,7 @@ _hx509_request_get_name(hx509_context context,
}
int
_hx509_request_set_SubjectPublicKeyInfo(hx509_context context,
hx509_request_set_SubjectPublicKeyInfo(hx509_context context,
hx509_request req,
const SubjectPublicKeyInfo *key)
{
@@ -105,7 +105,7 @@ _hx509_request_set_SubjectPublicKeyInfo(hx509_context context,
}
int
_hx509_request_get_SubjectPublicKeyInfo(hx509_context context,
hx509_request_get_SubjectPublicKeyInfo(hx509_context context,
hx509_request req,
SubjectPublicKeyInfo *key)
{
@@ -271,7 +271,7 @@ _hx509_request_parse(hx509_context context,
return ret;
}
ret = _hx509_request_init(context, req);
ret = hx509_request_init(context, req);
if (ret) {
free_CertificationRequest(&r);
return ret;
@@ -279,25 +279,25 @@ _hx509_request_parse(hx509_context context,
rinfo = &r.certificationRequestInfo;
ret = _hx509_request_set_SubjectPublicKeyInfo(context, *req,
ret = hx509_request_set_SubjectPublicKeyInfo(context, *req,
&rinfo->subjectPKInfo);
if (ret) {
free_CertificationRequest(&r);
_hx509_request_free(req);
hx509_request_free(req);
return ret;
}
ret = _hx509_name_from_Name(&rinfo->subject, &subject);
if (ret) {
free_CertificationRequest(&r);
_hx509_request_free(req);
hx509_request_free(req);
return ret;
}
ret = _hx509_request_set_name(context, *req, subject);
ret = hx509_request_set_name(context, *req, subject);
hx509_name_free(&subject);
free_CertificationRequest(&r);
if (ret) {
_hx509_request_free(req);
hx509_request_free(req);
return ret;
}