-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: Certificate info for TippingPoint alerts
The details of alerts using the TippingPoint SMS method now shows information about the TLS certificate. This way it is possible to check if the correct certificate is configured or not.
- Loading branch information
1 parent
8aff57a
commit fada909
Showing
5 changed files
with
115 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* Copyright (C) 2023 Greenbone AG | ||
* | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Affero General Public License | ||
* as published by the Free Software Foundation, either version 3 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import _ from 'gmp/locale'; | ||
|
||
import {isDefined} from 'gmp/utils/identity'; | ||
|
||
import PropTypes from 'web/utils/proptypes'; | ||
|
||
import DateTime from 'web/components/date/datetime'; | ||
|
||
import {Col} from 'web/entity/page'; | ||
|
||
import InfoTable from 'web/components/table/infotable'; | ||
import TableBody from 'web/components/table/body'; | ||
import TableData from 'web/components/table/data'; | ||
import TableRow from 'web/components/table/row'; | ||
|
||
const CertInfo = ({info}) => { | ||
const {activationTime, expirationTime, issuer, md5_fingerprint} = info; | ||
return ( | ||
<InfoTable> | ||
<colgroup> | ||
<Col width="10%" /> | ||
<Col width="90%" /> | ||
</colgroup> | ||
<TableBody> | ||
<TableRow> | ||
<TableData>{_('Activation')}</TableData> | ||
<TableData> | ||
{isDefined(activationTime) ? ( | ||
<DateTime date={activationTime} /> | ||
) : ( | ||
_('N/A') | ||
)} | ||
</TableData> | ||
</TableRow> | ||
|
||
<TableRow> | ||
<TableData>{_('Expiration')}</TableData> | ||
<TableData> | ||
{isDefined(expirationTime) ? ( | ||
<DateTime date={expirationTime} /> | ||
) : ( | ||
_('N/A') | ||
)} | ||
</TableData> | ||
</TableRow> | ||
|
||
<TableRow> | ||
<TableData>{_('MD5 Fingerprint')}</TableData> | ||
<TableData>{md5_fingerprint}</TableData> | ||
</TableRow> | ||
|
||
<TableRow> | ||
<TableData>{_('Issuer')}</TableData> | ||
<TableData>{issuer}</TableData> | ||
</TableRow> | ||
</TableBody> | ||
</InfoTable> | ||
); | ||
}; | ||
|
||
CertInfo.propTypes = { | ||
info: PropTypes.object.isRequired, | ||
}; | ||
|
||
export default CertInfo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters