diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/ssl_err2.c (renamed from src/lib/libcrypto/asn1/f.c) | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/src/lib/libcrypto/asn1/f.c b/src/lib/libssl/ssl_err2.c index 82bccdfd51..cd781d38aa 100644 --- a/src/lib/libcrypto/asn1/f.c +++ b/src/lib/libssl/ssl_err2.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* crypto/asn1/f.c */ | 1 | /* ssl/ssl_err2.c */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -55,26 +55,17 @@ | |||
| 55 | * copied and put under another distribution licence | 55 | * copied and put under another distribution licence |
| 56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
| 57 | */ | 57 | */ |
| 58 | |||
| 58 | #include <stdio.h> | 59 | #include <stdio.h> |
| 59 | #include <openssl/asn1.h> | ||
| 60 | #include <openssl/err.h> | 60 | #include <openssl/err.h> |
| 61 | #include <openssl/ssl.h> | ||
| 61 | 62 | ||
| 62 | main() | 63 | void |
| 63 | { | 64 | SSL_load_error_strings(void) |
| 64 | ASN1_TYPE *at; | 65 | { |
| 65 | char buf[512]; | 66 | #ifndef OPENSSL_NO_ERR |
| 66 | int n; | ||
| 67 | long l; | ||
| 68 | |||
| 69 | at=ASN1_TYPE_new(); | ||
| 70 | |||
| 71 | n=ASN1_TYPE_set_int_octetstring(at,98736,"01234567",8); | ||
| 72 | printf("%d\n",n); | ||
| 73 | n=ASN1_TYPE_get_int_octetstring(at,&l,buf,8); | ||
| 74 | buf[8]='\0'; | ||
| 75 | printf("%ld %d %d\n",l,n,buf[8]); | ||
| 76 | buf[8]='\0'; | ||
| 77 | printf("%s\n",buf); | ||
| 78 | ERR_load_crypto_strings(); | 67 | ERR_load_crypto_strings(); |
| 79 | ERR_print_errors_fp(stderr); | 68 | ERR_load_SSL_strings(); |
| 80 | } | 69 | #endif |
| 70 | } | ||
| 71 | |||
