Skip to content

Commit 6b72174

Browse files
Merge pull request #2418 from h2zh/support-jwk-ext-key
Support key files with `.jwk` extension in `IssuerKeysDirectory`
2 parents 5751dce + 9846dd8 commit 6b72174

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

config/init_server_creds.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ func loadPEMFiles(dir string) (jwk.Key, error) {
623623
if (path != dir) && dirEnt.IsDir() {
624624
return filepath.SkipDir
625625
}
626-
if dirEnt.Type().IsRegular() && filepath.Ext(dirEnt.Name()) == ".pem" {
626+
if dirEnt.Type().IsRegular() && (filepath.Ext(dirEnt.Name()) == ".pem" || filepath.Ext(dirEnt.Name()) == ".jwk") {
627627
// Parse the private key in this file and add to the in-memory keys map
628628
key, err := LoadSinglePEM(path)
629629
if err != nil {

0 commit comments

Comments
 (0)