jpsider / RestPS

Simple ReST Framework for Powershell
MIT License
112 stars 30 forks source link

Add a new CA verification function #87

Closed matsmcp closed 5 days ago

matsmcp commented 2 weeks ago

Adds a new function for a more flexible Certificate/CA verification. By setting $checkcertificate=$true in Get-RestCAList.ps1 the test-certificate cmdlet will be used to verify that the calling client cert is trusted by the server.

Intended to be used as a verification type.

Also decouples the server Certificate from the verification of the client cert and therefore adds support for PKI designs with more than one CA level.

Also uses Invoke-Expression (get-content -Path ...) instead of dot sourcing to speed up loading of subscripts ( dot sourcing seems to be very slow on PS 5.1).

I see further enhancements (for example dot sourcing on core (where it seems fast) and Invoke-Expression on 5.1. There are dot sourcing in more files that should be fixed too but I'll make an initial commit before I leave on vacation

jpsider commented 2 weeks ago

I'm on vacation for the next couple weeks. I'll review this once I'm back home.

jpsider commented 5 days ago

do you think these files are in the right location or do you think they should be moved to /bin ?