mirror of
https://github.com/openssl/openssl.git
synced 2025-01-24 13:55:42 +08:00
Tests for creating req from PKCS8 keys with extra attrs
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15142)
This commit is contained in:
parent
f60e35d01e
commit
6dbb277627
@ -73,7 +73,7 @@ subtest "generating alt certificate requests with RSA" => sub {
|
||||
|
||||
|
||||
subtest "generating certificate requests with RSA" => sub {
|
||||
plan tests => 3;
|
||||
plan tests => 7;
|
||||
|
||||
SKIP: {
|
||||
skip "RSA is not supported by this OpenSSL build", 2
|
||||
@ -97,6 +97,29 @@ subtest "generating certificate requests with RSA" => sub {
|
||||
"-config", srctop_file("test", "test.cnf"),
|
||||
"-verify", "-in", "testreq-rsa.pem", "-noout"])),
|
||||
"Verifying signature on request");
|
||||
|
||||
ok(run(app(["openssl", "req",
|
||||
"-config", srctop_file("test", "test.cnf"),
|
||||
"-new", "-out", "testreq_withattrs_pem.pem", "-utf8",
|
||||
"-key", srctop_file("test", "testrsa_withattrs.pem")])),
|
||||
"Generating request from a key with extra attributes - PEM");
|
||||
|
||||
ok(run(app(["openssl", "req",
|
||||
"-config", srctop_file("test", "test.cnf"),
|
||||
"-verify", "-in", "testreq_withattrs_pem.pem", "-noout"])),
|
||||
"Verifying signature on request from a key with extra attributes - PEM");
|
||||
|
||||
ok(run(app(["openssl", "req",
|
||||
"-config", srctop_file("test", "test.cnf"),
|
||||
"-new", "-out", "testreq_withattrs_der.pem", "-utf8",
|
||||
"-key", srctop_file("test", "testrsa_withattrs.der"),
|
||||
"-keyform", "DER"])),
|
||||
"Generating request from a key with extra attributes - PEM");
|
||||
|
||||
ok(run(app(["openssl", "req",
|
||||
"-config", srctop_file("test", "test.cnf"),
|
||||
"-verify", "-in", "testreq_withattrs_der.pem", "-noout"])),
|
||||
"Verifying signature on request from a key with extra attributes - PEM");
|
||||
}
|
||||
};
|
||||
|
||||
|
BIN
test/testrsa_withattrs.der
Normal file
BIN
test/testrsa_withattrs.der
Normal file
Binary file not shown.
29
test/testrsa_withattrs.pem
Normal file
29
test/testrsa_withattrs.pem
Normal file
@ -0,0 +1,29 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIE+QIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDsh7QWxhftrqng
|
||||
RC3Ms+HxH2NFCX1sRoiIV4cYK2z0DQdEiNpFdpHlcs3weTuudcpr8XursodVFMTB
|
||||
eHjROhgwO/LT9xReEUiaoHJgfv6KcKcxEvntCjQkzGhkw03OH5VYdtTRAbwpwcYt
|
||||
groPiZ2STINpQOmFabzai+K+3rddwTGkkca3C5kY7KOMlnt9IuvmycksRqH6MPKz
|
||||
P5QbztlgY95rtra+OEzKLYQ1ux6hkaUlpxT5eGKfzYdccwKJWa0dUXyT/8F6rpTm
|
||||
Zbz3BxdKGAWMywaTfh5ywhNmVNTeIumxIRc3+PInn0rqKTaDrWylxiBdb3t27HxQ
|
||||
InDZmPwdAgMBAAECggEBAMTRrzN8JxEq1ES/tvStgodoPOyHlwxwLNB3NP0RtZnm
|
||||
9XM8BZTjs0egnmlKGDV14riruuMGrcJIg+kR3EcN9m68k7V51kLoUugINuTBCAIe
|
||||
96DIT5vFb9pnFT8znRy1/0obp787mF2O1t+r9jNTqgDBFmCRGUBg2jtpR4bYQPEL
|
||||
ZjXMDPcsmOlmbBdsyQvjlOHqXjCoUWwOCBEZdtaLzxaOPrBW5Jh2h3Xz1pV3NdZ/
|
||||
xufAYRhpJamPNiSipRehBZAeQP2ZAyHj/5x3tgEcA+C04Ki8NvuwJx/6T/lGKD+1
|
||||
x3DKsniNi6fEbGlpST/Zp1GY4WyVPcrLa8JxyO+UagECgYEA+gvBBI+LSK5enPXu
|
||||
WooEQP17fKzdZG7Cic8TfTPbtBIcXjNQFLHjFoBNk+TBFCjZma7L+fEcKcDm+Bg1
|
||||
qa4xihOP6BoQqHXZZNZ+9ZU96MPmI9Zb60CMG9lM1VVhSqrm2n3Q+tefod/a2bQk
|
||||
oz8QsdpsUFqVFCF5l+Tb6lp2QN0CgYEA8imPEml6LG35snBY1H6t0ASCHT1oFdHP
|
||||
o01WKQas/tuLO+pMfZrA0zLZBExxZuUJloC6COsTcOrlK+hGM60Ab6TgSPbUvYqH
|
||||
8yMV7SYLvheEngqIiFExmHg79mxnys3Rgv9KMxAV2Ip2wBrBMwUOaURU9pUKXlIN
|
||||
xiaUuevSVEECgYEA0Dbrcs3JUSuKM7AC3DfjlO6/XrFf5hrpOfJKq058m/Uc1EBs
|
||||
Zd8/V2RdtVKeiRf/Ix9QUYA6UHaGnn8iaHpaXD0v7zmNN4pzDaojrIKrO+GtCZid
|
||||
kEd+pE4N0fO4AYJQnA567/aPwi7zQaflfl6smz1kRoE3dLzvUNHNYtgTcq0CgYAm
|
||||
Op1VgMVCwlHK86VyVlVGI5AO4aTO3QJ0ez8A1wb0bOA8Iy7UHVwXe017Oj4kyj+L
|
||||
POMhiUrWZp6rIc4DVmpdNaAapKzNB1OS9JT/jSQJbFkJQgxvyLGVqlV8/3wbLgbH
|
||||
MVobWYy5VJKOnSqmzUOLJrhq/PhYD4gRIgIUn7/igQKBgQCptqrREOq9fXDEpozC
|
||||
39TL4vDrKJWpB1uK6pBEjgEVD/+tcfziVN40j5hnNFDUu/8kxxp9/4w8mPjdJ0CF
|
||||
hWIvrXasjnnFehy6IewWCljNH5CfOM64rDoXaF+ESIM4rLBHbQ8KYvaKkMjOcdNB
|
||||
JG1sRWVU01AwEhnvxS1zbyBtiqA4MDYGCCqFAwIJAwgBMSoEKBqiSOXm8r5I7hEA
|
||||
+gglN/s0bbRCnzopEhuEorpcnDXrktVtjQrmMi0=
|
||||
-----END PRIVATE KEY-----
|
Loading…
Reference in New Issue
Block a user