小编ope*_*sid的帖子

Java编译错误限制为100

我有一个Java文件,当我编译时,在java编译器(javac)退出之后,我将只能在控制台上看到前100个错误.我怎样才能在控制台上看到所有编译错误?在此先感谢 - opensid

java javac

33
推荐指数
3
解决办法
1万
查看次数

C中的x509证书验证

我有DER和PEM格式的证书,我的目标是检索Issuer和Subject的字段,并使用CA公钥验证证书,同时使用根公钥验证CA证书.我能够检索发行人和主题的所有细节,但无法验证证书.
使用的API:

x509 = d2i_X509_fp (fp, &x509); //READING DER Format
x509 = PEM_read_X509 (fp, &x509, NULL, NULL); //READING PEM Format
//to retrieve the Subject:
X509_NAME_oneline(X509_get_subject_name(x509), subject, sizeof (subject));
//to retrieve the Issuer:
X509_NAME_oneline(X509_get_issuer_name(x509), issuer, sizeof (issuer));

//To store the CA public key (in unsigned char *key) that will be used to verify the 
//certificate (in my case always sha1WithRSAEncryption):
RSA *x = X509_get_pubkey(x509)->pkey.rsa;
bn = x->n;
//extracts the bytes from public key & convert into unsigned char buffer
buf_len = …
Run Code Online (Sandbox Code Playgroud)

c openssl

7
推荐指数
2
解决办法
2万
查看次数

x509 证书信息

Certificate:
Data:
    Version: 3 (0x2)
    Serial Number: 95 (0x5f)
    Signature Algorithm: sha1WithRSAEncryption
    Issuer: C=, O=, CN=
    Validity
        Not Before: Apr 22 16:42:11 2008 GMT
        Not After : Apr 22 16:42:11 2009 GMT
    Subject: C=, O=, CN=, L=, ST=
    Subject Public Key Info:
        Public Key Algorithm: rsaEncryption
        RSA Public Key: (1024 bit)
            Modulus (1024 bit):
                ...
                ...
                ...
            Exponent: 65537 (0x10001)
    X509v3 extensions:
        X509v3 Key Usage: critical
            Digital Signature, Key Encipherment
        X509v3 Extended Key Usage: critical
            Code Signing
        X509v3 Authority Key …
Run Code Online (Sandbox Code Playgroud)

openssl

3
推荐指数
1
解决办法
1726
查看次数

来自x509中的char缓冲区的EVP_PKEY(PKCS7)

我有一个DER证书,我从中检索unsigned char缓冲区中的公钥,如下所示,这是正确的获取方式吗?

pStoredPublicKey = X509_get_pubkey(x509);
if(pStoredPublicKey == NULL)
{
        printf(": publicKey is NULL\n");
}
if(pStoredPublicKey->type == EVP_PKEY_RSA) {
        RSA *x = pStoredPublicKey->pkey.rsa;
        bn = x->n;
}
else if(pStoredPublicKey->type == EVP_PKEY_DSA) {

}
else if(pStoredPublicKey->type == EVP_PKEY_EC) {
}
else {
        printf(" : Unkown publicKey\n");
}
//extracts the bytes from public key & convert into unsigned char buffer
buf_len = (size_t) BN_num_bytes (bn);
key = (unsigned char *)malloc (buf_len);
n = BN_bn2bin (bn, (unsigned char *) key);
for (i = 0; …
Run Code Online (Sandbox Code Playgroud)

openssl

3
推荐指数
1
解决办法
7927
查看次数

在cpp中使用unix系统调用

我是cpp的新手,我有一个小问题,我有一个cpp文件,它包含open(),read()和close()以及一些其他方法作为公共成员.现在我想在其中一个方法中使用'read'unix系统调用但是如果我这样做(在某些方法中)它指向类成员变量'read()'并给出编译错误.那么,如何在cpp中使用unix系统调用如'open,read,close'?如果没有那么任何其他替代品使用?

由于-opensid

c++

0
推荐指数
1
解决办法
1477
查看次数

标签 统计

openssl ×3

c ×1

c++ ×1

java ×1

javac ×1