Trying multiple private keys against a pcap I have 1000's of Private Key files "f0167f3d025582d6bb65d5ca501a50eb.key" etc to use against a PCAP file.

Only one of those private keys are valid and I am wondering what would be the easiest way to test against them and pull out the valid one?

Example of the key - 

-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDjQfT7Awy8J44B
h1lddhMT8lN68Gg8xHyssIV2O9eO2g96RuBuhxOtbaNm2LvJe512vrrX1sL8LqJV
KZdAmR2SzVgnMc7oNcs+ZHOPIAZFrCL/m1RnnohA+1RFKm3LSH4eP8rvt6vZa2dZ
A8y8QZl9psnW5T84KWrWPSnuZDirBUehfWtRBdBJLlJkmUSu1+hr3BDq0pT1MnXO
8ZOX+FIb7yYCWWWGr4PH3IIokPm5sODbHB69RCMMLzpHXxR7dgnZycrz0SC+fMb1
moG/94XCDk3naQt48warHARno2rQ85ebIJDVEuIzmRmVqzt60gu7OFMxmr1f9n78
PEquGYmNAgMBAAECggEADuy1+gYpP/IZEWCiLdEjT5wKf3hqYBNHXM/689jaPzdy
7MTa2Gdmk20v3gE90+2aWcIM4z/nbkhhwNYKaOOlXY6+y1QqEnX18xMFw9CGmOzF
H6RD1spCiIH49tHihAcuwS3PVg7p6k1zbBUjzPlB606Y0tQbYsTVj1xU9KMAVbrT
VbIOijg30rwJiSyGPxntOj/bNoiOpyLEf6NEJ6xzUF+cHe2a2BJxvyZE8Jn25flu
qzRvjCz8r54dNCbj3wnO3+hvFyE62d4LEEYrgRIMZsI5gLX1eunS0LPaLtpjHgk0
FouzYHDdw2PhMRWicmUm4qYq0BGzNJGokraM8BViAQKBgQD6JzM8vYzuzRwrX48D
rtpWrEVl+6kVaIoalU18HihYPEpFCuWeG26+B1yhHzVTGIvUIwjy+uzVCh7laRvF
-----END PRIVATE KEY-----


The key is longer but i removed some
META: this is really tool use not crypto and probably should be on superuser.

Open the PCAP file in Wireshark. Find the/a desired handshake; expand the handshake message containing the (server) Certificate message, the Certificates element, the first (EE) Certificate and the signedCertificate; click subjectPublicKeyInfo and rightclick,ExportSelected to a file, for example pubkeyfile.

Write a shell script (or CMD or PS or whatever) to run openssl pkey -in privkeyfile -pubout -outform der and compare the result to pubkeyfile; in Bourne-type shell this could be:

 for p in privkey*; do 
     if openssl pkey -in $p -pubout -outform der | cmp -s - pubkeyfile
     then echo FOUND $p; fi; done