mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-09-24 14:23:47 +08:00
quantum init
This commit is contained in:
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* Simple S/MIME compress example */
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/cms.h>
|
||||
@@ -57,8 +48,13 @@ int main(int argc, char **argv)
|
||||
ERR_print_errors_fp(stderr);
|
||||
}
|
||||
|
||||
CMS_ContentInfo_free(cms);
|
||||
BIO_free(in);
|
||||
BIO_free(out);
|
||||
if (cms)
|
||||
CMS_ContentInfo_free(cms);
|
||||
if (in)
|
||||
BIO_free(in);
|
||||
if (out)
|
||||
BIO_free(out);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/*
|
||||
* S/MIME detached data decrypt example: rarely done but should the need
|
||||
* arise this is an example....
|
||||
@@ -77,12 +68,22 @@ int main(int argc, char **argv)
|
||||
ERR_print_errors_fp(stderr);
|
||||
}
|
||||
|
||||
CMS_ContentInfo_free(cms);
|
||||
X509_free(rcert);
|
||||
EVP_PKEY_free(rkey);
|
||||
BIO_free(in);
|
||||
BIO_free(out);
|
||||
BIO_free(tbio);
|
||||
BIO_free(dcont);
|
||||
if (cms)
|
||||
CMS_ContentInfo_free(cms);
|
||||
if (rcert)
|
||||
X509_free(rcert);
|
||||
if (rkey)
|
||||
EVP_PKEY_free(rkey);
|
||||
|
||||
if (in)
|
||||
BIO_free(in);
|
||||
if (out)
|
||||
BIO_free(out);
|
||||
if (tbio)
|
||||
BIO_free(tbio);
|
||||
if (dcont)
|
||||
BIO_free(dcont);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* Simple S/MIME decryption example */
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/cms.h>
|
||||
@@ -68,11 +59,20 @@ int main(int argc, char **argv)
|
||||
ERR_print_errors_fp(stderr);
|
||||
}
|
||||
|
||||
CMS_ContentInfo_free(cms);
|
||||
X509_free(rcert);
|
||||
EVP_PKEY_free(rkey);
|
||||
BIO_free(in);
|
||||
BIO_free(out);
|
||||
BIO_free(tbio);
|
||||
if (cms)
|
||||
CMS_ContentInfo_free(cms);
|
||||
if (rcert)
|
||||
X509_free(rcert);
|
||||
if (rkey)
|
||||
EVP_PKEY_free(rkey);
|
||||
|
||||
if (in)
|
||||
BIO_free(in);
|
||||
if (out)
|
||||
BIO_free(out);
|
||||
if (tbio)
|
||||
BIO_free(tbio);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/*
|
||||
* S/MIME detached data encrypt example: rarely done but should the need
|
||||
* arise this is an example....
|
||||
@@ -86,12 +77,22 @@ int main(int argc, char **argv)
|
||||
ERR_print_errors_fp(stderr);
|
||||
}
|
||||
|
||||
CMS_ContentInfo_free(cms);
|
||||
X509_free(rcert);
|
||||
sk_X509_pop_free(recips, X509_free);
|
||||
BIO_free(in);
|
||||
BIO_free(out);
|
||||
BIO_free(dout);
|
||||
BIO_free(tbio);
|
||||
if (cms)
|
||||
CMS_ContentInfo_free(cms);
|
||||
if (rcert)
|
||||
X509_free(rcert);
|
||||
if (recips)
|
||||
sk_X509_pop_free(recips, X509_free);
|
||||
|
||||
if (in)
|
||||
BIO_free(in);
|
||||
if (out)
|
||||
BIO_free(out);
|
||||
if (dout)
|
||||
BIO_free(dout);
|
||||
if (tbio)
|
||||
BIO_free(tbio);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* Simple S/MIME encrypt example */
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/cms.h>
|
||||
@@ -82,11 +73,20 @@ int main(int argc, char **argv)
|
||||
ERR_print_errors_fp(stderr);
|
||||
}
|
||||
|
||||
CMS_ContentInfo_free(cms);
|
||||
X509_free(rcert);
|
||||
sk_X509_pop_free(recips, X509_free);
|
||||
BIO_free(in);
|
||||
BIO_free(out);
|
||||
BIO_free(tbio);
|
||||
if (cms)
|
||||
CMS_ContentInfo_free(cms);
|
||||
if (rcert)
|
||||
X509_free(rcert);
|
||||
if (recips)
|
||||
sk_X509_pop_free(recips, X509_free);
|
||||
|
||||
if (in)
|
||||
BIO_free(in);
|
||||
if (out)
|
||||
BIO_free(out);
|
||||
if (tbio)
|
||||
BIO_free(tbio);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* Simple S/MIME signing example */
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/cms.h>
|
||||
@@ -78,11 +69,20 @@ int main(int argc, char **argv)
|
||||
ERR_print_errors_fp(stderr);
|
||||
}
|
||||
|
||||
CMS_ContentInfo_free(cms);
|
||||
X509_free(scert);
|
||||
EVP_PKEY_free(skey);
|
||||
BIO_free(in);
|
||||
BIO_free(out);
|
||||
BIO_free(tbio);
|
||||
if (cms)
|
||||
CMS_ContentInfo_free(cms);
|
||||
if (scert)
|
||||
X509_free(scert);
|
||||
if (skey)
|
||||
EVP_PKEY_free(skey);
|
||||
|
||||
if (in)
|
||||
BIO_free(in);
|
||||
if (out)
|
||||
BIO_free(out);
|
||||
if (tbio)
|
||||
BIO_free(tbio);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* S/MIME signing example: 2 signers */
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/cms.h>
|
||||
@@ -86,13 +77,26 @@ int main(int argc, char **argv)
|
||||
ERR_print_errors_fp(stderr);
|
||||
}
|
||||
|
||||
CMS_ContentInfo_free(cms);
|
||||
X509_free(scert);
|
||||
EVP_PKEY_free(skey);
|
||||
X509_free(scert2);
|
||||
EVP_PKEY_free(skey2);
|
||||
BIO_free(in);
|
||||
BIO_free(out);
|
||||
BIO_free(tbio);
|
||||
if (cms)
|
||||
CMS_ContentInfo_free(cms);
|
||||
|
||||
if (scert)
|
||||
X509_free(scert);
|
||||
if (skey)
|
||||
EVP_PKEY_free(skey);
|
||||
|
||||
if (scert2)
|
||||
X509_free(scert2);
|
||||
if (skey)
|
||||
EVP_PKEY_free(skey2);
|
||||
|
||||
if (in)
|
||||
BIO_free(in);
|
||||
if (out)
|
||||
BIO_free(out);
|
||||
if (tbio)
|
||||
BIO_free(tbio);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* Simple S/MIME uncompression example */
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/cms.h>
|
||||
@@ -51,8 +42,14 @@ int main(int argc, char **argv)
|
||||
ERR_print_errors_fp(stderr);
|
||||
}
|
||||
|
||||
CMS_ContentInfo_free(cms);
|
||||
BIO_free(in);
|
||||
BIO_free(out);
|
||||
if (cms)
|
||||
CMS_ContentInfo_free(cms);
|
||||
|
||||
if (in)
|
||||
BIO_free(in);
|
||||
if (out)
|
||||
BIO_free(out);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* Simple S/MIME verification example */
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/cms.h>
|
||||
@@ -76,10 +67,19 @@ int main(int argc, char **argv)
|
||||
ERR_print_errors_fp(stderr);
|
||||
}
|
||||
|
||||
CMS_ContentInfo_free(cms);
|
||||
X509_free(cacert);
|
||||
BIO_free(in);
|
||||
BIO_free(out);
|
||||
BIO_free(tbio);
|
||||
if (cms)
|
||||
CMS_ContentInfo_free(cms);
|
||||
|
||||
if (cacert)
|
||||
X509_free(cacert);
|
||||
|
||||
if (in)
|
||||
BIO_free(in);
|
||||
if (out)
|
||||
BIO_free(out);
|
||||
if (tbio)
|
||||
BIO_free(tbio);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user