Changeset 94404 in vbox for trunk/src/libs/openssl-3.0.2/demos
- Timestamp:
- Mar 31, 2022 9:00:36 AM (3 years ago)
- Location:
- trunk/src/libs/openssl-3.0.2
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/openssl-3.0.2
- Property svn:mergeinfo
-
old new 13 13 /vendor/openssl/1.1.1k:145841-145843 14 14 /vendor/openssl/3.0.1:150323-150324 15 /vendor/openssl/current:147554-150322 15 /vendor/openssl/3.0.2:150728-150729 16 /vendor/openssl/current:147554-150727
-
- Property svn:mergeinfo
-
trunk/src/libs/openssl-3.0.2/demos/README.txt
r94320 r94404 11 11 aesgcm.c Demonstration of symmetric cipher GCM mode encrypt/decrypt 12 12 aesccm.c Demonstration of symmetric cipher CCM mode encrypt/decrypt 13 ariacbc.c Demonstration of symmetric cipher CBC mode encrypt/decrypt 13 14 14 15 cms: … … 17 18 EVP_MD_demo.c Compute a digest from multiple buffers 18 19 EVP_MD_stdin.c Compute a digest with data read from stdin 20 EVP_MD_xof.c Compute a digest using the SHAKE256 XOF 19 21 EVP_f_md.c Compute a digest using BIO and EVP_f_md 20 22 … … 26 28 mac: 27 29 gmac.c Demonstration of GMAC message authentication 30 poly1305.c Demonstration of Poly1305-AES message authentication 31 siphash.c Demonstration of SIPHASH message authentication 28 32 29 33 pkey: 30 34 EVP_PKEY_EC_keygen.c Generate an EC key. 35 EVP_PKEY_RSA_keygen.c Generate an RSA key. 31 36 32 37 smime: … … 38 43 signature: 39 44 EVP_Signature_demo.c Compute and verify a signature from multiple buffers 45 rsa_pss_direct.c Compute and verify an RSA-PSS signature from a hash 46 rsa_pss_hash.c Compute and verify an RSA-PSS signature over a buffer -
trunk/src/libs/openssl-3.0.2/demos/cipher/Makefile
r94320 r94404 12 12 LDFLAGS = $(OPENSSL_LIBS_LOCATION) -lssl -lcrypto 13 13 14 all: aesccm aesgcm 14 all: aesccm aesgcm ariacbc 15 15 16 16 aesccm: aesccm.o 17 17 aesgcm: aesgcm.o 18 ariacbc: ariacbc.o 18 19 19 aesccm aesgcm :20 aesccm aesgcm ariacbc: 20 21 $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) 21 22 22 23 clean: 23 $(RM) aesccm aesgcm *.o24 $(RM) aesccm aesgcm ariacbc *.o -
trunk/src/libs/openssl-3.0.2/demos/cms/cms_ver.c
r94082 r94404 28 28 29 29 st = X509_STORE_new(); 30 if (st == NULL) 31 goto err; 30 32 31 33 /* Read in CA certificate */ 32 34 tbio = BIO_new_file("cacert.pem", "r"); 33 35 34 if ( !tbio)36 if (tbio == NULL) 35 37 goto err; 36 38 37 39 cacert = PEM_read_bio_X509(tbio, NULL, 0, NULL); 38 40 39 if ( !cacert)41 if (cacert == NULL) 40 42 goto err; 41 43 … … 47 49 in = BIO_new_file("smout.txt", "r"); 48 50 49 if ( !in)51 if (in == NULL) 50 52 goto err; 51 53 … … 53 55 cms = SMIME_read_CMS(in, &cont); 54 56 55 if ( !cms)57 if (cms == NULL) 56 58 goto err; 57 59 58 60 /* File to output verified content to */ 59 61 out = BIO_new_file("smver.txt", "w"); 60 if ( !out)62 if (out == NULL) 61 63 goto err; 62 64 … … 77 79 } 78 80 81 X509_STORE_free(st); 79 82 CMS_ContentInfo_free(cms); 80 83 X509_free(cacert); -
trunk/src/libs/openssl-3.0.2/demos/digest/Makefile
r94320 r94404 4 4 # LD_LIBRARY_PATH=../.. ./EVP_MD_demo 5 5 6 CFLAGS = -I../../include -g 6 CFLAGS = -I../../include -g -Wall 7 7 LDFLAGS = -L../.. 8 8 LDLIBS = -lcrypto 9 9 10 all: EVP_MD_demo EVP_MD_stdin BIO_f_md10 all: EVP_MD_demo EVP_MD_stdin EVP_MD_xof BIO_f_md 11 11 12 12 %.o: %.c … … 15 15 EVP_MD_demo: EVP_MD_demo.o 16 16 EVP_MD_stdin: EVP_MD_stdin.o 17 EVP_MD_xof: EVP_MD_xof.o 17 18 BIO_f_md: BIO_f_md.o 18 19 … … 20 21 21 22 clean: 22 $(RM) *.o EVP_MD_demo EVP_MD_stdin BIO_f_md23 $(RM) *.o EVP_MD_demo EVP_MD_stdin EVP_MD_xof BIO_f_md -
trunk/src/libs/openssl-3.0.2/demos/pkey/EVP_PKEY_EC_keygen.c
r94320 r94404 1 1 /*- 2 * Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2021-2022 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 4 * Licensed under the Apache License 2.0 (the "License"). You may not use … … 90 90 unsigned char out_privkey[80]; 91 91 BIGNUM *out_priv = NULL; 92 size_t i,out_pubkey_len, out_privkey_len = 0;92 size_t out_pubkey_len, out_privkey_len = 0; 93 93 94 94 if (!EVP_PKEY_get_utf8_string_param(pkey, OSSL_PKEY_PARAM_GROUP_NAME, -
trunk/src/libs/openssl-3.0.2/demos/pkey/Makefile
r94320 r94404 3 3 # 4 4 # LD_LIBRARY_PATH=../.. ./EVP_PKEY_EC_keygen 5 # LD_LIBRARY_PATH=../.. ./EVP_PKEY_RSA_keygen 5 6 6 CFLAGS = -I../../include -g 7 CFLAGS = -I../../include -g -Wall 7 8 LDFLAGS = -L../.. 8 9 LDLIBS = -lcrypto 9 10 10 all: EVP_PKEY_EC_keygen 11 all: EVP_PKEY_EC_keygen EVP_PKEY_RSA_keygen 11 12 12 13 %.o: %.c … … 15 16 EVP_PKEY_EC_keygen: EVP_PKEY_EC_keygen.o 16 17 18 EVP_PKEY_RSA_keygen: EVP_PKEY_RSA_keygen.o 19 17 20 test: ; 18 21 19 22 clean: 20 $(RM) *.o EVP_PKEY_EC_keygen 23 $(RM) *.o EVP_PKEY_EC_keygen EVP_PKEY_RSA_keygen -
trunk/src/libs/openssl-3.0.2/demos/signature/Makefile
r94320 r94404 4 4 # LD_LIBRARY_PATH=../.. ./EVP_Signature_demo 5 5 6 CFLAGS = -I../../include -g 6 CFLAGS = -I../../include -g -Wall 7 7 LDFLAGS = -L../.. 8 8 LDLIBS = -lcrypto 9 9 10 all: EVP_Signature_demo 10 all: EVP_Signature_demo rsa_pss_direct rsa_pss_hash 11 11 12 12 %.o: %.c … … 14 14 15 15 EVP_Signature_demo: EVP_Signature_demo.o 16 rsa_pss_direct: rsa_pss_direct.o 17 rsa_pss_hash: rsa_pss_hash.o 16 18 17 19 test: ; 18 20 19 21 clean: 20 $(RM) *.o EVP_Signature_demo 22 $(RM) *.o EVP_Signature_demo rsa_pss_direct rsa_pss_hash -
trunk/src/libs/openssl-3.0.2/demos/smime/smver.c
r94082 r94404 28 28 29 29 st = X509_STORE_new(); 30 if (st == NULL) 31 goto err; 30 32 31 33 /* Read in signer certificate and private key */ 32 34 tbio = BIO_new_file("cacert.pem", "r"); 33 35 34 if ( !tbio)36 if (tbio == NULL) 35 37 goto err; 36 38 37 39 cacert = PEM_read_bio_X509(tbio, NULL, 0, NULL); 38 40 39 if ( !cacert)41 if (cacert == NULL) 40 42 goto err; 41 43 … … 47 49 in = BIO_new_file("smout.txt", "r"); 48 50 49 if ( !in)51 if (in == NULL) 50 52 goto err; 51 53 … … 53 55 p7 = SMIME_read_PKCS7(in, &cont); 54 56 55 if ( !p7)57 if (p7 == NULL) 56 58 goto err; 57 59 58 60 /* File to output verified content to */ 59 61 out = BIO_new_file("smver.txt", "w"); 60 if ( !out)62 if (out == NULL) 61 63 goto err; 62 64 … … 75 77 ERR_print_errors_fp(stderr); 76 78 } 79 80 X509_STORE_free(st); 77 81 PKCS7_free(p7); 78 82 X509_free(cacert);
Note:
See TracChangeset
for help on using the changeset viewer.