Articles of openssl

如何用busybox和openssl在脚本中更改用户密码?

我需要将用户帐户和密码同步到安装了busybox和openssl的系统上的外部源。 当外部来源告诉我的系统更新凭证时,如何在脚本中更改用户的密码? 我将以纯文本的密码。 这必须是自动的,从我所知道的busybox passwd是交互式的,我不特别想为passwd写一个expecttypes的脚本,如果甚至可能的话。 它看起来像openssl可以生成密码哈希( openssl passwd -1 -salt“abcdefgh”{密码} ),但我将不得不直接修改/ etc / shadow? Busybox有这些命令可用。

Openssl编译错误

我使用openssl库在C代码中包含了以下头文件。 #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <time.h> #ifdef __VMS #include <in.h> #include <inet.h> #else #include <netinet/in.h> #include <arpa/inet.h> #endif #include <openssl/crypto.h> #include <openssl/ssl.h> #include <openssl/err.h> 然后我用gcc -o openssl -lssl -lcrypt openssl.c编译这个程序在我的办公室里,这个代码编译和运行正常,但是在我的系统里(linux-debian 6在办公室和Ubuntu 12.04在家里)以下错误: /tmp/ccZcmLk4.o: In function `main': server.c:(.text+0x3d): undefined reference to […]

openssl命令挂起

下面的请求openssl挂起 openssl req -key server.key -out server.csr 任何想法可能是什么问题?

Broadcom引擎的OpenSSL速度testing

我正在使用OpenSSL 1.0.1e。 OpenSSL引擎ubsec需要包含实际实现的附加库。 实现库是/usr/lib/libvendor_ubsec.so。 要从ubsec OpenSSL引擎指示我们使用哪个实现来加载代码: ENGINE_ctrl_cmd_string (&engine, "SO_PATH", vendor_ubsec, 0); 我想运行openssl速度testing如下: openssl speed rsa1024 -engine ubsec 但是它失败了,因为openssl不加载libvendor_ubsec.so。 我明白,这与OpenSSL dynamic引擎相关,并加载实现我需要使用类似于: openssl引擎ubsec -pre SO_PATH:vendor_ubsec 我的问题如何“结合”两个comamnd openssl速度和openssl引擎运行ubsec引擎的速度testing>

从源码安装OpenSSL

我命令检查可用性以定制在IPsec协议在Ubuntu中使用的encryptionalgorithm,如果有人有任何关于这一点的build议? 我读过openssl中libcrypto的encryption操作。 当我试图从源代码编译和安装OpenSSL ..我安装了一切正常,但是什么时候检查安装在系统上的版本,使用“dpkg -s openssl”,似乎并不是它的版本已经安装,我读过的地方,我不得不安装开发文件“libssl-dev”这个包,我做了,但仍然有像我没有安装任何东西的旧版本。 先谢谢你。

我怎样才能将一个CA证书包分成不同的文件?

我正在使用OpenSSL,需要一个理智的默认CA列表。 我正在使用Mozilla的受信任CA列表,如cURL所捆绑的 。 但是,我需要拆分这个CA证书包,因为OpenSSL文档说 : 如果CApath不是NULL,则它指向包含PEM格式的CA证书的目录。 每个文件都包含一个CA证书。 这些文件由CA主题名称哈希值查找,因此必须可用。 例如,使用ca-bundle.crt文件直接正常工作: openssl-1.0.1g> ./apps/openssl s_client -connect www.google.com:443 -CAfile /home/user/certs/ca-bundle.crt … Verify return code: 0 (ok) — DONE 但是指定包含ca-bundle.crt文件的目录不起作用: openssl-1.0.1g> ./apps/openssl s_client -connect www.google.com:443 -CApath /opt/aspera/certs Verify return code: 20 (unable to get local issuer certificate) — DONE 我认为这是因为我的文件夹不符合文档要求的内容(即包含PEM格式的CA证书的目录,每个文件包含一个由哈希值命名的证书)。 我的目录只有一捆证书。 我如何拆分我的证书包以遵守OpenSSL的要求,即每个证书都在一个单独的文件中? 如果哈希也可以完成(如果需要的话,如果所有的证书都在单独的文件中,我可以自己写一个脚本来完成)。

如何编写openssl引擎

我想写一个openssldynamic引擎,但我找不到任何文件。 我想写的algorithm是一个削片algorithm(如rsa)和一个哈希algorithm(如md5)。 任何简单的引擎源代码,我可以改变,并从中使用?

如何用最新的openssl编译curl

我下载的是curl7.40源代码,而我已经编译好了openssl 1.0.2的源代码,现在我想用openssl 1.0.2编译curl。 ./configure –prefix=/usr/local/curl-7.40.0 –with-ssl –with-libssl-prefix=/usr/local/openssl-1.0.2 make && make install 我安装后,我lddcurl库,但仍然链接到系统默认库。 ldd libcurl.so linux-vdso.so.1 => (0x00007fff2db2e000) libidn.so.11 => /usr/lib/x86_64-linux-gnu/libidn.so.11 (0x00007fafb9b6e000) librtmp.so.0 => /usr/lib/x86_64-linux-gnu/librtmp.so.0 (0x00007fafb9954000) libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007fafb96f5000) libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007fafb931b000) … UPDATE 经过一番search,我使用下面的命令进行configuration。 ./configure –prefix=/usr/local/curl-7.40.0 –with-ssl=/usr/local/openssl-1.0.2 但是当安装时,它会显示下面的错误信息。 ../lib/.libs/libcurl.so: undefined reference to `SSLv2_client_method' collect2: error: ld returned 1 exit status

OpenSSL和信号

像send和receive这样的套接字函数可以被信号中断。 由于这一些额外的代码是必要的,例如检查errno == EINTR 。 这在相应的手册页中描述。 我想知道如何使用OpenSSL函数,如SSL_write , SSL_read 。 他们的手册没有提到任何有关信号的事情。 我也试图谷歌这一点,但没有运气。 你知道OpenSSL是否在内部处理信号,还是需要一些额外的代码? 如果是,如何检查函数调用是否被信号中断? 更新: 看来,OpenSSL不处理重试。 它只在BIO对象上设置“应该重试”标志。 所以我需要使用这样的东西来检测是否呼叫中断,并需要重试: int result = SSL_write(ssl, buff, length); if ((result < 0) && BIO_should_retry(SSL_get_wbio(ssl))) // need to retry int result = SSL_read(ssl, buff, length); if ((result < 0) && BIO_should_retry(SSL_get_rbio(ssl))) // need to retry

我的SSL证书不受信任

我使用这个命令在我的服务器上创build了一个证书: sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt 并正确configuration一切,cuz我的网站是可用的时候键入https除http。 但是,有一个问题。 我的证书不受信任。 Firefox提示: sec_error_untrusted_issuer 和Chrome: NET::ERR_CERT_AUTHORITY_INVALID 有没有办法让我的证书信任? 所以错误不会发生? 因为我可以接受风险,并转发到网站,但这不会看起来好,谁将通过https访问我的网站。