コード例 #1
0
ファイル: Signature.cpp プロジェクト: Krabi/idkaart_public
/**
 * 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);
}
コード例 #2
0
ファイル: SignatureBES.cpp プロジェクト: vallov/libdigidocpp
/**
 * 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);
}