mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-06 00:00:47 -04:00
Remove external build_encoding method in PKCS#9
This commit is contained in:
parent
0080daa787
commit
f0c02e27c4
@ -145,8 +145,10 @@ static attribute_t *attribute_create(int oid, chunk_t value)
|
||||
return this;
|
||||
}
|
||||
|
||||
METHOD(pkcs9_t, build_encoding, void,
|
||||
private_pkcs9_t *this)
|
||||
/**
|
||||
* Build encoding of the attribute list
|
||||
*/
|
||||
static void build_encoding(private_pkcs9_t *this)
|
||||
{
|
||||
enumerator_t *enumerator;
|
||||
attribute_t *attribute;
|
||||
@ -188,7 +190,7 @@ METHOD(pkcs9_t, build_encoding, void,
|
||||
METHOD(pkcs9_t, get_encoding, chunk_t,
|
||||
private_pkcs9_t *this)
|
||||
{
|
||||
if (this->encoding.ptr == NULL)
|
||||
if (!this->encoding.len)
|
||||
{
|
||||
build_encoding(this);
|
||||
}
|
||||
@ -255,7 +257,6 @@ static private_pkcs9_t *pkcs9_create_empty(void)
|
||||
|
||||
INIT(this,
|
||||
.public = {
|
||||
.build_encoding = _build_encoding,
|
||||
.get_encoding = _get_encoding,
|
||||
.get_attribute = _get_attribute,
|
||||
.set_attribute = _set_attribute,
|
||||
|
@ -31,11 +31,6 @@ typedef struct pkcs9_t pkcs9_t;
|
||||
*/
|
||||
struct pkcs9_t {
|
||||
|
||||
/**
|
||||
* Generate ASN.1 encoding of attribute list
|
||||
*/
|
||||
void (*build_encoding) (pkcs9_t *this);
|
||||
|
||||
/**
|
||||
* Gets ASN.1 encoding of PKCS#9 attribute list
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user