尝试通过TLS / SSL连接连接到服务器。
我在StackOverflow上进行了搜索,但找不到答案 还要确保certfile和私钥匹配
我已经检查了 https://www.sslshopper.com/certificate-key-matcher.html
它给了我
证书和私钥匹配!
证书哈希: 3fe39d1c76d2802002741d0660dea5d7ffb6e170b5fdxxxxxxxxxx
密钥哈希: 3fe39d1c76d2802002741d0660dea5d7ffb6e170b5fdxxxxxxxxxx
我尝试了.crt和.pem并没有起作用
错误
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n=in.nextInt();
System.out.println("Enter Students name:");
Student[] s = new Student[n];
for (int i = 0; i<n; i++)
{
s[i] = new Student();
s[i].name = in.nextLine();
}
System.out.println("Enter marks:");
for (int i = 0; i<n; i++)
{
s[i].mark = in.nextInt();
}
Arrays.sort(s, new MarkComparator());
for (int i = 0; i < n; i++)
{
System.out.println(s[i].name + " - "+ s[i].mark);
}
}
}
class Student {
int mark;
String name;
}
class MarkComparator implements Comparator {
public int compare(Object o1,Object o2){
Student s1=(Student)o1;
Student s2=(Student)o2;
if(s1.mark>=s2.mark) {
return 1;
} else {
return -1;
}
}
}
代码:-
import os
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
chromedriver = "D:\\Python27\\Scripts\\chromedriver.exe"
os.environ["webdriver.chrome.driver"] = chromedriver
capa = DesiredCapabilities.CHROME
capa["pageLoadStrategy"] = "none"
options= webdriver.ChromeOptions()
prefs = {"profile.managed_default_content_settings.images": 2, "plugins.plugins_disabled": ["Adobe Flash Player"]}
options.add_experimental_option("prefs", prefs)
driver = webdriver.Chrome(chromedriver, chrome_options =options, desired_capabilities=capa)
driver.get("https://www.investing.com/crypto/bitcoin/btc-usd")
wait = WebDriverWait(driver, 2)
wait.until(EC.presence_of_element_located((By.ID, 'topBarPopup')))
time.sleep(2)
driver.execute_script("window.stop();")
time.sleep(60)
driver.quit()