cfb8: Fix decrypt path
[gd/nettle] / der2rsa.c
index 9d8b437ff137aed13b87106caf9485e5b61bd741..dab35232daf8f04a5430c2a22b2997782c6b03a6 100644 (file)
--- a/der2rsa.c
+++ b/der2rsa.c
@@ -1,34 +1,40 @@
 /* der2rsa.c
- *
- * Decoding of keys in PKCS#1 format.
- */
-
-/* nettle, low-level cryptographics library
- *
- * Copyright (C) 2005 Niels Möller
- *  
- * The nettle library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or (at your
- * option) any later version.
- * 
- * The nettle library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
- * License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public License
- * along with the nettle library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- * MA 02111-1307, USA.
- */
+
+   Decoding of keys in PKCS#1 format.
+
+   Copyright (C) 2005 Niels Möller
+
+   This file is part of GNU Nettle.
+
+   GNU Nettle is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at your
+       option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at your
+       option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Nettle is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see http://www.gnu.org/licenses/.
+*/
 
 #if HAVE_CONFIG_H
 # include "config.h"
 #endif
 
-#if WITH_PUBLIC_KEY
-
 #include "rsa.h"
 
 #include "bignum.h"
@@ -118,7 +124,7 @@ int
 rsa_keypair_from_der(struct rsa_public_key *pub,
                     struct rsa_private_key *priv,
                     unsigned limit, 
-                    unsigned length, const uint8_t *data)
+                    size_t length, const uint8_t *data)
 {
   struct asn1_der_iterator i;
   enum asn1_iterator_result res;
@@ -133,5 +139,3 @@ rsa_keypair_from_der(struct rsa_public_key *pub,
   else
     return rsa_public_key_from_der_iterator(pub, limit, &i);    
 }
-
-#endif /* WITH_PUBLIC_KEY */