VirtualBox

source: vbox/trunk/src/libs/openssl-3.1.7/test/recipes/20-test_spkac.t@ 106165

最後變更 在這個檔案從106165是 104078,由 vboxsync 提交於 8 月 前

openssl-3.1.5: Applied and adjusted our OpenSSL changes to 3.1.4. bugref:10638

檔案大小: 1.3 KB
 
1#! /usr/bin/env perl
2# Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
3#
4# Licensed under the Apache License 2.0 (the "License"). You may not use
5# this file except in compliance with the License. You can obtain a copy
6# in the file LICENSE in the source distribution or at
7# https://www.openssl.org/source/license.html
8
9use strict;
10use warnings;
11
12use File::Spec;
13use File::Basename;
14use OpenSSL::Test qw/:DEFAULT srctop_file ok_nofips/;
15use OpenSSL::Test::Utils;
16
17setup("test_spkac");
18
19plan skip_all => "RSA is not supported by this OpenSSL build"
20 if disabled("rsa");
21
22plan tests => 4;
23
24# For the tests below we use the cert itself as the TBS file
25
26SKIP: {
27 skip "MD5 is not supported by this OpenSSL build", 2
28 if disabled("md5");
29
30 ok(run(app([ 'openssl', 'spkac', '-key', srctop_file("test", "testrsa.pem"),
31 '-out', 'spkac-md5.pem'])),
32 "SPKAC MD5");
33 ok(run(app([ 'openssl', 'spkac', '-in', 'spkac-md5.pem'])),
34 "SPKAC MD5 verify");
35}
36
37ok(run(app([ 'openssl', 'spkac', '-key', srctop_file("test", "testrsa.pem"),
38 '-out', 'spkac-sha256.pem', '-digest', 'sha256'])),
39 "SPKAC SHA256");
40ok(run(app([ 'openssl', 'spkac', '-in', 'spkac-sha256.pem'])),
41 "SPKAC SHA256 verify");
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette