Exemple #1
0
def test_signature_hash(mock_current_app, app):
    mock_current_app.config.get = Mock(side_effect=config_mock)
    assert plugin.signature_hash(None) == "sha256"
    assert plugin.signature_hash("sha256WithRSA") == "sha256"
    assert plugin.signature_hash("sha384WithRSA") == "sha384"
    assert plugin.signature_hash("sha512WithRSA") == "sha512"

    with pytest.raises(Exception):
        plugin.signature_hash("sdfdsf")
Exemple #2
0
def test_signature_hash(app):
    from lemur.plugins.lemur_digicert.plugin import signature_hash

    assert signature_hash(None) == "sha256"
    assert signature_hash("sha256WithRSA") == "sha256"
    assert signature_hash("sha384WithRSA") == "sha384"
    assert signature_hash("sha512WithRSA") == "sha512"

    with pytest.raises(Exception):
        signature_hash("sdfdsf")
Exemple #3
0
def test_signature_hash(app):
    from lemur.plugins.lemur_digicert.plugin import signature_hash

    assert signature_hash(None) == 'sha256'
    assert signature_hash('sha256WithRSA') == 'sha256'
    assert signature_hash('sha384WithRSA') == 'sha384'
    assert signature_hash('sha512WithRSA') == 'sha512'

    with pytest.raises(Exception):
        signature_hash('sdfdsf')
Exemple #4
0
def test_signature_hash(app):
    from lemur.plugins.lemur_digicert.plugin import signature_hash

    assert signature_hash(None) == 'sha256'
    assert signature_hash('sha256WithRSA') == 'sha256'
    assert signature_hash('sha384WithRSA') == 'sha384'
    assert signature_hash('sha512WithRSA') == 'sha512'

    with pytest.raises(Exception):
        signature_hash('sdfdsf')