gpt4 book ai didi

javascript - 使用钥匙串(keychain)配置服务器证书以与适用于 JavaScript 的 Google API 客户端库一起使用

转载 作者:太空宇宙 更新时间:2023-11-03 15:00:27 25 4
gpt4 key购买 nike

我刚刚开始试用适用于 JavaScript 的 Google API 客户端库。在此链接中实现代码,替换为我自己的凭据(API key 和客户端 ID):

https://developers.google.com/api-client-library/javascript/start/start-js

Chrome 开发者工具中的控制台显示如下错误:

Uncaught SecurityError: Blocked a frame with origin "https://accounts.google.com" from accessing a frame with origin "http://mydomain.com". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.

我想我可以通过在我的网站上实现 SSL 来纠正这个问题,这是我以前从未做过的。我想使用一个自签名的 SSL 证书,谷歌说这是可以的:

https://developers.google.com/api-client-library/javascript/dev/dev_jscript

我想在我的 Mac 上使用钥匙串(keychain)创建证书。在此过程中,我有机会设置扩展,例如签名、不可否认性、 key 加密、数据加密和 key 协议(protocol)(有关钥匙串(keychain)中提供的扩展的更多信息:http://goo.gl/huaEpf。)

默认情况下仅选择签名。我想为服务器证书选择哪些扩展程序以与适用于 JavaScript 的 Google API 客户端库一起使用?

最佳答案

基于此: http://siber-sonic.com/mac/MailSMIME/setupMtLion.html

我认为最好的选择是不设置任何扩展,只是不选中“Include Key Usage Extension”复选框。

关于javascript - 使用钥匙串(keychain)配置服务器证书以与适用于 JavaScript 的 Google API 客户端库一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22929104/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com