Esempio n. 1
0
/**
 * Sets signer claimed roles to the signature.
 * NB! Only ClaimedRoles are supported. CerifiedRoles are not supported.
 *
 * @param roles signer roles.
 */
void SignatureBES::setSignerRoles(const vector<string> &roles)
{
    if(roles.empty())
        return;

    ClaimedRolesListType claimedRoles;
    for(vector<string>::const_iterator iter = roles.begin(); iter != roles.end(); iter++)
        claimedRoles.claimedRole().push_back(*iter);

    SignerRoleType signerRole;
    signerRole.claimedRoles(claimedRoles);
    getSignedSignatureProperties().signerRole(signerRole);
}
Esempio n. 2
0
/**
 * Sets signer claimed roles to the signature.
 * NB! Only ClaimedRoles are supported. CerifiedRoles are not supported.
 *
 * @param roles signer roles.
 */
void SignatureBES::setSignerRoles(const vector<string> &roles)
{
    if(roles.empty())
        return;

    ClaimedRolesListType claimedRoles;
    for(const string &role: roles)
        claimedRoles.claimedRole().push_back(role);

    SignerRoleType signerRole;
    signerRole.claimedRoles(claimedRoles);
    getSignedSignatureProperties().signerRole(signerRole);
}