Skip to content

Commit

Permalink
Validate cert when there is only one
Browse files Browse the repository at this point in the history
samlify stopped validate a cert because of this condition - I am sure that is a mistake.
  • Loading branch information
kvcpr committed Mar 8, 2019
1 parent d7e47c6 commit 792e093
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libsaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ const libSaml = () => {
if (selectedCert === null) {
throw new Error('NO_SELECTED_CERTIFICATE');
}
if (metadataCert.length > 1 && !includes(metadataCert, selectedCert)) {
if (metadataCert.length >= 1 && !includes(metadataCert, selectedCert)) {
// keep this restriction for rolling certificate usage
// to make sure the response certificate is one of those specified in metadata
throw new Error('ERROR_UNMATCH_CERTIFICATE_DECLARATION_IN_METADATA');
Expand Down

0 comments on commit 792e093

Please sign in to comment.