comparison libtomcrypt/src/pk/asn1/der/printable_string/der_encode_printable_string.c @ 1471:6dba84798cd5

Update to libtomcrypt 1.18.1, merged with Dropbear changes
author Matt Johnston <matt@ucc.asn.au>
date Fri, 09 Feb 2018 21:44:05 +0800
parents f849a5ca2efc
children
comparison
equal deleted inserted replaced
1470:8bba51a55704 1471:6dba84798cd5
3 * LibTomCrypt is a library that provides various cryptographic 3 * LibTomCrypt is a library that provides various cryptographic
4 * algorithms in a highly modular and flexible manner. 4 * algorithms in a highly modular and flexible manner.
5 * 5 *
6 * The library is free for all purposes without any express 6 * The library is free for all purposes without any express
7 * guarantee it works. 7 * guarantee it works.
8 *
9 * Tom St Denis, [email protected], http://libtom.org
10 */ 8 */
11 #include "tomcrypt.h" 9 #include "tomcrypt.h"
12 10
13 /** 11 /**
14 @file der_encode_printable_string.c 12 @file der_encode_printable_string.c
35 LTC_ARGCHK(out != NULL); 33 LTC_ARGCHK(out != NULL);
36 LTC_ARGCHK(outlen != NULL); 34 LTC_ARGCHK(outlen != NULL);
37 35
38 /* get the size */ 36 /* get the size */
39 if ((err = der_length_printable_string(in, inlen, &len)) != CRYPT_OK) { 37 if ((err = der_length_printable_string(in, inlen, &len)) != CRYPT_OK) {
40 return err; 38 return err;
41 } 39 }
42 40
43 /* too big? */ 41 /* too big? */
44 if (len > *outlen) { 42 if (len > *outlen) {
45 *outlen = len; 43 *outlen = len;
78 return CRYPT_OK; 76 return CRYPT_OK;
79 } 77 }
80 78
81 #endif 79 #endif
82 80
83 /* $Source$ */ 81 /* ref: $Format:%D$ */
84 /* $Revision$ */ 82 /* git commit: $Format:%H$ */
85 /* $Date$ */ 83 /* commit time: $Format:%ai$ */