-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: ensure all certificates are valid and parsable (#6)
* ci: ensure certificates are from Amazon RDS * ci: improve messages
- Loading branch information
1 parent
2a98699
commit 329f96e
Showing
3 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,19 @@ | ||
import x509 from 'x509.js'; | ||
import { describe, assert } from 'poku'; | ||
import { defaults } from '../../src/profiles/ca/defaults.js'; | ||
|
||
describe('Ensuring all certificates are valid and parsable', { | ||
pad: true, | ||
background: false, | ||
}); | ||
|
||
defaults.forEach((cert, index) => { | ||
const parsedCert = x509.parseCert(cert); | ||
const expected = 'Amazon RDS'; | ||
|
||
assert.strictEqual( | ||
parsedCert.issuer.organizationalUnitName, | ||
expected, | ||
`Certificate at index ${index} from defaults` | ||
); | ||
}); |