return FALSE;
}
pubkeydata = asn1_wrap(ASN1_SEQUENCE, "mm",
- asn1_wrap(ASN1_INTEGER, "c", n),
- asn1_wrap(ASN1_INTEGER, "c", e));
+ asn1_integer("c", n),
+ asn1_integer("c", e));
hasher->allocate_hash(hasher, pubkeydata, &hash);
free(pubkeydata.ptr);
id = pubkey->get_id(pubkey, ID_PUBKEY_SHA1);
e = read_string(&key);
n = read_string(&key);
encoded = asn1_wrap(ASN1_SEQUENCE, "mm",
- asn1_wrap(ASN1_INTEGER, "c", n),
- asn1_wrap(ASN1_INTEGER, "c", e));
+ asn1_integer("c", n),
+ asn1_integer("c", e));
public = lib->creds->create(lib->creds, CRED_PUBLIC_KEY, KEY_RSA,
BUILD_BLOB_ASN1_DER, encoded, BUILD_END);
return FALSE;
}
publicKey = asn1_wrap(ASN1_SEQUENCE, "mm",
- asn1_wrap(ASN1_INTEGER, "c", n),
- asn1_wrap(ASN1_INTEGER, "c", e));
+ asn1_integer("c", n),
+ asn1_integer("c", e));
hasher->allocate_hash(hasher, publicKey, &hash);
this->keyid = identification_create_from_encoding(ID_PUBKEY_SHA1, hash);
chunk_free(&hash);
}
return asn1_wrap(ASN1_SEQUENCE, "cmmmmmmmm", ASN1_INTEGER_0,
- asn1_wrap(ASN1_INTEGER, "m", gcrypt_rsa_find_token(this->key, "n")),
- asn1_wrap(ASN1_INTEGER, "m", gcrypt_rsa_find_token(this->key, "e")),
- asn1_wrap(ASN1_INTEGER, "m", cd),
- asn1_wrap(ASN1_INTEGER, "m", cp),
- asn1_wrap(ASN1_INTEGER, "m", cq),
- asn1_wrap(ASN1_INTEGER, "m", cexp1),
- asn1_wrap(ASN1_INTEGER, "m", cexp2),
- asn1_wrap(ASN1_INTEGER, "m", gcrypt_rsa_find_token(this->key, "u")));
+ asn1_integer("m", gcrypt_rsa_find_token(this->key, "n")),
+ asn1_integer("m", gcrypt_rsa_find_token(this->key, "e")),
+ asn1_integer("m", cd),
+ asn1_integer("m", cp),
+ asn1_integer("m", cq),
+ asn1_integer("m", cexp1),
+ asn1_integer("m", cexp2),
+ asn1_integer("m", gcrypt_rsa_find_token(this->key, "u")));
}
/**
return FALSE;
}
publicKey = asn1_wrap(ASN1_SEQUENCE, "mm",
- asn1_wrap(ASN1_INTEGER, "m", gcrypt_rsa_find_token(key, "n")),
- asn1_wrap(ASN1_INTEGER, "m", gcrypt_rsa_find_token(key, "e")));
+ asn1_integer("m", gcrypt_rsa_find_token(key, "n")),
+ asn1_integer("m", gcrypt_rsa_find_token(key, "e")));
hasher->allocate_hash(hasher, publicKey, &hash);
*keyid = identification_create_from_encoding(ID_PUBKEY_SHA1, hash);
chunk_free(&hash);
static chunk_t get_encoding(private_gcrypt_rsa_public_key_t *this)
{
return asn1_wrap(ASN1_SEQUENCE, "mm",
- asn1_wrap(ASN1_INTEGER, "m", gcrypt_rsa_find_token(this->key, "n")),
- asn1_wrap(ASN1_INTEGER, "m", gcrypt_rsa_find_token(this->key, "e")));
+ asn1_integer("m", gcrypt_rsa_find_token(this->key, "n")),
+ asn1_integer("m", gcrypt_rsa_find_token(this->key, "e")));
}
/**