Revize 87c04047
Přidáno uživatelem Jan Pašek před téměř 4 roky(ů)
static/create_certificate.html | ||
---|---|---|
125 | 125 |
<div class="form-group"> |
126 | 126 |
<td><label for="subject_C">Country Code:</label></td> |
127 | 127 |
<td class="pl-3"> |
128 |
<input type="text" v-model:value="certificateData.subject.C" id="subject_C" name="subject_C" class="form-control"> |
|
128 |
<input type="text" v-bind:class="{ 'is-invalid': invalidC }" v-model:value="certificateData.subject.C" id="subject_C" name="subject_C" class="form-control">
|
|
129 | 129 |
</td> |
130 | 130 |
</div> |
131 | 131 |
</tr> |
static/js/create_certificate.js | ||
---|---|---|
6 | 6 |
notAfter: "", |
7 | 7 |
isSelfSigned: false, |
8 | 8 |
invalidCN: false, |
9 |
invalidC: false, |
|
9 | 10 |
customKey: false, |
10 | 11 |
customExtensions: false, |
11 | 12 |
// available certificate authorities |
... | ... | |
108 | 109 |
this.invalidCN = true; |
109 | 110 |
return; |
110 | 111 |
} |
112 |
if (this.certificateData.subject.C !== "" && this.certificateData.subject.C.length !== 2) { |
|
113 |
this.showError("C field must be empty or must have exactly 2 characters!"); |
|
114 |
this.invalidC = true; |
|
115 |
return; |
|
116 |
} |
|
111 | 117 |
|
112 | 118 |
// populate optional key field in the request body |
113 | 119 |
delete this.certificateData.key; |
Také k dispozici: Unified diff
Re #8587 - Check of country code field when creating certificate