Revize 7dd54fd2
Přidáno uživatelem Stanislav Král před téměř 4 roky(ů)
app.py | ||
---|---|---|
85 | 85 |
return crl_ocsp_controller.get_ocsp_from_der(id, request.data) |
86 | 86 |
|
87 | 87 |
|
88 |
@app.route('/api/certificates/<id>/identity', methods=["POST"])
|
|
88 |
@app.route('/api/certificates/<id>/identity', methods=["GET"])
|
|
89 | 89 |
def generate_certificate_pkcs_identity(id, certificate_controller: CertController): |
90 | 90 |
return certificate_controller.generate_certificate_pkcs_identity(id) |
91 | 91 |
|
tests/integration_tests/rest_api/certificates_test.py | ||
---|---|---|
947 | 947 |
|
948 | 948 |
assert ret.status_code == 201 |
949 | 949 |
|
950 |
certificate = {
|
|
950 |
identity_details = {
|
|
951 | 951 |
"name": "Foo Identity", |
952 | 952 |
"password": "foobarbaz" |
953 | 953 |
} |
954 |
identity_ret = server.post(f"/api/certificates/{ret.json['data']}/identity", content_type="application/json", json=certificate) |
|
954 |
identity_ret = server.get(f"/api/certificates/{ret.json['data']}/identity", content_type="application/json", |
|
955 |
json=identity_details) |
|
955 | 956 |
|
956 | 957 |
# assert valid HTTP status code and correct content type |
957 | 958 |
assert identity_ret.status_code == 200 |
Také k dispozici: Unified diff
Re #8708 - Changed the endpoint generating PKCS12 identities to GET from POST (the generated identity is not stored on the server)
Changed the endpoint test accordingly