我们有一个Jenkinsfile,它使用docker插件在给定容器中运行脚本.这适用于某些图像,但在其他图像上立即失败,退出代码为-1.我们已将错误减少到简单sleep
.这是Jenkinsfile:
node("docker") {
def wheezy_image = docker.image("pyca/cryptography-runner-wheezy")
wheezy_image.pull()
wheezy_image.inside {
sh """sleep 120"""
}
}
Run Code Online (Sandbox Code Playgroud)
这是詹金斯的输出
+ docker pull pyca/cryptography-runner-wheezy
Using default tag: latest
latest: Pulling from pyca/cryptography-runner-wheezy
Digest: sha256:ff5d9f661b05d831ace3811eec9f034fed7994279ff2307695a2cb7c32d6fa11
Status: Image is up to date for pyca/cryptography-runner-wheezy:latest
[Pipeline] sh
[3525-VE2ETALXLYB7VN3] Running shell script
+ docker inspect -f . pyca/cryptography-runner-wheezy
.
[Pipeline] withDockerContainer
$ docker run -t -d -u 1000:1000 -w /var/jenkins_home/workspace/3525-VE2ETALXLYB7VN3 --volumes-from 1382a2e208dd5575acd26f11678855282fc854319096de60cef6818ea279f25f -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** …
Run Code Online (Sandbox Code Playgroud) Apple的OS X 文档谈到了使用SecItemImport
获取的问题SecKeyRef
.函数签名如下所示:
OSStatus SecItemImport (
CFDataRef importedData,
CFStringRef fileNameOrExtension,
SecExternalFormat *inputFormat,
SecExternalItemType *itemType,
SecItemImportExportFlags flags,
const SecItemImportExportKeyParameters *keyParams,
SecKeychainRef importKeychain,
CFArrayRef *outItems
);
Run Code Online (Sandbox Code Playgroud)
以下代码将尝试加载包含单个RSA密钥的PKCS12字节数组:
#include <Security/Security.h>
#include <Security/SecKey.h>
#include <CoreFoundation/CoreFoundation.h>
int main(void) {
CFArrayRef array = NULL;
SecItemImportExportKeyParameters params;
SecExternalItemType itemType = kSecItemTypeUnknown;
SecExternalFormat format = kSecFormatUnknown;
params.flags = kSecKeyNoAccessControl;
UInt8 bytes[] = {
0x30, 0x82, 0x2, 0x1e, 0x2, 0x1, 0x3, 0x30, 0x82, 0x1, 0xe8, 0x6, 0x9, 0x2a, 0x86, 0x48, 0x86, 0xf7,
0xd, 0x1, …
Run Code Online (Sandbox Code Playgroud) 鉴于从RSA私钥SecKeyRef
加载使用SecItemImport
是否有办法获取或创建SecKeyRef
仅用于公钥组件?在OpenSSL中,这可以通过将模数和公共指数复制到新结构来完成,但是SecKeyRef
不透明,我一直无法找到执行此操作的函数.
是否可以在使用SecKeyGeneratePair
?生成RSA密钥对时更改默认公共指数(e)?
我知道65537是一个很好的默认值,所以这只是一个关于它是否在技术上可行的问题.
我试过安装quandl
pip install quandl
Run Code Online (Sandbox Code Playgroud)
但我收到以下错误:
Collecting quandl
Using cached Quandl-3.0.1-py2.py3-none-any.whl
Collecting pyOpenSSL (from quandl)
Using cached pyOpenSSL-16.0.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): pyasn1 in /usr/local/lib/python3.2/dist-packages (from quandl)
Collecting more-itertools (from quandl)
Using cached more-itertools-2.2.tar.gz
Requirement already satisfied (use --upgrade to upgrade): six in ./.local/lib/python3.2/site-packages (from quandl)
Collecting ndg-httpsclient (from quandl)
Using cached ndg_httpsclient-0.4.1.tar.gz
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.8 in /usr/local/lib/python3.2/dist-packages (from quandl)
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in ./.local/lib/python3.2/site-packages (from quandl)
Requirement …
Run Code Online (Sandbox Code Playgroud)